Search

US-12625811-B2 - Multi-tier memory reclamation

US12625811B2US 12625811 B2US12625811 B2US 12625811B2US-12625811-B2

Abstract

Reclamation of a portion of a cache memory in a cloud computing environment is described herein. A cache activeness signal is received from a cache broker. The cache activeness signal is representative of a usage of a first set of cache entries of the cache memory by a first group of computing nodes in a cluster of nodes. A determination to reclaim a portion of the first set of cache entries or of a second set of cache entries is made based at least on the cache activeness signal. The second set of cache entries are utilized by a second group of computing nodes in the cluster of nodes. The determined portion of memory is reclaimed. In an aspect, the cache broker determines a usage of the set of cache entries by the first group of computing nodes and generates the cache activeness signal representative of the determined usage.

Inventors

  • Junfeng Dong
  • Ajay Kalhan
  • Michael E. Habben
  • John M. Oslake
  • Preetham Melavarige GOPALAKRISHNA
  • Dhrumilkumar Utpalbhai SHAH
  • Purvi Shah

Assignees

  • MICROSOFT TECHNOLOGY LICENSING, LLC

Dates

Publication Date
20260512
Application Date
20230526

Claims (20)

  1. 1 . A system in a cloud computing environment, comprising: a cluster of computing nodes comprising a first group of computing nodes and a second group of computing nodes; a cache memory comprising a first set of cache entries utilized by the first group of computing nodes and a second set of cache entries utilized by the second group of computing nodes; a processor circuit that: determines a sample size of the first group of computing nodes based on a number of active users associated with the first group of computing nodes, samples the first set of cache entries based on the determined sample size, determines a usage of the sampled cache entries by the first group of computing nodes, determines a first cache activeness signal representative of the determined usage of the sampled cache entries, determines to reclaim a portion of the first set of cache entries or of the second set of cache entries based at least on the first cache activeness signal, and reclaims the determined portion of the cache memory.
  2. 2 . The system of claim 1 , wherein the processor circuit: determines to reclaim the portion of the first set of cache entries or of the second set of cache entries by: determining a subset of the sampled cache entries accessed by the first group of computing nodes within a first period of time, determining a total of the sampled cache entries used by the first group of computing nodes, and determining a ratio of the determined subset to the determined total of the sampled cache entries has a predetermined relationship with a threshold; and reclaims the portion of the cache memory by: reclaiming a cache entry of the first set of cache entries.
  3. 3 . The system of claim 1 , wherein the cache memory comprises at least one of: an internal cache memory of the first group of computing nodes; a buffer pool; or a column store.
  4. 4 . The system of claim 1 , wherein the processor circuit generates the first cache activeness signal by: determining that a first limit is reached based at least on the determined usage of the first set of cache entries, and generating the first cache activeness signal to include an indication that the first limit is reached; and the resource monitor determines to reclaim a subset of the first set of cache entries based at least on the indication that the first limit is reached.
  5. 5 . The system of claim 1 , wherein the processor circuit further: determines to reclaim a portion of the first set of cache entries or of the second set of cache entries based at least on the first cache activeness signal and a second cache activeness signal, the second cache activeness signal representative of a determined usage of the second set of cache entries by the second group of computing nodes.
  6. 6 . The system of claim 5 , wherein the processor circuit: determines to reclaim the portion of the cache memory by: determining a total of the second set of cache entries used by the second group of computing nodes has a predetermined relationship with a threshold; and reclaims the portion of the cache memory by: reclaiming a cache entry of the second set of cache entries.
  7. 7 . The system of claim 1 , wherein the processor circuit generates the first cache activity signal by: determining that an external pressure limit is reached based at least on the determined usage of the sampled cache entries and global cache usage data, the global cache usage data representative of usage of the cache memory by the cluster of computing nodes; and generating the first cache activeness signal to include an indication that the external pressure limit is reached.
  8. 8 . The system of claim 1 , wherein the first group of computing nodes comprises at least one of: a computing node associated with a user; a plurality of computing nodes associated with a group of users; or a plurality of computing nodes associated with a tenant.
  9. 9 . A method for reclaiming a portion of a cache memory in a cloud computing environment, the method comprising: determining a sample size of a first group of computing nodes in a cluster of computing nodes, the sample size determined based on a job cap of the first group of computing nodes, sampling a first set of cache entries of the cache memory based on the determined sample size, the first set of cache entries assigned to the first group of computing nodes; determining a first cache activeness signal, the first cache activeness signal representative of a usage of the sampled cache entries of the cache memory by the first group of computing nodes; determining to reclaim a portion of the first set of cache entries or of a second set of cache entries based at least on the first cache activeness signal, the second set of cache entries utilized by a second group of computing nodes in the cluster of computing nodes; and reclaiming the determined portion of the cache memory.
  10. 10 . The method of claim 9 , wherein said determining to reclaim the portion of the cache memory comprises: determining a subset of the sampled cache entries accessed by the first group of computing nodes within a first period of time, determining a total of the sampled cache entries used by the first group of computing nodes, and determining a ratio of the determined subset to the determined total of the sampled cache entries has a predetermined relationship with a threshold; and said reclaiming the determined portion of the cache memory comprises: reclaiming a cache entry of the first set of cache entries.
  11. 11 . The method of claim 9 , wherein the first cache activeness signal comprises an indication that a first limit is reached; and said determining to reclaim the portion of the cache memory comprises: determining to reclaim a subset of the first set of cache entries based at least on the indication that the first limit is reached.
  12. 12 . The method of claim 9 , wherein said determining to reclaim the portion of the cache memory comprises: determining to reclaim the portion of the cache memory based at least on the first cache activeness signal and a second cache activeness signal, the second cache activeness signal representative of a determined usage of the second set of cache entries by the second group of computing nodes.
  13. 13 . The method of claim 12 , wherein said determining to reclaim the portion of the cache memory comprises: determining a total of the second set of cache entries used by the second group of computing nodes has a predetermined relationship with a threshold; and said reclaiming the portion of the cache memory comprises: reclaiming a cache entry of the second set of cache entries.
  14. 14 . The method of claim 9 , said determining to reclaim the portion of the cache memory comprises: obtaining global cache usage data representative of usage of the cache memory by the cluster of computing nodes; determining that an external pressure limit is reached based at least on the first cache activeness signal and the obtained global cache usage data; and determining to reclaim the portion of the cache memory.
  15. 15 . A resource monitoring system coupled to a cluster of computing nodes in a cloud computing environment, the resource monitoring system comprising: a processor circuit; and a memory that stores program code executable by the processor circuit to perform operations for reclaiming a portion of a cache memory in the cloud computing environment, the operations comprising: determining a sample size of a first group of computing nodes in a cluster of computing nodes, the sample size determined based on a number of active users associated with the first group of computing nodes, sampling a first set of cache entries of the cache memory based on the determined sample size, the first set of cache entries assigned to the first group of computing nodes; determining a first cache activeness signal, the first cache activeness signal representative of a usage of the sampled cache entries of the cache memory by the first group of computing nodes; determining to reclaim a portion of the first set of cache entries or of a second set of cache entries based at least on the first cache activeness signal, the second set of cache entries utilized by a second group of computing nodes in the cluster of computing nodes; and reclaiming the determined portion of the cache memory.
  16. 16 . The resource monitoring system of claim 15 , wherein said determining to reclaim the portion of the cache memory comprises: determining a subset of the sampled cache entries accessed by the first group of computing nodes within a first period of time, determining a total of the sampled cache entries used by the first group of computing nodes, and determining a ratio of the determined subset to the determined total of the sampled cache entries has a predetermined relationship with a threshold; and said reclaiming the determined portion of the cache memory comprises: reclaiming a cache entry of the first set of cache entries.
  17. 17 . The resource monitoring system of claim 15 , wherein the first cache activeness signal comprises an indication that a first limit is reached; and said determining to reclaim the portion of the cache memory comprises: determining to reclaim a subset of the first set of cache entries based at least on the indication that the first limit is reached.
  18. 18 . The resource monitoring system of claim 15 , wherein said determining to reclaim the portion of the cache memory comprises: determining to reclaim the portion of the cache memory based at least on the first cache activeness signal and a second cache activeness signal, the second cache activeness signal representative of a determined usage of the second set of cache entries by the second group of computing nodes.
  19. 19 . The resource monitoring system of claim 18 , wherein said determining to reclaim the portion of the cache memory comprises: determining a total of the second set of cache entries used by the second group of computing nodes has a predetermined relationship with a threshold; and said reclaiming the portion of the cache memory comprises: reclaiming a cache entry of the second set of cache entries.
  20. 20 . The resource monitoring system of claim 15 , wherein said determining to reclaim the portion of the cache memory comprises: obtaining global cache usage data representative of usage of the cache memory by the cluster of computing nodes; determining that an external pressure limit is reached based at least on the first cache activeness signal and the obtained global cache usage data; and determining to reclaim the portion of the cache memory.

