I am writing a microbanchmark in Java, following the ‘rules’ on this page. The last rule states:
“Reduce noise in your measurements. Run your benchmark on a quiet machine…”
So now I’m wondering how to create a system that is as quiet as possible. Is a clean installation of windows 7 with unnecessary services disabled a开发者_开发知识库 good example of a quiet system, or are there better options?
A quiet machine is good, but perhaps unrealistic.
You should test a system which is as close to how you intend to use it as possible.
e.g. you should run the same hardware, OS and services as your target system.
If possibly run it on your target system, possible after hours if needed.
Linux gives you a lot more control over what runs on the system (e.g. it's trivial to run without a GUI, which I don't think is even possible on Windows), so if you want an ideal synthetic benchmark environment, it would be a better option.
But a clean Windows install (important: no virus scanner or other preinstalled crapware) with most services disabled should be good enough as well.
精彩评论