简体   繁体   中英

Why is dequeue() taking so much processor time?

Visual VM shows FifoMessageDispatchChannel.dequeue() taking a lot of time. The Tomcat process is using around 100% of a processor core.

dequeue()最大时间消耗者

The most probable cause is that you are calling a consumer receive method with a very short wait but it is impossible to tell without more information. The dispatch channel simply checks a queue for data and if none present will block for a given timeout waiting for a signal to wake and check again or time out and return.

dequeue() is not taking much processor time as that other guy said . This answer to another question explains Self Time includes time spent doing things other than processing, such as waiting.

Self and Total Time (CPU) include time in the method using the processor and they are 0 for dequeue(). To find methods using the processor most, sort by Self Time (CPU), as Bedla indicated .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM