
05-20-2009, 09:24 AM
|
|
Web Hosting Guru
|
|
Join Date: Mar 2008
Posts: 263
|
|
My server load is high, i checked and see everuthing is ok.
I think my sata disk cannot support my hard disk traffic.
Is it posible to check wich file used more hard disk traffic? (rpm speed)
Thanks
|

05-20-2009, 03:28 PM
|
|
Newbie
|
|
Join Date: May 2009
Location: Louisville, Ky
Posts: 14
|
|
It depends on the OS... what are you running?
|

05-20-2009, 03:53 PM
|
|
Warp Speed!
|
|
Join Date: Feb 2008
Location: Houston, Texas, USA
Posts: 2,740
|
|
I think he/she is running a VM box. This will get you the top 20 disk hogs:
Quote:
|
lsof |grep 'REG\|DIR' |grep -v mem|awk '{print $1" "$2}' | uniq -c|sort -k2 -nr|head -20
|
Best
|

05-20-2009, 04:14 PM
|
|
Newbie
|
|
Join Date: May 2009
Location: Louisville, Ky
Posts: 14
|
|
Quote:
Originally Posted by UNIXy
lsof |grep 'REG\|DIR' |grep -v mem|awk '{print $1" "$2}' | uniq -c|sort -k2 -nr|head -20
|
I do not believe that gives any output related to IO. The $1 and $2 in the awk statement will print the COMMAND and PID columns from the lsof output.
If they are indeed running linux (vps or other), then iostat would be helpful to see what kind of io activity is actually going on.
Running vmstat would be handy as well, as it would show if the load is coming from user or kernel space and what kind of io is going on at the same time.
|

05-20-2009, 04:18 PM
|
|
Warp Speed!
|
|
Join Date: Feb 2008
Location: Houston, Texas, USA
Posts: 2,740
|
|
Quote:
Originally Posted by Type82
I do not believe that gives any output related to IO. The $1 and $2 in the awk statement will print the COMMAND and PID columns from the lsof output.
If they are indeed running linux (vps or other), then iostat would be helpful to see what kind of io activity is actually going on.
Running vmstat would be handy as well, as it would show if the load is coming from user or kernel space and what kind of io is going on at the same time.
|
It will. Keep in mind that OP already identified the disk as being the bottleneck. Next step is to find the process that have the most handles open on disk. That's handles of type REG and DIR (i.e. real files. see man lsof). So this will show you which processes are hogging disk. OP can then use vzpid ${pid} to identify the VM and or process in question.
Best
|

05-20-2009, 04:51 PM
|
|
Newbie
|
|
Join Date: May 2009
Location: Louisville, Ky
Posts: 14
|
|
Right, your command will sort a list of processes which have the most number of files/directories open. A process having a high number of files open doesn't *necessarily* mean it's also consuming the majority of IO.
For example, use dd to create a huge file. IO performance will drop, but there's only one process which is creating the IO bottleneck, dd. There may only be a few open files associated with this process
|

05-20-2009, 06:15 PM
|
|
Warp Speed!
|
|
Join Date: Feb 2008
Location: Houston, Texas, USA
Posts: 2,740
|
|
Quote:
Originally Posted by Type82
Right, your command will sort a list of processes which have the most number of files/directories open. A process having a high number of files open doesn't *necessarily* mean it's also consuming the majority of IO.
|
Agreed but the output is a start in the right direction. I've read a post from OP a day or two ago about the high load on his VPS server (erad hardware node). So it's logical to assume the IO load is distributed (as opposed to being cause by single thread).
Quote:
Originally Posted by Type82
For example, use dd to create a huge file. IO performance will drop, but there's only one process which is creating the IO bottleneck, dd. There may only be a few open files associated with this process
|
That's correct.
Regards
|

05-21-2009, 05:22 AM
|
|
Web Hosting Guru
|
|
Join Date: May 2004
Location: India
Posts: 310
|
|
Do a hdparm test (eg: hdparm -t /dev/sda) and get the I/O Speeds. Also report the result of hdparm /dev/sda also.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|