Bird
0
0

What is the purpose of setting a memory-reservation in a Docker container?

easy📝 Conceptual Q1 of 15
Docker - Resource Management
What is the purpose of setting a memory-reservation in a Docker container?
AIt reserves CPU shares for the container.
BIt sets a hard limit that immediately kills the container if exceeded.
CIt sets a soft limit for memory usage that the container tries to stay within.
DIt limits the disk space the container can use.
Step-by-Step Solution
Solution:
  1. Step 1: Understand memory-reservation meaning

    Memory reservation is a soft limit that Docker tries to keep the container under, but it can exceed if available.
  2. Step 2: Differentiate from memory limit

    Memory limit is a hard limit that kills the container if exceeded, unlike reservation.
  3. Final Answer:

    It sets a soft limit for memory usage that the container tries to stay within. -> Option C
  4. Quick Check:

    memory-reservation = soft limit [OK]
Quick Trick: Memory reservation is a soft limit, not a kill limit [OK]
Common Mistakes:
  • Confusing memory-reservation with hard memory limit
  • Thinking memory-reservation limits CPU
  • Assuming it limits disk usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes