[syslog-ng] Profiling syslog-ng

Balazs Scheidler bazsi at balabit.hu
Tue Mar 14 00:34:54 CET 2006


On Mon, 2006-03-13 at 14:33 -0500, John Morrissey wrote:
> On Thu, Feb 16, 2006 at 09:56:30AM +0100, Balazs Scheidler wrote:
> > On Wed, 2006-02-15 at 14:28 -0500, John Morrissey wrote:
> > > FWIW, I modified syslog-ng 1.6.9 to usleep(10000) at the end of the
> > > io_iter() loop in src/main.c. This dropped CPU consumption by about fourfold
> > > - instead of spinning in that io_iter() loop, reading one or two messages
> > > per poll(), it's now reading several (3-15) messages per poll().
> > 
> > The idea is cool, although I have to admit it is really a hack :)
> > 
> > This might be useful to others as well. I will probably add it as a
> > global option. Thanks for tracking this down.

> [1] http://horde.net/~jwm/software/misc/10_configurable_sleep.diff

I have integrated this into my CVS tree with the change to use 1000000
as multiplier instead of 1000.

Tomorrow's snapshot should contain the change.

-- 
Bazsi



More information about the syslog-ng mailing list