Archive for July, 2007

How to measure Disk I/O Load generated by one application on Linuxes. Case study.

Thursday, July 26th, 2007

Before deploying any application to production servers it’s always good to check if the application won’t harm the environment. It’s good to check at least CPU usage & I/O load (local & network). That’s where troubles come from in large scale environments.

The CPU usage for one process can be easliy measured using sar command (SYSSTAT tool) with -x option:

sar -x pid.

Choosing one second monitoring interval will generate lots of results but only this way we can capture any CPU peaks generatedy by a process.

Network I/O Load can also be easily monitored using for example tcpdump.

The biggest problem is with checking the I/O Load of local disks. Linux system counts internally I/O load of a whole system, but not of separate processes. I tried to get an average I/O load generated by the application.
Procedure for one host:

  1. Start the application.
  2. Run iostat for defined amount of time. Get results: results0
  3. Stop the application
  4. Run iostat for defined amount of time. Get results: results1
  5. Compute change in I/O load for a host: results=results0-results1

The problem with this approach is that everything can affect the I/O Load during measurements time. I tried to use statistcs to solve it. I assumed that when I run this procedure on larger number of hosts and ranodimze procedure startup time, I will be able to extract I/O Load which was generated by the tested application.

I ran this procedure on random time on each of 450 hosts 2 times. Here are results:
iostat

It looks like the application generates 0.8 increase in tps on average.



Entries (RSS) and Comments (RSS).


© 2007 Xadec.com. All rights reserved About Us | Contact Us | Terms of Use