Ramesh Venkatraman wrote:

> Craig,
>  Thanks again for the response.
>
>  My understanding from ur reply,
>  As I am using the log() function provided by the API, the effect could
> perhaps relate to the way JRUN implements the logging on a Windows NT
> machine. Jrun , I notice, usually writes logging into a "event.log" ascii
> file.
>
>  I am not doing too much of logging, my concern is due to the number of hits
> on the servlet itself.
>

If the servlet engine is coded at all reasonably (and I'm pretty sure that JRun
is, given the size of some of the sites that run on it), you should not have a
problem.  Somewhere deep down inside there is enough locking to ensure that the
log messages from the various threads do not scribble on each other.  But, this
only matters if you actually do any logging.  If a particular hit on your
servlet generates no log messages, your thread will never be impacted by such a
lock -- which is why I said it basically doesn't matter how logging is
implemented.

If you need to log lots of stuff on every hit, that's a different story ... but
I would suggest first rethinking the need for all that logging, then run a test
to see if it makes any difference at all (example:  run a benchmark of your app
the way it is, then run another test of the same requests to the same servlets
with all the log() calls commented out).  If it is a big deal, and you really do
need all the log messages, then and only then consider alternative solutions
(such as queuing messages to a background thread) which might be what JRun is
doing already -- that's the way Apache JServ logs, for example.

>
> Cheers
> Ramesh.V
>

Craig McClanahan

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to