# US 2023/0057160 A1 · Automated database cache resizing

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

- Number: US 2023/0057160 A1
- Document ID: US20230057160A1
- Status: Published application
- Kind: A1
- Application number: 17/980,223
- Filed: 2022-11-03
- Published: 2023-02-23
- Earliest claimed: 2020-08-25
- Assignees: ServiceNow, Inc.
- Applicants: ServiceNow, Inc.
- Inventors: Ankit Khetarpal
- Web page: https://patentgrep.com/patent/US20230057160A1

## CPC

- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 11/3409: {for performance assessment}
- G06F 11/3419: {by assessing time}
- G06F 16/214: {Database migration support}
- G06F 16/24552: {Database cache management}
- G06F 2201/80: Database-specific techniques
- G06F 2201/81: Threshold
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A test query of a database is performed in response to determining that a performance associated with a user database query of the database does not satisfy a first performance threshold. In response to a determination that the performance of the test query satisfies a second performance threshold, a database buffer cache of the database is resized. Resizing the database buffer cache includes: determining a metric based at least in part on a storage size of the database and an index side of the database, and resizing the database buffer cache of the database based on the metric and a size of the database buffer cache.

## Claims

### Claim 1

A method comprising:
performing a test query of a database in response to determining that a performance associated with a user database query of the database does not satisfy a first performance threshold; and
in response to a determination that the performance of the test query satisfies a second performance threshold, resizing a database buffer cache of the database, wherein resizing the database buffer cache includes:
determining a metric based at least in part on a storage size of the database and an index side of the database; and
resizing the database buffer cache of the database based on the metric and a size of the database buffer cache.

### Claim 2 (depends on 1)

The method of claim 1, wherein the metric is based at least in part on a sum of the storage size of the database and the index side of the database.

### Claim 3 (depends on 1)

The method of claim 1, wherein resizing the database buffer cache includes comparing the size of the database buffer cache of the database against the metric.

### Claim 4 (depends on 1)

The method of claim 1, wherein the first performance threshold is based on an average response time of the database.

### Claim 5 (depends on 4)

The method of claim 4, wherein determining that the performance of the user database query to the database does not meet the first performance threshold includes determining that a response time of the user database query is at least twice the average response time of the database.

### Claim 6 (depends on 1)

The method of claim 1, wherein the performance of the user database query to the database was determined in response to an identification that the user database query has been performed at least a threshold number of times.

### Claim 7 (depends on 1)

The method of claim 1, wherein the first performance threshold is equal to the second performance threshold.

### Claim 8 (depends on 1)

The method of claim 1, wherein the first performance threshold is greater than the second performance threshold, and wherein the second performance threshold is an average response time of the database.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
increasing a size of the database buffer cache of the database.

### Claim 10 (depends on 9)

The method of claim 9, wherein the increase in the size of the database buffer cache is based on a percentage of a storage size associated with the database.

### Claim 11 (depends on 9)

The method of claim 9, wherein the increase in the size of the database buffer cache is based on a percentage of a sum of a storage size and an index size associated with the database.

### Claim 12 (depends on 9)

The method of claim 9, wherein the increase in the size of the database buffer cache is based on a sum of a first percentage of a storage size associated with the database and a second percentage of an index size associated with the database, wherein the first percentage is different from the second percentage.

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
in response to increasing a size of the database buffer cache, evicting one or more tables of the database.

### Claim 14 (depends on 13)

The method of claim 13, wherein the increase in the size of the database buffer cache is based on a storage size of remaining tables associated with the database.

### Claim 15 (depends on 13)

The method of claim 13, wherein evicting the one or more tables of the database includes migrating the evicted one or more tables of the database to a different database server.

### Claim 16 (depends on 15)

The method of claim 15, further comprising:
identifying one or more database tables associated with a first customer; and
identifying one or more database tables associated with a second customer, wherein the second customer is different from the first customer, wherein the migrated one or more tables are associated with the second customer.

### Claim 17

A system comprising:
one or more processors; and
a memory coupled to the one or more processors, wherein the memory is configured to provide the one or more processors with instructions which when executed cause the one or more processors to:
perform a test query of a database in response to determining that a performance associated with a user database query of the database does not satisfy a first performance threshold; and
in response to a determination that the performance of the test query satisfies a second performance threshold, resize a database buffer cache of the database, wherein causing the one or more processors to resize the database buffer cache includes causing the one or more processors to:
determine a metric based at least in part on a storage size of the database and an index side of the database; and
resize the database buffer cache of the database based on the metric and a size of the database buffer cache.

### Claim 18 (depends on 17)

The system of claim 17, wherein the metric is based at least in part on a sum of the storage size of the database and the index side of the database.

### Claim 19

A computer program product embodied in a non-transitory computer readable medium and comprising computer instructions for:
performing a test query of a database in response to determining that a performance associated with a user database query of the database does not satisfy a first performance threshold; and
in response to a determination that the performance of the test query satisfies a second performance threshold, resizing a database buffer cache of the database, wherein resizing the database buffer cache includes:
determining a metric based at least in part on a storage size of the database and an index side of the database; and
resizing the database buffer cache of the database based on the metric and a size of the database buffer cache.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein the metric is based at least in part on a sum of the storage size of the database and the index side of the database.
