I want to know about how to view the disk I/O in linux so that i can check if i have to increase the ram.

Also the limits/thresholds after which i should increase the ram.

Thank You

link|improve this question

30% accept rate
feedback

7 Answers

up vote 4 down vote accepted

If you have kernel ≥ 2.6.20 with the TASK_DELAY_ACCT and TASK_IO_ACCOUNTING options enabled, i suggest iotop.

top like realtime display of system io. Great tool. iotop homepage

link|improve this answer
feedback

Trending I/O can be done using something similar to iostat or sar (which is provided under the sysstat package under debian)

As to the limits/thresholds after which you should increase the amount of RAM it really depends on your machine and what you consider to be acceptable service levels.

Personally, I would be looking at the %iowait figure. Anything higher than about 5% is where you're likely to start seeing performance degradation.

From here you need to start looking at read/write trends. Keep in mind, if you're write bound then increasing the amount of RAM may NOT have any effect on performance.

HTH

link|improve this answer
feedback
dstat -D total
iostat -d 2
vmstat -d 2
link|improve this answer
feedback

Try iostat. In Gentoo it's in app-admin/sysstat

link|improve this answer
feedback

if it's typical server case - install munin to see how load / io activity changes during the day / week. especially linux_diskstats_ is useful for analyzing your io bottlenecks.

link|improve this answer
feedback

try iostat -dkx 2

link|improve this answer
feedback

Ummm... you should use something like "free -m" to see how much RAM has been used. Once you start hitting swap space is when you should think about increasing it.

You can use "vmstat -n 2" to view disk I/O. For both commands have a read through the man pages to see how they work.

link|improve this answer
Can you explain in detail bi and bo – Muahmmad Zeeshan Nov 23 '09 at 9:11
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.