Messages in this thread | | | Date | Sat, 4 Oct 2014 09:50:04 -0500 | From | Chuck Ebbert <> | Subject | Re: Slowdown due to threads bouncing between HT cores |
| |
On Fri, 3 Oct 2014 21:44:29 +0200 "Steinar H. Gunderson" <sgunderson@bigfoot.com> wrote:
> Hi, > > I did a chess benchmark of my new machine (2x E5-2650v3, so 20x2.3GHz > Haswell-EP), and it performed a bit worse than comparable Windows setups. > It looks like the scheduler somehow doesn't perform as well with > hyperthreading; HT is on in the BIOS, but I'm only using 20 threads > (chess scales sublinearly, so using all 40 usually isn't a good idea), > so really, the threads should just get one core each and that's it. > It looks like they are bouncing between cores, reducing overall performance > by ~20% for some reason. (The machine is otherwise generally idle.) >
Try playing with /proc/sys/kernel/sched_migration_cost_ns. This sets the number of nanoseconds the kernel will wait before considering moving a thread to another CPU. I have mine set to 50000000.
| |