4285ch04.fm Draft Document for Review May 4, 2007 11:35 am
118 Linux Performance and Tuning Guidelines
Sometimes however the workload is not so much limited by the performance of the disk
subsystem but much more by the performance of the CPU. Such a case could be a
scientific workload or a data warehouse processing very complex queries. In such
scenarios the NOOP elevator offers some advantage over the other elevators as it causes
less CPU overhead as shown on the following chart. However it should also be noted that
when comparing CPU overhead to throughput the deadline and CFQ elevator still are the
best choice for most access patterns to asynchronous file systems.
Figure 4-8 CPU utilization by I/O elevator (asynchronous)
򐂰Single ATA or SATA disk subsystems
If you choose to use a single physical ATA or SATA disk, consider using the anticipatory
I/O elevator, which reorders disk writes to accommodate the single disk head found in
these devices.
Impact of nr_requests
The plugable I/O scheduler implementation of kernel 2.6 also features a possibility to increase
or decrease the number of requests that can be issued to a disk subsystem. With nr_requests
as with so many other tuning parameters there is no one best setting. The correct value that
should be used for the number of requests largely depends on the underlying disk subsystem
and even more on the I/O characteristics of the workload. The impact of different values of
nr_requests may also differ from file system and I/O scheduler that you plan to use as can be
easily seen by the two benchmarks displayed in Figure4-9 on page 119 and Figure 4-10 on
page 120. As indicated by the chart in Figure4-9 on page 119 the Deadline elevator is less
prone to variations caused by different values of nr_requests than the CFQ elevator is.
0
5
10
15
20
25
30
35
40
45
50
CPU%
4 8 16 32 64 128 256 512 1024 2048
kB/op
NOOP
Deadline
CFQ
Anticipatory