摘要 |
A method, non-transitory computer readable medium, and data storage computing device that obtains data to be stored in a buffer in a buffer cache, determines a priority of the buffer based on the data, identifies one of a set of global recycle queues based on the priority, and inserts the buffer and metadata into the global recycle queue. When the global recycle queue is determined to be a lowest priority global recycle queue and the buffer is determined to be a least recently used buffer, the buffer is removed from the global recycle queue and inserted into a per-thread recycle queue. When the buffer is least recently used in the per-thread recycle queue, the buffer is removed from the per-thread recycle queue and placed in a free pool. With this technology, buffer cache can be more efficiently managed, particularly with respect to aging and scavenging operations, among other advantages. |
主权项 |
1. A method for managing a buffer cache, the method comprising:
obtaining, by a data storage computing device, data to be stored in a buffer in a buffer cache, determining a priority of the buffer based on the data, identifying one global recycle queue in a set of global recycle queues based on the priority, and inserting the buffer and metadata into the global recycle queue, wherein the metadata comprises at least a thread identifier corresponding to a thread associated with the data; sorting, by the data storage computing device, the set of global recycle queues comprising determining when the global recycle queue is a lowest priority one of the set of global recycle queues and the buffer is a least recently used one of one or more buffers in the global recycle queue, and removing the buffer from the global recycle queue and inserting the buffer into a per-thread recycle queue identified based on the thread identifier, when the determining indicates the global recycle queue is a lowest priority one of the set of global recycle queues and the buffer is a least recently used one of one or more buffers in the global recycle queue; and scavenging, by the data storage computing device, the buffer in the per-thread recycle queue comprising determining when the buffer is a lowest priority one of one or more buffers in the per-thread recycle queue, and removing the buffer from the per-thread recycle queue and placing the buffer in a free pool, when the determining indicates the buffer is a lowest priority one of one or more buffers in the per-thread recycle queue. |