# US 10,310,737 B1 · Size-targeted database I/O compression

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

- Number: US 10,310,737 B1
- Document ID: US10310737B1
- Status: Granted
- Kind: B1
- Application number: 15/404,809
- Filed: 2017-01-12
- Granted: 2019-06-04
- Earliest claimed: 2013-04-29
- Assignees: Amazon Technologies, Inc.
- Applicants: Amazon Technologies, Inc.
- Inventors: Subramanian Sankara Subramanian; Stefano Stefani
- Web page: https://patentgrep.com/patent/US10310737B1

## CPC

- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/065: {Replication mechanisms}
- G06F 3/068: {Hybrid storage device}
- G06F 16/1744: {using compression, e.g. sparse files}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/24569: {Query processing with adaptation to specific hardware, e.g. adapted for using GPUs or SSDs}
- G06F 16/328: {Management therefor}
- G06F 16/2291: {User-Defined Types; Storage management thereof}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Solid-state storage devices may be employed to store data maintained by a database management system, but may have characteristics that reduce the efficiency of interactions between the database management system and the device. A storage subsystem may receive information indicative of internal boundaries within database data. A segment of the database data may be selected for compression, wherein the size of the segment is based at least on one or more the internal boundaries, the memory page size of the solid-state drive, and a predicted rate of compression. The compressed segment may be stored if it has a size less than the memory page size of the device. If it does not, compression may be retried with a smaller segment of data or a portion of the data may be stored in uncompressed form. Additional segments of the data may be stored on the solid-state drive in a similar manner.

## Claims

### Claim 1

A system comprising:
at least one processor; and
one or more memories having stored thereon computer-readable instructions that, upon execution by the at least one processor, cause the system at least to:
determine a first size of a first segment of data to compress based at least in part on a value indicative of a compression rate and a page size of each of one or more memory pages of a storage device;
compress the first segment of the data, the first segment being of the first size, to form a compressed segment of a second size; and
store the compressed segment in a memory page of the one or more memory pages when the second size is less than the page size.

### Claim 2 (depends on 1)

The system of claim 1, further comprising one or more memories having stored thereon computer-readable instructions that, upon execution, cause the system at least to:
update the value indicative of the compression rate based at least in part on the second size.

### Claim 3 (depends on 1)

The system of claim 1, further comprising one or more memories having stored thereon computer-readable instructions that, upon execution, cause the system at least to:
store an uncompressed subset of the first segment of the data in a memory page of the one or more memory pages when the second size is greater than the page size.

### Claim 4 (depends on 1)

The system of claim 1, further comprising one or more memories having stored thereon computer-readable instructions that, upon execution, cause the system at least to:
determine to compress a second segment of the data in addition to the first segment of the data based at least in part on the second size of the compressed first segment being less than the page size page; and
compress the second segment of the data in addition to the first segment of data.

### Claim 5 (depends on 1)

The system of claim 1, further comprising one or more memories having stored thereon computer-readable instructions that, upon execution, cause the system at least to:
determine to form a second compressed segment based at least in part on one or more of an elapsed time to compress the first segment of the data, a number of attempts to compress the first segment of the data, and the first size of the first segment of the data; and
form the second compressed segment.

### Claim 6 (depends on 1)

The system of claim 1, wherein the one or more memory pages corresponds to an erase block.

### Claim 7 (depends on 1)

The system of claim 1, further comprising one or more memories having stored thereon computer-readable instructions that, upon execution, cause the system at least to:
apply a Lempel-Ziv compression algorithm to the first segment of the data.

### Claim 8 (depends on 1)

The system of claim 1, further comprising one or more memories having stored thereon computer-readable instructions that, upon execution, cause the system at least to:
select one or more of a compression algorithm and compression parameters based at least in part on the page size.

### Claim 9 (depends on 1)

The system of claim 1, further comprising one or more memories having stored thereon computer-readable instructions that, upon execution, cause the system at least to:
write uncompressed header information indicative of a compression status to the one or more memory pages.

### Claim 10 (depends on 1)

The system of claim 1, further comprising one or more memories having stored thereon computer-readable instructions that, upon execution, cause the system at least to:
determine the first size of the first segment of the data based at least in part on a probability of achieving the compression rate.

### Claim 11 (depends on 1)

The system of claim 1, further comprising one or more memories having stored thereon computer-readable instructions that, upon execution, cause the system at least to:
receive, from a component of an application, information indicative of one or more internal boundaries in the data; and
determine the first size of the first segment of the data based at least in part on the one or more internal boundaries.

### Claim 12

A method, comprising:
determining a first size of a first segment of data to compress based at least in part on a value indicative of a compression rate and a page size of each of one or more memory pages of a storage device;
compressing the first segment of the data, the first segment of the first size, to form a compressed segment of a second size; and
storing the compressed segment in a memory page of the one or more memory pages based on determining that the second size is less than the page size.

### Claim 13 (depends on 12)

The method of claim 12, wherein the compressing is performed using a first compression algorithm, the method further comprising:
retrying compression of at least a subset of the first segment when the second size is greater than the page size.

### Claim 14 (depends on 12)

The method of claim 12, further comprising:
retrying compression of at least a subset of the first segment.

### Claim 15 (depends on 12)

The method of claim 12, wherein the first size of the first segment is based at least in part on a boundary within data of an application.

### Claim 16 (depends on 12)

The method of claim 12, further comprising:
compressing the first segment of the data and an additional segment of the data based at least in part on the second size being less than the page size, to form an additional compressed segment; and
storing the compressed additional segment in a memory page.

### Claim 17

A non-transitory computer-readable storage medium having stored thereon instructions that, upon execution by a computing device, cause the computing device to at least:
determine a first size of a first segment of data to compress based at least in part on a value indicative of a compression rate and a page size of each of one or more memory pages of a storage device;
compress the first segment of the data, the first segment being of the first size, to form a compressed segment of a second size; and
store the compressed segment in a memory page of the one or more memory pages when the second size is less than the page size.

### Claim 18 (depends on 17)

The computer-readable medium of claim 17, having stored thereon further instructions that, upon execution by the computing device, cause the computing device to at least:
retry compression of at least a subset of the first segment when the second size is greater than the page size.

### Claim 19 (depends on 18)

The computer-readable medium of claim 18, having stored thereon further instructions that, upon execution by the computing device, cause the computing device to at least:
stop compression of the at least a subset of the first segment based at least in part on an elapsed time.

### Claim 20 (depends on 17)

The computer-readable medium of claim 17, wherein the first size of the first segment is based at least in part on a boundary within data of an application.
