# US 2020/0349067 A1 · Memory management for serverless databases

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0349067 A1
- Document ID: US20200349067A1
- Status: Published application
- Kind: A1
- Application number: 16/540,035
- Filed: 2019-08-13
- Published: 2020-11-05
- Earliest claimed: 2019-05-05
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Manoj SYAMALA; Arnd Christian KÖNIG; Vivek NARASAYYA; Junfeng DONG; Ajay KALHAN; Shize XU; Changsong LI; Pankaj ARORA; Jiaqi LIU; John M. OSLAKE
- Web page: https://patentgrep.com/patent/US20200349067A1

## CPC

- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 16/24552: {Database cache management}
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 16/172: Caching, prefetching or hoarding of files
- G06F 16/9574: {of access to content, e.g. by caching}
- G06F 12/121: using replacement algorithms
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/154: Networked environment
- G06F 2212/163: Server or database system
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A solution is disclosed for memory management of serverless databases that includes: based at least on detecting a trigger event, determining whether memory is to be reclaimed; based at least on determining that memory is to be reclaimed, determining an amount of memory to be reclaimed; identifying memory to be reclaimed; and reclaiming the identified memory. Disclosed solutions are flexible, enabling customization of the aggressiveness and manner of memory reclamation. This permits users to specify a tailored balance point between performance and cost, for arrangements that bill users based on resource usage (e.g., memory consumed by a serverless database). In some examples, users specify a ramp-down parameter that is used to determine how much memory can be evicted in a particular reclamation event, time intervals (or another criteria) for triggering a reclamation event, and a definition for whether a cache is active.

## Claims

### Claim 1

One or more computer storage devices having computer-executable instructions stored thereon for memory management of serverless databases, which, on execution by a computer, cause the computer to perform operations comprising:
detecting a trigger event for reclaiming memory from a serverless database instance, wherein the trigger event comprises at least one event selected from the list consisting of;
a timer event and a memory usage parameter exceeding a threshold;
receiving a selection defining at least a portion of a set of performance parameters;
based at least on detecting the trigger event, determining whether memory is to be reclaimed, wherein determining whether memory is to be reclaimed comprises measuring the set of performance parameters;
receiving a selection defining a ramp-down parameter;
based at least on determining that memory is to be reclaimed, determining an amount of memory to be reclaimed, wherein determining an amount of memory to be reclaimed comprises calculating the amount of memory to be reclaimed using the ramp-down parameter;
identifying memory to be reclaimed, wherein identifying memory to be reclaimed comprises identifying a memory eviction priority;
receiving a selection defining a memory reclamation policy; and
reclaiming the identified memory according to the memory reclamation policy.

### Claim 2 (depends on 1)

The one or more computer storage devices of claim 1, wherein the memory eviction priority is based at least on a cost to rehydrate a cache entry.

### Claim 3

A system for memory management of serverless databases, the system comprising:
a processor; and
a computer-readable medium storing instructions that are operative upon execution by the processor to:
detect a trigger event for reclaiming memory from a serverless database instance;
based at least on detecting the trigger event, determine whether memory is to be reclaimed;
based at least on determining that memory is to be reclaimed; determine an amount of memory to be reclaimed;
identify memory to be reclaimed; and
reclaim the identified memory.

### Claim 4 (depends on 3)

The system of claim 3, wherein the trigger event comprises at least one event selected from the list consisting of;
a timer event and a memory usage parameter exceeding a threshold.

### Claim 5 (depends on 3)

The system of claim 3, wherein the instructions are further operative to:
receive a selection defining at least a portion of a set of performance parameters, wherein determining whether memory is to be reclaimed comprises measuring the set of performance parameters.

### Claim 6 (depends on 3)

The system of claim 3, wherein determining an amount of memory to be reclaimed comprises calculating the amount of memory to be reclaimed using a ramp-down parameter.

### Claim 7 (depends on 6)

The system of claim 6, wherein the instructions are further operative to:
receive a selection defining the ramp-down parameter.

### Claim 8 (depends on 6)

The system of claim 6, wherein the instructions are further operative to:
tune the ramp-down parameter based at least on historical data.

### Claim 9 (depends on 3)

The system of claim 3, wherein identifying memory to be reclaimed comprises identifying a memory eviction priority, and wherein the memory eviction priority is based at least on a cost to rehydrate a cache entry.

### Claim 10 (depends on 3)

The system of claim 3, wherein the instructions are further operative to:
receive a selection defining a memory reclamation policy; and
wherein reclaiming the identified memory comprises reclaiming the identified memory according to the reclamation policy.

### Claim 11 (depends on 3)

The system of claim 3, wherein the instructions are further operative to:
evaluate a reclamation trigger condition against an aggregation of cache entries across multiple database instances in a pool of databases; and
wherein identifying memory to be reclaimed comprises identifying cache entries to evict across caches entries for the multiple database instances in the pool of databases.

### Claim 12

A method of memory management for serverless databases, the method comprising:
detecting a trigger event for reclaiming memory from a serverless database instance;
based at least on detecting the trigger event, determining whether memory is to be reclaimed;
based at least on determining that memory is to be reclaimed, determining an amount of memory to be reclaimed;
identifying memory to be reclaimed; and
reclaiming the identified memory.

### Claim 13 (depends on 12)

The method of claim 12, wherein the trigger event comprises at least one event selected from the list consisting of;
a timer event and a memory usage parameter exceeding a threshold.

### Claim 14 (depends on 12)

The method of claim 12, further comprising:
receiving a selection defining at least a portion of a set of performance parameters, wherein determining whether memory is to be reclaimed comprises measuring the set of performance parameters.

### Claim 15 (depends on 12)

The method of claim 12, wherein determining an amount of memory to be reclaimed comprises calculating the amount of memory to be reclaimed using a ramp-down parameter.

### Claim 16 (depends on 15)

The method of claim 15, further comprising:
receiving a selection defining the ramp-down parameter.

### Claim 17 (depends on 15)

The method of claim 15, further comprising:
tuning the ramp-down parameter based at least on historical data.

### Claim 18 (depends on 12)

The method of claim 12, wherein identifying memory to be reclaimed comprises identifying a memory eviction priority, and wherein the memory eviction priority is based at least on a cost to rehydrate a cache entry.

### Claim 19 (depends on 12)

The method of claim 12, further comprising:
receiving a selection defining a memory reclamation policy; and
wherein reclaiming the identified memory comprises reclaiming the identified memory according to the reclamation policy.

### Claim 20 (depends on 12)

The method of claim 12, further comprising:
evaluating a reclamation trigger condition against an aggregation of cache entries across multiple database instances in a pool of databases; and
wherein identifying memory to be reclaimed comprises identifying cache entries to evict across caches entries for the multiple database instances in the pool of databases.
