Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Trying to make sense of slow server response times

I tried JProfiler (and other profilers before this). The only method that seems to take some time is `sumArray`, the method that calculates the sum of the array. It is just running slower for some reason. I also tried to print details about the JIT compilation of this method, but it looked the same for the 'fast' and 'slow' servers. This is one of the things I do not understand at all.

On 08.05.22 12:10, Guillaume Maillard wrote:

I recommend using JProfiler for this kind of issue (you can use the trial
With the sampling mode you will  see very quickly where it hurts ;)



Le dim. 8 mai 2022 à 10:03, <easbar.mail@xxxxxxxxxx> a écrit :

Dear Jetty Devs and Community,

hopefully I've come to the right place to ask for help with the
following issue. I am puzzled by the server response times I am
measuring using a Jetty instance. I reduced the issue such that now
there are only two HttpServlets. One just returns a constant number and
serves as a baseline. The other calculates and returns the sum of all
integers in an array. I also measure the time the actual summation takes.

On some machines everything seems fine: The response time of the servlet
that does the summation is roughly equal to the time the summation is
expected to take. Querying the server only adds a minimal overhead.

But on others there is significant overhead (the servlet response is
much slower than the actual summation), and on some the overhead is even
proportional to the size of the array!

You can find the benchmark, instructions how to run it and a more
detailed explanation of my results (in here:

I am referencing to this specific commit to avoid confusion in case
there will be changes to the benchmark later.

I have tried using profilers and JVM flags like `-XX:+PrintCompilation`
to find out what causes this slow down, but the server response times I
am measuring still remain a complete mystery to me. They are very
reproducible, i.e. whenever I run the benchmark I pretty much get the
same result, but (qualitatively) different results for different
machines. I also tried different JDK versions (8,11,17), and Jetty 9&11,
but that does not seem to change anything.

Frankly speaking I don't really know what else to try to get to the
bottom of this, which is why I came here.

Any kind of help would be highly appreciated, e.g.

* running the benchmark and posting your results
* looking at the results in and giving some advice what I
could do to debug this, or thinking about what *could* be the cause for
such behavior

Thanks in advance!

jetty-dev mailing list
To unsubscribe from this list, visit

jetty-dev mailing list
To unsubscribe from this list, visit

Back to the top