Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Could someone with experience provide some guidance as to the use of Log4perl w.r.t. Apache2 (and mod_perl, of course)? The basics are pretty obvious, and I know my way around the 3 technologies pretty well, but there are some performance related details I don't have experience with.

For example, I don't understand the performance impacts of (log4perl) logging in a high traffic web application. The idea of each of 32-64 Apache child processes contending for a lock (e.g. syswrite or semaphore via Log::Log4perl::Appender::Synchronized) and then writing to the disk seems to be an issue, I'm just not sure how big an issue it is. Should logging be minimal and then made verbose when one needs to interrogate? Or do people just run at full detail (who cares, no impact)? Some experience would provide illumination as to how important this is. Also knowing simple details like which appender to use based on experience, would be helpful (e.g. File + newsyslog, versus FileRotate).

Also interestingly, the informative Log4perl FAQ by messr. Mike Schilli mentions 30K ops/sec by an "in-memory" appender, which sounds high for something writing to disk. Call me a tad skeptical on this claim (perhaps it is a measurement of the library's efficiency sans disk writing). Mike also mentions newsyslog, an external program to do the log rolling, rather than using FileRotate, I'm guessing to parallelize and possibly do things like compression (again, I lack experience here, so this is just a guess).

I'd appreciate very much any responses from people with real world experience of what works well and what doesn't to help make the right choices for a scalable, maintainable, production system.


In reply to Apache and log4perl (high performance logging?) by zerohero

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2024-04-25 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found