by Hovhannes Avoyan | Aug 25, 2009
While most tools for estimating the length of time it will take to transfer large amounts of data are not terribly accurate, the STREAM tool and lmbench provide reliable predictions. The STREAM tool works well because it makes estimates using the actual bandwidth available for the transfer rather than an idealistic peak bandwidth. Lmbench makes 4 essential measurements: 1) memory read speed, 2) memory write speed, 3) memory copy speed and 4) memory read latency.
One of the most common performance tools is called vmstat. You have to remember one thing about it, however: The first line vmstat tries to output will be an average since boot. The columns b, r, and w contain the processes that are in need of I/O resources (which includes paging), the total number of processes that have been in the run queue, and the processes that you can run but are swapped. If the w field ever contains number other than zero, at some point the system must have been low enough on memory to force a swap. Buff, cache, free, and swpd contain the amount of memory tied up as buffer, used for cache, left at idle, and used for virtual memory. The si and the so columns should be watched closely, as they contain the amount of swap-ins and swap-outs. If these values inflate too far, the kswapd swap_cluster variable probably needs to be given a larger value so more bandwidth will be available to and from the swap. Alternatively, you could simply add more physical memory.
The system activity reporter, known as sar, is another tool commonly used to monitor performance. Its usefulness lies in its ability to gather and store a wide amount of data to use at a later date, while not sacrificing the ability to collect specific data to use immediately. The data you gather with sar is usually compatible with vmstat, but it is not labeled the same way.
PS is equally widespread but tells you much less. Linux allows you to deal with the /proc filesystem directly, an excellent feature that tells you about individual processes’ memory usage, similar to the pmap command in Solaris. There is a file named status in the /proc filesystem of every process, in the directory reached through its process ID.
Category: Articles | Tagged No Comments.