Repository navigation
Support starting benchmark tasks using taskset on Linux #52233
Description
Activity
- addedgood first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
on Mar 27, 2024 FYI: It appears as though the p cores are 2 threads each, and the e cores are only one. This is the output of lscpu on one of the machinees:
root@test-hetzner-ubuntu2204-x64-2 ~ # lscpu --all --extended CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ MHZ 0 0 0 0 0:0:0:0 yes 4800.0000 800.0000 2500.000 1 0 0 0 0:0:0:0 yes 4800.0000 800.0000 2500.000 2 0 0 1 4:4:1:0 yes 4800.0000 800.0000 2500.000 3 0 0 1 4:4:1:0 yes 4800.0000 800.0000 2500.000 4 0 0 2 8:8:2:0 yes 4800.0000 800.0000 2500.000 5 0 0 2 8:8:2:0 yes 4800.0000 800.0000 2500.000 6 0 0 3 12:12:3:0 yes 4800.0000 800.0000 2500.000 7 0 0 3 12:12:3:0 yes 4800.0000 800.0000 2500.000 8 0 0 4 16:16:4:0 yes 4800.0000 800.0000 2500.000 9 0 0 4 16:16:4:0 yes 4800.0000 800.0000 2500.000 10 0 0 5 20:20:5:0 yes 4800.0000 800.0000 800.047 11 0 0 5 20:20:5:0 yes 4800.0000 800.0000 2500.000 12 0 0 6 24:24:6:0 yes 3500.0000 800.0000 2500.000 13 0 0 7 25:25:6:0 yes 3500.0000 800.0000 2500.000 14 0 0 8 26:26:6:0 yes 3500.0000 800.0000 2500.000 15 0 0 9 27:27:6:0 yes 3500.0000 800.0000 2500.000 16 0 0 10 28:28:7:0 yes 3500.0000 800.0000 2500.000 17 0 0 11 29:29:7:0 yes 3500.0000 800.0000 2500.000 18 0 0 12 30:30:7:0 yes 3500.0000 800.0000 2500.000 19 0 0 13 31:31:7:0 yes 3500.0000 800.0000 2500.000So it should just be a matter of
taskset -c 0-11 <command>for the perf cores.FWIW A long time ago I did research to see the impact of CPU 0 on Node.js tasks and apparently, it doesn't affect Node.js workload. https://github.com/RafaelGSS/lies-and-benchmark/blob/76a261381ab1fae378bc24ff1853d39e48e8bcde/cpu-0-variation/cpu-http.js#L25
I did a more comprehensive benchmark during that research, but I couldn't find any reference to it in my personal notes.
I will make a PR for this
@RafaelGSS the reason why this is needed is to remove variance from the tests, because on new machines there are different types of cores.
- added a commit that references this issue
on Apr 6, 2024 - added a commit that references this issue
on Apr 10, 2024 - added 2 commits that reference this issue
on Apr 13, 2024 - added 2 commits that reference this issue
on Apr 29, 2024 - added 6 commits that reference this issue
on May 2, 2024
Our benchmark tasks must be modified to add a
tasksetcommand to pin the CPU the benchmark will run on. This is needed because now CPUs come with performance cores and energy efficient cores, making it harder to have reliable results otherwise.It's also needed by nodejs/build#3657.
node/benchmark/compare.js
Lines 73 to 75 in af48641
https://github.com/nodejs/node/blob/main/benchmark/run.js#L43-L46
cc @nodejs/performance