Skip to content

Commit e73823e

Browse files
authored
Avoid pinning an E-core for newer Intel CPUs (#531)
1 parent 4deb082 commit e73823e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/benchmark_suite.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ def base_cmd(ruby_description, benchmark_name)
236236
# Pin the process to one given core to improve caching and reduce variance on CRuby
237237
# Other Rubies need to use multiple cores, e.g., for JIT threads
238238
if ruby_description.start_with?('ruby ') && should_pin?(benchmark_name)
239-
# The last few cores of Intel CPU may be slow E-Cores, so avoid using the last one.
240-
cpu = [(Etc.nprocessors / 2) - 1, 0].max
239+
# Up to the last two thirds of Intel CPU cores may be slow E-Cores, so avoid using them.
240+
cpu = [(Etc.nprocessors / 3) - 1, 0].max
241241
cmd.concat(["taskset", "-c", "#{cpu}"])
242242
end
243243

0 commit comments

Comments
 (0)