I have some problems with my system performance. As I was adviced here, I used sar
:
$sar -u 5
and found out that the problems are caused by a low HDD performance, as I supposed (high %iowait
).
My disk is Western Digital AV-25, WDC WD5000BUDT-63G8FY0. Vendor specification can be found here.
/etc/fstab
:
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
/dev/sda2 / ext4 defaults,noatime,data=writeback,barrier=0,nobh,errors=remount-ro 0 1
/dev/sda3 /home ext4 defaults,noatime,data=writeback,barrier=0,nobh,errors=remount-ro 0 1
/dev/sda4 swap swap defaults 0 0
The problem is that from time to time some application (Minecraft game, Chromium browser, Eclipse) hangs up, my processor activity LED turns on, iowait goes to some 50% or more (I have dual core processor) and stays like this for a couple of seconds. Similar things happen when I use applications for the first time after reboot. The worst situation ever was forcing the system to use the swap partition (by some stress tool), the system went unusable.
What can i do now to determine the exact cause of the performance problems? Is it the low hardware performance, some problems with linux io scheduler, application specific problems or something else?
EDIT:
Output of hdparm -t -T /dev/sda
under no load:
/dev/sda:
Timing cached reads: 6244 MB in 2.00 seconds = 3129.13 MB/sec
Timing buffered disk reads: 230 MB in 3.01 seconds = 76.33 MB/sec
Best Answer
You need more data; if you're having high
%iowait
you need to find out what is causing it. To do this you can use the following tools:iotop
especially with-a
.atop -d 1
sar
is a great tool for historical logging; but you need to use a real-time tool for monitoring it.I made a pretty detailed post about doing this here: https://serverfault.com/questions/554015/how-to-troubleshoot-performance-issues-of-php-mysql-and-generic-i-o/554617#554617