Tuning a Linux system with config files
The Linux system includes several files to define how disks are mounted, and so on. Some parameters can be set in these files instead of using /proc
or sysctl
.
Getting ready
There are several files in /etc
that control how a system is configured. These can be edited with a standard text editor such as vi
or emacs
. The changes may not take effect until the system is rebooted.
How to do it...
The /etc/fstab
file defines how disks are to be mounted and what options are supported.
The Linux system records when a file is created, modified, and read. There is little value in knowing that a file has been read, and updating the Acessed
timestamp every time a common utility like cat is accessed gets expensive.
The noatime
and relatime
mount options will reduce disk thrashing:
$ cat /dev/fstab /dev/mapper/vg_example_root / ext4 defaults,noatime 1 1 /dev/mapper/gb_example_spool /var ext4 defaults,relatime 1 1
How it works
The preceding example mounts...