US 10713080
Request-based virtual machine memory transitioning in an on-demand network code execution system
Granted 2020-07-14 · Filed 2018-07-25 · Application 16/045,584 · Utility · Kind B1
- Assignee as printed
- Amazon Technologies, Inc., Seattle, WA (US)
- Inventors
- Marc John Brooker, Seattle, WA (US); Mikhail Danilov, Sammamish, WA (US); Anthony Nicholas Liguori, Bainbridge Island, WA (US)
- CPC, current
- G06F9/45558; H04L67/1004; G06F2009/4557; G06F2009/45583; G06F2009/45591; H04L67/02; H04L67/10
Abstract
Systems and methods are described for selectively transitioning execution environments in an on-demand code execution system based on a timing of a next request to execute code within such environments. The system can predict, from a history of requests to the system, when a next call to execute code in an environment, such as a virtual machine instance, will occur. The system can then calculate and compare the relative costs of maintaining the environment in an executing state or of halting the environment and moving the environment to a lower tier of memory, each of which can be based on the predicted next call to execute code within the environment. If the relative cost of maintaining the environment in an executing state exceeds that of halting the environment and moving the environment to a lower tier of memory, the virtual machine is halted and transitioned to secondary memory.
The claims as the USPTO long-text file prints them (text data version 20261117.3), split by PatentRef's claim parser (structure version 2): each claim's opening words, then one row for each element with its character offsets in the claim text, and the dependent claims under the claim they refer to. The split describes the text; it is not a reading of it. Each claim and each element has a link of its own. How the links are made.
Claim 1
Independent claim.
1. A system to selectively transition idle virtual machine instances into secondary memory of an on-demand code execution system, the system comprising:
- Claim 1, element e1a data store including information associated with a history of requests to execute code on the on-demand code execution system; and 153–280
- Claim 1, element e2a computing device configured with executable instructions to: 286–347
- Claim 1, element e3detect that a virtual machine instance associated with the code is executing at least partly from a primary memory of a host device and that the virtual machine instance is in an idle state; 349–538
- Claim 1, element e4estimating, from at least the history of calls to execute the code on the on-demand code execution system, an expected time of a next request to execute the code; 540–701
- Claim 1, element e5calculate a first expected resource cost representing an expected resource cost on the host device of maintaining the virtual machine instance in an executing and idle state until the next request to execute the code, 703–919
- Claim 1, element e6wherein the first expected resource cost includes at least a cost in terms of usage of the primary memory; 921–1026
- Claim 1, element e7calculate a second expected resource cost representing an expected resource cost on the host device of transitioning the virtual machine instance to secondary memory and returning the virtual machine instance to the primary memory prior to the expected time of the next request to execute the code; 1028–1325
- Claim 1, element e8determine that the first expected resource cost exceeds the second expected resource cost; and 1327–1416
- Claim 1, element e9transition the virtual machine instance from the primary memory into the secondary memory.1422–1511
4 dependent claims: 2 to 5 (2, 3, 4, 5 on claim 1)
Claim 2
Depends on claim 1.
2. The system of claim 1 , wherein
- Claim 2, element e1the primary memory is random access memory (RAM).35–83
Claim 3
Depends on claim 1.
3. The system of claim 1 , wherein
- Claim 3, element e1the secondary memory is at least one of 3D XPoint memory, flash memory, or magnetic storage memory.35–133
Claim 4
Depends on claim 1.
4. The system of claim 1 , wherein
- Claim 4, element e1the secondary memory is a given secondary memory among a plurality of secondary memories, and wherein the instructions further configure the computing device to: 35–195
- Claim 4, element e2calculate, for individual secondary memories of the plurality of secondary memories, an expected resource cost on the host device of transitioning the virtual machine instance to the individual secondary memories and returning the virtual machine instance to the primary memory prior to the expected time of the next request to execute the code; and 197–541
- Claim 4, element e3select the given secondary memory from the plurality of secondary memories based on the given secondary memory being associated with a lowest expected resource cost on the host device.547–730
Claim 5
Depends on claim 1.
5. The system of claim 1 , wherein
- Claim 5, element e1the first expected resource code further includes at least a cost in terms of usage of a processing unit of the host device.35–158
Claim 6
Independent claim.
6. A computer-implemented method comprising:
- Claim 6, element e1detecting, within a primary memory of a host device on an on-demand code execution system, a virtual machine instance that is associated with execution of code and that is in an idle state; 45–233
- Claim 6, element e2predicting, from at least a history of calls to execute the code on the on-demand code execution system, an expected time of a next request to execute the code; 235–394
- Claim 6, element e3determining that an expected resource cost on the host device of maintaining the virtual machine instance in the primary memory in an idle state until the next request to execute the code exceeds a threshold value that is based on an expected resource cost on the host device of transitioning the virtual machine instance to secondary memory and returning the virtual machine instance to the primary memory prior to the expected time of the next request to execute the code; and 396–869
- Claim 6, element e4transitioning the virtual machine instance from the primary memory into the secondary memory.875–967
6 dependent claims: 7 to 12 (7, 9, 12 on claim 6; 8 on 7; 10, 11 on 9)
Claim 7
Depends on claim 6.
7. The computer-implemented method of claim 6 , wherein
- Claim 7, element e1transitioning the virtual machine instance from the primary memory into the secondary memory comprises: 56–158
- Claim 7, element e2generating a snapshot of a current state of the virtual machine instance; 160–232
- Claim 7, element e3storing the snapshot in the secondary memory; and 234–278
- Claim 7, element e4removing the virtual machine from the primary memory.284–336
Claim 8
Depends on claim 7.
8. The computer-implemented method of claim 7 , wherein
- Claim 8, element e1removing the virtual machine from the primary memory comprises halting execution of the virtual machine.56–159
Claim 9
Depends on claim 6.
9. The computer-implemented method of claim 6 further comprising:
- Claim 9, element e1at a point in time prior to the expected time of the next request to execute the code, transitioning the virtual machine instance from the secondary memory into the primary memory; 66–245
- Claim 9, element e2receiving the next request to execute the code; and 247–293
- Claim 9, element e3executing the code within the virtual machine instance.299–353
Claim 10
Depends on claim 9.
10. The computer-implemented method of claim 9 , wherein
- Claim 10, element e1transitioning the virtual machine instance from the secondary memory into the primary memory comprises regenerating the virtual machine instance based at least in part on a snapshot of the virtual machine instance stored within the secondary memory.57–305
Claim 11
Depends on claim 9.
11. The computer-implemented method of claim 9 , wherein
- Claim 11, element e1transitioning the virtual machine instance from the secondary memory into the primary memory comprises transferring a minimum portion of data of the virtual machine instance that is required to execute the virtual machine instance from the secondary memory to the primary memory, and wherein additional portions of the data of the virtual machine instance are transferred from the secondary memory to the primary memory on request by the virtual machine instance.57–519
Claim 12
Depends on claim 6.
12. The computer-implemented method of claim 6 further comprising:
- Claim 12, element e1receiving the next request to execute the code prior the expected time of the next request; 67–157
- Claim 12, element e2transitioning the virtual machine instance from the secondary memory into the primary memory in response to receiving the next request; and 159–293
- Claim 12, element e3executing the code within the virtual machine instance.299–353
Claim 13
Independent claim.
13. Non-transitory computer-readable storage media comprising
- Claim 13, element e1computer-executable instructions that, when executed on a computing system, cause the computing system to: 62–167
- Claim 13, element e2detect, within a primary memory of a host device on an on-demand code execution system, an execution environment that is associated with execution of code and that is in an idle state; 169–352
- Claim 13, element e3determine, from at least a history of calls to execute the code on the on-demand code execution system, an expected time of a next request to execute the code; 354–512
- Claim 13, element e4determine that an expected resource cost on the host device of maintaining the execution environment in the primary memory in an idle state until the next request to execute the code exceeds an expected resource cost on the host device of transitioning the execution environment to secondary memory and returning the virtual machine instance to the primary memory prior to the expected time of the next request to execute the code; and 514–944
- Claim 13, element e5transition the execution environment from the primary memory into the secondary memory.950–1036
7 dependent claims: 14 to 20 (14, 19 on claim 13; 15, 17 on 14; 16 on 15; 18 on 17; 20 on 19)
Claim 14
Depends on claim 13.
14. The non-transitory computer-readable storage media of claim 13 , wherein
- Claim 14, element e1the expected resource cost on the host device of transitioning the execution environment to secondary memory and returning the virtual machine instance to the primary memory prior to the expected time of the next request to execute the code comprises a combination of: 77–344
- Claim 14, element e2an expected resource cost to transition the execution environment from the primary memory to the secondary memory; 346–459
- Claim 14, element e3an expected resource cost to transition the execution environment from the secondary memory to the primary memory; and 461–574
- Claim 14, element e4an expected resource cost to maintain the execution environment in the secondary memory subsequent to transitioning the execution environment from the primary memory to the secondary memory and prior to transitioning the execution environment from the secondary memory to the primary memory.580–870
Claim 15
Depends on claim 14.
15. The non-transitory computer-readable storage media of claim 14 , wherein
- Claim 15, element e1the expected resource cost to transition the execution environment from the primary memory to the secondary memory comprises an expected resource cost to transfer a working set of data for the execution environment into the secondary memory.77–317
Claim 16
Depends on claim 15.
16. The non-transitory computer-readable storage media of claim 15 , wherein
- Claim 16, element e1the execution environment is stored within the secondary memory at least partly with reference to a prior snapshot of the execution environment in the secondary memory and data indicating a state of the working set of data for the execution environment.77–329
Claim 17
Depends on claim 14.
17. The non-transitory computer-readable storage media of claim 14 , wherein
- Claim 17, element e1the expected resource cost to transition the execution environment from the primary memory to the secondary memory is calculated as a weighted combination of time-factored costs corresponding to each resource required to transition the execution environment from the primary memory to the secondary memory.77–382
Claim 18
Depends on claim 17.
18. The non-transitory computer-readable storage media of claim 17 , wherein
- Claim 18, element e1weights of individual time-factored costs are set based at least partly on an availability of a corresponding resource required to transition the execution environment from the primary memory to the secondary memory.77–292
Claim 19
Depends on claim 13.
19. The non-transitory computer-readable storage media of claim 13 , wherein
- Claim 19, element e1the expected time of the next request is calculated as a time before which there is a statistical percentage likelihood that a next request to execute the code will not occur.77–251
Claim 20
Depends on claim 19.
20. The non-transitory computer-readable storage media of claim 19 , wherein
- Claim 20, element e1the instructions, when executed on a computing system, cause the computing system to calculate the expected time of the next request based at least partly on statistical analysis of a distribution of times between individual calls to execute the code reflected within the history of calls.77–365
1. A system to selectively transition idle virtual machine instances into secondary memory of an on-demand code execution system, the system comprising: a data store including information associated with a history of requests to execute code on the on-demand code execution system; and a computing device configured with executable instructions to: detect that a virtual machine instance associated with the code is executing at least partly from a primary memory of a host device and that the virtual machine instance is in an idle state; estimating, from at least the history of calls to execute the code on the on-demand code execution system, an expected time of a next request to execute the code; calculate a first expected resource cost representing an expected resource cost on the host device of maintaining the virtual machine instance in an executing and idle state until the next request to execute the code, wherein the first expected resource cost includes at least a cost in terms of usage of the primary memory; calculate a second expected resource cost representing an expected resource cost on the host device of transitioning the virtual machine instance to secondary memory and returning the virtual machine instance to the primary memory prior to the expected time of the next request to execute the code; determine that the first expected resource cost exceeds the second expected resource cost; and transition the virtual machine instance from the primary memory into the secondary memory.
2. The system of claim 1 , wherein the primary memory is random access memory (RAM).
3. The system of claim 1 , wherein the secondary memory is at least one of 3D XPoint memory, flash memory, or magnetic storage memory.
4. The system of claim 1 , wherein the secondary memory is a given secondary memory among a plurality of secondary memories, and wherein the instructions further configure the computing device to: calculate, for individual secondary memories of the plurality of secondary memories, an expected resource cost on the host device of transitioning the virtual machine instance to the individual secondary memories and returning the virtual machine instance to the primary memory prior to the expected time of the next request to execute the code; and select the given secondary memory from the plurality of secondary memories based on the given secondary memory being associated with a lowest expected resource cost on the host device.
5. The system of claim 1 , wherein the first expected resource code further includes at least a cost in terms of usage of a processing unit of the host device.
6. A computer-implemented method comprising: detecting, within a primary memory of a host device on an on-demand code execution system, a virtual machine instance that is associated with execution of code and that is in an idle state; predicting, from at least a history of calls to execute the code on the on-demand code execution system, an expected time of a next request to execute the code; determining that an expected resource cost on the host device of maintaining the virtual machine instance in the primary memory in an idle state until the next request to execute the code exceeds a threshold value that is based on an expected resource cost on the host device of transitioning the virtual machine instance to secondary memory and returning the virtual machine instance to the primary memory prior to the expected time of the next request to execute the code; and transitioning the virtual machine instance from the primary memory into the secondary memory.
7. The computer-implemented method of claim 6 , wherein transitioning the virtual machine instance from the primary memory into the secondary memory comprises: generating a snapshot of a current state of the virtual machine instance; storing the snapshot in the secondary memory; and removing the virtual machine from the primary memory.
8. The computer-implemented method of claim 7 , wherein removing the virtual machine from the primary memory comprises halting execution of the virtual machine.
9. The computer-implemented method of claim 6 further comprising: at a point in time prior to the expected time of the next request to execute the code, transitioning the virtual machine instance from the secondary memory into the primary memory; receiving the next request to execute the code; and executing the code within the virtual machine instance.
10. The computer-implemented method of claim 9 , wherein transitioning the virtual machine instance from the secondary memory into the primary memory comprises regenerating the virtual machine instance based at least in part on a snapshot of the virtual machine instance stored within the secondary memory.
11. The computer-implemented method of claim 9 , wherein transitioning the virtual machine instance from the secondary memory into the primary memory comprises transferring a minimum portion of data of the virtual machine instance that is required to execute the virtual machine instance from the secondary memory to the primary memory, and wherein additional portions of the data of the virtual machine instance are transferred from the secondary memory to the primary memory on request by the virtual machine instance.
12. The computer-implemented method of claim 6 further comprising: receiving the next request to execute the code prior the expected time of the next request; transitioning the virtual machine instance from the secondary memory into the primary memory in response to receiving the next request; and executing the code within the virtual machine instance.
13. Non-transitory computer-readable storage media comprising computer-executable instructions that, when executed on a computing system, cause the computing system to: detect, within a primary memory of a host device on an on-demand code execution system, an execution environment that is associated with execution of code and that is in an idle state; determine, from at least a history of calls to execute the code on the on-demand code execution system, an expected time of a next request to execute the code; determine that an expected resource cost on the host device of maintaining the execution environment in the primary memory in an idle state until the next request to execute the code exceeds an expected resource cost on the host device of transitioning the execution environment to secondary memory and returning the virtual machine instance to the primary memory prior to the expected time of the next request to execute the code; and transition the execution environment from the primary memory into the secondary memory.
14. The non-transitory computer-readable storage media of claim 13 , wherein the expected resource cost on the host device of transitioning the execution environment to secondary memory and returning the virtual machine instance to the primary memory prior to the expected time of the next request to execute the code comprises a combination of: an expected resource cost to transition the execution environment from the primary memory to the secondary memory; an expected resource cost to transition the execution environment from the secondary memory to the primary memory; and an expected resource cost to maintain the execution environment in the secondary memory subsequent to transitioning the execution environment from the primary memory to the secondary memory and prior to transitioning the execution environment from the secondary memory to the primary memory.
15. The non-transitory computer-readable storage media of claim 14 , wherein the expected resource cost to transition the execution environment from the primary memory to the secondary memory comprises an expected resource cost to transfer a working set of data for the execution environment into the secondary memory.
16. The non-transitory computer-readable storage media of claim 15 , wherein the execution environment is stored within the secondary memory at least partly with reference to a prior snapshot of the execution environment in the secondary memory and data indicating a state of the working set of data for the execution environment.
17. The non-transitory computer-readable storage media of claim 14 , wherein the expected resource cost to transition the execution environment from the primary memory to the secondary memory is calculated as a weighted combination of time-factored costs corresponding to each resource required to transition the execution environment from the primary memory to the secondary memory.
18. The non-transitory computer-readable storage media of claim 17 , wherein weights of individual time-factored costs are set based at least partly on an availability of a corresponding resource required to transition the execution environment from the primary memory to the secondary memory.
19. The non-transitory computer-readable storage media of claim 13 , wherein the expected time of the next request is calculated as a time before which there is a statistical percentage likelihood that a next request to execute the code will not occur.
20. The non-transitory computer-readable storage media of claim 19 , wherein the instructions, when executed on a computing system, cause the computing system to calculate the expected time of the next request based at least partly on statistical analysis of a distribution of times between individual calls to execute the code reflected within the history of calls.
The text of each claim as printed, for pasting a claim word for word. The links in the tree view name the same claims and elements.
Status
active
As of 2026-11-17, the USPTO record for US 10713080 shows no unresolved maintenance-fee lapse, and the term end computed from the dates in that record is 2038-12-21 (20 years from filing, plus 149 days of patent term adjustment), a date not yet passed (data version 20261117.2).
- Basis
- term_20y · pta_days:149 (20 years from filing, plus 149 days of patent term adjustment)
- Term end
- 2038-12-21 Computed from the dates in the USPTO record
- Fee lapse
- none on record
- Reinstatement
- none on record; reinstatement_possible: false, not lapsed
- As of
- 2026-11-17
- Data version
- 20261117.2
A fact about the record with its basis and its as-of date, not legal advice.
Citations
References cited on the grant: 0 US patent documents · Cited by: 46 US patents in this data · Lists through the API: /api/v1/patent/us_patent_citation/10713080/ (needs a free key, as the links under Get this as data)
Family outside the US
Google Patents Public Datasets lists no publication outside the US in this patent's family (read 2026-10-15).
This patent's family on USPTO Global Dossier
Family data from Google Patents Public Datasets, used under CC BY 4.0.
Record JSON
{
"patent_id": "10713080",
"status": "active",
"basis": [
"term_20y",
"pta_days:149"
],
"reinstatement_possible": false,
"reinstatement_basis": "not lapsed",
"expiry_date_estimated": "2038-12-21",
"lapse_date": null,
"reinstated_date": null,
"as_of": "2026-11-17",
"data_version": "20261117.2",
"catalog_data_version": "20261117.2",
"permalink": "https://patentref.io/p/10713080?v=20261117.2",
"next_steps": [
{
"kind": "record",
"url": "https://patentref.io/p/10713080?v=20261117.2",
"audience": "human"
},
{
"kind": "patent",
"url": "https://patentref.io/api/v1/patent/10713080/",
"audience": "agent"
},
{
"kind": "fee_events",
"tool": "uspto_patent_center",
"url": "https://patentcenter.uspto.gov/applications?patentNumber=10713080",
"audience": "agent"
}
]
}
Get this as data
- Full record
/api/v1/patent/10713080/ - Status record
/api/v1/lapse/status/10713080/ - Claim tree
/api/v1/structure/claims/10713080/ - Brief
/api/v1/structure/brief/10713080/
These four links need a free key (1,000 requests a month). Opened in a browser, which sends no key, they answer 403. Get a free key on the sign-up page, then send it in the X-Api-Key header. To see the shape of an answer without a key, open Try it.