7

I'm not asking how to find out where a bottleneck is. I just what to know how to check if the harddrive is being used at its limit (and hence causing a bottleneck).

Something like top where I can see a usage percentage of CPU and RAM.
Is there something like that with which I can monitor harddrive activity?

Native linux tools preferred.

9 Answers 9

12

Take a look at:

2
  • do you know any program that i can run and it will record system responsiveness and levels performance of ram, gpu, cpu, hard drive, network so i can see where bottleneck is later on. If i see that at 2:30 pm my computer was slow and i see ram was at full use whereas cpu, gpu, and hard drive speed were lower than their maximum use. May 17, 2015 at 18:38
  • Personally, I like collecting metrics and using historical graphing tools. Cacti's an example but there are plenty of others between graphite, statsd, and so forth. sar is a utility that might help you with what you need, @MuhammadUmer
    – Warner
    Oct 20, 2015 at 3:12
15

You want the sysstat utilities: iostat and sar are what you'll find most useful, I think.

iostat will give you current stats. sar will grab and store and show you historical stats.

Also possibly useful is iotop, which is like iostat but ties things to PIDs. It's newer though, and I don't know as much about it.

8

You already mentioned top. It's useful enough to give you a simple realtime figure.

Check the %wa counter on the CPU line near the top of the screen. It tells you the percentage of time the CPU currently spends waiting on I/O. This should be close to zero.

6

I'm a huge fan of iostat for watching disk activity on the console. You'll be able to see the IOPs being service by the drive, throughput, it's utilization %, request wait time and more. If you are seeing high wait, service and utilization that'll be the give away.

2

Another tool that will allow you to see disk activity (among other things) on Linux (or AIX) is nmon. It will display either a table or a bar graph and shows both per-partition and per-device data.

1
  • +1 I didn't know nmon. Nice! May 28, 2010 at 1:18
1

sar is the answer. Its gathers statics on queue length, request response time, etc. You can run it interactively, or even better run it in the background and analyze the data later.

1

http://studyhat.blogspot.com/2009/12/identifying-linux-bottlenecks.html

try above mail help you

0

iostat (or nmon which also displays the same stats in a different format) is good to get a system level diagnostic there are other tools which are more fine grained if you need it. I was recently introduced to blktrace/blkparse which came with the OS and will record and strace like level of detail about every IO request from every part of the system. You can record number and size of IO requests per process, including kernel processes like swap and filesystem journaling, as well as latency.

0

personally I find sar and iostat too verbose to be of value to me. they take multiple lines out output and are very difficult to view (my opinion). try collectl! same data and more, but much easier to read the output. -mark

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .