7.7. 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-cscommand of Virtuozzo Storage tries to detect and report such issues to the administrator in advance, but be aware that the
fdiskutility is not recommended for partitioning HDDs. You should use
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 Virtuozzo 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 journaling for CS services which mitigates the issue to some extent.
Aligning OS partitions properly as described in Aligning Disks and Partitions in Virtual Machines.
You can check for unaligned write operations in the cluster by as follows:
statcommand. For example:
# vstorage -c stor1 top
Press i to display the RMW and JRMW columns in the CS part of the
Check the RMW or JRMW counters, which are explained below.
When SSD journaling 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 journaling is not used, the JRMW counter shows the number of unaligned requests which potentially generate Read-Modify-Write cycles on the HDD in question.
7.7.1. Improving Virtual Disk Performance¶
This section lists ways of improving the performance of virtual disks.
18.104.22.168. Preventing Partition Misalignment in Legacy Operating Systems¶
Virtual disks in virtual machines running legacy guest operating systems such as Windows Server 2003, Windows XP, Windows 2000, CentOS 5, or RHEL 5 may work slower because of partition misalignment. For solutions to this issue, see Aligning Disks and Partitions in Virtual Machines.
22.214.171.124. Maximizing Virtuozzo Containers Performance¶
Containers created with Virtuozzo containers installed in a virtual machine may not work at maximum performance by default. To maximize their performance, make sure you install the update VZU460053 for Virtuozzo containers before you create or migrate any containers. For more information on working with Virtuozzo containers, see the Virtuozzo Containers 6.0 User’s Guide.
A write journal on a solid-state drive is highly recommended for virtual machines running Virtuozzo containers.