Measuring Efficiencies on VVols

Something that always comes up with discussions around VVols is “how do I report on how much I’ve allocated and consumed?”. This usually is expressed in one of the following ways:

  • Can I know total capacity allocated and consumed for the system and what efficiencies am I getting?
  • Can I know capacity allocated/consumed and efficiencies for each storage container?
  • Can I know capacity allocated/consumed and efficiencies for each VM?

Fortunately, the answer is yet to all three Smile There are a number of ways to get at this, but for the sake of simplicity I’ll be showing examples using the SolidFire PowerShell module. If you don’t have the PSM installed you can grab it and the installation instructions here:

Total System Capacity and Efficiencies

Total system metrics can be viewed by running Get-SFClusterCapacity

C:\> $ClusterCapacity = Get-SFClusterCapacity
C:\> $ClusterCapacity

ActiveBlockSpace : 48349817348
ActiveSessions : 16
AverageIOPS   : 4
ClusterRecentIOSize   : 5602
CurrentIOPS   : 4
MaxIOPS   : 200000
MaxOverProvisionableSpace : 276546135777280
MaxProvisionedSpace   : 55309227155456
MaxUsedMetadataSpace : 432103337164
MaxUsedSpace : 8642066743296
NonZeroBlocks : 52358440
PeakActiveSessions : 16
PeakIOPS : 502
ProvisionedSpace : 662498705408
SnapshotNonZeroBlocks : 0
Timestamp : 2017-02-17T18:05:17Z
TotalOps : 3586717
UniqueBlocks : 16370852
UniqueBlocksUsedSpace : 49468393216
UsedMetadataSpace : 876314624
UsedMetadataSpaceInSnapshots : 876314624
UsedSpace : 49468393216
ZeroBlocks : 271127256

Let me decode those bolded entries for you

  • NonZeroBlocks – The number of 4K blocks in the system that have been ‘touched’. Basically, there has been data written to them.
  • ProvisionedSpace – The number of bytes that have been provisioned. In the VVol case, this will line up with the aggregate size of all the VMDKs. For example adding an 80GB VMDK to a VM will increase this counter 80GB. 
  • UsedSpace – The actual amount of consumed block space on SolidFire for all NonZeroBlocks post deduplication/ compression savings. 

So the answers to our questions are:

  • Total Capacity Allocated = ProvsionedSpace (662498705408 bytes; 662GB)
  • Total Capacity Consumed [Pre-Efficiencies] = nonZeroBlocks * 4096 = 52358440 * 4096 = 214460170240 bytes; 214GB)
  • Total Capacity Consumed [Post Efficiencies] = UsedSpace (49468393216 bytes; 49GB) –> This implies a 4.6 cluster efficiency metric (deduplication * compression)

This lines up nicely with the numbers reported on the cluster reporting overview screen.



So if you wanted to pull those numbers into some PowerShell variables you could do this. Note values would be stored in GiB, not GB notation when using the “/1gb” built in PowerShell constant.

$ClusterStats = Get-SFClusterCapacity
$ClusterAllocated = $ClusterStats.ProvisionedSpace /1gb
$ClusterConsumedPre = $ClusterStats.NonZeroBlocks * 4096 /1gb
$ClusterConsumedPost = $ClusterStats.UsedSpace /1gb

Capacity and Efficiency per Storage Container

[Note: If this section seems a little convoluted it is. There is a bug in the SDK that leaves out some details needed to match up VVols and storage containers, so I had to follow a bit of a circuitous route to get at what I wanted. I’ll amend this post when the hotfix is available.]

Ok, so lets take a look at how this breaks down with storage containers in the mix. There is not an API call to get all the capacity related counters for a storage container directly. We have to get at it by summing up the values for all VVols in the storage container.

There are a couple ways to go about this, but (until the SDK is fixed) I settled on the following logic.

#First, get storage containers and account objects
$StorageContainers = Get-SFStorageContainer
$StorageContainerAccounts = Get-SFAccount -AccountID $StorageContainers.AccountID

foreach ($StorageContainerAccount in $StorageContainerAccounts){

    #Get VVols for the Storage Container
    $VVols = Get-SFVolume -accountID $StorageContainerAccount.AccountID
    $VVolStats = $VVols | Get-SFVolumeStatsByVirtualVolume

        #Add up capacity stats for all VVols under a single storage container
        foreach ($vvol in $VVolStats) {
        $StorageContainerAllocatedBytes += $vvol.VolumeSize 
        $StorageContainerNonZeroblocks += $vvol.NonZeroBlocks 

    #Do some math
    $StorageContainerConsumedGB = [math]::Round(($StorageContainerNonZeroblocks * 4096) /1gb,2)
    $StorageContainerAllocatedGB = $StorageContainerAllocatedBytes /1gb
    $TempSC = $storagecontainers | select AccountID,StoragecontainerID | where-object {$_.AccountID -match $StorageContainerAccount.AccountID}
    $StorageContainerEfficiency = Get-SFStorageContainerEfficiency -StorageContainerID $TempSC.StorageContainerID 
    $scdedupe = [math]::Round($StorageContainerEfficiency.Deduplication,2)
    $sccompres = [math]::Round($StorageContainerEfficiency.Compression,2)
    $sctotalefficiency = [math]::Round($StorageContainerEfficiency.Deduplication * $StorageContainerEfficiency.Compression,2)

    #Write out results to console on each pass
    Write-Host "`nStorage Container $($StorageContainerAccount.Username) VVol Stats (Account ID $($StorageContainerAccount.AccountID)):" -ForegroundColor DarkGray
    Write-Host "Allocated GB: $($StorageContainerAllocatedGB)" -ForegroundColor Green
    Write-Host "Consumed GB: $($StorageContainerConsumedGB)" -ForegroundColor Green
    Write-Host "Storage Container Efficiency: " -ForegroundColor Green
    Write-Host "Deduplication: $($scdedupe)" -ForegroundColor Green
    Write-Host "Compression: $($sccompres)" -ForegroundColor Green
    Write-Host "Total: $($sctotalefficiency)" -ForegroundColor Green

#Clear out variables
$StorageContainerAllocatedBytes = 0
$StorageContainerNonZeroblocks= 0
$StorageContainerConsumedGB = 0
$StorageContainerAllocatedGB = 0
$TempSC = $null
$StorageContainerEfficiency = 0
$scdedupe = $null
$sccompres = $null
$sctotalefficiency = $null

That produces the following results:


Note that the cluster wide efficiency numbers will look better than the individual storage container metrics because the deduplication domain is larger when you look at the full cluster. 

Now to get to work on that per-VM reporting…

Leave a Reply

Your email address will not be published. Required fields are marked *