×

Dynamic database memory management policies

  • US 7,840,752 B2
  • Filed: 10/30/2006
  • Issued: 11/23/2010
  • Est. Priority Date: 10/30/2006
  • Status: Active Grant
First Claim
Patent Images

1. A method for managing a database stored on a persistent storage medium, the method comprising the steps of:

  • enabling, at a computing device running a database application and one or more other applications, both a kernel mode system file cache of an operating system of the computing device and a user mode buffer pool of a database engine of the database application buffering data pages retrieved by the database engine from the persistent storage medium of the computing device, the user mode buffer pool being implemented using a memory resource in user mode that is also accessible by the kernel mode system file cache of the operating system, the kernel mode system file cache being implemented using a memory resource in kernel mode that is also accessible from user mode by the database application and the one or more other applications running on the computing device, wherein enabling the kernel mode system file cache and the user mode buffer pool for buffering comprises;

    setting, by the database engine, a maximum data page target for the user mode buffer pool to impose an upper limit on the number of data pages that are buffered in the user mode buffer pool such that a memory size of the user mode buffer pool is smaller relative to a memory size of the kernel mode system file cache in order to minimize duplicative buffering of data pages by the user mode buffer pool and the kernel mode system file cache;

    enabling, from the user mode buffer pool, a direct flush write path to the persistent storage medium;

    providing, from the user mode buffer pool, a system file cache write path buffering data pages from the user mode buffer pool to the kernel mode system file cache; and

    providing, from the kernel mode system file cache, a cached input/output (I/O) stream to the persistent storage medium enabling the kernel mode system file cache to directly read data pages from and write data pages to the persistent storage medium;

    retrieving, by the database engine, data pages stored on the persistent storage medium of the computing device;

    buffering, by the database engine, the data pages retrieved from the persistent storage medium of the computing device into the user mode buffer pool;

    writing, by the database engine, the data pages from user mode buffer pool to the persistent storage medium via the direct flush write path as a disk I/O stream to the persistent storage medium;

    buffering, by the operating system, the data pages of the disk I/O stream into the kernel mode system file cache;

    trimming, by the database engine, data pages from the user mode buffer pool to maximize free memory in the memory resource in the user mode in response to detection of the database engine entering an idle state;

    determining, by the database engine, whether a required data page that has been trimmed from the user mode buffer pool is held in the kernel mode system file cache; and

    retrieving, by the database engine, the required data page from the kernel mode system file cache when the required data page is held in the kernel mode system file cache.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×