Profiling nnrpd

Russ Allbery rra at stanford.edu
Fri Nov 29 07:25:44 UTC 2002


Jeffrey M Vinocur <jeff at litech.org> writes:

> I ran nnrpd directly (i.e., input from stdin), did a LIST and then a
> bunch of GROUP and XOVER 1- for the first half-dozen high-traffic groups
> that came to mind.  I'm finding the flat profile part of gprof most
> useful (since the control flow is generally pretty clear, the analysis
> of how many times something was executed isn't too interesting, but
> you're welcome to it if you want it):

> Flat profile:
> Each sample counts as 0.01 seconds.
>   %   cumulative   self              self     total
>  time   seconds   seconds    calls  us/call  us/call  name
>  82.35      0.14     0.14    90023     1.56     1.56  tdx_search
>  11.76      0.16     0.02        7  2857.14 24285.71  CMDxover
>   5.88      0.17     0.01    90023     0.11     1.67  tradindexed_search
>   0.00      0.17     0.00    90023     0.00     1.67  OVsearch
>   0.00      0.17     0.00    90023     0.00     0.00  SendIOv
>   0.00      0.17     0.00     8594     0.00     0.00  uwildmat
> [...]

That looks about like what I'd expect; all of the time is spent in the
routine that actually pulls the data off of disk.  For the original
problem, I think the next step would be to do XOVER 1- on a large group
and then do XOVER in 20 article chunks for the same group and see how the
profile changes.

(CMDxover seems to be using up a lot of time inside itself.)

>   %   cumulative   self              self     total
>  time   seconds   seconds    calls  Ts/call  Ts/call  name
>  38.24      0.07     0.07                             tdx_search (tdx-data.c:413 @ 80a5270)
>  14.71      0.09     0.03                             tdx_search (tdx-data.c:441 @ 80a53e6)
>  14.71      0.12     0.03                             tdx_search (tdx-data.c:442 @ 80a53fa)
>   5.88      0.12     0.01                             CMDxover (article.c:978 @ 806512c)
>   5.88      0.14     0.01                             CMDxover (article.c:983 @ 80651a8)

So most of the time is consumed looking at index entries and seeing if
they correspond to real entries.  Is this a group with a lot of holes?

The last CMDxover call there is, I think, the results of nnrpdcheckart.
I'm not sure what the first one is.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list