time spent writing history..

Alex Kiernan alexk at demon.net
Tue Jan 30 09:16:49 UTC 2001


Fabien Tassin <fta at sofaraway.org> writes:

> According to Alex Kiernan:
> > The patch looks like its just what I need to help me answer that!
> 
> If you try it, please, show me your reports.

bash-2.03$ perl ~news/src/stats.pl /tmp/stathist.log 
Function            Invoked       Total(s)    Min(ms)    Avg(ms)    Max(ms)

HISfilesfor             834       1.933757      0.146      2.319    201.768
HIShavearticle        16057      56.298177      0.273      3.506   1724.164
  HIScacheadd         15111       1.510993      0.084      0.100      3.595
  HIScachelookup      16057       1.649463      0.085      0.103     11.638
  HISlogstats            15       0.010777      0.600      0.718      0.931
HISremember             130       0.193989      0.346      1.492      2.487
  HIScacheadd           130       0.012798      0.089      0.098      0.408
  HISsync                18       0.003849      0.182      0.214      0.240
HISsync                   6       0.001275      0.191      0.212      0.231
HISwrite              14745      49.664075      0.339      3.368    571.275
  HIScacheadd         14745       1.479103      0.087      0.100      4.878
  HISsync              1466       0.337298      0.172      0.230      1.021

Whilst I was about it I profiled the code, the HIShavearticle code is
dominated by the memcpy inside search (48s of wall clock time), the
other 8s is mostly overhead from the logging(!).

HISwrite's time is all in pwrite (42s), again the rest is mostly in
the logging.

I'm tempted to haul the history code out of innd along the lines of
Russ' proposed API and replace it with a locked in core implementation
since thats all I need for now.

-- 
Alex Kiernan, Principal Engineer, Development, Thus PLC


More information about the inn-workers mailing list