Red Hat traces SQL Server write latency on OpenShift VMs to drivers and storage flushes
The tuning guide recommends a newer Windows storage driver and explains when write-through storage can reduce flush overhead without giving up durability.
Red Hat’s OpenShift Virtualization performance team published a SQL Server tuning guide on Dec. 1 for teams seeing lower database throughput or higher write latency than their storage should deliver. It separates two problems that can look alike from the database: a Windows virtual-disk driver bottleneck and time spent waiting for writes to be flushed.
Check the Windows driver first
For Windows guests with bus: virtio disks, Red Hat recommends virtio-win 1.9.62 or newer, containing viostor 100.104.104.30300 or newer. That version includes a queue optimization for virtio-blk disks. The guide advises checking the installed viostor.inf version in the guest with pnputil /enum-drivers. This recommendation is specific to Windows guests using that disk bus; it is not a blanket recommendation to switch every VM to virtio-blk.
Check what the storage guarantees
The guide explains that SQL Server follows database writes with flushes to ensure durability. If the backing device already provides write-through semantics, the team says configuring QEMU’s directsync cache mode can avoid redundant flush work. That storage guarantee is the prerequisite, not an assumption to make from a latency graph. Red Hat says full support for configuring directsync is pending and lists backports being tracked for 4.22.z and 5.0.z. The sidecar example is an unsupported way to evaluate the behavior, not a production recommendation.
There is a separate path for compatible storage. Starting in 4.22, Red Hat says VMs using bus: scsi disks and machine type rhel-9.8.0 or later automatically enable Forced Unit Access (FUA) when the underlying device supports it. The guide says SQL Server on Windows uses that behavior automatically; on Linux it requires trace flag T3979. Red Hat does not recommend explicitly enabling both FUA and directsync for the same optimization.
Measure before changing settings
The team suggests comparing VM write and flush counters over a short interval under load rather than reading cumulative totals since boot. In one lab sample, flushes occurred almost as often as writes and took substantially more time in aggregate. The guide’s throughput examples used fast local storage; teams with different storage or replication should treat those results as examples, not expected gains. For a before-and-after test, Red Hat recommends keeping the HammerDB client version constant and allowing enough ramp-up time to reach steady state.
sources
- Red Hat Developer: OpenShift Virtualization: Microsoft SQL Server Tuning Guidancedevelopers.redhat.com
comments · 0