Lab #14: Performance Monitoring
Date: April 2, 2008
Record answers to all questions in your lab file.
- Process Monitoring
- What was the load average for the last 5 minutes?
uptime
- Start top in one window to monitor CPU usage. Record the initial 1, 5, and 15 minute load averages.
top
- Start 10 processes and record the 1 minute load average every 10 seconds. If you run out of disk space on /tmp, use a different partition like /var/vm for this test. What were the lowest and highest load averages during the test?
for i in 0 1 2 3 4 5 6 7 8 9
do
dd if=/dev/zero of=/tmp/zero$i bs=512 count=10000000 &
done
- Clean up your test files.
rm -f /tmp/zero?
- vmstat
- Run vmstat for two iterations. Why is the output of the first iteration so different from that of the second?
vmstat 5 2
- Start vmstat in continuous updating mode.
vmstat 5
- Monitor your vmstat output while you start a large number of processes. Record the highest measurements for runnable processes, blocked processes, free memory, buffer memory, cache memory, context switches, user CPU%, system CPU%, idle CPU%. If you run out of disk space on /tmp, use a different partition like /var/vm for this test.
for i in 0 1 2 3 4 5 6 7 8 9
do
dd if=/dev/zero of=/tmp/zero$i bs=512 count=10000000 &
done
- Clean up your test files.
rm -f /tmp/zero?
- Start processes until you force the system to begin paging out memory. Firefox and Open Office are both good choices to use up large amounts of memory. Record how many processes of each type that you started, along with the both the lowest nonzero page out (so) rate and the highest page out rate measured.
- Disk Monitoring
- Install iostat.
yum whatprovides iostat
yum install PACKAGE_NAME_HERE
- Download a copy of the Linux kernel from www.kernel.org.
- Start iostat in continuous updating mode.
iostat 5
- Monitor your iostat output while you unpack the Linux kernel, then delete the directory that you unpacked. Record the highest number of blocks read and written per second in your lab file.
- Create a large temporary file with dd. Record the highest number of blocks read and written per second in your lab file.
dd if=/dev/zero of=/tmp/zero bs=512 count=100000000
- Create 10 dd processes that each write a file a tenth the size of the previous one. Do 10 processes produce more I/O writing a tenth as much data cause more or less disk activity? Record the highest number of blocks read and written per second in your lab file and compare with your previous results to support your answer. If you run out of disk space on /tmp, use a different partition like /var/vm for this test.
for i in 0 1 2 3 4 5 6 7 8 9
do
dd if=/dev/zero of=/tmp/zero$i bs=512 count=10000000 &
done
- Clean up your test files.
rm -f /tmp/zero?
©2008 James Walden, Ph.D.