Improving High-Capacity HDD Performance
Unlike older hard disks with 512-byte sectors, many modern HDDs (3TB and more in capacity) use 4KB physical sectors. In certain cases, this can greatly reduce system performance (by 3-4 times) due to extra Read-Modify-Write (RMW) cycles required to align the source write request. Why this happens? When an operating system issues an unaligned write request, the HDD has to align the beginning and end of that request to 4KB boundaries. To do this, the HDD reads the request's head and tail ranges to determine an even number of sectors to modify. For example, on a request to write a 4KB block at a 2KB offset, HDD will read the 0-2KB and 6-8KB ranges to modify the entire 0-8KB data range.
The typical reasons of poor performance with 4KB sector HDDs are:
-
Host OS file system unaligned on the 4KB boundary. The
make-cs
command of Parallels Cloud Storage tries to detect and report such issues to the administrator in advance, but be aware that the
fdisk
utility is not recommended for partitioning HDDs. You should use
parted
instead.
-
Unaligned writes (e.g., 1KB) performed by guest OS. Many legacy operating systems, like Microsoft Windows XP and Windows Server 2003 or Red Hat Enterprise Linux 5.x, have unaligned partitions by default and generate unaligned I/O patterns which are quite slow on both Parallels Cloud Storage and actual HDDs with 4KB sectors. If you plan running such legacy operating systems, consider the following:
-
Using smaller HDDs with 512-byte sectors, or use SSD journalling for CS services which mitigates the issue to some extent.
-
Aligning OS partitions properly as described in
Aligning Disks and Partitions in Virtual Machines
in the
Parallels Cloud Server 6.0 User's Guide
.
You can check for unaligned write operations in the cluster by as follows:
-
Run the
pstorage top
or
stat
command. For example:
# pstorage -c pcs1 top
-
Press
i
to display the
RMW
and
JRMW
columns in the CS part of the
top
output.
-
Check the
RMW
or
JRMW
counters, which are explained below.
-
When SSD journalling is used, the
RMW
counter shows the number of requests which lead to Read-Modify-Write cycles, while the
JRMW
counter shows the number of Read-Modify-Write cycles mitigated by the use of SSD journals.
-
When SSD journalling is not used, the
JRMW
counter shows the number of unaligned requests which potentially generate Read-Modify-Write cycles on the HDD in question.
|