Multi-tier memory reclamation
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.
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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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.