Reputation: 5702
I have a benchmark suite written using JMH, and I would like to run these benchmarks in parallel. I have a sufficiently powerful machine with plenty of CPU cores, so I figured I would simply run multiple JMH processes and isolate each of them on their own core.
However, JMH actually enforces a single-process policy by using a lock file. I can work around it by setting a property -Djmh.ignoreLock=true
, at which point I get the following warning:
# WARNING: JMH lock is ignored by user request, make sure no other JMH instances are running
Therefore my question - if I have $N
JMH processes running on a CPU with $N+2
cores, and I have pinned each of the JMH processes to its own core, which exact risks am I exposing myself to? How will this affect the reliability of my benchmarks?
EDIT: The tasks being measured are 100 % CPU bound, there is no I/O whatsoever. I run with SerialGC
to optimize for throughput, but also to help minimize the number of threads the JVM will require.
Upvotes: 1
Views: 59