LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-06-2009, 06:16 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
Finding hard drive usage (read/write operations, and so forth)


Hi.


I'd like to measure the current load on the SCSI disk attached to my server. I'm pretty new to this kind of hardware, and new to using linux to discover its performance, so please be patience with me.

So, does anyone have a link, or would like to write something here, on how to measure disc performance on linux?

Regards,
kenneho
 
Old 01-06-2009, 06:27 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
With RHEL you will (should) have sysstat - good place to start. The doco is good.
RH will also have some general performance papers on their site(s).

Depends a lot on your environment too - iSCSI, RAID, LVM, (native) SCSI ...
 
Old 01-06-2009, 07:40 AM   #3
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Thanks for your reply.

Actually, in this case I'm working on a virtual RHEL 5.1 box on Vmware ESX. I'm experiencing a very slow VM (a RHEL 5.1 box, that is), and are investigating disk usage to see if the problem lies in communication with the SAN. In any case, I'm using this oppurtunity to get to know linux better with regards to hardware communication.

Anyways, I've already run "iostat", and everything looks fine. Is there a way to see how many SCSI operations (read, write) the RHEL 5.1 box issues?
 
Old 02-16-2009, 01:37 PM   #4
asimba
Member
 
Registered: Mar 2005
Location: 127.0.0.0
Distribution: Red Hat / Fedora
Posts: 355

Rep: Reputation: 42
how did you run iostat ?

Usually you might want to use "timing" option and redirect it to some file with some csv options and analyze output in spreadsheet.


once you have got "timing" stuff worked out you can analyze data for peek periods and also in standalone mode using dd command to check out io stats.
 
Old 02-17-2009, 10:10 AM   #5
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by asimba View Post
how did you run iostat ?

Usually you might want to use "timing" option and redirect it to some file with some csv options and analyze output in spreadsheet.


once you have got "timing" stuff worked out you can analyze data for peek periods and also in standalone mode using dd command to check out io stats.
Which timing options are you referring to, if I may ask?
 
Old 02-17-2009, 01:25 PM   #6
asimba
Member
 
Registered: Mar 2005
Location: 127.0.0.0
Distribution: Red Hat / Fedora
Posts: 355

Rep: Reputation: 42
You might want to read man pages and do google - having said that.

You might want to review following command.

Basic syntax for iostat is : iostat <options> interval count

typically if you run it for longer durations you might want to adjust the interval and count

Say I want to run iostat for 24 hours at interval of 10 seconds ... Basic calculation would be --- 24 hours x 60 minutes x 60 seconds = 86400.

That was the timing option I was talking about.

iostat <options> 10 8640


Basic command : iostat -xtc 10 8640

intermediate command : iostat -xtc 10 8640 > mystats & (Send the job in background while I do some other stuff)

Advanced command - You might want to work on that - using awk script to format the data rows. - You might even want to format it in HTML format.



-c The -c option is exclusive of the -d option and displays only
the CPU usage report.

-t Print the time for each report displayed.

-x Display extended statistics. This option is exclusive of the -p
one, and works with post 2.5 kernels since it needs
/proc/diskstats file or a mounted sysfs to get the statistics.
This option may also work with older kernels (e.g. 2.4) only if
extended statistics are available in /proc/partitions (the ker-
nel needs to be patched for that).





Article I liked

http://www.princeton.edu/~unix/Solar...ot/iostat.html (Notes on Odd Behavior Section) I have yet to verify this on Red Hat environment.
 
Old 02-17-2009, 02:48 PM   #7
nottings
LQ Newbie
 
Registered: Aug 2007
Posts: 6

Rep: Reputation: 0
Your underlying problem sounds suspiciously like a problem I have encountered before where the VM guest was alloted tons of RAM (8 GB I think) but it was actually swapping (on the host side) due to a misconfiguration. The problem was that the "unlimited" check box was not checked under the memory options for the guest. I realize this isn't the question you asked, but I'd hate to see someone spend as much time as I did trying to figure out why the guest was performing so poorly! There are no clues that point to this going on from a system command standpoint on the guest os. The guest sees 8GB of RAM and no swapping occuring, but on the host side it is in fact swapping after 1GB of RAM usage.
 
Old 02-18-2009, 02:18 AM   #8
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by asimba View Post

Say I want to run iostat for 24 hours at interval of 10 seconds ... Basic calculation would be --- 24 hours x 60 minutes x 60 seconds = 86400.

That was the timing option I was talking about.



Article I liked

http://www.princeton.edu/~unix/Solar...ot/iostat.html (Notes on Odd Behavior Section) I have yet to verify this on Red Hat environment.

I see. Didn't first understand what you referred to when you wrote timing options, but now I do.

I'll check you the article you linked to. Thanks.
 
Old 02-18-2009, 02:25 AM   #9
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by nottings View Post
Your underlying problem sounds suspiciously like a problem I have encountered before where the VM guest was alloted tons of RAM (8 GB I think) but it was actually swapping (on the host side) due to a misconfiguration. The problem was that the "unlimited" check box was not checked under the memory options for the guest. I realize this isn't the question you asked, but I'd hate to see someone spend as much time as I did trying to figure out why the guest was performing so poorly! There are no clues that point to this going on from a system command standpoint on the guest os. The guest sees 8GB of RAM and no swapping occuring, but on the host side it is in fact swapping after 1GB of RAM usage.
Thanks for the tip. I just checked that option, and it was checked. But for what I know it has been checked just recently. Next time I exeperience performance problems I'll make sure to verify this option.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to read and write to a hard disk drive connected to Airport Extreme jai134 Linux - Networking 0 06-24-2008 06:46 AM
Slow read/write operations on 3592 drive Joejr4u Linux - Hardware 2 03-17-2008 05:25 AM
External hard-drive - readonly, can't make it read/write mooseman Linux - Hardware 3 05-18-2007 02:27 AM
hard drive with bad read/write caching Old_Fogie Slackware 5 08-24-2006 08:01 AM
finding cd/dvdrw read/write speeds? slinky2004 Linux - General 4 01-08-2006 09:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration