IP Library Granted Patent US 9,244,980
Granted Patent B1
US 9,244,980 · App. 13/797,728 · Granted Jan 26, 2016

Strategies for pushing out database blocks from cache

Inventors: Adam Birnbaum (La Jolla, CA); Raymi Dyskant (Pittsburgh, PA); Scott Graupmann (San Diego, CA)
Assignee: ParAccel LLC
G06F17/3048
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,244,980
App. No.
13/797,728
Granted
Jan 26, 2016
Kind
B1
Abstract

Data of a columnar database is organized into extents. Each extent occupies contiguous storage on the disk. An extent stores database blocks of a column of a database table. The database system adds new database blocks of a column to the extents assigned to that column. When a request for adding a block to a table is received, the extent for the table and column combination is obtained and the block added to the extent. Prefetching strategies are used to retrieve database blocks in advance of an actual request. The rate of prefetching is determined per column. The rate of prefetching is adjusted based on the number of faults encountered for the column. Database blocks no longer needed in memory are pushed out. When a scan process is reading blocks, as soon as the block has been processed it is scheduled to be pushed out.

Claims (67)

1. A computer-implemented method for selecting blocks for pushing out of a cache in a database system, the method comprising:

receiving, by a database system, a request to execute a set of scan processes, each scan process corresponding to a database query and configured to read blocks of a table in a scan order;

prefetching blocks of the table from a persistent storage device for storing in a cache of the database system and associating each prefetched block with scan processes expected to read data from the prefetched block;

receiving an indication of processing of a first prefetched block by a scan process, the first prefetched block having a rank value based on the order of processing of data by the scan process;

maintaining a count of the number of scan processes that are expected to read each prefetched block stored in cache, the maintaining comprising, responsive to receiving the indication of processing of the first prefetched block by the scan process: for each prefetched block with a rank in the scan order less than the rank value of the first prefetched block, decreasing the count for the prefetched block;

responsive to decreasing the count of a second prefetched block, determining whether the count for the second prefetched block indicates that no scan processes are expected to read the second prefetched block; and

marking the storage of the second prefetched block in the cache for pushing out of the cache if the count of the second prefetched block is determined to indicate that no scan processes are expected to read the second prefetched block.

2. The computer-implemented method of claim 1 , further comprising:

retrieving a new block from the persistent storage device for storing in the cache; and

responsive to the storage of the prefetched block in the cache being marked as free, reusing the storage of the prefetched block for storing the new block.

3. The computer-implemented method of claim 1 , further comprising:

storing a set of blocks of the table in a contiguous portion of the persistent storage device; and

wherein prefetching blocks of the table comprises:

receiving a request to read a block from the persistent storage; and

retrieving a plurality of blocks stored contiguously with the requested block.

4. The computer-implemented method of claim 1 , further comprising:

selecting a prefetched block for keeping in the cache in spite of determining that the scan processes associated with the prefetched block have completed processing the prefetched block.

5. The computer-implemented method of claim 4 , wherein the selected prefetched block is a block being modified.

6. The computer-implemented method of claim 4 , wherein the selected prefetched block is a block with a rank within the table below a threshold value.

7. The computer-implemented method of claim 4 , wherein the selected prefetched block is pushed out of the cache using a least recently used strategy.

8. A computer-implemented method for selecting blocks for pushing out of a cache in a database system, the method comprising:

receiving, by a database system, a request to execute a set of scan processes, each scan process corresponding to a database query and configured to read blocks of a table in a scan order;

prefetching blocks of the table from a persistent storage device for storing in a cache of the database system and associating each prefetched block with at least a scan process expected to read data from the prefetched block;

receiving a request to process data of a prefetched block by a scan process;

maintaining a count of the number of scan processes that are expected to read each prefetched block stored in cache;

responsive to the scan process processing the prefetched block, decreasing the count for another prefetched block with a rank in the scan order less than or same as the rank of the prefetched block; and

responsive to the count of the other prefetched block becoming zero, marking the other prefetched block for pushing out of the cache.

9. The computer-implemented method of claim 8 , further comprising:

retrieving a new block from the persistent storage device for storing in the cache; and

responsive to the storage of the prefetched block in the cache being marked as free, reusing the storage of the prefetched block for storing the new block.

10. The computer-implemented method of claim 8 , further comprising:

storing a set of blocks of the table in a contiguous portion of the persistent storage device; and

wherein prefetching blocks of the table comprises:

receiving a request to read a block from the persistent storage; and

retrieving a plurality of blocks stored contiguously with the requested block.

11. A computer-readable storage medium storing computer-executable code for pushing out blocks from a cache of a database system, the code, when executed by a processor, causing the processor to:

receive a request to execute a set of scan processes, each scan process corresponding to a database query and configured to read blocks of a table in a scan order;

prefetch blocks of the table from a persistent storage device for storing in a cache of the database system and associating each prefetched block with scan processes expected to read data from the prefetched block;

