# US 2018/0322050 A1 · Self-Adaptive Parallel Database Page Flusher

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

- Number: US 2018/0322050 A1
- Document ID: US20180322050A1
- Status: Published application
- Kind: A1
- Application number: 15/585,557
- Filed: 2017-05-03
- Published: 2018-11-08
- Earliest claimed: 2017-05-03
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Dirk Thomsen
- Web page: https://patentgrep.com/patent/US20180322050A1

## CPC

- G06F 11/1469: {Backup restoration techniques}
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G06F 11/2023: {Failover techniques}
- G06F 11/2097: {maintaining the standby controller/processing unit updated (initialisation or re-synchronisation thereof G06F11/1658 and subgroups)}
- G06F 2201/80: Database-specific techniques
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Execution of a page flusher is initiated in an in-memory database system in which pages are loaded into memory and having associated physical disk storage by a resource flush thread using a queue. Thereafter, pages are identified that have been loaded into the memory of the database system and which have been modified. These identified pages are to be flushed to the physical disk storage. Each page is assigned with a different ordered physical page number. These identified pages are added to the queue. Subsequently, asynchronous write I/O is triggered causing the identified pages to be flushed to the physical disk storage and stored in the physical disk storage according to their assigned physical page numbers such that, if at least one predetermined performance condition is met, a subset of the identified pages in the queue are flushed to physical disk storage.

## Claims

### Claim 1

A computer-implemented method comprising:
initiating, in an in-memory database system in which pages are loaded into memory and having associated physical disk storage, execution of a resource flush thread using a queue;
identifying pages loaded into the memory of the database system that have been modified and which are to be flushed to the physical disk storage;
assigning each identified page with a different ordered physical page number;
adding the identified pages to the queue; and
triggering asynchronous write I/O causing the identified pages in the queue to be flushed to the physical disk storage and stored in the physical disk storage according to their assigned physical page numbers;
wherein, if at least one predetermined performance condition is met, a subset of the identified pages in the queue is flushed to physical disk storage, in parallel to the flushing by the page flusher tread, using at least one helper job.

### Claim 2 (depends on 1)

The method as in claim 1 further comprising:
monitoring, by the resource flush thread, an amount of processing resources consumed in connection with the flushing of the identified pages;
wherein the at least one predetermined condition specifies a threshold amount of processing resources to be consumed solely by the resource flush thread, which when exceeded, causes the at least one helper job to flush the subset of the identified pages to physical disk storage.

### Claim 3 (depends on 1)

The method as in claim 1 further comprising:
monitoring, by the resource flush thread, execution times of helper jobs for potential execution of parallel page flushing;
wherein the at least one predetermined condition specifies a threshold for helper job execution times, which when exceeded, causes the at least one helper job to flush the subset of the identified pages to physical disk storage.

### Claim 4 (depends on 1)

The method of claim 1, wherein the identification of pages to be flushed to disk is based on whether the pages were last modified outside a pre-defined time window.

### Claim 5 (depends on 1)

The method of claim 1 further comprising:
allocating shadow pages in the memory prior to the triggering of the asynchronous write I/O;
copying the identified pages to the allocated shadow pages;
wherein the identified pages are flushed to the physical disk storage from the allocated shadow pages.

### Claim 6 (depends on 5)

The method of claim 5, wherein the shadow pages are allocated during a critical phase of a savepoint.

### Claim 7 (depends on 5)

The method of claim 5, wherein the shadow pages are allocated if the corresponding identified pages are rowstore pages.

### Claim 8 (depends on 5)

The method of claim 5 further comprising:
calculating a checksum value for each identified page copied to a shadow page and storing the calculated checksum value in the shadow page.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
encrypting the identified pages after calculating the checksum.

### Claim 10 (depends on 8)

The method of claim 8, wherein the assigning is performed by a main thread and the allocation of shadow pages, calculating checksum, encrypting, triggering I/O is performed by a plurality of helper jobs.

### Claim 11 (depends on 1)

The method of claim 1, wherein the physical page numbers are based on timestamps associated with each identified page indicating when such page was last modified.

### Claim 12 (depends on 1)

The method of claim 1 further comprising:
calculating a checksum value for each identified page to confirm integrity of a different corresponding identified page.

### Claim 13 (depends on 1)

The method of claim 1, wherein the database system comprises a primary database system and an associated secondary database system, wherein read statements are routed to the secondary database system until such time as a result lag between the primary database system is beyond a pre-defined lag threshold relative to the secondary database system.

### Claim 14 (depends on 13)

The method of claim 13, wherein the page flusher is executed on the primary database system.

### Claim 15 (depends on 13)

The method of claim 13, wherein the page flusher is executed on the secondary database system.

### Claim 16 (depends on 1)

The method of claim 1, wherein the identifying further determines a type of page for each modified page, wherein at least one type of modified page has a different pre-defined time window as compared to at least one other type of modified page such that the corresponding page types are flushed to physical disk storage at different times.

### Claim 17 (depends on 1)

The method of claim 1, further comprising:
initiating recovery of the database system by taking the database system offline;
replaying recovery operations specified by a redo log of the database system; and
bringing the database system online after all of the recovery operations are replayed;
wherein the page flusher executes independent of the recovery of the database system.

### Claim 18 (depends on 1)

The method of claim 1, wherein the modified pages are placed in a queue, and wherein the physical page numbers are assigned according to the modified pages respective locations within the queue.

### Claim 19 (depends on 1)

The method of claim 1, wherein the assigning is performed by a main thread and the allocation of shadow pages is performed by a plurality of helper jobs executing in parallel.

### Claim 20

A computer-implemented method comprising:
initiating, in an in-memory database system in which pages are loaded into memory and having associated physical disk storage, execution of a resource flush thread using a queue;
identifying pages loaded into the memory of the database system that have been modified and which are to be flushed to the physical disk storage;
adding the identified pages to the queue; and
triggering asynchronous write I/O causing the identified pages in the queue to be flushed to the physical disk storage and stored in the physical disk storage;
wherein, if at least one predetermined performance condition is met, a subset of the identified pages in the queue is flushed to physical disk storage, in parallel to the flushing by the page flusher tread, using at least one helper job.
