IP Library Granted Patent US 11,531,614
Granted Patent B2
US 11,531,614 · App. 16/991,125 · Granted Dec 20, 2022

Saving virtual memory space in a clone environment

Inventors: Tanay Ganguly (Bangalore, IN); Zubraj Singha (Bangalore, IN); Goresh Musalay (Bangalore, IN); Kashish Bhatia (Bangalore, IN)
Assignee: VMware, Inc.
G06F12/023G06F12/10G06F2212/1044G06F2212/152
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,531,614
App. No.
16/991,125
Granted
Dec 20, 2022
Kind
B2
Abstract

Virtual memory space may be saved in a clone environment by leveraging the similarity of the data signatures in swap files when a chain of virtual machines (VMs) includes clones spawned from a common parent and executing common applications. Deduplication is performed across the chain, rather than merely within each VM. Examples include generating a common deduplication identifier (ID) for the chain; generating a logical addressing table linked to the deduplication ID, for each of the VMs in the chain; and generating a hash table for the chain. Examples further include, based at least on a swap out request, generating a hash value for a block of memory to be written to a storage medium; and based at least on finding the hash value within the hash table, updating the logical addressing table to indicate a location of a prior-existing duplicate of the block on the storage medium.

Claims (72)

1. A method of saving virtual memory space in a clone environment, the method comprising:

creating a first clone virtual machine (VM) of a first parent VM on a computing node, the first parent VM and the first clone VM forming a first VM chain;

defining a first deduplication ID for the first VM chain;

creating a first plurality of additional clone VMs from the first parent VM, the first plurality of additional clone VMs being within the first VM chain;

generating, for each of the VMs in the first VM chain, a logical addressing table linked to the first deduplication ID, the logical addressing table having a plurality of entries that point to a same block on a storage medium;

generating, for the first VM chain, a chain hash table and sharing the chain hash table across all VMs in the first VM chain;

based at least on a swap out request for writing a block of memory to the storage medium, received from one of the VMs in the first VM chain, generating a hash value for the block of memory to be written to the storage medium;

based at least on finding the hash value within the shared chain hash table, updating the logical addressing table for the one of the VMs in the first VM chain to indicate a location of a prior-existing duplicate of the block on the storage medium; and

based at least on not finding the hash value within the shared chain hash table:

writing the block to the storage medium;

updating the logical addressing table for the one of the VMs in the first VM chain to indicate a location of the block on the storage medium; and

updating the shared chain hash table with the hash value.

2. The method of claim 1 , wherein each VM in the first VM chain is associated with a swap file, each swap file having a reserved common swap file size.

3. The method of claim 1 , further comprising:

creating a second clone VM of a second parent VM on the computing node, the second parent VM and the second clone VM forming a second VM chain;

defining a second deduplication ID for the second VM chain, the second deduplication ID being different than the first deduplication ID;

creating a second plurality of additional clone VMs from the second parent VM, the second plurality of additional clone VMs being within the second VM chain; and

generating, for each of the VMs in the second VM chain, a logical addressing table linked to the second deduplication ID.

4. The method of claim 1 , wherein sharing the chain hash table across all VMs in the first VM chain allows a data block written on the storage medium for one VM in the first VM chain to be shared by all VMs in the first VM chain.

5. The method of claim 1 , further comprising:

based on the finding of the hash value within the chain hash table, incrementing a reference count that tracks a quantity of entries pointing to the block on the storage medium.

6. The method of claim 1 , wherein a reference count is decremented when an entry in one of the logical addressing tables in the first VM chain that points to the block is deleted, and wherein the block on the storage medium is deleted on determining that a value of the reference count has reached zero.

7. The method of claim 1 , further comprising:

executing, on each of the VMs in the first VM chain, at least one common application.

8. A computer system for saving virtual memory space in a clone environment, the computer system comprising:

a processor; and

a non-transitory computer readable medium having stored thereon program code, the program code causing the processor to:

create a first clone virtual machine (VM) of a first parent VM on a computing node, the first parent VM and the first clone VM forming a first VM chain;

define a first deduplication ID for the first VM chain;

create a first plurality of additional clone VMs from the first parent VM, the first plurality of additional clone VMs being within the first VM chain;

generate, for each of the VMs in the first VM chain, a logical addressing table linked to the first deduplication ID, the logical addressing table having a plurality of entries that point to a same block on a storage medium;

generate, for the first VM chain, a chain hash table and share the chain hash table across all VMs in the first VM chain;

based at least on a swap out request for writing a block of memory to the storage medium, received from one of the VMs in the first VM chain, generate a hash value for the block of memory to be written to the storage medium;

based at least on finding the hash value within the shared chain hash table, update the logical addressing table for the one of the VMs in the first VM chain to indicate a location of a prior-existing duplicate of the block on the storage medium; and

