hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Disk Checking (I/O)
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Disk Checking (I/O)

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 05-20-2009, 09:24 AM
persianwhois persianwhois is offline
Web Hosting Guru
 
Join Date: Mar 2008
Posts: 263

Disk Checking (I/O)


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

__________________
Need More Power?!
PersianWhois.Com

Reply With Quote


Sponsored Links
  #2  
Old 05-20-2009, 03:28 PM
Type82 Type82 is offline
Newbie
 
Join Date: May 2009
Location: Louisville, Ky
Posts: 14
It depends on the OS... what are you running?

Reply With Quote
  #3  
Old 05-20-2009, 03:53 PM
UNIXy UNIXy is offline
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

__________________
|- UNIXY :: Fully Managed Servers and Clusters Since 2006
|- DC POP :: Houston, Los Angeles, Atlanta, & Rotterdam NL
|- Managed Magento Varnish Servers w/ ESI. < 250ms Page Load / TTFB
L- We LOVE helping our clients!

Reply With Quote
Sponsored Links
  #4  
Old 05-20-2009, 04:14 PM
Type82 Type82 is offline
Newbie
 
Join Date: May 2009
Location: Louisville, Ky
Posts: 14
Quote:
Originally Posted by UNIXy View Post
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.

Reply With Quote
  #5  
Old 05-20-2009, 04:18 PM
UNIXy UNIXy is offline
Warp Speed!
 
Join Date: Feb 2008
Location: Houston, Texas, USA
Posts: 2,740
Quote:
Originally Posted by Type82 View Post
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

__________________
|- UNIXY :: Fully Managed Servers and Clusters Since 2006
|- DC POP :: Houston, Los Angeles, Atlanta, & Rotterdam NL
|- Managed Magento Varnish Servers w/ ESI. < 250ms Page Load / TTFB
L- We LOVE helping our clients!

Reply With Quote
  #6  
Old 05-20-2009, 04:51 PM
Type82 Type82 is offline
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

Reply With Quote
  #7  
Old 05-20-2009, 06:15 PM
UNIXy UNIXy is offline
Warp Speed!
 
Join Date: Feb 2008
Location: Houston, Texas, USA
Posts: 2,740
Quote:
Originally Posted by Type82 View Post
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 View Post
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

__________________
|- UNIXY :: Fully Managed Servers and Clusters Since 2006
|- DC POP :: Houston, Los Angeles, Atlanta, & Rotterdam NL
|- Managed Magento Varnish Servers w/ ESI. < 250ms Page Load / TTFB
L- We LOVE helping our clients!

Reply With Quote
  #8  
Old 05-21-2009, 05:22 AM
madguy24 madguy24 is offline
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.

__________________
SS Maddy
SupportSages.com - Bytes of Wisdom @ Work - Where guarantees and promises are made to keep!
24/7 Support with 15 mins response time & no charge guarantees


Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Host Rackspace Adds FreeBSD 9, CentOS 6.3 Support to Cloud Servers Web Hosting News 2012-07-30 12:47:10
Web Host Earthnet Launches Xpert.net Linux Web Hosting Services Web Hosting News 2012-03-23 16:09:07
Storm On Demand Boosts Performance with Solid State Drives Cloud Servers Web Hosting News 2012-03-07 14:31:24
Web Host Webair Improves Cloud Hosting Disk Speeds with Fusion-io Web Hosting News 2012-02-22 11:27:07
Web Host SoftLayer Adds Local Disk Storage Option to CloudLayer Hosting Web Hosting News 2011-07-26 18:43:31


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?