Chapter 4. Tuning the operating system 113
Draft Document for Review May 4, 2007 11:35 am 4285ch04.fm
SwapCached: 0 kB
Active: 364732 kB
Inactive: 53908 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 4037420 kB
LowFree: 386664 kB
SwapTotal: 2031608 kB
SwapFree: 2031608 kB
Dirty: 0 kB
Writeback: 0 kB
Mapped: 148620 kB
Slab: 24820 kB
CommitLimit: 2455948 kB
Committed_AS: 166644 kB
PageTables: 2204 kB
VmallocTotal: 536870911 kB
VmallocUsed: 263444 kB
VmallocChunk: 536607255 kB
HugePages_Total: 1557
HugePages_Free: 1557
Hugepagesize: 2048 kB
Please refer to kernel documentation in Documentation/vm/hugetlbpage.txt for more
information.
4.6 Tuning the disk subsystem
Ultimately, all data must be retrieved from and stored to disk. Disk accesses are usually
measured in milliseconds and are at least thousands of times slower than other components
(such as memory and PCI operations, which are measured in nanoseconds or
microseconds). The Linux file system is the method by which data is stored and managed on
the disks.
Many different file systems are available for Linux that differ in performance and scalability.
Besides storing and managing data on the disks, file systems are also responsible for
guaranteeing data integrity. The newer Linux distributions include journaling file systems as
part of their default installation. Journaling, or logging, prevents data inconsistency in case of
a system crash. All modifications to the file system metadata have been maintained in a
separate journal or log and can be applied after a system crash to bring it back to its
consistent state. Journaling also improves recovery time, because there is no need to perform
file system checks at system reboot. As with other aspects of computing, you will find that
there is a trade-off between performance and integrity. However, as Linux servers make their
way into corporate data centers and enterprise environments, requirements such as high
availability can be addressed.
In addition to the various file systems, the Linux kernel 2.6 knows 4 distinct I/O scheduling
algorithms that again can be used to tailor the system to a specific task. Each I/O elevator has
distinct features that may or may not make it suitable for a specific hardware configuration and
a desired task. While some elevators pronounce streaming I/O as it is often found in multi
media or desktop PC environments, other elevators focus on low latency access times
necessary for database workloads.