VMware Cloud Community
lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

VSAN footprint calculation

Hello

 

I'm trying to find a way to calculate vSAN FOOTprint using a script, I'm not sure if that is possible or not but based on the below formula I guess it's possible

 

DiskGroupFootprint = DISKGROUP_FIXED_FOOTPRINT + DISKGROUP_SCALABLE_FOOTPRINT + CacheSize * CACHE_DISK_FOOTPRINT + NumCapacityDisks * CAPACITY_DISK_FOOTPRINT

 

vSANFootprint = HOST_FOOTPRINT + NumDiskGroups * DiskGroupFootprint

 

PS I asked the same question on vSAN group by mistake and didn't find a way to delete it 

 

 

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I did some further digging, but as far as I can tell, these data, and their format, are not made public.

Reverse engineering the rvc Ruby sources for the VSAN part (in /opt/vmware/rvc/lib/rvc/modules/vsancmd), I found out they use the QueryVsanStatistics method.

But the labels you have to pass to this method are "The following labels are current supported: - TBD".

With a bit of guess work, and reading the comments in the Ruby source, I could determine that memory statistics are retrieved with the "mem" label.

That indeed returns information, but then the next roadblock is "The details of the counters remain undocumented and unsupported at this point, and this API remains internal."

At that point, I gave up.

I currently have the following, but no documented way to interpret what mem-group-stats and mem-heap-stats contain.
Nor do I know how to interpret the on-esx-collect-duration value

$clusterName = 'cluster'

$cluster = Get-View -ViewType ClusterComputeResource -Filter @{Name=$clusterName}
Get-View -ViewType HostSystem -SearchRoot $cluster.MoRef -PipelineVariable esx |
ForEach-Object -Process {
  $vsanSys = Get-View -Id $esx.configManager.vsanInternalSystem
  $memMetric = $vsanSys.QueryVsanStatistics(@('mem')) | ConvertFrom-Json
  $memMetric.'mem-group-stats' | Out-File -FilePath ".\$($esx.Name)-vsan-mem-group-stats.csv"
  $memMetric.'mem-heap-stats' | Out-File -FilePath ".\$($esx.Name)-vsan-mem-heap-stats.csv"
}

 


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

View solution in original post

8 Replies
LucD
Leadership
Leadership
Jump to solution

Not sure what you exactly mean by these footprint terms.
Is this something you see in the Web GUI?


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

Reply
0 Kudos
lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

Yes, exactly. 

II know that it's maybbe difficult to script it but if there's a formula how to calculate I guess it's possible to get it :smiling_face_with_smiling_eyes:

Reply
0 Kudos
Lalegre
Virtuoso
Virtuoso
Jump to solution

@lElOUCHE_79,

Thinking out loud, why don´t you use the vSAN Sizer: https://vsansizer.esp.vmware.com/login?returnUrl=%2Fhome.

It will not also provide capacity but will give you an estimate of the memory consumption to get a proper footprint.

 

Reply
0 Kudos
lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

@Lalegre

TThank you for the reply, the idea is just to be able to integrate the footprint in my capacity planning script :smiling_face_with_smiling_eyes:

LucD
Leadership
Leadership
Jump to solution

WHich numbers in the Web GUI are you talking about?


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

Reply
0 Kudos
lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

based on this KB https://kb.vmware.com/s/article/2113954 it's the Memory consumed by vSAN

in my capacity planning script I would like to integrate this metric in order to be sure that we are always safe and guarantee resources

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

I did some further digging, but as far as I can tell, these data, and their format, are not made public.

Reverse engineering the rvc Ruby sources for the VSAN part (in /opt/vmware/rvc/lib/rvc/modules/vsancmd), I found out they use the QueryVsanStatistics method.

But the labels you have to pass to this method are "The following labels are current supported: - TBD".

With a bit of guess work, and reading the comments in the Ruby source, I could determine that memory statistics are retrieved with the "mem" label.

That indeed returns information, but then the next roadblock is "The details of the counters remain undocumented and unsupported at this point, and this API remains internal."

At that point, I gave up.

I currently have the following, but no documented way to interpret what mem-group-stats and mem-heap-stats contain.
Nor do I know how to interpret the on-esx-collect-duration value

$clusterName = 'cluster'

$cluster = Get-View -ViewType ClusterComputeResource -Filter @{Name=$clusterName}
Get-View -ViewType HostSystem -SearchRoot $cluster.MoRef -PipelineVariable esx |
ForEach-Object -Process {
  $vsanSys = Get-View -Id $esx.configManager.vsanInternalSystem
  $memMetric = $vsanSys.QueryVsanStatistics(@('mem')) | ConvertFrom-Json
  $memMetric.'mem-group-stats' | Out-File -FilePath ".\$($esx.Name)-vsan-mem-group-stats.csv"
  $memMetric.'mem-heap-stats' | Out-File -FilePath ".\$($esx.Name)-vsan-mem-heap-stats.csv"
}

 


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

lElOUCHE_79
Enthusiast
Enthusiast
Jump to solution

Realy it's very clear and good to know, based on that I think I will not focus on vSAN footprint calculation in my vSAN Capacity planning script

Thank you again :slightly_smiling_face:

Reply
0 Kudos