Installation guide

Chapter 20. Solid-State Disk Deployment Guidelines
120
In addition, keep in mind that logical volumes, device-mapper targets, and md targets do not support
TRIM. As such, the default Red Hat Enterprise Linux 6 installation will not allow the use of the TRIM
command, since this install uses DM-linear targets.
Red Hat also warns that software RAID levels 1, 4, 5, and 6 are not recommended for use on SSDs.
During the initialization stage of these RAID levels, some RAID management utilities (such as mdadm)
write to all of the blocks on the storage device to ensure that checksums operate properly. This will
cause the performance of the SSD to degrade quickly.
At present, ext4 is the only fully-supported file system that supports TRIM. To enable TRIM commands
on a device, use the mount option discard. For example, to mount /dev/sda2 to /mnt with TRIM
enabled, run:
mount -t ext4 -o discard /dev/sda2 /mnt
By default, ext4 does not issue the TRIM command. This is mostly to avoid problems on devices which
may not properly implement the TRIM command. The Linux swap code will issue TRIM commands to
TRIM-enabled devices, and there is no option to control this behaviour.
20.2. Tuning Considerations
This section describes several factors to consider when configuring settings that may affect SSD
performance.
I/O Scheduler
Any I/O scheduler should perform well with most SSDs. However, as with any other storage type, Red
Hat recommends benchmarking to determine the optimal configuration for a given workload.
When using SSDs, Red Hat advises changing the I/O scheduler only for benchmarking particular
workloads. For more information about the different types of I/O schedulers, refer to the I/O Tuning
Guide (also provided by Red Hat). The following kernel document also contains instructions on how to
switch between I/O schedulers:
/usr/share/doc/kernel-version/Documentation/block/switching-sched.txt
Virtual Memory
Like the I/O scheduler, virtual memory (VM) subsystem requires no special tuning. Given the fast
nature of I/O on SSD, it should be possible to turn down the vm_dirty_background_ratio and
vm_dirty_ratio settings, as increased write-out activity should not negatively impact the latency
of other operations on the disk. However, this can generate more overall I/O and so is not generally
recommended without workload-specific testing.
Swap
An SSD can also be used as a swap device, and is likely to produce good page-out/page-in
performance.