Tip

iostat and sar disk analysis

iostat and sar disk analysis
Imperial Technology

In previous searchStorage.com Admin tips, we discussed the commands iostat and sar. Both commands are useful in disk and CPU analysis. The previous tips simply detailed the output of the commands in general terms. This tip will provide specific examples of high disk usage analysis.


Excessive I/O generated requests is illustrated in this example where the disk, sd15, is a magnetic disk used as a log in a high transaction rate environment.

	sdo			sd15		CPU			
rps	wps	util	rps	wps	util	us 	sy	wt	id
0	0	0	0	90	90	20	40	40	0
0	0	0	0	0	89	19	42	40	0

This is an implementation where more I/O requests are generated each second than a disk can service. The disk utilization of 90% with fully 80% of the CPU used in system mode or waiting for I/O to complete, indicates this. CPU idle time is zero, because of the excessive CPU resources being used to manage the I/O queue or waiting for the I/O to complete.

If sar was used in the same analysis on the log disk sd15 in the previous example, the results should show high avque numbers due to the high CPU resource consumption.

Because the disk speed is the actual limiting factor, adding more CPU does not help, as the additional CPU generates more unserviced I/O requests, and a larger utilization that consumes even more CPU in I/O queue management.

Replacing

Requires Free Membership to View

the log disk with a very high rate transaction device, such as a solid state disk, raises the I/O rate of the limiting factor--the disk speed--and when iostat is again run the following results would theoretically be obtained:

	sdo			sd16		CPU			
rps	wps	util	rps	wps	Util	us	sy	wt	id
0	0	0	0	322	17	40	22	5	34
0	0	0	0	300	16	44	23	8	26

Notice that the percentage of CPU waiting drops from 40% to 5% - a 35% reduction, while approximately 200 more log writes are completed each second with only 17% of the disk utilized. Because of this additional speed, I/Os are completed as they are requested, and the CPU no longer queues I/Os. Thus, the percentage of CPU spent in system mode is reduced and CPU usage doubles. In addition, 30% of the CPU is idle and available for more work. Thus, the elimination of the disk "bottleneck" at the log has now made the system capable of significantly more work, while using less CPU resource.

Database applications can vary widely in the ratio of system resources used. In general, however, high disk utilizations, very low or very high CPU idle percentages and large percentages of CPU spent in waiting or system mode, indicate significant unutilized CPU.


This tip was provided to searchstorage.com courtesy of Imperial Technology, manufacturers of diskless servers.

What did you think of this tip? Like it? Hate it? Email and let us know.


This was first published in April 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.