Enabling Deduplication and Compression on All-Flash Clusters
It is often advantageous to enable Deduplication and Compression on All-Flash vSAN deployments. Reduced capacity utilization can often make All-Flash vSAN more cost effective than Hybrid vSAN deployments.
If you are using the Configure vSAN wizard, the Enable
Deduplication and Compression option can be selected while creating the vSAN cluster.
However, after creating vSAN cluster, the process of enabling or disabling the
Deduplication and Compression option using the Configure vSAN wizard can be time
consuming. In some scenarios it might lead to reduced availability.
Note: If you use the vSAN Express Storage
Architecture (ESA), compression is enabled by default on the cluster. To disable
compression, you can use storage policies.
By using the vSAN Management API, the process of enabling the Deduplication and Compression is simple.
In the vSphere Client, you enable deduplication and compression in the Configure vSAN wizard, before you claim any disks for the cluster.

To enable deduplication and compression with the vSAN Management API, you set the dataEfficiencyConfig property of the vsanReconfigSpec object with an object of type VsanDataEfficiencyConfig.
if isallFlash: print 'Enable deduplication and compression for VSAN' vsanReconfigSpec.dataEfficiencyConfig = vim.VsanDataEfficiencyConfig( compressionEnabled=args.enabledc, dedupEnabled=args.enabledc) # Enable/disable deduplication and compression task = vsanClusterSystem.VsanClusterReconfig(cluster, vsanReconfigSpec) vsanapiutils.WaitForTasks([task], si)