based at least on not finding the hash value within the shared chain hash table:

write the block to the storage medium;

update the logical addressing table for the one of the VMs in the first VM chain to indicate a location of the block on the storage medium; and

update the shared chain hash table with the hash value.

9. The computer system of claim 8 , wherein each VM in the first VM chain is associated with a swap file, each swap file having a reserved common swap file size.

10. The computer system of claim 8 , wherein the program code is further operative to:

create a second clone VM of a second parent VM on the computing node, the second parent VM and the second clone VM forming a second VM chain;

define a second deduplication ID for the second VM chain, the second deduplication ID being different than the first deduplication ID;

create a second plurality of additional clone VMs from the second parent VM, the second plurality of additional clone VMs being within the second VM chain; and

generate, for each of the VMs in the second VM chain, a logical addressing table linked to the second deduplication ID.

11. The computer system of claim 8 , wherein sharing the chain hash table across all VMs in the first VM chain allows a data block written on the storage medium for one VM in the first VM chain to be shared by all VMs in the first VM chain.

12. The computer system of claim 8 , wherein the program code is further operative to:

based on the finding of the hash value within the chain hash table, increment a reference count that tracks a quantity of entries pointing to the block on the storage medium.

13. The computer system of claim 8 , wherein a reference count is decremented when an entry in one of the logical addressing tables in the first VM chain that points to the block is deleted, and wherein the block on the storage medium is deleted on determining that a value of the reference count has reached zero.

14. The computer system of claim 8 , wherein the program code is further operative to:

execute, on each of the VMs in the first VM chain, at least one common application.

15. One or more non-transitory computer storage media having computer-executable instructions that, upon execution by a processor, cause the processor to at least perform operations that comprise:

creating a first clone virtual machine (VM) of a first parent VM on a computing node, the first parent VM and the first clone VM forming a first VM chain;

defining a first deduplication ID for the first VM chain;

creating a first plurality of additional clone VMs from the first parent VM, the first plurality of additional clone VMs being within the first VM chain;

generating, for each of the VMs in the first VM chain, a logical addressing table linked to the first deduplication ID, the logical addressing table having a plurality of entries that point to a same block on a storage medium;

generating, for the first VM chain, a chain hash table and sharing the chain hash table across all VMs in the first VM chain;

based at least on a swap out request for writing a block of memory to the storage medium, received from one of the VMs in the first VM chain, generating a hash value for the block of memory to be written to storage medium;

based at least on finding the hash value within the shared chain hash table, updating the logical addressing table for the one of the VMs in the first VM chain to indicate a location of a prior-existing duplicate of the block on the storage medium; and

based at least on not finding the hash value within the shared chain hash table:

writing the block to the storage medium;

updating the logical addressing table for the one of the VMs in the first VM chain to indicate a location of the block on the storage medium; and

updating the shared chain hash table with the hash value.

16. The non-transitory computer storage media of claim 15 , wherein the computer-executable instructions further comprise:

creating a second clone VM of a second parent VM on the computing node, the second parent VM and the second clone VM forming a second VM chain;

defining a second deduplication ID for the second VM chain, the second deduplication ID being different than the first deduplication ID;

creating a second plurality of additional clone VMs from the second parent VM, the second plurality of additional clone VMs being within the second VM chain; and

generating, for each of the VMs in the second VM chain, a logical addressing table linked to the second deduplication ID.

17. The non-transitory computer storage media of claim 15 , wherein each VM in the first VM chain is associated with a swap file, each swap file having a reserved common swap file size.

18. The non-transitory computer storage media of claim 15 , wherein the computer-executable instructions further comprise:

based on the finding of the hash value within the chain hash table, incrementing a reference count that tracks a quantity of entries pointing to the block on the storage medium.

19. The non-transitory computer storage media of claim 15 , wherein a reference count is decremented when an entry in one of the logical addressing tables in the first VM chain that points to the block is deleted, and wherein the block on the storage medium is deleted on determining that a value of the reference count has reached zero.

20. The non-transitory computer storage media of claim 15 , wherein chain hash table across all VMs in the first VM chain allows a data block written on the storage medium for one VM in the first VM chain to be shared by all VMs in the first VM chain.

Assignments (2)
CHANGE OF NAME Recorded Apr 15, 2024
From: VMWARE, INC.
To: VMWARE LLC
Reel/Frame 067102/0395 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 12, 2020
From: GANGULY, TANAY; SINGHA, ZUBRAJ; MUSALAY, GORESH; BHATIA, KASHISH
To: VMWARE, INC.
Reel/Frame 053467/0326 →
Priority Claims (1)
IN 202041023073 · Jun 2, 2020 · national
Continuity (1)
Related Publication 20210374045A1 · Dec 2, 2021