Challenge - 5 Problems
Memory Mastery in Redis
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ query_result
intermediate1:30remaining
Understanding used_memory in INFO memory
You run the command
INFO memory on a Redis server and see the field used_memory:1048576. What does this number represent?Attempts:
2 left
💡 Hint
Think about what 'used_memory' means in terms of Redis's memory allocation.
✗ Incorrect
The used_memory field shows the total bytes Redis has allocated from the operating system, including data and internal overhead.
❓ query_result
intermediate1:30remaining
Interpreting memory fragmentation ratio
In the output of
INFO memory, you see mem_fragmentation_ratio:1.25. What does this value indicate?Attempts:
2 left
💡 Hint
Fragmentation ratio compares allocated memory to actual data size.
✗ Incorrect
The mem_fragmentation_ratio shows how much extra memory Redis uses compared to the raw data size, due to fragmentation and allocator overhead.
📝 Syntax
advanced1:00remaining
Correct command to check memory usage
Which of the following Redis commands correctly returns memory usage information?
Attempts:
2 left
💡 Hint
The command to get server info including memory is a single word.
✗ Incorrect
INFO memory returns detailed memory stats. MEMORY USAGE keyname returns memory used by a specific key, not overall info.
🧠 Conceptual
advanced1:30remaining
Effect of maxmemory on INFO memory output
If you set a
maxmemory limit in Redis configuration, which field in INFO memory output will reflect this limit?Attempts:
2 left
💡 Hint
Look for a field that directly relates to a configured memory limit.
✗ Incorrect
The maxmemory field shows the configured maximum memory Redis can use.
🔧 Debug
expert2:00remaining
Diagnosing unexpected high used_memory_rss
You notice
used_memory_rss is much higher than used_memory in INFO memory. What is the most likely cause?Attempts:
2 left
💡 Hint
Consider how operating system memory allocation differs from Redis internal usage.
✗ Incorrect
used_memory_rss shows memory allocated from OS, which can be higher due to fragmentation and allocator behavior.