Developers Guide

Performance considerations
47 Dell EMC SC Series with Red Hat Enterprise Linux 7x | CML1071
4.4 SCSI UNMAP/TRIM
The application and use of SCSI UNMAP/TRIM in filesystem use cases can be very effective towards storage
and cost management in the business enterprise. However, consideration should also be made in regard to
how this function is implemented.
The discard mount parameter would enable the filesystem to perform real-time, on-demand SCSI UNMAP
commands to the SC Series array. In high-I/O-based application landscapes, this may introduce
unnecessarily high levels of I/O control traffic as well as raised CPU loads, causing an increase I/O latency
and potentially impacting business critical I/O subsequently.
An alternative to this implementation is using the fstrim command. The fstrim command is part of the util-linux
package, and allows a one-time request to discard used blocks from a mounted filesystem. This command
can be scripted (shown in the following sample script), injected into a scheduled cron job, and then applied to
a set of mounted filesystems in batch during a time of day that would have less impact to business critical
functions.
#!/bin/bash
FSTrim=/usr/bin/fstrim
MntPoints="u01 u02 u03 u04 u05"
for i in ${MntPoints}
do
echo "INFO: Applying ${FSTrim} to mount point ${i}"
${FSTrim} -v /${i}
done
4.5 SCSI device queue variables
Several Linux SCSI device queue settings can be applied to tune performance. The more common ones are
listed in sections 4.5.1 through 4.5.4, with a brief explanation of what each parameter does with regard to I/O.
These values are found in the /sys/block/dm-X/queue directory (multipath devices) and /sys/block/sdX/queue
directory (block devices) and should be modified for each path device for the intended multipath volume.
4.5.1 I/O scheduler
The /sys/block/dm-X/queue/scheduler parameter and its contents define the I/O scheduler in use by the Linux
kernel for SCSI (sd) devices. Some application vendors (such as Oracle) provide specific recommendations
for I/O scheduler to use in order to achieve optimal performance with the application platform. By default in
RHEL 7.x, this variable is set to deadline as denoted by the [ ] brackets within the file. The deadline scheduler
can be further configured using the sysfs tunable subparameters (such as fifo_batch, read_expire, and
write_expire) that are discussed in the RHEL 7 Performance Tuning Guide.
# cat /sys/block/dm-X/queue/scheduler
noop [deadline] cfq