Before installing Linux on a hardware system, you need to consider many performance issues that will help optimize the operating system and the applications running on it in the future. These problems include:
- Select partition location
- Use multiple hard drives
- Select File System
Linux requires at least one root partition and one swap partition. The installation location of these two partitions and other partitions that require frequent access on the disk will eventually affect the system performance.
- Separate partitions are used for var, swap,/var,/usr, And/home partitions.
- Most hard drive disks encapsulate more sectors on the outer track than the inner track, so reading data from the outer track is much faster. Generally, a partition with a lower number is installed on an external track (for example,/dev/hda1 is closer to the outer edge of the hard drive than/dev/hda3 ), therefore, you must first place partitions that require frequent access.
- The first partition should be a swap partition (used to optimize memory swap operations)
- The second partition should be/var, because log records are frequently written to/var/log.
- The next partition should be/usr, because the basic system tools and commands are located in/usr.
- The root and/home partitions can reside near the end of the hard drive.
Use multiple hard drive, and make full use of multiple hard drive.
- Install frequently accessed partitions on a faster hard drive
- If the performance of these hard drive is similar, install the commonly used partitions on different hard drive. For example, the/var and/usr partitions are placed on two different hard drive, and the swap partition is placed on the independent hard drive.
- To maximize the throughput of the bus, each hard drive acting as the main device should be placed on the I/O channel. After the hard drive is moved between different I/O channels, the device name changes. Therefore, you need to change the file system table (/etc/fstab) accordingly. If you want to move a hard drive that contains the root or/boot partition, you also need to edit the/boot/grub/menu. lst file.
File System Type
- Ext4, ext3 Ultimate Edition, provides more performance and reliability, more rich features
- ReiserFS provides better performance for small files
- XFS provides better performance for large files