Project

General

Profile

PriorityQueueRelaxed.take() taking maximum time in profiling results

Nauman Bashir
Added over 4 years ago

Hi,

We recently profiled tigase server using only the presence packets. We used a simple java program to generate load for test using smack API.

We noticed that PriorityQueueRelaxed.take() method is taking maximum time. Should this method be appearing on top of profiling results ?

What can we do to improve its performance ?

Thanks.


Replies (2)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

Nauman Bashir wrote:

Hi,

We recently profiled tigase server using only the presence packets. We used a simple java program to generate load for test using smack API.

We noticed that PriorityQueueRelaxed.take() method is taking maximum time. Should this method be appearing on top of profiling results ?

It's blocking method, so it is normal that processing time is long, as thread waits on the method if there is no data available. It follows JDK API contract from BlockingQueue

Instead of looking for longest processing time you should look for code which consumes most CPU power.

What can we do to improve its performance ?

Why do you think performance of this method is not good enough?

Added by Nauman Bashir over 4 years ago

Thanks for clarification, I guessed the same, that its a blocking queue. Just wanted to be sure I am missing not anything.

    (1-2/2)