receive an indication of processing of a first prefetched block by a scan process, the first prefetched block having a rank value based on the order of processing of data by the scan process;

maintain a count of the number of scan processes that are expected to read each prefetched block stored in cache, the maintaining comprising, responsive to receiving the indication of processing of the first prefetched block by the scan process: for each prefetched block with a rank in the scan order less than the rank value of the first prefetched block, decrease the count for the prefetched block;

responsive to decreasing the count of a second prefetched block, determine whether the count for the second prefetched block indicates that no scan processes are expected to read the second prefetched block; and

mark the storage of the second prefetched block in the cache for pushing out of the cache if the count of the second prefetched block is determined to indicate that no scan processes are expected to read the second prefetched block.

12. The computer-readable storage medium of claim 11 , wherein the code further causes the processor to:

retrieve a new block from the persistent storage device for storing in the cache; and

responsive to the storage of the prefetched block in the cache being marked as free, reuse the storage of the prefetched block for storing the new block.

13. The computer-readable storage medium of claim 11 , wherein the code further causes the processor to:

store a set of blocks of the table in a contiguous portion of the persistent storage device; and

wherein prefetching blocks of the table causes the processor to:

receive a request to read a block from the persistent storage; and

retrieve a plurality of blocks stored contiguously with the requested block.

14. A computer-implemented system for storing data in a database, the system comprising:

a computer processor; and

a computer-readable storage medium storing computer program modules configured to execute on the computer processor, the computer program modules comprising a cache manager module configured to:

receive a request to execute a set of scan processes, each scan process corresponding to a database query and configured to read blocks of a table in a scan order;

prefetch blocks of the table from a persistent storage device for storing in a cache of the database system and associating each prefetched block with scan processes expected to read data from the prefetched block;

receive an indication of processing of a first prefetched block by a scan process, the first prefetched block having a rank value based on the order of processing of data by the scan process;

maintain a count of the number of scan processes that are expected to read each prefetched block stored in cache, the maintaining comprising, responsive to receiving the indication of processing of the first prefetched block by the scan process: for each prefetched block with a rank in the scan order less than the rank value of the first prefetched block, decrease the count for the prefetched block;

responsive to decreasing the count of a second prefetched block, determine whether the count for the second prefetched block indicates that no scan processes are expected to read the second prefetched block; and

mark the storage of the second prefetched block in the cache for pushing out of the cache if the count of the second prefetched block is determined to indicate that no scan processes are expected to read the second prefetched block.

15. The computer-implemented system of claim 14 , wherein the cache manager module is further configured to:

retrieve a new block from the persistent storage device for storing in the cache; and

responsive to the storage of the prefetched block in the cache being marked as free, reuse the storage of the prefetched block for storing the new block.

16. The computer-implemented system of claim 14 , wherein the cache manager module is further configured to:

store a set of blocks of the table in a contiguous portion of the persistent storage device; and

prefetch blocks of the table by:

receiving a request to read a block from the persistent storage; and

retrieving a plurality of blocks stored contiguously with the requested block.

Assignments (6)
RELEASE OF SECURITY INTEREST Recorded Jul 24, 2018
From: VIRTUS GROUP, LP
To: ACTIAN CORPORATION; PARACCEL LLC; PERVASIVE SOFTWARE INC.; VERSANT SOFTWARE LLC
Reel/Frame 046621/0033 →
SECURITY INTEREST Recorded Jul 1, 2017
From: ACTIAN CORPORATION; PARACCEL LLC; PERVASIVE SOFTWARE INC.; VERSANT SOFTWARE LLC
To: VIRTUS GROUP, LP
Reel/Frame 042881/0075 →
RELEASE OF SECURITY INTEREST Recorded Jun 30, 2017
From: TC LENDING, LLC
To: ACTIAN CORPORATION; VERSANT CORPORATION (NKA VERSANT SOFTWARE LLC); PERVASIVE SOFTWARE INC.; PARACCEL LLC; ACTIAN INTERNATIONAL, INC.; VERSANT SOFTWARE LLC; POET HOLDINGS, INC.
Reel/Frame 042880/0155 →
PLEDGE SUPPLEMENT Recorded Apr 11, 2016
From: PARACCEL LLC; PERVASIVE SOFTWARE INC.
To: TC LENDING, LLC, AS COLLATERAL AGENT
Reel/Frame 038406/0307 →
CERT OF CONVERSION-FORMATION-LLC Recorded Jul 31, 2013
From: PARACCEL, INC.
To: PARACCEL LLC
Reel/Frame 030936/0382 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 9, 2013
From: BIRNBAUM, ADAM; DYSKANT, RAYMI; GRAUPMANN, SCOTT
To: PARACCEL, INC.
Reel/Frame 030388/0868 →
Continuity (1)
Provisional Application 61643231 · May 5, 2012