Linux cpu affinity for forked benchmaks

Aleksey Shipilev shade at redhat.com
Tue Jan 21 08:50:40 UTC 2020


On 1/21/20 9:45 AM, Laurent Bourgès wrote:
> See 
> https://github.com/bourgesl/nearly-optimal-mergesort-code/blob/master/sort-bench/src/main/java/edu/sorting/bench/LinuxAffinityHelperProfiler.java
>
> Do you think that would be worth to integrate in JMH ?

Maybe? But this is not the job for Profiler. Using it to inject "taskset" to the running process is
the abuse of API. It should be somewhere in Runner. And the appropriate fallbacks should be present
when taskset is not available, e.g. on Windows.

-- 
Thanks,
-Aleksey



More information about the jmh-dev mailing list