Chapter 1. Understanding the Linux operating system 35
Draft Document for Review May 4, 2007 11:35 am 4285ch01.fm
That is, the average of the sum of TASK_RUNNING and TASK_UNINTERRUPTIBLE
process. If processes that request CPU time are blocked (which means that the CPU has
no time to process them), the load average will increase. On the other hand, if each
process gets immediate access to CPU time and there are no CPU cycles lost, the load
will decrease.
򐂰Runable processes
This value depicts the processes that are ready to be executed. This value should not
exceed 10 times the amount of physical processors for a sustained period of time;
otherwise a processor bottleneck is likely.
򐂰Blocked
Processes that cannot execute as they are waiting for an I/O operation to finish. Blocked
processes can point you toward an I/O bottleneck.
򐂰Context switch
Amount of switches between threads that occur on the system. High numbers of context
switches in connection with a large number of interrupts can signal driver or application
issues. Context switches generally are not desirable because the CPU cache is flushed
with each one, but some context switching is necessary. Refer to 1.1.5, “Context
switching” on page6.
򐂰Interrupts
The interrupt value contains hard interrupts and soft interrupts; hard interrupts have more
of an adverse effect on system performance. High interrupt values are an indication of a
software bottleneck, either in the kernel or a driver. Remember that the interrupt value
includes the interrupts caused by the CPU clock. Refer to 1.1.6, “Interrupt handling” on
page 6
1.6.2 Memory metrics
򐂰Free mem ory
Compared to most other operating systems, the free memory value in Linux should not be
a cause for concern. As explained in 1.2.2, “Virtual memory manager” on page13, the
Linux kernel allocates most unused memory as file system cache, so subtract the amount
of buffers and cache from the used memory to determine (effectively) free memory.
򐂰Swap usage
This value depicts the amount of swap space used. As described in 1.2.2, “Virtual memory
manager” on page 13, swap usage only tells you that Linux manages memory really
efficiently. Swap In/Out is a reliable means of identifying a memory bottleneck. Values
above 200 to 300 pages per second for a sustained period of time express a likely memory
bottleneck.
򐂰Buffer and cache
Cache allocated as file system and block device cache.
򐂰Slabs
Depicts the kernel usage of memory. Note that kernel pages cannot be paged out to disk.
򐂰Active versus inactive memo ry
Provides you with information about the active use of the system memory. Inactive
memory is a likely candidate to be swapped out to disk by the kswapd daemon. Refer to
“Page frame reclaiming” on page14.