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

Did you take a look at the benchmark? I wrote three JMH benchmarks:

- one only calls the work method (calculates the array sum)
- one queries against a dummy servlet that returns a constant value
- one queries against a servlet that calls the work method

Calling only the work method is fast. Calling the work method via the servlet is slow. So Jetty is certainly involved somehow. Calling the dummy servlet only is also fast, so the work method is involved as well. Also the overhead cannot simply be explained by a small GC pause, because the overhead increases when we increase the array size.

I'm not saying there is necessarily something wrong with Jetty, but the problem does not occur when I do not use Jetty.

My current conclusion is that under certain (not too exotic) circumstances using Jetty slows down the worker method by a factor of two. Under other circumstances it at least adds a constant overhead of several ms. I'd like to find out why.

On 09.05.22 09:01, Simone Bordet wrote:

On Mon, May 9, 2022 at 8:03 AM <easbar.mail@xxxxxxxxxx> wrote:
Are there any Jetty settings we could try to gain more information about
the cause of the problem? Or maybe use the Jetty API in some way to
exclude certain features that might be the cause of this?

I don't think Jetty is involved at all.

Write a JMH benchmark instead of using Jetty, and run it on the
different machines.

Also, did you check the GC? It may just happen that the 7 ms you see
are a small GC pause.

Back to the top