0
0
Redisquery~20 mins

Memory usage analysis (INFO memory) in Redis - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Memory Mastery in Redis
Get all challenges correct to earn this badge!
Test your skills under time pressure!
query_result
intermediate
1: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?
AThe total number of bytes allocated by Redis for all data and overhead.
BThe amount of free memory available on the server.
CThe maximum memory Redis is allowed to use.
DThe memory used only by keys stored in Redis, excluding overhead.
Attempts:
2 left
💡 Hint
Think about what 'used_memory' means in terms of Redis's memory allocation.
query_result
intermediate
1:30remaining
Interpreting memory fragmentation ratio
In the output of INFO memory, you see mem_fragmentation_ratio:1.25. What does this value indicate?
ARedis is using 25% more memory than the data size due to fragmentation and overhead.
BRedis has 25% free memory available for new data.
CRedis is using 75% of the maximum allowed memory.
DRedis has fragmented 25% of its keys.
Attempts:
2 left
💡 Hint
Fragmentation ratio compares allocated memory to actual data size.
📝 Syntax
advanced
1:00remaining
Correct command to check memory usage
Which of the following Redis commands correctly returns memory usage information?
AGET MEMORY
BMEMORY USAGE keyname
CINFO memory
DSHOW MEMORY
Attempts:
2 left
💡 Hint
The command to get server info including memory is a single word.
🧠 Conceptual
advanced
1: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?
Aused_memory_rss
Bmaxmemory
Cmem_fragmentation_ratio
Dused_memory_peak
Attempts:
2 left
💡 Hint
Look for a field that directly relates to a configured memory limit.
🔧 Debug
expert
2: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?
AThe Redis server is using swap space heavily.
BRedis is leaking memory due to a bug in key eviction.
CThe <code>used_memory</code> value is incorrectly calculated.
DMemory fragmentation or allocator overhead causing Redis to hold more memory from OS than used internally.
Attempts:
2 left
💡 Hint
Consider how operating system memory allocation differs from Redis internal usage.