LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   IOStats in Linux (https://www.linuxquestions.org/questions/linux-general-1/iostats-in-linux-218172/)

akuate 08-16-2004 04:34 AM

IOStats in Linux
 
Hi,

I am a programmer and dont have much knowledge of the system side. We have a website running on linux with apache mysql. We are doing some performance tuning. I came across the fact that for optimum performance, disk I/O should be really fast. How can I find how is the disk I/O doing on my Linux system. Also, are there any tips from improving the disk I/O performance.

Thanks a lot.

esben 08-16-2004 06:02 AM

Try hdparm. E.g, to test IO speed for a disk,
Code:

hdparm -tT
You can play around with it, if you like. Most modern distros optimize this from install, though. Other options are, of course, SCSI, RAID, faster disks, clusters and combinations of these.

akuate 08-16-2004 06:53 AM

We have 2 SCSI hard disks. On doing a df, I can see the following partitions
We are running a high traffic website on this box.
Our webdocuments are in /home
Apache, mysql etc are in installed in /usr (I think)

/dev/sda7 1035660 241696 741356 25% /

/dev/sdb1 70557052 32828 66940128 1% /backup

/dev/sda1 46636 25594 18634 58% /boot

/dev/sda5 48885484 539396 45862844 2% /home

none 1547352 0 1547352 0% /dev/shm

/dev/sda6 1035660 49196 933856 6% /tmp

/dev/sda2 10317860 2967172 6826568 31% /usr

/dev/sda3 7224600 209600 6647916 4% /var

I ran an hdparm -tT on these partitions and the following were the results

/dev/sda5:
Timing buffer-cache reads: 1972 MB in 2.00 seconds = 986.00 MB/sec
Timing buffered disk reads: 168 MB in 3.00 seconds = 56.00 MB/sec

/dev/sdb1:
Timing buffer-cache reads: 1932 MB in 2.00 seconds = 966.00 MB/sec
Timing buffered disk reads: 192 MB in 3.01 seconds = 63.79 MB/sec

/dev/sda6:
Timing buffer-cache reads: 1928 MB in 2.00 seconds = 964.00 MB/sec
Timing buffered disk reads: 104 MB in 3.05 seconds = 34.10 MB/sec

/dev/sda1:
Timing buffer-cache reads: 1928 MB in 2.00 seconds = 964.00 MB/sec
Timing buffered disk reads: 46 MB in 0.81 seconds = 56.79 MB/sec

/dev/sda7:
Timing buffer-cache reads: 1940 MB in 2.00 seconds = 970.00 MB/sec
Timing buffered disk reads: 106 MB in 3.00 seconds = 35.33 MB/sec

/dev/sda2:
Timing buffer-cache reads: 1920 MB in 2.00 seconds = 960.00 MB/sec
Timing buffered disk reads: 186 MB in 3.01 seconds = 61.79 MB/sec

/dev/sda3:
Timing buffer-cache reads: 1976 MB in 2.00 seconds = 988.00 MB/sec
Timing buffered disk reads: 174 MB in 3.00 seconds = 58.00 MB/sec

Are these numbers looking good? Also the disk reads vary from 34-61 MB/sec, isnt this odd?

Thanks a lot for your help

esben 08-16-2004 08:40 AM

I'm sorry, but I have no experience with SCSI disks. The numbers are certainly better (by an order of magnitude) than anything I could afford :)

akuate 08-16-2004 09:11 AM

Thanks esben for looking into this.
Btw, nice signature!

arno 08-16-2004 09:14 AM

You have two disks sda and sdb but use sdb only as a backup.
If you have disk performance problems you could begin by moving some of the data to disk sdb.

I have some good result with using Redhat AS 2.1 they have optimized their system for the use of scsi devices.
We migrated a progress database from a 3 year old xeon processor based system to a dell 6650 linux AS 2.1 and a query which took 20 minutes on the old system now was ready within one minute, also a find instruction went from 30 seconds to a blink of the eye


All times are GMT -5. The time now is 05:19 PM.