Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend N-copies to 2N for Context Switching case in out-of-box run #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pdeng6
Copy link
Contributor

@pdeng6 pdeng6 commented Aug 15, 2024

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:

  1. All systems are saturated with 2N copies.
  2. Actually, all systems are saturated with copies less than 2N, say X. From X to 2N even to 4N, the score of context switching almost keeps flat with very slight drop which is less than 5%.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant