Solved

file size of vm's snapshot

  • 12 January 2021
  • 5 replies
  • 2268 views

Badge +1

Does anyone knows size of VM’s snapshot file? I am concern about disk space, but I also need to back up. Is there formula for calculate snapshot file size approximately?   

icon

Best answer by Alona 14 January 2021, 04:08

View original

This topic has been closed for comments

5 replies

Userlevel 6
Badge +5

Hey @Michael Kang , you can also use the below script to get exclusive storage usage for a VM using its VM ID:

Please run the below command from a CVM on the cluster and use the VMs UUID to get the storage details for the VM:
 

cvm$ /usr/local/nutanix/diagnostics/entity_space_usage_stat.py -i <VM_UUID>

 

The above command will give the below details about the VMs storage usage:
 

1)Exclusive usage: Logical space used exclusively by the VM and all its snapshots. This is the amount of logical space that can be recovered if you remove the VM and all its snapshots. 

2)Snapshot usage or exclusive snapshot usage: Logical space used exclusively by the VM’s snapshots. This is the amount of logical space that can be recovered if you remove all of the VM's snapshots.

3)Live usage: Total logical space that is referenced by the VM and all its snapshots together. This is a summation of exclusive usage, exclusive snapshot usage, and shared space.

4)Shared dedup usage:The amount of logical space that this VM shares with other VMs when using the capacity tier deduplication feature. This value is only applicable if the container has deduplication enabled. 

5)Shared clone usage: The logical space that this VM shares with other VMs. This value is only applicable when using cloning. 

 

I hope the above can help.:smile:

Badge +1

Thank you for reply, I mean VM snapshot file, how many MB or GB it could occupies per copies?  

Userlevel 6
Badge +5

Hey, @Michael Kang oh okay I see, so you are looking for every snapshot file size of the VM ?, not the total usage?

Badge +1

 Yes, I am looking for every snapshot file size. 

Userlevel 6
Badge +5

Hi Michael,

There is no formula to calculate the snapshot size. You may find a way that allows you to collect the stats of your VMs’ daily change and project from there.

The crucial thing to understand with snapshots is that their size if a direct reflection of what it is happening on the VM. Snapshot size can be in both MB and GB. I have seen more than once a 1TB snapshot (not recommended by any means for any purposes but it’s possible).

Generally speaking, if you have one or more of these happening on your VM:

  • native backups
  • database rebuilds
  • large files transfers or a series of smaller files transfers
  • any other activity that causes a significant change (influx or draining) of data into or from the VM’s disk

then the size of the snapshot can be expected to noticeable.

Another aspect to take into account is for how long the snapshot is going to be kept? When you think of a snapshot remember that you have two parts in the picture: the immutable VM’s disks and the snapshot files that now receive all the writes. The longer the life of the snapshot the more historical writes they receive. With every write, the information about the changed part of the disk is written to the snapshot. So with the same rate of change (even if it is not very high) over a long period of time, the snapshot can grow in size substantially.

To summarise, every VM will have a different size of snapshot that depends on the application installed and processes running on the VM as well as the age of the snapshot.

I hope the above helps. Let me know if you have any questions still.