JVisualVM might be helpful in identifying the problem.
Have a look from the jmx-console at the MBean org.jboss.system.server.ServerInfo of the jboss.system domain.
It has a method listThreadCpuUtilization which might help you to find out the bottleneck.
Thank you Francesco, but listThreadCpuUtilization shows the time each thread id consumed from cpu cumulatively.
How can this be helpful ?
Thank you Jithu,
I will have a look at JVisualVM, I wonder if it will show me CPU being used thread by thread.
The information dumped by listThreadCpuUtilization needs to be merged with the Thread Stack Trace. In other words you discover first which Thread is consuming more time and then see what is doing the Thread, through its stack trace.
I mean listThreadCpuUtilization displays a thread id's total time, each time a thread with that id works the time is added to the total time.
The thread(id) that took the most time may not even be active currently, and getting a stack trace is possible for only active threads, am I wrong ?
Even that thread id is active currently, the stacktrace for the thread id will only show me what it is doing at that time, probably a normal operation ?