You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Rondeau, Tim (Mission Systems)" <Ti...@ngc.com> on 2006/04/17 14:17:24 UTC
Performance & Caching
Hi All,
New to log4j and I am researching information to decide if we should use or not.
Looking for information on Performance, Caching and Memory Use?
How is the performance? Everything I have seen says fast, but really looking to measure that time? So if I have 100 records say, how long with that take? 200 records how long will that take? etc..
Can caching be used for log4j?
Can you write to memory?
If anyone has information or can point me into the write direction that would be great.
Thanks for any info,
Tim
Re: Performance & Caching
Posted by Curt Arnold <ca...@apache.org>.
On Apr 17, 2006, at 7:17 AM, Rondeau, Tim (Mission Systems) wrote:
>
> Hi All,
>
> New to log4j and I am researching information to decide if we
> should use or not.
>
> Looking for information on Performance, Caching and Memory Use?
>
> How is the performance? Everything I have seen says fast, but
> really looking to measure that time? So if I have 100 records
> say, how long with that take? 200 records how long will that
> take? etc..
>
> Can caching be used for log4j?
>
> Can you write to memory?
>
> If anyone has information or can point me into the write direction
> that would be great.
>
> Thanks for any info,
>
> Tim
log4j attempts to make discarded log requests (that is log requests
where the repository is disabled or the threshold is higher than the
log request) approach the cost of a no-op. It should get it to about
the cost of an integer comparison or two. The idea is that when you
disable logging or raise the threshold to warn or similar, the
application runs as close to the same speed as an application with no
logging calls at all.
Performance when requests are not discarded will vary by the nature
of the appender, the layout and underlying performance of the platform.
There is a VectorAppender in the unit tests where the LoggingEvent is
capture in a java.util.Vector which would be a "write to memory".
However, the usefulness of the appender in an actual application is
minimal. Almost exclusively, you would want non-discarded logging
requests to go to some type of persistent storage (file, database) or
at least external to the application (SMTP, Socket, etc).
The AsyncAppender can be used to provide a cache around any arbitrary
appender. The log4j 1.2 AsyncAppender does have some deadlocking
issues that should be resolved in the SVN HEAD (See http://
issues.apache.org/bugzilla/show_bug.cgi?id=38982, http://
issues.apache.org/bugzilla/show_bug.cgi?id=38137).
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Performance & Caching
Posted by James Stauffer <st...@gmail.com>.
The bottom of http://logging.apache.org/log4j/docs/manual.html has
performance info.
How would caching be used with log4j? Write caching could be bad
because if the application dies you want to see what was happening
right before it died.
You could easily write an appender that wrote to memory.
On 4/17/06, Rondeau, Tim (Mission Systems) <Ti...@ngc.com> wrote:
>
> Hi All,
>
> New to log4j and I am researching information to decide if we should use or not.
>
> Looking for information on Performance, Caching and Memory Use?
>
> How is the performance? Everything I have seen says fast, but really looking to measure that time? So if I have 100 records say, how long with that take? 200 records how long will that take? etc..
>
> Can caching be used for log4j?
>
> Can you write to memory?
>
> If anyone has information or can point me into the write direction that would be great.
>
> Thanks for any info,
>
> Tim
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org