4285ch04.fm Draft Document for Review May 4, 2007 11:35 am
94 Linux Performance and Tuning Guidelines
suggest that you select the respective file system based on these requirements. Refer to
4.6, “Tuning the disk subsystem” for detailed selection criteria.
򐂰Package selection: minimal or everything?
During an installation of Linux, administrators are faced with the decision of a
minimal-or-everything installation approach. Philosophies differ somewhat in this area.
There are voices that prefer everything installations because there is hardly ever the need
to install packages to resolve dependencies.
Consider these points: While not related to performance, it is important to point out that an
“everything” or “near-everything” installation imposes security threats on a system. The
availability of development tools on production systems may lead to significant security
threats. The fewer packages you install, the less disk space will be wasted, and a disk with
more free space performs better than a disk with little free space. Intelligent software
installers such as the Red Hat Packet Manager or rpm or yum will resolve dependencies
automatically if desired. Therefore, we suggest you consider a minimal packages selection
with only those packages that are absolutely necessary for a successful implementation of
the application.
򐂰Netfilter configuration
You need to choose if the Netfilter firewall configuration is required or not. The Netfilter
firewall should usually be used to protect the system from malicious attacks. However
having too many and complicated firewall rules may decrease performance in high data
traffic environments. We cover the Netfilter filewall in 4.7.6, “Performance impact of
Netfilter” on page133.
򐂰SELinux
In certain Linux distributions such as Red Hat Enterprise Linux 4.0, the installation routine
allows to select the installation of SELinux. SELinux comes at a significant performance
penalty and you should carefully evaluate whether the additional security provided by
SELinux is really needed for a particular system. For more information, refer to 4.2.4,
“SELinux” on page102.
򐂰Runlevel selection
The last choice given during the installation process is the selection of the runlevel your
system defaults to. Unless you have a specific need to run your system in runlevel 5
(graphical user mode) we strongly suggest using runlevel 3 for all server systems.
Normally there should be no need for a GUI on a system that resides in a data center, and
the overhead imposed by runlevel 5 is considerable. Should the installation routine not
offer a run level selection we suggest to manually select run level 3 after the initial system
configuration.
4.2.2 Check the current configuration
As stated in the introduction, it is most important to establish a solid base for any system
tuning attempts. A solid base means ensuring that all subsystems work the way they were
designed to and that there are no anomalies. An example to such an anomaly would be a
gigabit network interface card and a server with a network performance bottleneck. Tuning the
TCP/IP implementation of the Linux kernel may be of little use if the network card
autonegotiated to 100MBit/half duplex.

dmesg

The main purpose of dmesg is to display kernel messages. dmesg can provide helpful
information in case of hardware problems or problems with loading a module into the kernel.