Microsoft Virtualization Discussions

Monitoring Storage Data Efficiency

1VINAYKUMAR
9,935 Views

Hi Guys,

 

I need to Monitor the Storage Data Efficiency using the powershell scripts on NetApp Clusters 8.3. can anybody assist me with a powershell scripts for the data efficiency monitoring mostly on the Netapp Volumes.

 

regards

VK

1 ACCEPTED SOLUTION

asulliva
9,799 Views

All the data is in the objects returned by "Get-NcEfficiency", will just need to format it.  Here is a quick version:

 

Get-NcEfficiency | Select Vserver,Name,
    @{ N="Space Saved by Storage Efficiency"; E={ ConvertTo-FormattedNumber $_.Returns.Total -Type DataSize -NumberFormatString "0.0" }},
    @{ N="Percentage Saved by Storage Efficiency"; E={ [Math]::Round($_.EfficiencyPercent) }},
    @{ N="Space Saved by Deduplication"; E={ ConvertTo-FormattedNumber $_.Returns.Dedupe -Type DataSize -NumberFormatString "0.0" }},
    @{ N="Percentage Saved by Deduplication"; E={ [Math]::Round(($_.Returns.Dedupe / $_.EffectiveUsed) * 100) }},
    @{ N="Space Saved by Compression"; E={ ConvertTo-FormattedNumber $_.Returns.Compression -Type DataSize -NumberFormatString "0.0" }},
    @{ N="Percentage Space Saved by Compression"; E={ [Math]::Round(($_.Returns.Compression / $_.EffectiveUsed) * 100) }}

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

6 REPLIES 6

asulliva
9,875 Views

Have you tried the "Get-NcEfficiency" cmdlet?  Here is some example output:

 

   Vserver: Infrastructure

Name                       Capacity       Used   SnapshotUsed    Returns  EffectiveUsed  EfficiencyPercent
----                       --------       ----   ------------    -------  -------------  -----------------
software                     1.0 TB   393.6 GB       147.7 MB   531.1 GB       924.7 GB              90.3%
vice_infrastructure          2.0 TB   656.3 GB       121.2 GB   800.0 GB         1.4 TB              71.1%
VICE_Infrastructure_root    19.0 MB   152.0 KB       716.0 KB    80.4 KB       232.4 KB               1.2%

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

1VINAYKUMAR
9,808 Views

Hi Asulliva,

 

My requirement is that, I need a powershell script which shows output as comes in the below link.

 

https://library.netapp.com/ecmdocs/ECMP1196906/html/GUID-307CD98D-AE25-4B5D-90CD-8100F86543F8.html

 

Space Saved by Storage Efficiency, Space Saved by Deduplication, Space Saved by Commpression.

 

Thanks & regards

VK

asulliva
9,800 Views

All the data is in the objects returned by "Get-NcEfficiency", will just need to format it.  Here is a quick version:

 

Get-NcEfficiency | Select Vserver,Name,
    @{ N="Space Saved by Storage Efficiency"; E={ ConvertTo-FormattedNumber $_.Returns.Total -Type DataSize -NumberFormatString "0.0" }},
    @{ N="Percentage Saved by Storage Efficiency"; E={ [Math]::Round($_.EfficiencyPercent) }},
    @{ N="Space Saved by Deduplication"; E={ ConvertTo-FormattedNumber $_.Returns.Dedupe -Type DataSize -NumberFormatString "0.0" }},
    @{ N="Percentage Saved by Deduplication"; E={ [Math]::Round(($_.Returns.Dedupe / $_.EffectiveUsed) * 100) }},
    @{ N="Space Saved by Compression"; E={ ConvertTo-FormattedNumber $_.Returns.Compression -Type DataSize -NumberFormatString "0.0" }},
    @{ N="Percentage Space Saved by Compression"; E={ [Math]::Round(($_.Returns.Compression / $_.EffectiveUsed) * 100) }}

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

1VINAYKUMAR
9,778 Views

Hi Asulliva,

 

I need the same as i requested but when i compare the same with NetApp CLI and with Powershell both gives two different output when used the same values. if you look below the "Percentage Saved by Storage Efficiency" show as 208% whereas the "sis-space-saved-percent" shows 21%. similarly other percentage fields.

 

seems somthing is missing in the powershell query. though i am not good in scripting. can you please look into it.

 

