log4j performance problems to the console-console-input-c non-blocking log4j performance problems to the console

log4j output to the console of performance problems

 We found that business ConsoleAppender thread when using the print log, need to monitor the synchronization acquiring lock OutputStreamManager object and then synchronous call PrintStream.write () → BufferedOutputStream.write () → FileOutputStream.write (), then flush (), and so write after the success of the Console, will release the lock, but the lock needs to acquire other businesses during this period can only be blocked threads wait.

 

https://kb.kutu66.com/others/post_13626538

https://stackoverflow.com/questions/6171132/non-blocking-console-input-c

 

Guess you like

Origin www.cnblogs.com/yuanjiangw/p/12098482.html