IP Library Granted Patent US 10,223,258
Granted Patent B2
US 10,223,258 · App. 15/464,634 · Granted Mar 5, 2019

Automated virtual machine performance tuning

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 10,223,258
App. No.
15/464,634
Granted
Mar 5, 2019
Kind
B2
Abstract

Disclosed are systems, methods, and non-transitory computer-readable media for automated. VM performance tuning. An auto-tuning system implements a three stage automated VM performance tuning process to optimize garbage collection. In the first stage, the auto-tuning system analyzes garbage collection logs to calculate garbage collection parameters to configure the new generation portion of the memory heap (e.g., maximum tenuring age, maximum new size and survivor ratio). In the second stage, the auto-tuning system implements the calculated garbage collection parameter and monitors garbage collection activity for the VM to determine the resulting effects. In the third stage, the auto-tuning system tunes the old generation portion of the memory heap based on the monitored garbage collection activity. Specifically, the auto-tuning system determines a promotion rate from the monitored garbage collection activity and then determines a total memory heap size based on the promotion rate to achieve a target major garbage collection rate.

Claims (66)

1. A method comprising:

analyzing garbage collection logs for a virtual machine (VM), yielding an analysis, the garbage collection logs describing garbage collection activity for the VM having been performed according to an initial set of garbage collection parameters, the garbage collection parameters comprising an initial maximum tenuring age, an initial maximum new size, an initial survivor ratio, and an initial total heap size;

determining, based on the analysis, an updated maximum tenuring age, an updated maximum new size and an updated survivor ratio, yielding updated garbage collection parameters;

while garbage collection for the VM is performing according to the updated garbage collection parameters, monitoring garbage performance activity for the VM, yielding monitored performance data;

determining, based on the monitored performance data, a promotion rate of data from a new generation portion of a memory heap associated with the VM to an old generation portion of the memory heap;

determining, based on the promotion rate and a target major garbage collection rate, an updated total memory heap size, yielding a finalized set of garbage collection parameters; and

causing garbage collection for the VM to be performed according to the finalized set of garbage collection parameters.

2. The method of claim 1 , wherein determining the updated maximum tenuring age comprises:

determining, based on data describing a set of data objects created by the VM, a number of data objects from the set of data objects that were alive at a first tenuring age and a number of data objects from the set of data objects that were alive at a second tenuring age that is subsequent to the first tenuring age;

determining a delta between the number of data objects from the set of data objects that were alive at the first tenuring age and the number of data objects from the set of data objects that were alive at the second tenuring age;

comparing the delta to a threshold value; and

in response to determining that the delta is less than the threshold value, assigning the second tenuring age as the updated maximum tenuring age.

3. The method of claim 2 , wherein the first tenuring age indicates a number of times the set of data objects have been copied to survivor spaces in the new generation portion of the memory heap as the result of a minor garbage collection.

4. The method of claim 1 , wherein the maximum tenuring age indicates a threshold number of times that a data object can be copied to survivor spaces in the new generation portion of the memory heap prior to being moved to the old generation portion of the memory heap.

5. The method of claim 1 , wherein determining the updated maximum new size comprises:

determining an allocation rate of data to the memory heap;

dividing the allocation rate by a target minor garbage collection rate, yielding the updated maximum new size, the target minor generation garbage collection rate indicating a target frequency at which garbage collection is performed on a new generation portion of the memory heap.

6. The method of claim 1 , wherein determining the updated survivor ratio comprises:

determining a subset of the new generation portion of the memory heap to designate as eden; and

determining, from a remaining subset of the new generation portion of the memory heap that is not designated as eden, two or more survivor spaces.

7. The method of claim 1 , wherein the updated total memory heap size is greater than the initial total memory heap size, the method further comprising:

allocating additional memory to the memory heap based on the updated total data heap size, wherein allocating the additional memory causes a memory size increase to the old generation portion of the memory heap.

8. An auto-tuning system comprising:

one or more computer processors; and

one or more computer-readable mediums storing instructions that, when executed by the one or more computer processors, cause the auto-tuning system to perform operations comprising:

analyzing garbage collection logs for a virtual machine (VM), yielding an analysis, the garbage collection logs describing garbage collection activity for the VM having been performed according to an initial set of garbage collection parameters, the garbage collection parameters comprising an initial maximum tenuring age, an initial maximum new size, an initial survivor ratio, and an initial total heap size;

determining, based on the analysis, an updated maximum tenuring age, an updated maximum new size and an updated survivor ratio, yielding updated garbage collection parameters;

while garbage collection for the VM is performing according to the updated garbage collection parameters, monitoring garbage performance activity for the VM, yielding monitored performance data;

determining, based on the monitored performance data, a promotion rate of data from a new generation portion of a memory heap associated with the VM to an old generation portion of the memory heap;

determining, based on the promotion rate and a target major garbage collection rate, an updated total memory heap size, yielding a finalized set of garbage collection parameters; and

