Snapshot-based garbage collection in an on-demand code execution system

US10824339B1 · US · B1

Patent metadata
FieldValue
Publication numberUS-10824339-B1
Application numberUS-201916452425-A
CountryUS
Kind codeB1
Filing dateJun 25, 2019
Priority dateJun 25, 2019
Publication dateNov 3, 2020
Grant dateNov 3, 2020

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Systems and methods are described for management of garbage collection processes in an on-demand code execution system. An on-demand code execution system may execute user-submitted code on virtual machine instances, which may be hosted on various host computing devices. As each virtual machine instance executes code, garbage (e.g., memory that is allocated and then not properly de-allocated) may accumulate and may reduce the computing resources that the instance makes available for allocation to further code executions. A garbage collection manager may be implemented on each host computing device that implements garbage collection by taking a snapshot of the virtual machine instance prior to the accumulation of garbage, and then restoring the snapshot rather than identifying and de-allocating garbage on an item-by-item basis. The virtual machine instance may also identify state information that should be preserved, and the garbage collection manager may preserve or avoid overwriting this state information.

First claim

Opening claim text (preview).

What is claimed is: 1. A system for managing garbage collection on a virtual machine instance, the system comprising: a processor in communication with a non-transitory data store; and computer-executable instructions stored in the non-transitory data store, wherein the computer-executable instructions, when executed by the processor, configure the processor to perform operations including: provisioning a virtual machine instance on a host computing device, wherein provisioning the virtual machine instance on the host computing device includes provisioning a virtualized processor and virtualized memory by allocating a portion of computing resources of the host computing device; configuring the virtual machine instance to execute one or more tasks that are submitted to an on-demand code execution system, the one or more tasks each comprising user-submitted code executable by the virtual machine instance; generating a snapshot of the virtual machine instance prior to executing any user-submitted code within the virtual machine instance, the snapshot including information regarding a state of the virtual machine instance; causing the virtual machine instance to execute the one or more tasks, wherein executing the one or more tasks causes garbage to accumulate in the virtualized memory; determining that garbage collection should be performed on the virtual machine instance; and performing the garbage collection by restoring the virtual machine instance using the snapshot. 2. The system of claim 1 , wherein the garbage comprises an object or data in the virtualized memory that was created by a task but is no longer accessed by the task. 3. The system of claim 1 , wherein determining that garbage collection is needed comprises: determining a remaining amount of the virtualized memory that is available for execution of further tasks; and determining that the remaining amount of the virtualized memory satisfies a criterion. 4. The system of claim 3 , wherein the criterion is determined based at least in part on one or more of: an estimated memory usage of a task, or a rate of change in the remaining amount of the virtualized memory. 5. The system of claim 1 , wherein the snapshot includes one or more of: a page table associated with the virtualized memory, at least a portion of content of the virtualized memory, or one or more registers of the virtual processor. 6. A computer-implemented method comprising: configuring a virtual machine instance to execute user-submitted tasks that are submitted to an on-demand code execution system, the virtual machine instance comprising a virtualized processor and virtualized memory that are allocated from computing resources of a host computing device; generating a snapshot of the virtual machine instance prior to executing one or more user-submitted tasks within the virtual machine instance; causing the virtual machine instance to execute the one or more user-submitted tasks, wherein executing the one or more user-submitted tasks causes garbage to accumulate in the virtualized memory; determining that garbage collection should be performed on the virtual machine instance; and performing garbage collection by restoring the snapshot. 7. The computer-implemented method of claim 6 further comprising provisioning the virtual machine instance. 8. The computer-implemented method of claim 6 , wherein determining that garbage collection should be performed on the virtual machine instance is based at least in part on a workload forecast. 9. The computer-implemented method of claim 6 further comprising determining that garbage collection should be performed by generating and restoring the snapshot. 10. The computer-implemented method of claim 9 , wherein determining that garbage collection should be performed by generating and restoring the snapshot is based at least in part on the one or more user-submitted tasks. 11. The computer-implemented method of claim 9 , wherein determining that garbage collection should be performed by generating and restoring the snapshot is based at least in part on a resource cost associated with generating the snapshot, a resource cost associated with restoring the snapshot, or a resource cost associated with performing garbage collection by executing a garbage collection task. 12. The computer-implemented method of claim 6 , wherein the virtual machine instance comprises a container, and wherein causing the virtual machine instance to execute the one or more user-submitted tasks comprises causing the virtual machine instance to execute the one or more user-submitted tasks within the container. 13. The computer-implemented method of claim 6 further comprising: receiving, from the virtual machine instance, a request to preserve state information associated with executing the one or more user-submitted tasks; and restoring the state information after restoring the snapshot. 14. The computer-implemented method of claim 13 , wherein the state information comprises information regarding one or more of a network connection, an object in the virtualized memory, or data in the virtualized memory. 15. The computer-implemented method of claim 13 , wherein the state information comprises an object or data on a kernel space page of the virtualized memory. 16. The computer-implemented method of claim 6 , wherein the snapshot comprises page table entries associated with user space pages in the virtualized memory. 17. A non-transitory computer-readable medium including computer-executable instructions that, when executed by a processor, cause the processor to perform operations including: configuring a virtual machine instance to execute user-submitted tasks that are submitted to an on-demand code execution system; generating a snapshot of the virtual machine instance prior to executing one or more user-submitted tasks within the virtual machine instance; causing the virtual machine instance to execute the one or more user-submitted tasks, wherein executing the one or more user-submitted tasks includes allocating one or more virtual computing resources, and wherein executing the one or more user-submitted tasks causes at least a portion of the one or more virtual computing resources to be allocated but no longer accessed by the one or more user-submitted tasks; and deallocating the at least a portion of the one or more virtual computing resources by restoring the snapshot. 18. The non-transitory computer-readable medium of claim 17 , wherein the snapshot comprises allocation data from a time prior to allocation of the at least a portion of the one or more virtual computing resources. 19. The non-transitory computer-readable medium of claim 17 , wherein configuring the virtual machine instance to execute user-submitted tasks comprises configuring one or more of an operating system, software library, network connection, or computing resource. 20. The non-transitory computer-readable medium of claim 17 including further computer-executable instructions that, when executed by the processor, cause the processor to perform operations including: determining that an available portion of the one or more virtual computing resources satisfies a threshold.

Assignees

Inventors

Classifications

  • G06F9/5077Primary

    Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455) · CPC title

  • Mechanisms to release resources · CPC title

  • Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket · CPC title

  • at device level, e.g. emulation of a storage device or system · CPC title

  • Single storage device · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10824339B1 cover?
Systems and methods are described for management of garbage collection processes in an on-demand code execution system. An on-demand code execution system may execute user-submitted code on virtual machine instances, which may be hosted on various host computing devices. As each virtual machine instance executes code, garbage (e.g., memory that is allocated and then not properly de-allocated) m…
Who is the assignee on this patent?
Amazon Tech Inc
What technology area does this patent fall under?
Primary CPC classification G06F9/5077. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Nov 03 2020 00:00:00 GMT+0000 (Coordinated Universal Time) (B1). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).