Cache eviction in a multi-tenant architecture
Systems and methods include storage of a plurality of objects in a cache, determination, for each of the plurality of objects, of a value based on a quality of service level associated with a tenant to which the object belongs and on at least one time at which the object was accessed from the cache, determination of one of the plurality of objects to delete from the cache based on the determined values, and deletion of the determined one of the plurality of objects from the cache.
1 . A system comprising:
a cache storing a plurality of objects;
a memory storing executable program code; and
one or more processing units to execute the executable program code to cause the system to:
determine, for each of the plurality of objects, a value based on an exponential function having an exponent including a quality of service level associated with a tenant to which the object belongs and on a linear function including an elapsed time since a last access to the object in the cache;
determine one of the plurality of objects to evict from the cache based on the determined values; and
evict the determined one of the plurality of objects from the cache.
2 . The system of claim 1 , the one or more processing units to execute the executable program code to cause the system to:
after the determined one of the plurality of objects is evicted from the cache, determine a second one of the plurality of objects to evict from the cache based on the determined values; and
evict the determined second one of the plurality of objects from the cache.
3 . The system of claim 2 , the one or more processing units to execute the executable program code to cause the system to:
determine, for each of the plurality of objects stored in the cache, a second value based on the exponential function having an exponent including the quality of service level associated with the tenant to which the object belongs and on the linear function including the elapsed time since a last access to the object in the cache;
determine one of the plurality of objects to evict from the cache based on the determined second values; and
evict the determined one of the second plurality of objects from the cache.
4 . The system of claim 3 , wherein the value for each of the plurality of objects is determined based on a frequency of accesses of the object.
5 . The system of claim 1 , the one or more processing units to execute the executable program code to cause the system to:
determine, for each of a second plurality of objects stored in the cache, a second value based on the exponential function having an exponent including the quality of service level associated with a tenant to which the object belongs and on the linear function including an elapsed time since a last access to the object in the cache;
determine one of the second plurality of objects to evict from the cache based on the determined values; and
evict the determined one of the second plurality of objects from the cache.
6 . The system of claim 1 ,
wherein the object is accessed in the cache by a plurality of application instances.
7 . The system of claim 1 , wherein the value for each of the plurality of objects is determined based on a frequency of accesses of the object.
8 . A method comprising:
storing a plurality of objects in a cache;
determining, for each of the plurality of objects, a value based on an exponential function having an exponent including a quality of service level associated with a tenant to which the object belongs and on a linear function including an elapsed time since a last time at which the object was accessed from the cache;
determining one of the plurality of objects to delete from the cache based on the determined values; and
deleting the determined one of the plurality of objects from the cache.
9 . The method of claim 8 , further comprising:
after deleting the determined one of the plurality of objects from the cache, determining a second one of the plurality of objects to evict from the cache based on the determined values; and
deleting the determined second one of the plurality of objects from the cache.
10 . The method of claim 9 , further comprising:
determining, for each of the plurality of objects stored in the processor memory, a second value based on the exponential function having an exponent including the quality of service level associated with the tenant to which the object belongs and on the linear function including the elapsed time since a last time at which the object was accessed from the cache;
determining one of the plurality of objects to deleted from the cache based on the determined second values; and
deleting the determined one of the second plurality of objects from the cache.
11 . The method of claim 8 , further comprising:
determining, for each of a second plurality of objects stored in the cache, a second value based on the exponential function having an exponent including the quality of service level associated with a tenant to which the object belongs and the linear function including the elapsed time since a last time at which the object was accessed from the cache;
determining one of the second plurality of objects to delete from the cache based on the determined values; and
deleting the determined one of the second plurality of objects from the cache.
12 . The method of claim 8 , wherein the value for each of the plurality of objects is determined based on a frequency of accesses of the object.
13 . One or more non-transitory computer-readable media storing program code executable by a computing system to cause the computing system to perform operations comprising:
storing a plurality of objects in a cache;
determining, for each of the plurality of objects, a value based on an exponential function having an exponent including a quality of service level associated with a tenant to which the object belongs and on a linear function including an elapsed time since a last time at which the object was accessed from the cache;
determining one of the plurality of objects to delete from the cache based on the determined values; and
deleting the determined one of the plurality of objects from the cache.
14 . The one or more non-transitory computer-readable media of claim 13 , further comprising:
determining, for each of the plurality of objects stored in the processor memory, a second value based on the exponential function having an exponent including the quality of service level associated with the tenant to which the object belongs and on the linear function including the elapsed time since a last time at which the object was accessed from the cache;
determining one of the plurality of objects to delete from the cache based on the determined second values; and
deleting the determined one of the second plurality of objects from the cache.
15 . The one or more non-transitory computer-readable media of claim 13 , wherein the value for each of the plurality of objects is determined based on a frequency of accesses of the object.