causing garbage collection for the VM to be performed according to the finalized set of garbage collection parameters.

9. The auto-tuning system of claim 8 , wherein determining the updated maximum tenuring age comprises:

determining, based on data describing a set of data objects created by the VM, a number of data objects from the set of data objects that were alive at a first tenuring age and a number of data objects from the set of data objects that were alive at a second tenuring age that is subsequent to the first tenuring age;

determining a delta between the number of data objects from the set of data objects that were alive at the first tenuring age and the number of data objects from the set of data objects that were alive at the second tenuring age;

comparing the delta to a threshold value; and

in response to determining that the delta is less than the threshold value, assigning the second tenuring age as the updated maximum tenuring age.

10. The auto-tuning system of claim 9 , wherein the first tenuring age indicates a number of times the set of data objects have been copied to survivor spaces in the new generation portion of the memory heap as the result of a minor garbage collection.

11. The auto-tuning system of claim 8 , wherein the maximum tenuring age indicates a threshold number of times that a data object can be copied to survivor spaces in the new generation portion of the memory heap prior to being moved to the old generation portion of the memory heap.

12. The auto-tuning system of claim 8 , wherein determining the updated maximum new size comprises:

determining an allocation rate of data to the memory heap;

dividing the allocation rate by a target minor garbage collection rate, yielding the updated maximum new size, the target minor generation garbage collection rate indicating a target frequency at which garbage collection is performed on a new generation portion of the memory heap.

13. The auto-tuning system of claim 8 , wherein determining the updated survivor ratio comprises:

determining a subset of the new generation portion of the memory heap to designate as eden; and

determining, from a remaining subset of the new generation portion of the memory heap that is not designated as eden, two or more survivor spaces.

14. The auto-tuning system of claim 8 , wherein the updated total memory heap size is greater than the initial total memory heap size, the method further comprising:

allocating additional memory to the memory heap based on the updated total data heap size, wherein allocating the additional memory causes a memory size increase to the old generation portion of the memory heap.

15. A non-transitory computer-readable medium storing instructions that, when executed by one or more computer processors of an auto-tuning system, cause the auto-tuning system to perform operations comprising:

analyzing garbage collection logs for a virtual machine (VM), yielding an analysis, the garbage collection logs describing garbage collection activity for the VM having been performed according to an initial set of garbage collection parameters, the garbage collection parameters comprising an initial maximum tenuring age, an initial maximum new size, an initial survivor ratio, and an initial total heap size;

determining, based on the analysis, an updated maximum tenuring age, an updated maximum new size and an updated survivor ratio, yielding updated garbage collection parameters;

while garbage collection for the VM is performing according to the updated garbage collection parameters, monitoring garbage performance activity for the VM, yielding monitored performance data;

determining, based on the monitored performance data, a promotion rate of data from a new generation portion of a memory heap associated with the VM to an old generation portion of the memory heap;

determining, based on the promotion rate and a target major garbage collection rate, an updated total memory heap size, yielding a finalized set of garbage collection parameters; and

causing garbage collection for the VM to be performed according to the finalized set of garbage collection parameters.

16. The non-transitory computer-readable medium of claim 15 , wherein determining the updated maximum tenuring age comprises:

determining, based on data describing a set of data objects created by the VM, a number of data objects from the set of data objects that were alive at a first tenuring age and a number of data objects from the set of data objects that were alive at a second tenuring age that is subsequent to the first tenuring age;

determining a delta between the number of data objects from the set of data objects that were alive at the first tenuring, age and the number of data objects from the set of data objects that were alive at the second tenuring age;

comparing the delta to a threshold value; and

in response to determining that the delta is less than the threshold value, assigning the second tenuring age as the updated maximum tenuring age.

17. The non-transitory computer-readable medium of claim 16 , wherein the first tenuring age indicates a number of times the set of data objects have been copied to survivor spaces in the new generation portion of the memory heap as the result of a minor garbage collection.

18. The non-transitory computer-readable medium of claim 15 , wherein the maximum tenuring age indicates a threshold number of times that a data object can be copied to survivor spaces in the new generation portion of the memory heap prior to being moved to the old generation portion of the memory heap.

19. The non-transitory computer-readable medium of claim 15 , wherein determining the updated maximum new size comprises:

determining an allocation rate of data to the memory heap;

dividing the allocation rate by a target minor garbage collection rate, yielding the updated maximum new size, the target minor generation garbage collection rate indicating a target frequency at which garbage collection is performed on a new generation portion of the memory heap.

20. The non-transitory computer-readable medium of claim 15 , wherein determining the updated survivor ratio comprises:

determining a subset of the new generation portion of the memory heap to designate as eden; and

determining, from a remaining subset of the new generation portion of the memory heap that is not designated as eden, two or more survivor spaces.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 1, 2017
From: LINKEDIN CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 044746/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 21, 2017
From: PURGASON, BENJAMIN DAVID
To: LINKEDIN CORPORATION
Reel/Frame 041658/0996 →