[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: slapd perf



For anyone curious, here's the top 30 functions from a current profile,
again executing test008-concurrency in the test suite.

This list is sorted by local time, i.e., the amount of time spent in
a single function, as opposed to total time (the time spent in the
function and every function it called).

|      local      |      total      |          |           |
|      sec. |  %  |      sec. |  %  | calls    |t. sec/call| name
|-----------|-----|-----------|-----|----------|-----------|--------
|  73.984180| 46.9|  73.984195| 46.9|         1|  73.984195| ldap_pvt_thread_join
|  37.326988| 23.7|  73.983966| 46.9|         1|  73.983966| slapd_daemon_task
|   4.316665|  2.7|   4.640310|  2.9|    220556|   0.000021| ber_memfree
|   3.962184|  2.5|  32.589156| 20.7|    185541|   0.000176| ldap_pvt_thread_mutex_unlock
|   3.514288|  2.2|   3.683313|  2.3|    167152|   0.000022| ber_memalloc
|   1.768955|  1.1|   2.419034|  1.5|      7647|   0.000316| sb_stream_write
|   1.574920|  1.0|   1.665407|  1.1|       150|   0.011103| ldbm_delete
|   1.516388|  1.0|   2.263155|  1.4|     46012|   0.000049| ldap_pvt_thread_yield
|   1.351148|  0.9|   2.694682|  1.7|     96008|   0.000028| avl_find
|   1.217064|  0.8|   1.217064|  0.8|     51729|   0.000024| ber_memcalloc
|   1.055105|  0.7|   1.801449|  1.1|      3916|   0.000460| ldap_pvt_thread_cond_wait
|   0.847731|  0.5|   5.306683|  3.4|      7821|   0.000679| cache_find_entry_id
|   0.636504|  0.4|   3.466818|  2.2|    126234|   0.000027| ch_free
|   0.533834|  0.3|   1.601113|  1.0|      9826|   0.000163| ldbm_fetch
|   0.525784|  0.3|   2.775285|  1.8|    185534|   0.000015| ldap_pvt_thread_mutex_lock
|   0.487856|  0.3|   0.636712|  0.4|     61781|   0.000010| ber_get_tag
|   0.445121|  0.3|   1.213043|  0.8|     61781|   0.000020| ber_skip_tag
|   0.437038|  0.3|   0.594115|  0.4|      7169|   0.000083| ldap_pvt_thread_cond_signal
|   0.397338|  0.3|   0.397338|  0.3|    177738|   0.000002| attr_index_name_cmp
|   0.369332|  0.2|   2.221570|  1.4|     24714|   0.000090| ber_scanf
|   0.366752|  0.2|   0.374804|  0.2|    159202|   0.000002| ber_read
|   0.350711|  0.2|   2.771815|  1.8|      7796|   0.000356| LDAPDN_rewrite
|   0.342209|  0.2|   0.601317|  0.4|     35876|   0.000017| ldap_pvt_thread_rdwr_rtrylock
|   0.332193|  0.2|   0.332193|  0.2|     15841|   0.000021| UTF8normalize
|   0.331353|  0.2|   6.640760|  4.2|      3774|   0.001760| send_search_entry
|   0.330163|  0.2|  27.780986| 17.6|      3756|   0.007396| do_search
|   0.328593|  0.2|   0.606574|  0.4|     65000|   0.000009| ucisprop
|   0.326687|  0.2|   0.475749|  0.3|     72290|   0.000007| is_ad_subtype
|   0.322092|  0.2|   0.576919|  0.4|      2500|   0.000231| uccanondecomp
|   0.321424|  0.2|   0.675140|  0.4|     13791|   0.000049| ldap_avafree

Here's a profile for the same data on release 2.0.19. Note the huge
difference in time spent in ber_memfree/ber_memalloc and such. At
this point, I don't have many ideas left for where to find dramatic
improvements. Anything else is going to be tiny, incremental work
and certainly a case of diminishing returns...

|      local      |      total      |          |           |
|      sec. |  %  |      sec. |  %  | calls    |t. sec/call| name
|-----------|-----|-----------|-----|----------|-----------|--------
| 100.282820| 46.8| 100.282848| 46.8|         1| 100.282848| ldap_pvt_thread_join
|  44.554837| 20.8| 100.282666| 46.8|         1| 100.282666| slapd_daemon_task
|   9.842536|  4.6|  10.810876|  5.0|    535522|   0.000020| ber_memfree
|   8.968107|  4.2|   9.336912|  4.4|    432198|   0.000022| ber_memalloc
|   4.327615|  2.0|  50.917474| 23.7|    195445|   0.000261| ldap_pvt_thread_mutex_unlock
|   3.803511|  1.8|   3.950266|  1.8|       150|   0.026335| ldbm_delete
|   2.468017|  1.2|   4.460891|  2.1|      7647|   0.000583| sb_stream_write
|   2.334197|  1.1|   4.652615|  2.2|     39464|   0.000118| ldap_pvt_thread_yield
|   2.201196|  1.0|   4.472302|  2.1|    127889|   0.000035| avl_find
|   1.674392|  0.8|   8.719923|  4.1|    347992|   0.000025| ch_free
|   1.451509|  0.7|   1.582023|  0.7|     63694|   0.000025| ber_memcalloc
|   1.230248|  0.6|  20.057238|  9.4|     59777|   0.000336| slap_bv2ad
|   1.185764|  0.6|   8.730832|  4.1|     59791|   0.000146| str2charray
|   1.062244|  0.5|   5.918145|  2.8|    209316|   0.000028| ch_malloc
|   0.987820|  0.5|   1.006014|  0.5|    456664|   0.000002| attr_index_name_cmp
|   0.839827|  0.4|   4.235526|  2.0|    147741|   0.000029| ber_strdup
|   0.814806|  0.4|   0.991046|  0.5|      8298|   0.000119| ldap_pvt_thread_cond_signal
|   0.661902|  0.3|   4.715371|  2.2|    140922|   0.000033| ch_strdup
|   0.652394|  0.3|  12.550008|  5.9|      7771|   0.001615| cache_find_entry_id
|   0.642994|  0.3|   0.665543|  0.3|    304807|   0.000002| lutil_debug
|   0.546234|  0.3|   3.735024|  1.7|     64851|   0.000058| ber_bvfree
|   0.536914|  0.3|   5.315650|  2.5|    195438|   0.000027| ldap_pvt_thread_mutex_lock
|   0.518997|  0.2|   3.092202|  1.4|     10828|   0.000286| ldbm_fetch
|   0.485264|  0.2|   4.107914|  1.9|     63641|   0.000065| charray_free
|   0.483110|  0.2|   1.089518|  0.5|     67848|   0.000016| ber_skip_tag
|   0.438563|  0.2|   0.964696|  0.4|     10202|   0.000095| lutil_MD5Transform
|   0.437785|  0.2|   4.502870|  2.1|     43330|   0.000104| ad_free
|   0.425643|  0.2|  21.896853| 10.2|     38750|   0.000565| ad_inlist
|   0.405735|  0.2|   0.542600|  0.3|     29796|   0.000018| ldap_pvt_thread_rdwr_rtrylock
|   0.385292|  0.2|   0.387481|  0.2|    175079|   0.000002| ber_read

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc  
  Symas: Premier OpenSource Development and Support