lkml.org 
[lkml]   [2009]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Hyperthreading on 4 core CPU DECREASES performance???
From
On Wed, Oct 28, 2009 at 5:24 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> This is Ubuntu Hardy, 2.6.24 kernel. I tried the same with 2.6.31,
>> with the same effect.

>> I would like to know how can I make the scheduler to prefer to spread
>> the tasks across physical cores as opposed to bundling two on one core
>> and leaving some cores idle.
>
> The scheduler will try and do balancing for packages and for HT. Make
> sure your distribution is built with the SCHED_SMT and SCHED_MC options
> enabled. Some of the non-enterprise distirbutions may well not have these
> enabled.

Yes, for the stock hardy -server and -generic kernel:

CONFIG_SCHED_MC=y
CONFIG_SCHED_SMT=y

>
> For hand laying out threads see: man pthread_setaffinity_np
>
> The win from HT depends a lot on the CPU and also the workload mix. In
> some workloads it will decrease performance.

OK, I think that I understand. Thanks.

So, what you are basically saying is that there is no option to
improve this behavior, right?

Thanks Alan.


\
 
 \ /
  Last update: 2009-10-29 01:03    [W:0.101 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site