I need your help!!! Please help me ,thanks.
2010-12-13 刘东 发件人: 刘东 发送时间: 2010-12-11 01:52:03 收件人: Log4J Users List 抄送: 主题: Re: Re: performance problem in multithread environment hi, through jprofiler I found that many thread are blocked at logger.info(message).I saw that each logger.info() call will cost 2,200 us,the application are running at a machine which has one phyical cpu(64 virtual cpu),1.5Ghz,32G memory,solaris 10. If I comment all logger message(means no logging message),the application performance will be faster more than ten times. If I crate new logger instance for each log message,the application performance will be faster more than four times. Could tell me the difference between category and logger. Api shows that logger extends category,logger.info() just is category.info()。 The code show that synchronization is by category,but code category = this,shows that at this time category just is logger. BTW: In my application,when process one order,it will log about 700 messages. With log,application will process three orders one second,But without log,application will process 40 orders one second. Is there any mistakes by using log4j?need more config? thanks. 2010-12-11 刘东 发件人: Sebastien Tardif 发送时间: 2010-12-11 01:10:40 收件人: log4j-user 抄送: 主题: Re: performance problem in multithread environment The code show that synchronization is by category. If appendLoopOnAppenders is faster, like if the underline code use asynchronous appender, that should not be a problem. So you should investigate what the thread having the lock is doing. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org