When performance teams are asked for advice in improving performance, the requests are generally fairly generic and open-ended. In these cases, we generally do a first impressions sweep of the performance information.
In this example, we're on a RHEL 5.1 system on a Power6 system. If you're on different levels, the rpm and kernel versions will of course be different.
Check distro level
First, check the basic values to confirm the OS levels.
RPMs to install.
We'll want oprofile and some extra commands available installed. Install oprofile and sysstat.
oprofile-0.9.2-6.el5
sysstat-7.0.0-3.el5
Open multiple windows.
Create a new /tmp directory to work out of. For example, /tmp/workdir. Open three windows. In each window, cd to that /tmp/workdir directory.
In one window, run the mpstat command. This will dump CPU run statistics for all of the individual CPUs every 5 seconds.
In a second window, run the iostat command. This format provides statistics in kilobytes per second and will display the extended statistics, every 5 seconds.
In a third window, fire up oprofile, see below for steps.
oprofile
To initialize oprofile, execute the following commands. Note that the vmlinux image should correspond to your kernel.
In a fourth window, run the workload you want to profile.
After the workload runs, you can terminate oprofile with the following commands:
Then, in the remaining profiling windows, Ctrl-C out of mpstat and iostat.
Run snap
snap is a handy IBM support data gathering tool which quickly grabs applicable data for basic system definition assistance.
Tar up the results
SOS - son of sysreport
If available, run sosreport from RedHat.
Send the tar balls
Send the /tmp/workdir.tar.gz and the /tmp/sosreport* to your support representative. Be sure to include a detailed description of the workload that was profiled.