Measuring a complete workload on a dedicated system
Using a dedicated system is the ideal situation because we can use measurements that include system overhead as well as the cost of individual processes.
# vmstat 5 >vmstat.outputkthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
0 1 75186 192 0 0 0 0 1 0 344 1998 403 6 2 92 0# iostat 5 >iostat.outputtty: tin tout avg-cpu: % user % sys % idle % iowait
0.0 0.0 19.4 5.7 70.8 4.1
Disks: % tm_act Kbps tps Kb_read Kb_wrtn
hdisk0 8.0 34.5 8.2 12 164
hdisk1 0.0 0.0 0.0 0 0
cd0 0.0 0.0 0.0 0 0# svmon -G
size inuse free pin virtual
memory 65527 65406 121 5963 74711
pg space 131072 37218
work pers clnt lpage
pin 5972 0 0 0
in use 54177 9023 2206 0# ps -fu hoetzel
UID PID PPID C STIME TTY TIME CMD
hoetzel 24896 33604 0 09:27:35 pts/3 0:00 /usr/bin/ksh
hoetzel 32496 25350 6 15:16:34 pts/5 0:00 ps -fu hoetzel
# svmon -P 24896
------------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd LPage
24896 ksh 7547 4045 1186 7486 N N N
Vsid Esid Type Description LPage Inuse Pin Pgsp Virtual
0 0 work kernel seg - 6324 4041 1186 6324
6a89aa d work shared library text - 1064 0 0 1064
72d3cb 2 work process private - 75 4 0 75
401100 1 pers code,/dev/hd2:6250 - 59 0 - -
3d40f f work shared library data - 23 0 0 23
16925a - pers /dev/hd4:447 - 2 0 - -
The working segment (5176), with 4 pages in use, is the cost of this instance of the ksh program. The 2619-page cost of the shared library and the 58-page cost of the ksh program are spread across all of the running programs and all instances of the ksh program, respectively.
If we believe that our 256 MB system is larger than necessary, use the rmss command to reduce the effective size of the machine and remeasure the workload. If paging increases significantly or response time deteriorates, we have reduced memory too much. This technique can be continued until we find a size that runs our workload without degradation. See Memory requirements assessment with the rmss command for more information on this technique.
# netstat -I tr0 5
input (tr0) output input (Total) output
packets errs packets errs colls packets errs packets errs colls
35552822 213488 30283693 0 0 35608011 213488 30338882 0 0
300 0 426 0 0 300 0 426 0 0
272 2 190 0 0 272 2 190 0 0
231 0 192 0 0 231 0 192 0 0
143 0 113 0 0 143 0 113 0 0
408 1 176 0 0 408 1 176 0 0The first line of the report shows the cumulative network traffic since the last boot. Each subsequent line shows the activity for the preceding 5-second interval.