PowerCLI

 View Only
  • 1.  VSAN footprint calculation

    Posted Apr 13, 2023 03:59 AM

    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 

     

     



  • 2.  RE: VSAN footprint calculation

    Posted Apr 13, 2023 08:17 AM

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



  • 3.  RE: VSAN footprint calculation

    Posted Apr 13, 2023 08:08 PM

    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



  • 4.  RE: VSAN footprint calculation

    Posted Apr 13, 2023 09:15 PM

    ,

    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.

     



  • 5.  RE: VSAN footprint calculation

    Posted Apr 13, 2023 09:45 PM

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



  • 6.  RE: VSAN footprint calculation

    Posted Apr 14, 2023 05:11 AM

    WHich numbers in the Web GUI are you talking about?



  • 7.  RE: VSAN footprint calculation

    Posted Apr 14, 2023 06:41 PM

    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



  • 8.  RE: VSAN footprint calculation
    Best Answer

    Posted Apr 16, 2023 02:49 PM

    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"
    }
    

     



  • 9.  RE: VSAN footprint calculation

    Posted Apr 17, 2023 01:15 PM

    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