Subscribe

SnapShot Space consumption differences between Get-NcEfficiency and Get-NcSnap

Hi,

 

We are attempting to use the Windows PowerShell manageability tools and seem to have encountered a discrepancy when comparing the results of SnapshotUsed from Get-NcEfficiency and Get-NcSnapshot commands.

 

Can anyone please explain what the 'SnapshotUsed' value is from the Get-NcEfficiency commandlet from the Powershell Toolkit? It seems this number is different from the summation of the actual snapshot sizes, as returned by the Total value from the Get-NcSnapshot data for volumes.

 

The documentation makes no distinction of the two, and in fact shows the usage of SnapshotUsed value in reporting. We are seeing a very high discrepancy for some volumes in comparing the two numbers. As tested with toolkit versions 3.1 and most recent, 3.2.1

 

See:

http://community.netapp.com/fukiw75442/attachments/fukiw75442/virtualization-and-cloud-articles-and-resources/425/Making%20The%20Most%20Of%20Data%20ON...

 

From ShowHelp, I see:

 

The Get-NcSnapshot cmdlet is designed to "get a list of snapshot objects".

 

The Get-NcEfficiency cmdlet is designed to "get efficiency information for volumes." The cmdlet returns a VolEfficiencyInfo object for each volume it investigates. The VolEfficiency object returned contains the SnapshotCount - the number of snapshots of the volume.

 

So, the Get-NcSnapshot cmdlet should return a list of snapshots. The Get-NcEfficiency cmdlet should return a count of snapshots (as a small part of its output.) Presumably, the count of snapshots from Get-NcEfficiency should equal the number of snapshots returned by Get-NcSnapshot?

 

The problem is that there is "a discrepancy when comparing the results of SnapshotUsed from Get-NcEfficiency and Get-NcSnapshot commands." Snapshotused is the amount of space used by snapshots. The Get-NcSnapshot doesn't appear to return space used. Perhaps we need to use advanced queries? Can anyone confirm that this would be productive if we tried it?

 

This is important to us to reconcile since we use the information returned to create billing statements that we believe may be inaccurate.

We'd like to find a way to make sure we are billing properly for space consumed within snapshots.

 

 

Thanks for any help that anyone can provide.

 

Re: SnapShot Space consumption differences between Get-NcEfficiency and Get-NcSnap

[ Edited ]

Hello Eric,

 

Suppose vs1:vol1 is the volume where you are seeing the reported discrepancy. Please run

 

   Get-NcEfficiency -Vserver vs1 -Volume vol1

   Get-NcSnapshot -Vserver vs1 -Volume vol1 | Sort Cumulative -Descending | select -First 1

and verify whether there is any discrepancy between the 'Cumulative' column reported by Get-NcSnapshot and the 'SnapshotUsed' column reported by Get-NcEfficiency. There really shouldn't be.

 

I suspect the discrepancy you are observing is because of formatting. The toolkit formats output of the 'Total' column of Get-NcSnapshot by rounding to the nearest x.y KB/MB/GB/TB (meaning it converts the bytes in to a 'reasonable unit' say MB, and rounds the MB value to one place after decimal; like 13.23 MB becomes 13.2MB and 13.26MB becomes 13.3MB).

   Suppose you have a 10 snapshots of size 1.35MB. The output would show 1.4MB for each of them. So if you are manually adding this value, you get total size as 14MB, whereas cumulative (and Get-NcEfficiency) would have actually performed the addition in bytes and rounded only the sum and will show 13.5MB.

 

Hope this helps,

Aparajita

Re: SnapShot Space consumption differences between Get-NcEfficiency and Get-NcSnap

[ Edited ]

This isn't a byte size conversion issue.  We are pulling the byte number itself.  Here is the output for just one volume with the difference.

 

Note the SnapshotUsed value (in bytes)

 

 

 

PS> Get-NcEfficiency -Volume vol1 | fl *


