US 11,714,682 B1
Reclaiming computing resources in an on-demand code execution system
Vishal Shahane, Bothell, WA (US); and Marc Brooker, Seattle, WA (US)
Assigned to Amazon Technologies, Inc., Seattle, WA (US)
Filed by Amazon Technologies, Inc., Seattle, WA (US)
Filed on Mar. 3, 2020, as Appl. No. 16/808,235.
Int. Cl. G06F 9/50 (2006.01); G06F 9/455 (2018.01)
CPC G06F 9/5016 (2013.01) [G06F 9/45558 (2013.01); G06F 2009/45583 (2013.01)] 19 Claims
OG exemplary drawing
 
1. A system for reclaiming computing resources in an on-demand code execution system, the system comprising:
a data store configured to store computer-executable instructions; and
a processor in communication with the data store, wherein the computer-executable instructions, when executed by the processor, configure the processor to perform operations including:
obtaining resource utilization metrics regarding demand for computing resources on a host computing device, the demand associated with requests to execute user-submitted tasks on an on-demand code execution system;
determining, based at least in part on the resource utilization metrics, to reclaim one or more memory pages allocated to virtual machine instances executing on the host computing device;
identifying, based at least in part on the resource utilization metrics, a first virtual machine instance instantiated on the host computing device, wherein a first quantity of memory pages is allocated to the first virtual machine instance, and wherein the resource utilization metrics indicate that at least a portion of the first quantity of memory pages is underutilized;
instructing, by a process external to the first virtual machine instance, a reclaimable memory identification process to execute within the first virtual machine instance, wherein the reclaimable memory identification process identifies a reclaimable portion of the first quantity of memory pages allocated to the first virtual machine instance and unclaimed by other processes executing within the first virtual machine instance;
obtaining, from the reclaimable memory identification process executing within the first virtual machine instance, an indication of the reclaimable portion of the first quantity of memory pages allocated to the first virtual machine instance and unclaimed by other processes executing within the first virtual machine instance;
determining, based at least in part on the reclaimable portion of the first quantity of memory pages allocated to the first virtual machine instance and unclaimed by other processes executing within the first virtual machine instance, a quantity of memory pages to reclaim; and
reclaiming, from the first virtual machine instance, a quantity of memory pages determined based at least in part on the reclaimable portion of the first quantity of memory pages allocated to the first virtual machine instance and unclaimed by other processes executing within the first virtual machine instance.