Extend N-copies to 2N for Context Switching case in out-of-box run #99
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change proposes to extend the N-copies to 2N-copies for context switching case in out-of-box run(“copies” is not explicitly specified).
Currently, the out-of-box benchmark run(via ‘./Run’, where ‘-c’ option is not used) launches 1 copy and N-copies test, where N is the number of CPUs.
We investigated the performance characteristic on multiple high CPU core count systems and found that N-copies test of Pipe-based Context Switching case doesn’t saturate the system, e.g. in a 160 cores system, it is ~69%, and in a 224 cores system, it is ~62%. In this situation, the N-copies test doesn’t demonstrate the real system capability.
To address this problem, in this pull request, we propose to run a 2N-copies Pipe-based Context Switching case when ‘-c’ option is not used, others keep N-copies, and when ‘-c’ option is used, run the copies specified.
The 2N is an experience number that obtained from our tests in 7 systems where core number ranges from 96 to 288, with Linux kernel version 5.x and 6.x. According to the tests:
Low core count systems with 4/8/16 cores were also evaluated, 2N-copies saturated all, with less than 9.4% drops compare with N-copies.
I don’t have a good way to find the best X without running many times in a system, while in my humble opinion, 2N is a reasonable number since it almost demonstrates the real system capability and fair for different systems.
Please take a look, and very glad to hear your thoughts, thanks!