[Twisted-Python] Seeking advice: Coping with heavy log file loads

2010-04-09 Thread Paul Goins
There may not be a clear answer to this problem, and the answer may or may not be Twisted-specific. I'm just trying to fish for ideas here. The server I'm working on suffers from extremely high CPU time spent in the logging functions. I'm spending between 30 and 40% of all CPU time just in

Re: [Twisted-Python] Seeking advice: Coping with heavy log file loads

2010-04-09 Thread Tim Allen
On Fri, Apr 09, 2010 at 05:35:51PM +0900, Paul Goins wrote: We use DailyLogFiles for file rotation along with the PythonLoggingObserver to allow for logLevel support. (Of course, this gives us significant overhead from Python's complex logging architecture; maybe we should drop this...) I

Re: [Twisted-Python] Seeking advice: Coping with heavy log file loads

2010-04-09 Thread Itamar Turner-Trauring
On Fri, 2010-04-09 at 11:49 +0200, Kees Bos wrote: I think you could try to use a custom light weight log function that just queues the log messages (FIFO) and bursts them, say every second, to the log file (e.g. in a thread to use a multicore cpu). Or: 0. Profile logging system - what

Re: [Twisted-Python] Seeking advice: Coping with heavy log file loads

2010-04-09 Thread Kees Bos
On Fri, 2010-04-09 at 15:23 +0200, Itamar Turner-Trauring wrote: On Fri, 2010-04-09 at 11:49 +0200, Kees Bos wrote: I think you could try to use a custom light weight log function that just queues the log messages (FIFO) and bursts them, say every second, to the log file (e.g. in a thread

Re: [Twisted-Python] Seeking advice: Coping with heavy log file loads

2010-04-09 Thread Marc Byrd
Definitely use syslog. To see how much logging is costing you without changing code, you can simply route to /dev/null via syslog. Btw, w/ local logging, you may not see it in the cpu usage - more likely in the i/o wait. In my experience, logging to a remote syslog-ng server over udp has very