我们使用logback作为我们的日志记录。有这个Reentrant锁导致性能问题。知道为什么会这样吗?
这是一个调用跟踪,我们看到锁定高达9.5秒。请附上完整的跟踪。
FrameworkServlet.service:unknown (160ms self time, 36258 ms total time)
HttpServlet.service:621 (0ms self time, 36098 ms total time)
DispatcherServlet.doService:838 (0ms self time, 31639 ms total time)
DispatcherServlet.doDispatch:910 (0ms self time, 30835 ms total time)
Logger.log:788 (0ms self time, 9485 ms total time)
Logger.filterAndLog_0_Or3Plus:396 (0ms self time, 9485 ms total time)
Logger.buildLoggingEventAndAppend:442 (0ms self time, 9485 ms total time)
Logger.callAppenders:260 (0ms self time, 9485 ms total time)
Logger.appendLoopOnAppenders:273 (0ms self time, 9485 ms total time)
AppenderAttachableImpl.appendLoopOnAppenders:48 (0ms self time, 9485 ms total time)
UnsynchronizedAppenderBase.doAppend:88 (0ms self time, 9485 ms total time)
OutputStreamAppender.append:103 (0ms self time, 9485 ms total time)
OutputStreamAppender.subAppend:217 (0ms self time, 9485 ms total time)
ReentrantLock.lock:290 (9485ms self time, 9485 ms total time)
附图: