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
)?