google / benchmark

A microbenchmark support library
Apache License 2.0
9.07k stars 1.63k forks source link

Add support for processor affinity #185

Open buchgr opened 8 years ago

buchgr commented 8 years ago

Many microbenchmarks are very sensitive to cpu migrations. Especially multithreaded and memory intensive ones and even more so on NUMA systems. I am currently pinning the threads myself, but I think it would be great if google benchmark supported automatic pinning of threads to cores. I think results would be much more reproducable.

EricWF commented 8 years ago

Could you explain how to do that?

lkleen commented 7 years ago

Set the CPU affinity of the main thread to a single core.

EricWF commented 7 years ago

Patches welcome :-)

koct9i commented 4 years ago

First attempt #988