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

Reserve cpus for benchmarking #751

Open
blackgeorge-boom opened this issue Jun 19, 2024 · 2 comments
Open

Reserve cpus for benchmarking #751

blackgeorge-boom opened this issue Jun 19, 2024 · 2 comments

Comments

@blackgeorge-boom
Copy link

Hello, thank you for the great tool!

I was wondering whether it's better to combine this tool with something like cpuset, to reserve the cpus the benchmark and hyperfine run on.

Would this make a difference? I understand that hyperfine will catch outliers stemming from, e.g., competing programs, but would this be avoided in the first place by reserving the cpus?

Thank you for your time.

@sharkdp
Copy link
Owner

sharkdp commented Jun 22, 2024

This is a great question. I don't have the answer. I have experimented with hyperfine + cpuset in the past and I believe that it may have helped reducing outliers, but I can't provide definitive proof.

Note that context switches are not the only source of noise. There's also I/O, which often plays a huge role when benchmarking CLI apps, but that obviously spends a lot on your use case. cpuset will not help with this.

@blackgeorge-boom
Copy link
Author

Ok, so my understanding is that if someone sees notable outliers/variability in their results, they should consider running hyperfine with cpuset as an option, but remember that this would help only if the variability is due to context switches.

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

No branches or pull requests

2 participants