You are not logged in.

#1 2018-07-16 18:27:23

bwidlar
Member
Registered: 2018-02-06
Posts: 29

[SOLVED] Any way to calm down the kernel migration processes ?

Hi,

I use two Intel Xeon E5620 on arch linux to render images.
I launch 7 threads on 8 real cores, I left one core free. (no hypertheading here).
7 threads at 100% (this is usual in this kind of work).

OK, then four migration process keeps eating a lot of my cpus time for minutes/hours, from start to finish.

I know the migration process moves the threads between cores, but this is overkill.

Is the normal linux kernel behavior?,
Maybe using other kernel process scheduler?

The system is using the last Arch update.

Thanks.

Last edited by bwidlar (2018-07-17 08:22:03)

Offline

#2 2018-07-16 20:33:46

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Any way to calm down the kernel migration processes ?

The task scheduler in normal Linux kernels is named "CFS" = "Completely Fair Scheduler". It exposes a bunch of variables that you can use to tweak its behavior. You can see and change those with the "sysctl" command. There is one variable that influences how tasks are moved between cores. It tells CFS how expensive a migration between cores is. You could tweak this value and increase it, and then CFS will reduce the amount migrating that tasks do.

Here's a bit of interesting documentation I could find with Google:

https://doc.opensuse.org/documentation/ … duler.html

Scroll to section "13.3.6 Runtime Tuning with sysctl" on that page. The variable I mean is named "kernel.sched_migration_cost_ns".

Offline

#3 2018-07-16 20:42:02

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: [SOLVED] Any way to calm down the kernel migration processes ?

taskset and numactl allow control over which cores a process (not thread) is run on.  At the thread level I believe the process itself would have to bind the thread to a core.

Offline

#4 2018-07-17 08:20:18

bwidlar
Member
Registered: 2018-02-06
Posts: 29

Re: [SOLVED] Any way to calm down the kernel migration processes ?

Thanks guys.

After testing some parameters, this did the trick:

sysctl kernel.numa_balancing=0

It kills the process migration totally.

Offline

Board footer

Powered by FluxBB