SnapshotCount           : 142
SnapshotReserve         : 0
SnapshotUsed            : 4305979133952
SnapshotOverflow        : 4305979133952
Reserve                 : 0
ReserveUsed             : 0
SpaceReserve            : none
QuotaCommitted          : 0
QuotaUsed               : 38139489857536
QuotaOverCommit         : 0
TotalLunSize            : 0
LunOverprovisionPercent : 0
EffectiveUsed           : 116773961909522
EfficiencyPercent       : 160.91712069961211069091928728
Qtrees                  : {[, DataONTAP.C.Types.Efficiency.QtreeEfficiency], [RECFILEVAULT, DataONTAP.C.Types.Efficienc
                          y.QtreeEfficiency], [RECFILEVAULT1, DataONTAP.C.Types.Efficiency.QtreeEfficiency], [RECFILEVA
                          ULT2, DataONTAP.C.Types.Efficiency.QtreeEfficiency]...}
NcController            : 10.197.167.240
Vserver                 : vs1
Name                    : vol1
Capacity                : 72567767433216
Used                    : 53395415322624
Free                    : 19172352110592
Returns                 : 63378546586898

 

 

And the summation of the actual 142 snapshots:

 

 

PS> Get-NcSnapshot -Volume vol1 | Measure-Object Total -Sum

Count : 142
Average :
Sum : 31604404408320
Maximum :
Minimum :
Property : Total

These are orders of magnitued in difference (Efficiency.SnapshotUsed value reports ~4 TB while the actualy snapshot sizes, Total, summed are ~28 TB).  

 


Running your statement (pulling just the "most recent" snapshot size via the Cummulative value), returns the same number as errounusly being reported by the Efficiency.SnapshotUsed value:

 

PS> Get-NcSnapshot -Volume vol1 | Sort Cumulative -Descending | Select-Object -First 1 | fl *


Cumulative                                 : 4305979133952
Created                                    : 12/9/2014 12:10:00 AM
NcController                               : 10.197.167.240
Vserver                                    : vs1
AccessTime                                 : 1418101800
AccessTimeDT                               : 12/9/2014 12:10:00 AM
Busy                                       : False
ContainsLunClones                          :
CumulativePercentageOfTotalBlocks          : 12
CumulativePercentageOfUsedBlocks           : 26
CumulativeTotal                            : 4305979133952
CumulativeTotalBlocks                      : 4205057748
Dependency                                 :
Is7ModeSnapshot                            : False
IsConstituentSnapshot                      : False
Name                                       : daily.2014-12-09_0010
PercentageOfTotalBlocks                    : 0
PercentageOfUsedBlocks                     : 1
SnapmirrorLabel                            :
SnapshotInstanceUuid                       : 7566a76f-b342-47bc-95bf-0a7a51532f4e
SnapshotOwnersList                         :
SnapshotVersionUuid                        : 7566a76f-b342-47bc-95bf-0a7a51532f4e
State                                      : valid
Total                                      : 172813733888
TotalBlocks                                : 168763412
Volume                                     : vol1
VolumeProvenanceUuid                       : a964388d-dbda-45bd-80b1-94e59ceb5440
AccessTimeSpecified                        : True
BusySpecified                              : True
ContainsLunClonesSpecified                 : False
CumulativePercentageOfTotalBlocksSpecified : True
CumulativePercentageOfUsedBlocksSpecified  : True
CumulativeTotalSpecified                   : True
Is7ModeSnapshotSpecified                   : True
IsConstituentSnapshotSpecified             : True
PercentageOfTotalBlocksSpecified           : True
PercentageOfUsedBlocksSpecified            : True
TotalSpecified                             : True

 

If you run the equlvilent 7mode commandlets, the Efficiency.SnapshotUsed number returned from Get-NaEfficiency "correctly" reports the summation of all snapshots, Get-NaSnapshots.  This has to be a bug with the cmode efficiency command.