Verification workflow for vSAN OSA compression-only settings
search cancel

Verification workflow for vSAN OSA compression-only settings

book

Article ID: 441683

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

  • Administrators managing a VMware vSAN OSA cluster may notice lower-than-expected space savings or high physical space utilization metrics reported within the vCenter Server UI. When vSAN compression-only settings are enabled, space savings are heavily dependent on the compressibility of the specific workload.
  • This article provides the workflow to verify LZ4 compression efficiency, check deduplication statistics (dedupStats), and review device space usage statistics (deviceSpaceUsageStats) via the ESXi command line (vsish).
  • Understanding these metrics helps administrators determine if a significant portion of the workload consists of incompressible data, which directly impacts the overall space savings achieved on the capacity tier.

Environment

VMware vSAN 8.X

Cause

  • vSAN uses the LZ4 compression mechanism, which operates on 4 KB data blocks. The deduplication engine evaluates each unique 4 KB block for compression efficiency during the de-staging process from the write buffer to the capacity tier.
  • If the LZ4 compression mechanism successfully reduces the block size by at least 50% (compressing a 4 KB block to ≤ 2 KB), the compressed version is persisted to the capacity tier as a single 2 KB allocation block.
  • If compression cannot reduce the size to 2 KB or less, the block is considered incompressible and is written in its original form, consuming two 2 KB allocation units. During this workflow, metadata blocks are read from the capacity tier, updated to reflect the compression state and block references, and subsequently written back to disk.
  • To verify compression efficiency, check the dedupStats for the capacity disks via vsish:
# /vmkModules/plog/devices/naa.####/> cat dedupStats
Number of compressed blocks:213632033
Number of uncompressed blocks:605521785
Time spent in compression (ns):2678666103387

Note: A high number of uncompressed blocks indicates data that could not achieve the required compression threshold.

Next, check the physical and logical space consumption usage:

  • totalUniqueCompressedLogicalUsage: Logical consumption by compressed unique blocks.

  • totalUniqueCompressedPhysicalUsage: On-disk usage of unique compressed blocks.

  • totalUniqueUncompressedLogicalUsage: Logical consumption by uncompressed unique blocks.

# /vmkModules/plog/devices/naa.####/> cat deviceSpaceUsageStats

PLOG Device Space Usage Stats {
   Deduplication scope:1
   Are dedupe stats valid:1
   Total Dedupe Compressed 2K Blocks:0
   Total Dedupe Uncompressed 2K Blocks:0
   Total Unique Compressed 2K Blocks:99732386
   Total Unique Uncompressed 2K Blocks:515872918
   Total Zero Block Deduplication:314133053
   Total Zero Logical usage:1286688985088
   Total Compressed blocks Deduplications:0
   Total Uncompressed blocks Deduplications:0
   Total 2K Blocks:895952914
   Total Free 2K Blocks:280347610
   Total Logical usage in bytes:2751700574208
   Total Logical usage by dedupe in bytes:0
   Total Logical usage by unique compressed in bytes:408503853056
   Total Physical usage in bytes:1260759662592
   Total Physical usage by dedupe in bytes:0
   Total Physical usage by unique compressed in bytes:204251926528
   Dedup allocation blk size:2048
}

Block to Byte Calculation Example: Using the output above, calculate the exact physical bytes consumed by compressed blocks:

  • Block size: 2048 bytes (2 KB)

  • Total Compressed Bytes: 99,732,386 (Total Unique Compressed 2K Blocks) * 2048 = 204,251,926,528 bytes

  • Total Compressed GB: 204,251,926,528 / 1,073,741,824 = ~190.22 GB of compressed data on disk naa.####.

The high count of uncompressed unique blocks confirms that the workload predominantly contains data patterns that are not sufficiently compressible to satisfy the vSAN threshold.

Resolution

The observed space utilization in vCenter reflects post-compression physical consumption after block-level compression processing by vSAN. The compression mechanism is functioning as designed, and current space savings depend entirely on the compressibility characteristics of the workload data.

Workloads and environmental conditions vary; if raw storage performance is the highest priority, disabling space efficiency features yields the highest sustained performance for the hardware configuration used.