inevity / lusca-cache

Automatically exported from code.google.com/p/lusca-cache
0 stars 0 forks source link

increased CPU use with the logfile daemon w/ buffered_logs off #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Doing some random profiling with oprofile is showing that there's a lot of 
malloc/free time spent in 
the calloc->xcalloc->logfileNewBuffer() path.

This happens with buffered_logs off (default). With them on the CPU time isn't 
used.

investigate why!

Original issue reported on code.google.com by adrian.c...@gmail.com on 15 Sep 2009 at 8:06

GoogleCodeExporter commented 9 years ago
The problem is in logfile_mod_daemon.c:logfile_mod_daemon_lineend().

The write is queued immediately on line-end. This is why things are .. well, 
horrible.

The buffered logs option is already thrown at the daemon itself; that should be 
enough. There's a per-second event to tickle the write queue if it hasn't yet 
been 
written and that should be enough.

So, what to do next..

Original comment by adrian.c...@gmail.com on 14 Feb 2010 at 9:00

GoogleCodeExporter commented 9 years ago
fixed in r14409.

Original comment by adrian.c...@gmail.com on 14 Feb 2010 at 9:24