Multi-level buffer pool extensions
First Claim
1. A computer program product comprising one or more computer-storage devices, excluding propagation signals, which store computer-executable instructions that, when executed by one or more processors of a computing system, cause the computing system to implement a method for using a buffer pool to manage blocks of memory among a first level memory, a second level memory, and a lower level of external memory, and where the computer-implemented method comprises acts of:
- retrieving from an external memory blocks of memory comprised of data pages, and caching at least some of said data pages in a first level memory of a buffer pool, and caching at least some other data pages in a second level memory of the buffer pool, the first level memory providing faster average access speeds for data retrieval than the second level memory, and the second level memory providing faster average access speeds for data retrieval than the external memory;
determining at least first and second threshold values, the first threshold value defining a value which determines when a data page is to be evicted from the first level memory of the buffer pool to the second level memory of the buffer pool, and the second threshold value defining a value which determines when a data page is to be evicted from the second level memory of the buffer pool;
periodically scanning all data pages cached in the first and second levels of memory of the buffer pool and assigning a value to each scanned data page based on usage history of each scanned page as of the time scanned;
periodically comparing the assigned value of each said cached data page to the first and second threshold values;
scheduling for eviction cached data pages from the first level memory of the buffer pool to the second level memory of the buffer pool for those cached data pages not having an assigned value above said first threshold level;
scheduling for eviction cached data pages from the second level memory of the buffer pool to a lower level memory for those cached data pages not having an assigned value above said second threshold level;
determining if a data page scheduled for eviction is dirty because the page has been altered prior to eviction, and if so, scheduling a write operation for writing the dirty data page to external memory prior to unhashing a buffer descriptor and freeing a page frame for the dirty data page so that the dirty page is then evicted;
for each data page scheduled for eviction that is dirty, writing the dirty page to external memory and after the scheduled write operation has been completed, evicting the dirty page from the first or second level of memory of the buffer pool based on the assigned value for the evicted dirty page as compared to the first and second threshold values; and
for each data page scheduled for eviction that is not dirty, unhashing a buffer descriptor and freeing a page frame for each said data page that is not dirty, and evicting each such data page from the first or second level of memory of the buffer pool based on the assigned value of the evicted page that is not dirty, as compared to the first and second threshold values.
2 Assignments
0 Petitions
Accused Products
Abstract
A buffer manager that manages blocks of memory amongst multiple levels of buffer pools. For instance, there may be a first level buffer pool for blocks in first level memory, and a second level buffer pool for blocks in second level memory. The first level buffer pool evicts blocks to the second level buffer pool if the blocks are not used above a first threshold level. The second level buffer pool evicts blocks to a yet lower level if they have not used above a second threshold level. The first level memory may be dynamic random access memory, whereas the second level memory may be storage class memory, such as a solid state disk. By using such a storage class memory, the working block set of the buffer manager may be increased without resorting to lower efficiency random block access from yet lower level memory such as disk.
47 Citations
18 Claims
-
1. A computer program product comprising one or more computer-storage devices, excluding propagation signals, which store computer-executable instructions that, when executed by one or more processors of a computing system, cause the computing system to implement a method for using a buffer pool to manage blocks of memory among a first level memory, a second level memory, and a lower level of external memory, and where the computer-implemented method comprises acts of:
-
retrieving from an external memory blocks of memory comprised of data pages, and caching at least some of said data pages in a first level memory of a buffer pool, and caching at least some other data pages in a second level memory of the buffer pool, the first level memory providing faster average access speeds for data retrieval than the second level memory, and the second level memory providing faster average access speeds for data retrieval than the external memory; determining at least first and second threshold values, the first threshold value defining a value which determines when a data page is to be evicted from the first level memory of the buffer pool to the second level memory of the buffer pool, and the second threshold value defining a value which determines when a data page is to be evicted from the second level memory of the buffer pool; periodically scanning all data pages cached in the first and second levels of memory of the buffer pool and assigning a value to each scanned data page based on usage history of each scanned page as of the time scanned; periodically comparing the assigned value of each said cached data page to the first and second threshold values; scheduling for eviction cached data pages from the first level memory of the buffer pool to the second level memory of the buffer pool for those cached data pages not having an assigned value above said first threshold level; scheduling for eviction cached data pages from the second level memory of the buffer pool to a lower level memory for those cached data pages not having an assigned value above said second threshold level; determining if a data page scheduled for eviction is dirty because the page has been altered prior to eviction, and if so, scheduling a write operation for writing the dirty data page to external memory prior to unhashing a buffer descriptor and freeing a page frame for the dirty data page so that the dirty page is then evicted; for each data page scheduled for eviction that is dirty, writing the dirty page to external memory and after the scheduled write operation has been completed, evicting the dirty page from the first or second level of memory of the buffer pool based on the assigned value for the evicted dirty page as compared to the first and second threshold values; and for each data page scheduled for eviction that is not dirty, unhashing a buffer descriptor and freeing a page frame for each said data page that is not dirty, and evicting each such data page from the first or second level of memory of the buffer pool based on the assigned value of the evicted page that is not dirty, as compared to the first and second threshold values. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer-implemented method for using a buffer pool to manage blocks of memory among a first level memory, a second level memory, and a lower level of memory, the computer-implemented method comprising acts of:
-
retrieving from an external memory blocks of memory comprised of data pages, and caching at least some of said data pages in a first level memory of a buffer pool, and caching at least some other data pages in a second level memory of the buffer pool, the first level memory providing faster average access speeds for data retrieval than the second level memory, and the second level memory providing faster average access speeds for data retrieval than the external memory; determining at least first and second threshold values, the first threshold value defining a value which determines when a data page is to be evicted from the first level memory of the buffer pool to the second level memory of the buffer pool, and the second threshold value defining a value which determines when a data page is to be evicted from the second level memory of the buffer pool; periodically scanning all data pages cached in the first and second levels of memory of the buffer pool and assigning a value to each scanned data page based on usage history of each scanned page as of the time scanned; periodically comparing the assigned value of each said cached data page to the first and second threshold values; scheduling for eviction cached data pages from the first level memory of the buffer pool to the second level memory of the buffer pool for those cached data pages not having an assigned value above said first threshold level; scheduling for eviction cached data pages from the second level memory of the buffer pool to a lower level memory of the buffer for those cached data pages not having an assigned value above said second threshold level; determining if a data page scheduled for eviction is dirty because it has been altered prior to eviction, and if so, scheduling a write operation for writing the dirty data page to external memory prior to unhashing a buffer descriptor and freeing a page frame for the dirty data page so that the dirty page is then evicted; for each data page scheduled for eviction that is dirty, after scheduled write operation has been completed, evicting the dirty page from the first or second level of memory of the buffer pool based on the assigned value of that page as compared to the first and second threshold values; and for each data page scheduled for eviction that is not dirty, unhashing a buffer descriptor and freeing a page frame for each said data page that is not dirty, and evicting each such data page from the first or second level of memory of the buffer pool based on the assigned value of that page as compared to the first and second threshold values. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A computer system comprising:
-
one or more processors; a lower level of external memory for storage of memory blocks comprising one or more data pages; a buffer pool comprised of a first level memory and a second level memory, the first level memory providing faster average access speeds for data retrieval than the second level memory, and the second level memory providing faster average access speeds for data retrieval than the external memory; and one or more computer-storage devices which store computer-executable instructions that, when executed by one or more processors of a computing system, cause the computer system to implement a method for using the buffer pool to manage blocks of memory among the first level memory, the second level memory, and the lower level of external memory, and where the computer-implemented method comprises acts of; retrieving from the external memory blocks of memory comprised of data pages, and caching at least some of said data pages in the first level memory of a buffer pool, and caching at least some other data pages in the second level memory of the buffer pool; determining at least first and second threshold values, the first threshold value defining a value which determines when a data page is to be evicted from the first level memory of the buffer pool to the second level memory of the buffer pool, and the second threshold value defining a value which determines when a data page is to be evicted from the second level memory of the buffer pool; periodically scanning all data pages cached in the first and second levels of memory of the buffer pool and assigning a value to each scanned data page based on usage history of each scanned page as of the time scanned; periodically comparing the assigned value of each said cached data page to the first and second threshold values; scheduling for eviction cached data pages from the first level memory of the buffer pool to the second level memory of the buffer pool for those cached data pages not having an assigned value above said first threshold level; scheduling for eviction cached data pages from the second level memory of the buffer pool to a lower level memory of the buffer for those cached data pages not having an assigned value above said second threshold level; determining if a data page scheduled for eviction is dirty because the pate has been altered prior to eviction, and if so, scheduling a write operation for writing the dirty data page to external memory prior to unhashing a buffer descriptor and freeing a page frame for the dirty data page so that the dirty page is then evicted; for each data page scheduled for eviction that is dirty, after the scheduled write operation has been completed, evicting the dirty page from the first or second level of memory of the buffer pool based on the assigned value for that page as compared to the first and second threshold values; and for each data page scheduled for eviction that is not dirty, unhashing a buffer descriptor and freeing a page frame for each said data page that is not dirty, and evicting each such data page from the first or second level of memory of the buffer pool based on the assigned value for that page as compared to the first and second threshold values. - View Dependent Claims (18)
-
Specification