Skip to content

Commit 2f947dc

Browse files
authored
Merge pull request #187444 from flang-msft/fxl---discrepancy-with-our-docs-and-open-source-docs-13186258
fxl---New text to address the github issue 86640
2 parents 7bad183 + 3f62507 commit 2f947dc

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

articles/azure-cache-for-redis/cache-troubleshoot-server.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,21 @@ If your Azure Cache for Redis underwent a failover, all client connections from
5757

5858
Memory pressure on the server can lead to various performance problems that delay processing of requests. When memory pressure hits, the system pages data to disk, which causes the system to slow down significantly.
5959

60-
Several possible can cause this memory pressure:
60+
Here are some possible causes of memory pressure:
6161

62-
- The cache is filled with data near its maximum capacity.
63-
- Redis server is seeing high memory fragmentation. Fragmentation is most often caused by storing large objects. Redis is optimized for small objects. If the `used_memory_rss` value is higher than the `used_memory` metric, it means part of Redis memory has been swapped off by the operating system, and you can expect some significant latencies. Because Redis server does not have control over how its allocations are mapped to memory pages, high `used_memory_rss` is often the result of a spike in memory usage.
62+
- The cache is filled with data near its maximum capacity
63+
- Redis server is seeing high memory fragmentation
6464

65-
Redis exposes two stats through the [INFO](https://redis.io/commands/info) command that can help you identify this issue: "used_memory" and "used_memory_rss". You can [view these metrics](cache-how-to-monitor.md#view-metrics-with-azure-monitor-metrics-explorer) using the portal.
65+
Fragmentation is likely to be caused when a load pattern is storing data with high variation in size. For example, fragmentation might happen when data is spread across 1 KB and 1 MB in size. When a 1-KB key is deleted from existing memory, a 1-MB key can’t fit into it causing fragmentation. Similarly, if 1-MB key is deleted and 1.5-MB key is added, it can’t fit into the existing reclaimed memory. This causes unused free memory and results in more fragmentation.
66+
67+
If the `used_memory_rss` value is higher than 1.5 times the `used_memory` metric, there's fragmentation in memory. The fragmentation can cause issues when:
68+
69+
1. Memory usage is close to the max memory limit for the cache, or
70+
2. `UsedMemory_RSS` is higher than the Max Memory limit, potentially resulting in page faulting in memory.
71+
72+
If a cache is fragmented and is running under high memory pressure, the system does a failover to try recovering Resident Set Size (RSS) memory.
73+
74+
Redis exposes two stats, `used_memory` and `used_memory_rss`, through the [INFO](https://redis.io/commands/info) command that can help you identify this issue. You can [view these metrics](cache-how-to-monitor.md#view-metrics-with-azure-monitor-metrics-explorer) using the portal.
6675

6776
Validate that the `maxmemory-reserved` and `maxfragmentationmemory-reserved` values are set appropriately.
6877

0 commit comments

Comments
 (0)