Choosing between VMDK vs RDM for Microsoft SQL Server workloads running in VMware is a vital decision that IT administrators must make when setting up their infrastructure. While both provide storage for use with SQL Server in virtualized environments, which one is the preferred choice depends on whether your use case prioritizes performance and flexibility.
This guide explains the practical differences between the two to help guide you to the right choice for running SQL Server under VMware virtualization.
What is VMDK?
Virtual machine disk (VMDK) is a portable, high-performance, highly scalable, virtual disk format used in VMware vSphere virtualized environments. It’s a virtualized hard disk that can be readily resized, backed up, snapshotted, and recovered, and connected and disconnected from virtual machines, making VMDK flexible and easy to manage.
What is RDM?
Raw device mapping (RDM) allows VMware vSphere to map storage directly to a SAN LUN (Logical Unit Number). This can provide direct access to physical storage features. It can also offer better performance (though this is less of an advantage now compared to VMDK, as discussed below), and give software running in virtualized environments (for example, clustering software) direct access to hardware storage, but comes with tradeoffs for flexibility, scalability, and management.
vVol is another VMware vSphere storage technology; however, it is being deprecated and should not be used in new deployments. Existing users of vVol should assess whether they need to migrate from it to another supported storage technology.
What is the difference between VMDK and RDM?
To summarize, VMDK is a virtual disk file accessed from within the VMware vSphere virtualization platform, while RDM maps a virtual machine directly to a physical storage device. Both appear as regular volumes to guest operating systems, however, there are differences between them that impact SQL Server workloads, and each technology has implications for performance and management.
What to consider when deciding which VMware storage technology to use for SQL Server
The appropriate choice for Microsoft SQL Server workloads will depend on your use case, but generally, users will use VMDK for the following reasons.
VMDK vs. RDM performance impacts
While RDM is historically considered more performant than VMDK, this difference has become diminished as a decision factor for most users. VMDK is now heavily optimized for performance, making the practical difference minimal (sometimes as small as 1%).
Performance gains from RDM tend to now be workload-specific, with very limited use cases where the guest needs direct access to storage hardware features.
Management and operational tradeoffs between virtualized and hardware storage
VMDK is demonstrably easier to manage than RDM due to the following features:
- Flexible, on-the-fly backup and restore: VMDK supports snapshots, replicas, and cloning
- Simplified management: Virtualization means storage can be provisioned, resized, optimized, and deprovisioned at will
- Portability and scalability: Hot swap storage, and readily migrate disks or virtual machines between environments
- Integration with VMware virtualization tools: Fully virtualized environments can be fully leveraged for their advantages, rather than being reliant on specific underlying devices
Conversely, the lack of snapshotting and other management features can make RDM more difficult to back up and restore, more complex to maintain, and less portable and scalable, with limited compatibility and support for the features that make virtualization attractive for SQL Server hosting in the first place.
SQL Server workload considerations
When planning the infrastructure for your SQL Server deployment, you should be prioritizing consistent disk performance, as well as reliable backup and recovery. You should also consider the need for high availability configurations and the benefits of additional virtualization features. VMDK meets these requirements when specced correctly.
When RDM may still be a useful alternative to VMDK
For most, VMDK will be the clear choice for Microsoft SQL Server workloads. However, for specific edge-case hardware and cluster configurations, RDM may still be required. Legacy systems or software that require direct access to the storage hardware (for example, clustering software) may also necessitate RDM.
If you are considering RDM, think carefully, as even VMware generally recommends VMDK outside workload-specific use cases or the need to support legacy requirements.
Monitor performance, manage, and back up VMware hosts and virtual machines
One of the key advantages of VMDK is its ability to be snapshotted, allowing you to roll back to a known good state or restore a full backup. For systems that rely on either VMDK or RDM, it’s important to be able to quickly diagnose issues (especially in distributed systems), and, in the event of a failure or cybersecurity event, restore a whole system.
NinjaOne provides VMware monitoring and management as part of its comprehensive IT toolchain that integrates endpoint management, cybersecurity tools, and network management for unified oversight over your entire IT infrastructure, on-site, in the cloud, and virtualized.
