VMware Cloud Community
winsolo
Enthusiast
Enthusiast

Property or Method to collect the vSAN dedup and Compression savings info

Is there a property or method that outputs the vSAN Dedup & compression savings from a cluster?

Snag_138c7c02.png

 

I couldn't find anything that corresponds to vSAN compression in the

$cluster.ExtensionData

Snag_138ec9ea.png

Labels (2)
Reply
0 Kudos
5 Replies
LucD
Leadership
Leadership

I suspect the following might provide the data to calculate those savings.
Can't really test since I'm not using dedup nor compression.

$clusterName = 'cluster'
$cluster = Get-Cluster -Name $clusterName

$vdMgmt = Get-VsanView -Id  VimClusterVsanVcDiskManagementSystem-vsan-disk-management-system
$vdMgmt.QueryClusterDataEfficiencyCapacityState($cluster.ExtensionData.MoRef) | Format-Custom


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

winsolo
Enthusiast
Enthusiast

These values appear to be in bytes. They don't show the savings capacity and the ratio.

Snag_14247c1e.png

Snag_14289ef5.png

 Thanks @LucD for checking this for me though.

Reply
0 Kudos
LucD
Leadership
Leadership

Isn't it just a matter of doing the percentage calculation?
(LogicalCapacityUsed - PhysicalCapacityUsed) / LogicalCapacityUsed


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
winsolo
Enthusiast
Enthusiast

"(LogicalCapacityUsed - PhysicalCapacityUsed) / LogicalCapacityUsed" gives me 0.15680954964731416169289202387412 (160.57 GB), unless I’m very much mistaken. I'm trying to understand how does this value reflect the compression and/or saving ratio in the UI. I'm sure I'm missing something. Would you mind telling me if you see a problem?

LogicalCapacityUsed = 222913884816664 bytes (202.73 TB)
PhysicalCapacityUsed = 187958572722320 bytes (170.94 TB)

(202.73 TB -170.94 TB) / 202.73 TB = 160.57 GB

Reply
0 Kudos
LucD
Leadership
Leadership

I'm not sure how you did that calculation, but on my calculator 

(202-170)/170 = 0.15

Which I interpret as a 15% storage won by using compression and deduplication. 


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference