throughput vs latency, what to look at?
Maneesh Bhunwal
maneesh.bhunwal at gmail.com
Thu Apr 15 15:05:48 UTC 2021
Hi Team,
I have a generic question and a specific question. can you please help me
with this?
JMH reports 2 gives out metrics throughput (ops/ms) and latency (ms/ops).
When we are looking at results, which metric should we focus on? Is there
any general guideline?
i have a scenario, where methodA calls methodB. When I try to benchmark
both methodA and methodB(these are done as part of the same run on a
standalone vm, so no possibility of outside interference and IMO results
should be comparable.), there is a huge difference in throughput (1800
vs 2700 ops/ms) but marginal difference between latencies (19ms vs 18ms).
There is no locking or contention involved.
I am not able to understand how to interpret the results. IMO if there are
no locks and similar latency are there, throughput should be the same. So I
am confused.
Regards
Maneesh Bhunwal
More information about the jmh-dev
mailing list