[migration] process using up 99% of CPU - normal?

4 posts / 0 new
Last post
#1 Mon, 11/12/2012 - 04:19
nothingless

[migration] process using up 99% of CPU - normal?

Hello! I am fairly new at VirtualMin. Have a dedicated server setup with CentOS 6.3 and installed Virtualmin and Webmin from scratch a few days ago. All went well - I then proceeded to move my Cpanel sites over using the Migrate Server option, again all went well (bar a few minor hiccups). I finished all that yesterday, and today went to check back on the server load. During the migrations, the load spiked to around 6 and 7 for hours (some sites were 15+GB), but today I saw everything had settled back down to normal-ish levels:

1.37 (1 mins) , 1.37 (5 mins) , 1.36 (15 mins)

Since I have 29 websites on this server, all running Wordpress and some fairly busy, this, I thought, was OK?

However, when I went to look at my Running Processes (236 in total), the top of the list looks like this:

ID   Owner   CPU   Command  
17 root 99.5 % [migration/4]
14 root 98.5 % [migration/3]
26 root 94.2 % [migration/7]
07 root 90.2 % [migration/1]
23 root 88.7 % [migration/6]
20 root 81.8 % [migration/5]
06 root 75.9 % [migration/0]
11 root 58.9 % [migration/2]
6937 apache 7.0 % /usr/sbin/httpd
976 apache 4.3 % /usr/sbin/httpd
27616 apache 3.8 % /usr/sbin/httpd
21488 apache 3.3 % /usr/sbin/httpd
19136 apache 3.2 % /usr/sbin/httpd
19141 apache 3.2 % /usr/sbin/httpd
19142 apache 3.2 % /usr/sbin/httpd
19143 apache 3.2 % /usr/sbin/httpd

What are those migration processes? Are they left over from the server migrations yesterday? I tried killing one of them, but nothing happened when I clicked the Kill button - the page just reloaded and the process continued on as normal. Will these processes go away by themselves or is there something I should be doing?

This server runs on a Intel(R) Xeon(R) CPU E3-1245 V2 @ 3.40GHz , 8 cores with 32GB of RAM.

Thank you in advance for any advice! :-)

Mon, 11/12/2012 - 07:02
Locutus

Those "migration" processes have nothing to do with your "migration" from cpanel to Virtualmin. :) It's coincidence that they are named like that.

In general, processes in square brackets are kernel processes. You wouldn't be able to just kill those, that's like trying to kill the kernel itself. Any stuff that Virtualmin might run during its operations will have regular path names to the executables in the "Command" column.

"Migration" is, according to my Google research, responsible for distributing workload across processor cores. You should have one "migration" process per CPU core, which appears to be the case according to your ps output.

It's not normal though that those use 50+% CPU load on your machine. Have you rebooted the box after you moved your websites over? Might help. If not, you might want to check the syslog and kernel log if there are any suspicious messages.

Also, a system load of 1.3+ is quite a bit, even for an 8-core machine. It means that on the average, at any given time more than one process is ready to be executed (and waiting to get its share of system resources). This should only be the case if your websites are very very busy.

For comparison, the loadavg of my main hosting VM (which has 2 CPU cores):

root@australis:/# cat /proc/loadavg
0.03 0.03 0.05 1/202 26497
Mon, 11/12/2012 - 11:49
nothingless

Thank you so much for your detailed reply! It's good to know the two 'migrations' aren't related.

No, I haven't tried rebooting after all the moving - I'm still moving one more site over, wget-ing the Cpanel backup file to my server. It's 80GB in size, so I'll just let it finished before I try rebooting.

I also discovered that I had ACP configured wrongly, and it wasn't actually helping my sites any - this may have contributed to the load. I'll have to take another look at this once this last transfer finishes! Any hints or tips for where would be a good place to start & what to look for? In my top, the majority seems to be php-cgi processes, all for different users - might it benefit me to switch some of my busiest sites to mod_php?

Mon, 11/12/2012 - 13:45
andreychek

In my top, the majority seems to be php-cgi processes, all for different users - might it benefit me to switch some of my busiest sites to mod_php?

Well, by default, Virtualmin would configure your domains to use FCGID, which should only be slightly slower than mod_php. Unlike CGI, FCGID does do caching, so you should be seeing good site performance from the PHP/Apache end of things.

You can of course try mod_php to see if it makes a difference, doing some testing can't hurt at all.

But you may also want to explore some other things too.

Caching, for example, can provide huge benefits.

You mentioned that you used WordPress -- WordPress has several plugins that perform caching.

You could also, with a plugin, configure WordPress to use memcache, which reduces usage of MySQL by caching queries.

And as you said, PHP caching such as APC can help as well.

Lastly -- installing a plugin into WordPress can add a number of new MySQL hits for every page load. If your sites have plugins installed that aren't required, you could always remove them. Especially on the high traffic sites, removing a few unused plugins could really make a difference too.

-Eric

Topic locked