Skip to content

Commit d1bb983

Browse files
committed
New text to address the github issue
1 parent c08a57e commit d1bb983

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,19 @@ 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 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+
<!-- Is Max Memory visible in the UI or are we talking about `maxmemory-reserved` that I see in the json file-->
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+
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.
6673

6774
Validate that the `maxmemory-reserved` and `maxfragmentationmemory-reserved` values are set appropriately.
6875

0 commit comments

Comments
 (0)