System information

Chapter 23. Storage I/O Alignment and Size
Recent enhancements to the SCSI and ATA standards allow storage devices to indicate their
preferred (and in some cases, required) I/O alignment and I/O size. This information is particularly
useful with newer disk drives that increase the physical sector size from 512 bytes to 4k bytes. This
information may also be beneficial for RAID devices, where the chunk size and stripe size may impact
performance.
The Linux I/O stack has been enhanced to process vendor-provided I/O alignment and I/O size
information, allowing storage management tools (parted , l vm, mkfs. *, and the like) to optimize
data placement and access. If a legacy device does not export I/O alignment and size data, then
storage management tools in Red Hat Enterprise Linux 6 will conservatively align I/O on a 4k (or
larger power of 2) boundary. This will ensure that 4k-sector devices operate correctly even if they do
not indicate any required/preferred I/O alignment and size.
Refer to Section 23.2, ā€œ Userspace Accessā€ to learn how to determine the information that the
operating system obtained from the device. This data is subsequently used by the storage
management tools to determine data placement.
The IO scheduler has changed for Red Hat Enterprise Linux 7. Default IO Scheduler is now Deadline,
except for SATA drives. CFQ is the default IO scheduler for SATA drives. For faster storage, Deadline
outperforms CFQ and when it is used there is a performance increase without the need of special
tuning.
If default is not right for some disks (for example, SAS rotational disks), then change the IO scheduler
to CFQ. This instance will depend on the workload.
23.1. Paramet ers for St orage Access
The operating system uses the following information to determine I/O alignment and size:
p h ysical_blo ck_siz e
Smallest internal unit on which the device can operate
lo g ical_b lo ck_siz e
Used externally to address a location on the device
alig n men t _o f f set
Tthe number of bytes that the beginning of the Linux block device (partition/MD/LVM device)
is offset from the underlying physical alignment
minimu m_io _siz e
The device’s preferred minimum unit for random I/O
o p t imal_io _siz e
The device’s preferred unit for streaming I/O
For example, certain 4K sector devices may use a 4K physi cal _bl o ck_si ze internally but expose
a more granular 512-byte l o g i cal _bl o ck_si ze to Linux. This discrepancy introduces potential
for misaligned I/O. To address this, the Red Hat Enterprise Linux 6 I/O stack will attempt to start all
data areas on a naturally-aligned boundary (physi cal _bl ock_si ze) by making sure it accounts
for any alignment_offset if the beginning of the block device is offset from the underlying physical
alignment.
Red Hat Ent erprise Lin ux 6 St orage Admin ist rat io n G uide
158