Patent ID: 11947568
Assignee: AMAZON TECHNOLOGIES, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
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.