4285ch03.fm Draft Document for Review May 4, 2007 11:35 am
84 Linux Performance and Tuning Guidelines
򐂰A process behaves poorly. Paging can be a serious performance problem when the
amount of free memory pages falls below the minimum amount specified, because the
paging mechanism is not able to handle the requests for physical memory pages and the
swap mechanism is called to free more pages. This significantly increases I/O to disk and
will quickly degrade a server’s performance.
If your server is always paging to disk (a high page-out rate), consider adding more memory.
However, for systems with a low page-out rate, it may not affect performance.

3.3.2 Performance tuning options

It you believe there is a memory bottleneck, consider performing one or more of these
actions:
򐂰Tune the swap space using bigpages, hugetlb, shared memory.
򐂰Increase or decrease the size of pages.
򐂰Improve the handling of active and inactive memory.
򐂰Adjust the page-out rate.
򐂰Limit the resources used for each user on the server.
򐂰Stop the services that are not needed, as discussed in “Daemons” on page97.
򐂰Add memory.
3.4 Disk bottlenecks
The disk subsystem is often the most important aspect of server performance and is usually
the most common bottleneck. However, problems can be hidden by other factors, such as
lack of memory. Applications are considered to be I/O-bound when CPU cycles are wasted
simply waiting for I/O tasks to finish.
The most common disk bottleneck is having too few disks. Most disk configurations are based
on capacity requirements, not performance. The least expensive solution is to purchase the
smallest number of the largest-capacity disks possible. However, this places more user data
on each disk, causing greater I/O rates to the physical disk and allowing disk bottlenecks to
occur.
The second most common problem is having too many logical disks on the same array. This
increases seek time and significantly lowers performance.
The disk subsystem is discussed in 4.6, “Tuning the disk subsystem” on page113.

3.4.1 Finding disk bottlenecks

A server exhibiting the following symptoms may be suffering from a disk bottleneck (or a
hidden memory problem):
򐂰Slow disks will result in:
Memory buffers filling with write data (or waiting for read data), which will delay all
requests because free memory buffers are unavailable for write requests (or the
response is waiting for read data in the disk queue)
Insufficient memory, as in the case of not enough memory buffers for network requests,
will cause synchronous disk I/O
򐂰Disk utilization, controller utilization, or both will typically be very high.
򐂰Most LAN transfers will happen only after disk I/O has completed, causing very long
response times and low network utilization.