0

We have an issue in our server that is the migration process in taking time and also the load in the server is getting high due to that.

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.3 LTS
Release:        12.04
Codename:       precise
Linux kvm-cloud 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
root         6     2 17 Nov25 ?        01:51:10 [migration/0]
root         8     2 16 Nov25 ?        01:44:56 [migration/1]
root        13     2 12 Nov25 ?        01:24:30 [migration/2]
root        17     2 17 Nov25 ?        01:51:03 [migration/3]
root        21     2 13 Nov25 ?        01:26:44 [migration/4]
root        25     2 17 Nov25 ?        01:51:03 [migration/5]
root        29     2 16 Nov25 ?        01:50:09 [migration/6]
root        33     2 16 Nov25 ?        01:49:58 [migration/7]
root        37     2 16 Nov25 ?        01:50:09 [migration/8]
root        41     2 13 Nov25 ?        01:29:26 [migration/9]
root        45     2 13 Nov25 ?        01:25:29 [migration/10]
root        49     2 16 Nov25 ?        01:47:29 [migration/11]
root        53     2 16 Nov25 ?        01:46:22 [migration/12]
root        57     2 16 Nov25 ?        01:45:02 [migration/13]
root        61     2 17 Nov25 ?        01:51:37 [migration/14]
root        65     2 16 Nov25 ?        01:47:59 [migration/15]
root        69     2 16 Nov25 ?        01:47:59 [migration/16]
root        73     2 17 Nov25 ?        01:51:37 [migration/17]
root        77     2 16 Nov25 ?        01:47:53 [migration/18]
root        81     2 17 Nov25 ?        01:54:00 [migration/19]
root        85     2 16 Nov25 ?        01:46:04 [migration/20]
root        89     2 16 Nov25 ?        01:46:04 [migration/21]
root        93     2 12 Nov25 ?        01:21:52 [migration/22]
root        97     2 13 Nov25 ?        01:29:45 [migration/23]

ps -auxf | sort -nr -k 3 | head -10
root        81 17.2  0.0      0     0 ?        S    Nov25 114:00  \_ [migration/19]
root        73 16.9  0.0      0     0 ?        S    Nov25 111:37  \_ [migration/17]
root        61 16.9  0.0      0     0 ?        S    Nov25 111:37  \_ [migration/14]
root         6 16.8  0.0      0     0 ?        S    Nov25 111:10  \_ [migration/0]
root        25 16.8  0.0      0     0 ?        S    Nov25 111:03  \_ [migration/5]
root        17 16.8  0.0      0     0 ?        S    Nov25 111:03  \_ [migration/3

Have any one come across with this issue ? please let me know if there is any suggestion

1 Answers1

0

"migration" is the kernel proces that distributes processes over cores, you should see one process for each core.

Typically those threads consuming a lot of resources is only a symptom of another issue, not the cause of a high load.

But: one method to prevent processes from migrating is to pin them to a specific single core or a range of cores. From the manpage of taskset:

taskset is used to set or retrieve the CPU affinity of a running process given its PID or to launch a new COMMAND with a given CPU affinity. CPU affinity is a scheduler property that "bonds" a process to a given set of CPUs on the system. The Linux scheduler will honor the given CPU affinity and the process will not run on any other CPUs.

Note that the Linux scheduler also supports natural CPU affinity: the scheduler attempts to keep processes on the same CPU as long as practical for performance reasons. Therefore, forcing a specific CPU affinity is useful only in certain applications.

HBruijn
  • 77,029
  • 24
  • 135
  • 201
  • But the issue with me is that this is a server which run KVM instance, we do have other machines which runs KVM and it doesn;t have this issue acuatlly the server is working for but the migration process in this server is showing 17 Hours and other server are at 0 at this time the wa is also getting higher need to dig further – Manoj Shenoy Nov 27 '13 at 06:37
  • You still can do cpu pinning for KVM virtual guests. `virsh capabilities` will list a.o. the physical cpu's and cores and with `virsh vcpupin domain` you can set cpu affinity for the virtual guest. – HBruijn Nov 27 '13 at 08:52