Two-Node vSAN Performance Tip Disable Site Read Locality

0

When it comes to vSAN the solution performs extremely well from a performance standpoint by default. VMware has made many of the settings and tweaks built into the solution function automatically for the benefit of speed and performance. The great thing is this means that much of the hard work of performance tweaking is done for you. However, if you use the two-node vSAN cluster with the witness appliance, there is a setting that you may want to change that is implemented by default. This is the site read locality setting found under the advanced settings of the vSAN cluster vSAN properties. What does this setting do? Why in the two-node configuration might you want to change this? Let’s look at two-node vSAN performance tip disable site read locality to look into this a bit further.

What is the Site Read Locality Setting?

What is the Site Read Locality setting? Cormac Hogan has a great plain English explanation of the site read locality setting. The site read locality setting is there for true “stretched clusters” to ensure that you don’t have replicas across a relatively slow WAN/metro WAN type link being read from. Normal vSAN implementations will take advantage of all replicas for read purposes so that RAID-1 objects can be read from across all the hosts for the benefit of performance in terms of cache efficiency. A single block of data will only be cached once. However, again, you want this normal behavior to function differently when your hosts are housed in different sites.

Why is this enabled by default for a two-node vSAN cluster? Well, a two-node vSAN cluster is a special type of stretched cluster that makes use of the Witness appliance for quorum. The difference however with the two-node setup is you will most likely have the two-node cluster housed in one location and the Witness appliance housed in another.

Since this is the case with the two-node vSAN configuration, the two nodes that hold the actual data replicas of the virtual machines will be in the same high-performance site. You would want to be able to take advantage of the efficiency of the cache operation as it is configured in normal vSAN configurations.

As a two-node vSAN performance tip disable site read locality to once again take advantage of a bit of a performance increase in the two-node configuration since the data hosts reside in the same location.

Two-Node vSAN Performance Tip Disable Site Read Locality

Looking at the default configuration when you configure a VMware vSAN two-node configuration, one host is configured as a preferred fault domain and the other is configured as a secondary. Notice below, I have the Witness host configured with the fault domain which signifies the “stretched configuration”. Even in a two-node configuration, vSAN has the concept of fault domains. One of your hosts is configured as preferred and the other as secondary.

VMware-vSAN-two-node-fault-domains-configured-by-default Two-Node vSAN Performance Tip Disable Site Read Locality
Two-Node vSAN Performance Tip Disable Site Read Locality

To find the Site Read Locality setting, navigate to the vSAN cluster Configure > vSAN > Services > (Advanced Options) Edit.

Looking-at-VMware-vSAN-Site-Read-Locality-configuration Two-Node vSAN Performance Tip Disable Site Read Locality
Looking at VMware vSAN Site Read Locality configuration

The default VMware vSAN site read locality setting is configured as follows when you create a VMware vSAN cluster. Note how when you simply have the default vSAN configuration enabled without any type of stretched cluster, this setting is greyed out and cannot be changed.

Default-site-read-locality-configuration-for-VMware-vSAN-1 Two-Node vSAN Performance Tip Disable Site Read Locality
Default site read locality configuration for VMware vSAN

Once you have a stretched cluster configured, you can then disable the Site Read Locality setting by flipping the toggle switch.

Turning-off-the-site-read-locality-setting-for-a-vSAN-cluster Two-Node vSAN Performance Tip Disable Site Read Locality

The great thing about this setting change is there is no disruption to your vSAN datastore or any maintenance period you have to undergo to change it. The toggle can simply be flagged either way while VMs are running and the vsanDatastore is mounted.

Wrapping Up

In my home lab, I have a VMware vSAN two-node configuration provisioned that is hosting my “production” workloads. The performance of the cluster is fantastic and this is a setting that I have taken advantage of in the home lab running a two-node configuration.

I am always pleasantly surprised at the amount of tweaking and configuration that is done for you with VMware vSAN configurations that makes the solution extremely easy to provision, configure, and troubleshoot. The number of times you will find you need to tweak and configure settings manually is extremely low. This two-node vSAN performance tip disable site read locality is a tweak that you may want to make with your two-node configuration for the best performance possible.