Bug 106 - slow zonec performance on Sparc
slow zonec performance on Sparc
Status: RESOLVED FIXED
Product: NSD
Classification: Unclassified
Component: Zonec Code
2.3.x
All other
: P2 normal
Assigned To: NSD team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-29 11:28 CEST by Miek Gieben
Modified: 2005-10-11 10:49 CEST (History)
2 users (show)

See Also:


Attachments
full profile (63.33 KB, text/plain)
2005-09-29 12:25 CEST, Miek Gieben
Details
a preliminary patch (2.48 KB, patch)
2005-09-29 15:58 CEST, Miek Gieben
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miek Gieben 2005-09-29 11:28:56 CEST
When compiling a dnssec zone, zonec is extremely slow.

Below is the top of a gprof trace:

it is in the nsec parsing where most time is wasted.

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls   s/call   s/call  name
 48.69    449.98   449.98                             internal_mcount
 16.28    600.41   150.43   343018     0.00     0.00  zparser_conv_nsec
  8.11    675.35    74.93 26749245     0.00     0.00  yylex
  4.30    715.12    39.77        1    39.77   460.19  yyparse
  3.06    743.38    28.27  5812793     0.00     0.00  rrtype_descriptor_by_name
  2.01    761.95    18.56 55909038     0.00     0.00  dname_compare
  1.80    778.61    16.66 102818154     0.00     0.00  label_compare
  1.71    794.37    15.76   343053     0.00     0.00  b64_pton
  1.38    807.12    12.76 205269205     0.00     0.00  dname_label
  1.20    818.20    11.08 15545512     0.00     0.00  zoctet
  1.20    829.26    11.06 216452756     0.00     0.00  dname_name
  1.09    839.34    10.07 236290767     0.00     0.00  label_length
  0.99    848.45     9.11  1832874     0.00     0.00  rbtree_find_less_equal
  0.74    855.31     6.87 211786022     0.00     0.00  dname_label_offsets
  0.71    861.86     6.55 205636308     0.00     0.00  label_data
  0.70    868.30     6.44                             moncontrol
  0.66    874.39     6.09  6516817     0.00     0.00  dname_make
  0.66    880.45     6.06 28060859     0.00     0.00  region_alloc
  0.39    884.09     3.65 15545512     0.00     0.00  parse_token
  0.26    886.48     2.39  1480222     0.00     0.00  process_rr
Comment 1 Miek Gieben 2005-09-29 12:25:06 CEST
Created attachment 25 [details]
full profile
Comment 2 Miek Gieben 2005-09-29 15:58:31 CEST
Created attachment 26 [details]
a preliminary patch

This is some rough code to only check the windows that need to 
be checked when generating nsecs.
Comment 3 Miek Gieben 2005-10-11 10:49:21 CEST
In addition to the NSEC patch (better version in subversion). This turned out to 
be a case of: "Set your compiler flags correctly". When compiled with -O2 zonec
was another 50% faster. So total compile time went down from 30 minutes to about
7 minutes.