Can't understand CPU utilization during md resync
I just built a new server with 2x 2TB SATA disks. Mainboard has an Atom D525 dual core installed. 4GB memory I have installed 32-bits Debian Wheezy.
This is the output of the top command: Code:
jlinkels@homeserv:~$ top Code:
md2 : active raid1 sda6[0] sdb6[1] Secondly, the sync speed is extremely low, 1MB/s I know that an Atom is not exactly the fastest processor in the world, but 1 MB/s is really low. This is what I get on another Atom system copying 4GB from one partition to the next: (decimal separator inserted manually) Code:
sent 4265657063 bytes received 445 bytes 22,044,741.64 bytes/sec |
Hello
About your first question, the load average indicates the number of processes in running state (i.e. waiting for cpu resource), you can find them like that : Code:
ps -eo state,cmd | grep "^R" Also, the raid building operations generates a lot of disk i/o, which are all handled by cpu0 if I remember. That could explain why you've got that little load average (because it's only waiting for cpu0 and no other core). About the second question, I'm not an expert in that domain but I think that you can't compare these two speeds. The raid building speed is far more complex and the copying one is optimized when you are in raid 1... I don't think that these indicators are showing the real hardware speed. |
Quote:
Code:
jlinkels@homeserv:~$ ps -e -o state,cmd | grep "^R" Quote:
Quote:
Quote:
Code:
root@homeserv:/home/jlinkels# cat /proc/mdstat Code:
And this is what top shows: It doesn't mean that I understand what was going on when I started this thread. I am happy I pasted the /proc/mdstat in here so I am sure I am not insane. jlinkels |
Quote:
Quote:
|
loadavg has little to do with CPU% - it is a decaying moving average of running and runnable processes. Adjust the command line offered above to search for [RD] (egrep).
It is also unnormalised, so is unaffected by the number of cores - a single looping/busy task in an otherwise idle system will drive the loadavg toward 1 regardless of the number of cores. iowait is also similarly misunderstood by most - searching here on LQ (and elsewhere of course) will bring many and varied theories. But basically it doesn't mean the whole box has ground to a halt. Unless you have a single core/CPU, and a (userland) process (really) busy with I/O. And nothing else. Essentially a useless metric these days. But then if you look at the code for loadavg, you might be inclined to say the same - using blocked rather than uiniterruptible makes much more sense IMHO. |
akiuni: I am still puzzled. The next time I started the machine, the resync speed was going up and down between 7 MB/s and 20 MB/s. When I put the value 40,000 in the speed_limit_min, the resync speed showed a sustained 40+MB/s.
The processor load avg and idle times remain the same regardless of these settings. Only the disk light flashes more often when the resync speed is higher. syg00: I know, the load average significance is among the most asked questions on Linux forums. Still I have the experience that the load avg is increasing when user and sys processes are over 10% or so. All processor cores idling at > 99.8% and a load avg of 1.0 I have not seen before. Running egrep with "R|D" didn't show many more runnable processes. Code:
root@homeserv:/proc/sys/dev/raid# ps -e -o state,cmd | egrep "^R|^D" |
Yeah, but that state "D" kernel thread contributes to the loadavg count - and it is going to be either "R" or "D" all the time.
No, I can't expalin why it wouldn't cause the loadavg to be at least 1 all the time ... ;) |
All times are GMT -5. The time now is 12:19 AM. |