Re: balance storm

Libo Chen
2014-05-26T11:49:32Z

On 2014/5/26 15:56, Mike Galbraith wrote:
> On Mon, 2014-05-26 at 11:04 +0800, Libo Chen wrote:
>> hi,
>> my box has 16 cpu (E5-2658,8 core, 2 thread per core), i did a test on
>> 3.4.24stable, startup 50 same process, every process is sample:
>>
>> #include <unistd.h>
>>
>> int main()
>> {
>> for (;;)
>> {
>> unsigned int i = 0;
>> while (i< 100){
>> i++;
>> }
>> usleep(100);
>> }
>>
>> return 0;
>> }
>>
>> the result is process uses 15% cpu time, perf tool shows 70w migrations in 5 second.
>
> My 8 socket 64 core DL980 running 256 copies (3.14-rt5) munches ~4%/copy
> per top, and does roughly 1 sh*tload migrations, nano-work loop or not.
> Turn SD_SHARE_PKG_RESOURCES off at MC (not a noop here), and consumption
> drops to ~2%/copy, and migrations ('course) mostly go away.

how to turn off SD_SHARE_PKG_RESOURCES in userspace ?

>
> vogelweide:/abuild/mike/:[0]# perf stat -a -e sched:sched_migrate_task -- sleep 5
>
> Performance counter stats for 'system wide':
>
> 3108 sched:sched_migrate_task
>
> 5.001367910 seconds time elapsed
>
> (turns SD_SHARE_PKG_RESOURCES back on)
>
> vogelweide:/abuild/mike/:[0]# perf stat -a -e sched:sched_migrate_task -- sleep 5
>
> Performance counter stats for 'system wide':
>
> 4182334 sched:sched_migrate_task
>
> 5.001365023 seconds time elapsed
>
> vogelweide:/abuild/mike/:[0]#
>
>
>