ASPST00086::> vol show -vserver ASPST00094 -volume ASPST00093_G -fields vserver,volume,size,sis-space-saved,sis-space-saved-percent,dedupe-space-saved,dedupe-space-saved-percent,compression-space-saved,compression-space-saved-percent
vserver       volume             size  sis-space-saved sis-space-saved-percent dedupe-space-saved dedupe-space-saved-percent compression-space-saved compression-space-saved-percent
------------- ------------------ ----- --------------- ----------------------- ------------------ -------------------------- ----------------------- -------------------------------
ASPST00094 ASPST00093_G 720GB 177.4GB         21%                     111.5GB            13%                        65.93GB                 8%                  

ASPST00086::>

 

 

Powershell script

 

PS P:\> Get-NcEfficiency -vserver ASPST00094 -volume ASPST00093_G | Select Vserver,Name,@{N="Capacity"; E={[math]::Round($_.capacity/1GB,2)}}, @{ N="Space Saved by Storage Efficiency"; E={ ConvertTo-FormattedNumber $_.Returns.total  -Type DataSize -NumberFormatString "0.0" }}, @{ N="Percentage Saved by Storage Efficiency"; E={ [Math]::Round($_.EfficiencyPercent) }}, @{ N="Space Saved by Deduplication"; E={ ConvertTo-FormattedNumber $_.Returns.Dedupe -Type DataSize -NumberFormatString "0.0" }}, @{ N="Percentage Saved by Deduplication"; E={ [Math]::Round(($_.Returns.Dedupe / $_.EffectiveUsed) * 100) }}, @{ N="Space Saved by Compression"; E={ ConvertTo-FormattedNumber $_.Returns.Compression -Type DataSize -NumberFormatString "0.0" }}, @{ N="Percentage Space Saved by Compression"; E={ [Math]::Round(($_.Returns.Compression / $_.EffectiveUsed) * 100) }}|ft -AutoSize

Vserver       Name               Capacity Space Saved by Storage Efficiency Percentage Saved by Storage Efficiency Space Saved by Deduplication Percentage Saved by Deduplication Space Saved by Compression         Percentage Space Saved by
                                                                                                                                                                                                                                    Compression
-------       ----               -------- --------------------------------- -------------------------------------- ---------------------------- --------------------------------- -------------------------- ----------------------------------
ASPST00094 ASPST00093_G      720 GB          814.8 GB                                                             208 111.5 GB                                                     7 65.9 GB                                                     4


PS P:\>

asulliva
9,767 Views

I think this is because the cmdlet's total space saved value counts snapshots and clones as a part of the storage efficiency number.  Let's try removing those...

 

Get-NcEfficiency -Volume software | Select Vserver,Name,
    @{ 
        N="Space Saved by Storage Efficiency"; 
        E={ 
            ConvertTo-FormattedNumber ($_.Returns.Dedupe + $_.Returns.Compression) -Type DataSize -NumberFormatString "0.0" 
        }
    },
    @{ 
        N="Percentage Saved by Storage Efficiency"; 
        E={ 
            [Math]::Round((($_.Returns.Dedupe + $_.Returns.Compression) / ($_.Used + $_.Returns.Dedupe + $_.Returns.Compression)) * 100) 
        }
    },
    @{ N="Space Saved by Deduplication"; E={ ConvertTo-FormattedNumber $_.Returns.Dedupe -Type DataSize -NumberFormatString "0.0" }},
    @{ N="Percentage Saved by Deduplication"; E={ [Math]::Round(($_.Returns.Dedupe / ($_.Used + $_.Returns.Dedupe + $_.Returns.Compression)) * 100) }},
    @{ N="Space Saved by Compression"; E={ ConvertTo-FormattedNumber $_.Returns.Compression -Type DataSize -NumberFormatString "0.0" }},
    @{ N="Percentage Space Saved by Compression"; E={ [Math]::Round(($_.Returns.Compression / ($_.Used + $_.Returns.Dedupe + $_.Returns.Compression)) * 100) }}

This way we aren't using the "Total Return" (which is based off of snapshots + clones + dedupe + compression) or the "Effective Used" (actual used + total returns), instead just taking into account dedupe and compression.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Kirand1979
9,176 Views

any good place i can definition of each of these ? say, Percentage Saved by Storage Efficiency

Public