I m having a Python script where the overhead of parallelization per added threads is above the maximal performance benefit of hyperthreading.

But setting the number of threads at half the number of the system s cpu count is not enough. Because for power saving, the Linux kernel can chose to favor packing threads on virtual cores instead of using more physicall cores

So how to determine physicall core binding when setting process affinity? Should I bind the process to odd or even numbers of system cpu cores (for example binding the process to system s cores 2 4 6 8)?

  • So I m somewhat trying to disable hyperthreading for a single process. – user2284570 Jan 4 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.