Building a High-Performance SQL Cluster on vSphere: Best Practices and Recommendations

By | May 12, 2023

Building a new SQL cluster in vCenter requires careful planning and consideration of several factors. Here’s a comprehensive guide covering prerequisites, questions to ask the customer, and recommendations for a highly utilized SQL cluster.


  1. Hardware Resources: Ensure that the host servers have adequate CPU, memory, and storage resources to handle the expected workload. Consider the growth projections and ensure scalability.
  2. Networking: Verify that the network infrastructure can support the required bandwidth and latency for SQL cluster communication. Plan for redundancy and fault tolerance with multiple network interfaces.
  3. Storage Configuration: Choose a storage solution with sufficient capacity, performance, and redundancy for the SQL cluster. Consider options like Fibre Channel, iSCSI, or NFS, depending on the requirements and capabilities of your environment.
  4. vCenter and ESXi Version Compatibility: Ensure that the vCenter Server and ESXi hosts are compatible with the version of SQL Server you plan to deploy. Check the VMware Compatibility Guide for compatibility information.
  5. Cluster Quorum: Decide on the cluster quorum configuration, which determines how the cluster makes decisions in case of node failures. Options include a shared disk, a witness server, or a file share witness.

Questions to Ask the Customer:

  1. Workload Requirements: Understand the specific workload characteristics, such as the number of concurrent users, database size, IOPS (Input/Output Operations Per Second) requirements, and expected growth rate. This information helps determine the necessary hardware resources.
  2. High Availability Requirements: Determine the desired level of availability, including considerations for failover and disaster recovery. Discuss the Recovery Point Objective (RPO) and Recovery Time Objective (RTO) to determine the appropriate cluster configuration.
  3. Backup and Recovery Strategy: Inquire about the customer’s backup and recovery strategy for the SQL cluster. Understand their preferred backup solution and any specific requirements that may impact the cluster design.
  4. Security Considerations: Discuss security requirements such as network segmentation, firewall rules, encryption, and authentication mechanisms to ensure that the SQL cluster meets the necessary security standards.

Recommendations for a Highly Utilized SQL Cluster:

  1. Disk Configuration: Consider using VMware’s paravirtualized SCSI adapter (PVSCSI) for improved disk performance. Deploying multiple virtual disks spread across different storage LUNs can help distribute I/O load and enhance performance.
  2. Disk Mode: Choose the appropriate disk mode based on the customer’s requirements. For maximum performance, use “Independent – Persistent” mode. If application-level consistency is important, use “Independent – Nonpersistent” mode along with a suitable backup strategy.
  3. VMDK Disk File Format: Use the VMFS6 file format for improved performance and scalability. VMFS6 supports features like automatic space reclamation and supports larger VMDK sizes.
  4. vCPU Configuration: It is generally recommended to use fewer sockets and more cores per socket. This configuration provides better scalability, NUMA optimization, and reduces potential NUMA contention. However, consult the SQL Server licensing requirements to ensure compliance with the core-based licensing model.
  5. vNUMA: If the host server has NUMA architecture, enable vNUMA in the VM’s settings. This allows the VM’s vCPUs and memory to align with the NUMA nodes, optimizing performance and reducing memory latency.
  6. vCPU Hot Plug: Disable vCPU hot plug for SQL Server VMs. Hot plug operations can cause a temporary performance impact and are generally not recommended for critical database workloads.
  7. Monitoring and Optimization: Implement performance monitoring tools to keep track of SQL Server performance metrics, including CPU utilization, disk I/O, memory usage, and network latency. Regularly review these metrics to identify performance bottlenecks and optimize the cluster configuration as needed.
  1. Memory Configuration: Allocate sufficient memory to the SQL Server VMs to accommodate the working set of the database and avoid excessive paging. Consider reserving memory to prevent contention with other VMs on the host.
  2. Storage Performance Improvement: To improve disk read/write performance, consider implementing the following techniques:

    a. Use eager zeroed thick provisioning for VMDK files to pre-allocate storage space and avoid potential performance impacts during write operations.

    b. Utilize storage array-based features like caching, tiering, and replication to optimize performance and redundancy.

    c. Leverage VMware vSphere features such as Storage I/O Control (SIOC) and Storage Distributed Resource Scheduler (SDRS) to prioritize and balance storage resources.

    d. Consider using VMware vSAN (Virtual SAN) as a storage solution for high-performance and highly available configurations.

  3. SQL Server Configuration: Configure SQL Server to align with the virtual environment. Set appropriate memory limits, maximum degree of parallelism (MAXDOP), and affinity mask settings based on the available hardware resources and workload requirements.
  4. Regular Performance Monitoring: Continuously monitor the performance of the SQL cluster using tools like vCenter performance charts, SQL Server Performance Monitor, and third-party monitoring solutions. Monitor CPU usage, memory usage, disk I/O, network latency, and SQL Server-specific performance counters. Analyze the data to identify bottlenecks and optimize the configuration as needed.
  5. Disaster Recovery and High Availability: Implement a robust disaster recovery (DR) plan for the SQL cluster. Explore options such as vSphere High Availability (HA), vSphere Fault Tolerance (FT), or third-party solutions for failover and data protection. Consider off-site replication, database mirroring, or log shipping for additional data redundancy.
  6. Regular Maintenance and Patching: Establish a schedule for regular maintenance tasks, including applying patches, updates, and security fixes for both the virtual infrastructure and the SQL Server instances. Ensure proper testing and change management procedures are followed to minimize disruptions.
  7. Documentation and Knowledge Transfer: Document the SQL cluster design, configuration, and any unique considerations specific to the customer’s environment. This documentation will serve as a valuable reference for troubleshooting, future upgrades, and knowledge transfer.

Remember, these recommendations provide general guidelines, and it’s essential to assess the specific requirements and constraints of the customer’s environment. Consultation with the customer, along with thorough testing and performance monitoring, will help fine-tune the SQL cluster configuration for optimal performance and availability.

Leave a Reply

Your email address will not be published. Required fields are marked *