CPC G06F 16/284 (2019.01) [G06F 9/5027 (2013.01); G06F 12/0802 (2013.01); G06F 16/2255 (2019.01); G06F 16/2264 (2019.01); G06F 16/2282 (2019.01); G06F 16/2379 (2019.01); G06F 16/2456 (2019.01); G06F 16/275 (2019.01)] | 20 Claims |
1. A system, comprising:
at least one processor; and
a memory, storing program instructions that when executed by the at least one processor, cause the at least one processor to implement a database system, configured to:
monitor a working set ratio of data pages in a buffer cache in the memory for the database to detect a scaling event, wherein to monitor the working set ratio, the database system is configured to:
access a fixed-size array that stores respective timestamps of last accesses of different ones of the data pages without increasing the fixed-size array to determine which ones of the data pages are accessed within a range of time corresponding to a sliding window of time that filters out entries from the fixed-size array outside of the range of time;
based on the access, determine an estimate of a working set for the database system within the range of time;
determine the working set ratio of data pages for the database system from a size of the buffer cache and the estimate of the working set for the database system within the range of time; and
compare the working set ratio with a ratio threshold for scaling events; and
responsive to the detection of the scaling event, cause the size of the buffer cache to be increased or decreased according to the detected scaling event.
|