Testing UNIX system performance: Part 2
The iostat and sar utilities in UNIX analyze and report on I/O and CPU utilization and allocation, by providing a simultaneous interval by interval profile of disk and CPU usage. Theses utilities can provide indications of which system resource may be limiting overall system performance if used during heavy workloads or periods of inadequate system performance. When the system resource is identified, an administrator can then know what steps to take to improve system performance.
The following example is for the Solaris 2.X operating system. Since the presence and function of this utility vary slightly among different versions of UNIX, you should consult the UNIX System Administrator's manual for information about your specific system. The output from this utility can be redirected to a file for later analysis.
Utilizing the sar utility command (%b) will display the CPU statistics, disk statistics and memory usage. The -u option specifies cpu, the -d option specifies disk, the 1 specifies a one second sample interval and the 10 specifies 10 iterations. Additionally, sar offers selectable start and stop times, time-stamping and an advanced method for file output. sar also displays all active disks. Again, consult your UNIX Systems Administrator's manual for platform sensitive differences.
sar provides the same information as iostat for CPU utilization, but in its display mode provides somewhat different disk reports. %busy is equivalent to util in iostat, avque is the number of pending I/O's waiting for disk access, r+w/s is the number of reads plus writers (i/os) per second, again averaged over a period of one second. blks/s is the number of disk blocks transferred per second over the period (in this case, four 512 byte disk blocks for each of the 330 I/Os per second), avwait is the average time in milliseconds that the I/O waited idly on the queue. Avserv is the average response time to service an I/O in milliseconds and includes the queue residence time. A good estimate of average service time would be %b/(rds+wrs).
%b or sar utl is a measure of how busy the device is, however, it has no knowledge of the physical device which may be and commonly is a Raid storage subsystem. As a result of this physical versus logical difference, 100% busy may not necessarily translate into 100% utilization; higher throughput may be attained by more concurrent streams of I/O, up to physical device saturation. For example, 100% busy with 1 thread generally delivers less throughput then 100% busy with 10 threads of concurrent I/O.
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.
Solaris Administration : A Beginner's Guide
Author : Paul Watters
Publisher : Osborne
Published : Feb 2001
Solaris Administration: A Beginner's Guide introduces administrator's, who have experienced with either Windows NT/2000 and/or Linux, to Solaris system administration.
Dig Deeper on Data management tools