Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Disabling (part of the) timers ?

1 view
Skip to first unread message

Russ Allbery

unread,
Jun 6, 2005, 11:44:38 PM6/6/05
to
Christiaan den Besten <ch...@prolocation.net> writes:

> Is it in anyway possible to disable (as much as possible) the 'timers'
> used in numerous places of inn and nnrpd. For a test I disabled the
> (nnrp write)timer in nnrpd and let the other one (used to check for
> Client time-out) run once every 100 iterations. It felt like the nnrpd
> (1000 instances running on the server) used way less CPU.

Yes, you can disable the timers in innd by just setting timer to 0 in
inn.conf. This should affect nnrpd as well but it currently doesn't; I'll
fix that in Subversion.

> Just stracing the inn process shows me numerous gettimeofday's ... are
> all of the necessary?, or am I mistaking in the overhead of CPU power
> required for doing this systemcall?

gettimeofday is the fastest possible syscall, and is usually implemented
in as quick of a method as is available on the architecture. Disabling
the timers also won't eliminate this; a lot of them are coming from
select() rather than the timers. gettimeofday is about as close to free
as syscalls get.

> ( when our server is -realy- busy, we have disk I/O left, but 0% CPU
> from the Dual Xeon 2.8 cpu's ... )

That's fairly unusual for INN, and I'd be interested in the information
that the timer code would give you before you turned it off. :) INN
really doesn't use CPU power except in the filtering code.

--
Russ Allbery (r...@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.

Russ Allbery

unread,
Jun 7, 2005, 2:56:39 PM6/7/05
to
(Please reply to the mailing list rather than to me individually.
Thanks!)

Christiaan den Besten <ch...@prolocation.net> writes:

> The first time I 'notices' the 'timers' were using more CPU than
> estimated was when Heith patched (as a request) the ovdb_server with the
> same 'timers' to see where it was spending its time. The server could
> barely serve more than 350mbit of feed (towards clients). After removing
> the timers again, we had no problem reaching 450mbit. So I decided to
> remove the timer from nnrpd and decrease the client-timeout check a
> factor (i++; if i>100 (now = time (); check possible timeout value;
> i=0)) etc... This did seem to decrease the CPU load.

> But you think we should have less overhead from all these 'gettimeofday'
> syscalls. nnrpd does a gettimeofday after each read/write sequence by
> default ... With 1000+ nnrpd's running probably makes some sence ?

It really shouldn't make a difference. If it is making a difference,
that's really a problem with your OS, I think, although some OSes
admittedly do have slow system calls. Tons of stuff uses gettimeofday.

That being said, I did incorporate a patch into STABLE and CURRENT that
would let you turn off the timer for nnrpd as well in inn.conf.

> PS: Are the patches for CNFS_BLOCKSIZE integrated into 2.4-STABLE or
> 2.4-CURRENT ? (or both or none ?).

If you're talking about the patch that zero-fills writes to CNFS_BLOCKSIZE
boundaries, it's in both STABLE and CURRENT.

0 new messages