[ 
https://issues.apache.org/jira/browse/LOG4NET-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680736#action_12680736
 ] 

Eric Tuttleman commented on LOG4NET-195:
----------------------------------------

Interesting question Ashish.

After thinking about it, I'm trying to figure out if it would actually be 
faster in a real-world environment.  I agree with the idea of trying to 
simulate real-world by logging bunches of data in a loop, but I have a problem 
with the assumption that your application would have only a single thread 
keeping it busy.

I understand things will run faster if you have hyper-threading / multi-core 
machine and don't have a whole lot of threads vying for attention, because the 
operations involved will be done in parallel.  It's important to note though, 
that the process in total will take more time overall as there's more 
instructions.  It's more computationally expensive to manage threads, context 
switches, locking etc, than it is to do it in a single thread.  So if you 
measured this in CPU cycles, it would by longer, not shorter.  With that in 
mind I wonder on a busy webserver (usually pretty high thread contention), 
would this methodology actually be slower as more of the time is spent on 
context switching?

 If the machine / vm listened to the lower-priority hint on the thread, it 
could also make logged messages more prone to loss if an application crash 
happens.  Might not matter in some situations, but I've seen people using 
log4net to log traces that they may feel is import to have later.

What do you guys think?




> Log4Net Performance comparison with other logging utility
> ---------------------------------------------------------
>
>                 Key: LOG4NET-195
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-195
>             Project: Log4net
>          Issue Type: Test
>    Affects Versions: 1.2.10
>         Environment: .Net Framework 2.0, VS 2005, Windows XP
>            Reporter: Ashish Khandelwal
>            Priority: Critical
>         Attachments: Log4Net_Vs_nSpring.zip
>
>
> I developed one utility to compare the performance between Log4Net and 
> nSpring(another logging utility). The result I saw is surprise to me - 
> Log4Net took more time than nSpring. It is surprise because "Log4net claims 
> to be fast and flexible: speed first, flexibility second."
> Log4Net says: 
> (http://logging.apache.org/log4net/release/manual/internals.html)
> One of the often-cited arguments against logging is its computational cost. 
> This is a legitimate concern as even moderately sized applications can 
> generate thousands of log requests. Much effort was spent measuring and 
> tweaking logging performance. Log4net claims to be fast and flexible: speed 
> first, flexibility second.
> Although test is saying Log4Net takes more time, I am still not convinced 
> with the result achieved, considering the fact; Log4Net is widely accepted by 
> the industry and known for its speed, reliability and flexibility.
> I would like to know why Log4Net is taking more time, we might be missing any 
> setting or other which can boost the performance. Can you please help to know 
> the reason?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to