In this section, system performance is analyzed to determine whether a system is CPU bound or memory bound. There is also a discussion on the idle time for Symmetric Multiprocessors (SMP) and Uniprocessor (UP) systems.
The following are some terms used during this discussion.
Using the output from the vmstat command, the values for the sy and us columns is used to continue with this discussion.
You need to obtain a preliminary look at the performance of the system as
shown in Figure 108.
Figure 108: vmstat Report of CPU-Bound System
In this section, you will look at the sy and us columns for the CPU usage to determine if the system was CPU-bound during the time the vmstat command was gathering system information.
Remember that a system is CPU-Bound if the Total system and user CPU usage approaches 100 percent.
For rows two through Five, the System +User CPU Usage are:
Row 2 =(66+31)%=97% and r = 2
Row 3 =(77+23)%=100% and r = 2
Row 4 =(60+40)%=100% and r = 4
Row 5 =(88+12)%=100% and r = 3
There are two indications that this system is CPU-bound.
To determine if a system is memory bound, the pi and po columns are taken into consideration. As defined in 12.4 Performance Analysis, a system is memory bound if the average page in rate (pi) for paging spaces and the average page out rate (po) for paging spaces were non-zero.
Idle time calculations on an Symmetric Multiprocessor and an Uniprocessor system are the same. In an SMP environment, the output received from the vmstat and iostat commands are a summary of the system wait and idle time across all processors. Therefore, need only use the tools as laid out in the previous sections and calculating the system idle time based on the output received.
When calculating total system idle time over an interval, both the percentage of idle time(id), and the percentage of wait time (wa) are to be considered. Both fields are obtained from the vmstat command output.
| Note |
|---|
|
Total CPU Idle Time % = wait % + Idle Time % |
In order to calculate the time that the system is idle using the output from the vmstat command, perform the following:
Given the following output from an SMP system, calculate the system idle time from the command vmstat 900 4, that is, an output every 900 seconds or (15 minutes) four times.
kthr memory page faults cpu ----- ----------- ------------------------ ------------ ----------- r b avm fre re pi po fr sr cy in sy cs us sy id wa 0 0 11015 205693 0 0 0 0 0 0 102 11 6 0 0 99 1 0 1 13014 203638 0 0 0 0 0 0 513 202 233 0 0 97 2 0 1 13903 202718 0 0 0 0 0 0 528 256 262 0 0 95 4 0 1 13008 203613 0 0 0 0 0 0 509 178 225 0 0 99 1
Average CPU Idle Time percentage = Sum (%Idle Times(id) + %wait)/ # readings, therefore, the Average CPU Idle Time percentage = ((99+1) + (97+2) + (95+4) + (99+1))/4 = 99.5%
These readings were obtained over one hour, therefore, total CPU Idle Time for this system = 99.5% x 60 minutes = ~59 minutes
Paging rate is the average number of page-ins and page-outs per CPU cycle.
If the pagein/pageout (pi/po) ratio is greater than one, it is indicating that for every pagein there has to be at least one pageout and, therefore, points to high paging activities. This system is, therefore, said to have a high paging rate.