#49012 Remove unused counters
Closed: wontfix None Opened 4 years ago by firstyear.

We don't use the counters in ch_malloc. Even if DEBUG builds this attempts an undef DEBUG.

As well, it goes through some extra if conditions, and checks.

Cleaning this up, yielded the following:

/opt/dirsrv/bin/ldclt -h localhost -p 389 -n 30 -N 10 -D "uid=testXXXX,dc=example,dc=com" -w passwordXXXX -e "randombinddn,randombinddnlow=0001,randombinddnhigh=9999" -e bindonly,bindeach

With counters:

ldclt[4213]: Starting at Wed Oct 19 15:17:47 2016

ldclt[4213]: Average rate:  190.57/thr  ( 571.70/sec), total:   5717
ldclt[4213]: Average rate:  275.83/thr  ( 827.50/sec), total:   8275
ldclt[4213]: Average rate:  477.10/thr  (1431.30/sec), total:  14313
ldclt[4213]: Average rate:  211.73/thr  ( 635.20/sec), total:   6352
ldclt[4213]: Average rate:  138.33/thr  ( 415.00/sec), total:   4150
ldclt[4213]: Number of samples achieved. Bye-bye...
ldclt[4213]: All threads are dead - exit.
ldclt[4213]: Global average rate: 1293.57/thr  (776.14/sec), total:  38807
ldclt[4213]: Global number times "no activity" reports: never
ldclt[4213]: Global no error occurs during this session.
ldclt[4213]: Ending at Wed Oct 19 15:18:37 2016
ldclt[4213]: Exit status 0 - No problem during execution.


Without counters:

ldclt[2070]: Starting at Wed Oct 19 15:22:41 2016

ldclt[2070]: Average rate:  442.53/thr  (1327.60/sec), total:  13276
ldclt[2070]: Average rate:  255.10/thr  ( 765.30/sec), total:   7653
ldclt[2070]: Average rate:  478.17/thr  (1434.50/sec), total:  14345
ldclt[2070]: Average rate:  137.53/thr  ( 412.60/sec), total:   4126
ldclt[2070]: Average rate:  134.83/thr  ( 404.50/sec), total:   4045
ldclt[2070]: Number of samples achieved. Bye-bye...
ldclt[2070]: All threads are dead - exit.
ldclt[2070]: Global average rate: 1448.17/thr  (868.90/sec), total:  43445
ldclt[2070]: Global number times "no activity" reports: never
ldclt[2070]: Global no error occurs during this session.
ldclt[2070]: Ending at Wed Oct 19 15:23:31 2016
ldclt[2070]: Exit status 0 - No problem during execution.


~10% improvement.

In slapi_ch_free() I think you still need to check if ptr == NULL, because you could deference it when doing free(*ptr)

You're right, I put that check back.

commit 9a83b3a
Writing objects: 100% (6/6), 1.02 KiB | 0 bytes/s, done.
Total 6 (delta 4), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
3151648..9a83b3a master -> master

Metadata Update from @firstyear:
- Issue assigned to firstyear
- Issue set to the milestone: 0.0 NEEDS_TRIAGE

4 years ago

Metadata Update from @vashirov:
- Issue set to the milestone: None (was: 0.0 NEEDS_TRIAGE)

a year ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/2071

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

8 months ago

Login to comment on this ticket.

Metadata