Description

BACKGROUND Cloud computing refers to the access and/or delivery of computing services and resources, including servers, storage, databases, networking, software, analytics, and intelligence, over the Internet (“the cloud”). A cloud computing platform may make such services and resources available to user entities, referred to as “tenants,” for fees. A cloud computing platform typically supports multiple tenants, with each tenant accessing a respective portion of the services and resources simultaneously with other tenants accessing other portions of the services and resources. Such a cloud computing platform is considered “multitenant.” Databases in cloud computing environments can be grouped together in elastic pools that use a shared resource pool. Resource monitoring systems (also referred to as “resource monitors”) monitor and evaluate the use of database resources, such as cache memory (relatively fast storage), secondary storage, compute nodes, etc. If the utilization of a shared cache memory resource is below a threshold, or the database is idle, a process wide memory reclamation task may be used to reclaim a portion of the cache memory. In some databases, different tenants may use the same memory resources. Furthermore, each tenant may have a different level of activity and utilization from other tenants. SUMMARY This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Systems and methods are described herein for reclaiming a portion of a cache memory in a cloud computing environment. In an aspect of the present disclosure, a first cache activeness signal is received from a first cache broker. The first cache activeness signal is representative of a usage of a first set of cache entries of the cache memory by a first group of computing nodes in a cluster of computing nodes. A second set of cache entries is utilized by a second group of computing nodes in the cluster of computing nodes. A determination to reclaim a portion of the first set of cache entries or of the second set of cache entries is made based at least on the first cache activeness signal. The determined portion of the cache memory is reclaimed. In a further aspect of the present disclosure, a first cache broker determines a usage of the first set of cache entries by the first group of computing nodes and generates a first cache activeness signal representative of the determined usage of the first set of cache entries. In a further aspect of the present disclosure, a resource monitor receives a second cache activeness signal from a second cache broker. The second cache activeness signal is representative of a determined usage of the second set of cache entries by the second group of computing nodes. A determination to reclaim a portion of the first set of cache entries or of the second set of cache entries is made based at least on the first and second cache activeness signals. BRIEF DESCRIPTION OF THE DRAWINGS/FIGURES The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments and, together with the description, further serve to explain the principles of the embodiments and to enable a person skilled in the pertinent art to make and use the embodiments. FIG. 1 shows a block diagram of a system for performing multi-tier memory reclamation, in accordance with an example embodiment. FIG. 2 shows a block diagram of a reclamation system for reclaiming a portion of cache memory, in accordance with an example embodiment. FIG. 3 shows a flowchart of a process for reclaiming a portion of cache memory, in accordance with an example embodiment. FIG. 4 shows a block diagram of a system for managing cache activeness, in accordance with an embodiment. FIG. 5 shows a flowchart of a process for reclaiming a subset of cache entries based on an indication that a soft limit is reached, in accordance with an embodiment. FIG. 6 shows a flowchart of a process for reclaiming a portion of cache memory based on an indication that an external pressure limit is reached, in accordance with an embodiment. FIG. 7 shows a block diagram of the resource monitor of FIG. 1, in accordance with an example embodiment. FIG. 8 shows a flowchart of a process for reclaiming a cache entry based on usage of cache entries, in accordance with an example embodiment. FIG. 9 shows a flowchart of a process for determining to reclaim the portion of the cache memory based on an external pressure limit, in accordance with an example embodiment. FIG. 10 shows a block diagram of a system for reclaiming a portion of cache memory based on multiple cache activeness signals, in accordance with an example embodiment. FIG. 11 shows a process for reclaiming a portion of