Hi @ZP@Gyrus
Thanks for the Question and using Microsoft Q&A
As per my understanding, setting up maxmemory-reserved and maxfragmentmemory-reserved in the Redis Cache for better performance.
Memory policies:
Use the Maxmemory policy, maxmemory-reserved, and maxfragmentationmemory-reserved settings from Advanced settings from the Resource menu on the left to configure the memory policies for the cache. When you create a cache, the values maxmemory-reserved
and maxfragmentationmemory-reserved
default to 10% of maxmemory
, which is the cache size.
find the below link for better understanding of Memory configuration.
https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-configure?tabs=access-keys
maxmemory-reserved setting configures the amount of memory in MB per instance in a cluster that is reserved for noncache operations, such as replication during failover. Setting this value allows you to have a more consistent Redis server experience when your load varies. This value should be set higher for workloads that write large amounts of data. When memory is reserved for such operations, it's unavailable for storage of cached data. The minimum and maximum values on the slider are 10% and 60%, shown in megabytes. You must set the value in that range.
maxfragmentationmemory-reserved setting configures the amount of memory in MB per instance in a cluster that is reserved to accommodate for memory fragmentation. When you set this value, the Redis server experience is more consistent when the cache is full or close to full and the fragmentation ratio is high. When memory is reserved for such operations, it's unavailable for storage of cached data. The minimum and maximum values on the slider are 10% and 60%, shown in megabytes. You must set the value in that range.
When choosing a new memory reservation value (maxmemory-reserved or maxfragmentationmemory-reserved), consider how this change might affect a cache that is already running with large amounts of data in it. For instance, if you have a 53-GB cache with 49 GB of data, then change the reservation value to 8 GB, this change drops the max available memory for the system down to 45 GB. If either your current used_memory
or your used_memory_rss
values are higher than the new limit of 45 GB, then the system has to evict data until both used_memory
and used_memory_rss
are below 45 GB. Eviction can increase server load and memory fragmentation. For more information on cache metrics such as used_memory
and used_memory_rss.
I hope this information helps. Please do let us know if you have any further queries.