0

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

dequeue() largest time consumer

brendan
  • 384
  • 3
  • 10
  • 1
    Your screenshot seems to say that `dequeue` uses zero processor time. – that other guy Sep 10 '19 at 20:18
  • If you have problems with high CPU load, then you are suspecting wrong method. This thread is just waiting for messages in state `TIMED_WAITING` and consumes zero CPU time. To find real cause you need to sort records in VisualVM by CPU time. – Bedla Sep 10 '19 at 20:50
  • Thanks Other Guy, Bedla – brendan Sep 10 '19 at 21:07
  • Other Guy or Bedla, can you say that in an answer with a reference that explains self time CPU? – brendan Sep 10 '19 at 21:54

2 Answers2

0

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.

Tim Bish
  • 17,475
  • 4
  • 32
  • 42
  • Thanks very much, Tim. I'll see can I find something like that but I'm not sure what method to look for calls to. I don't know whether the method that's called is in Active MQ, Camel or something else. – brendan Sep 10 '19 at 20:47
0

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.

brendan
  • 384
  • 3
  • 10