Bird
0
0

Why is it important to set resource limits like --memory and --cpus when running Docker containers?

easy📝 Conceptual Q11 of 15
Docker - Resource Management
Why is it important to set resource limits like --memory and --cpus when running Docker containers?
ATo prevent one container from using too many resources and slowing down the whole system
BTo make containers run faster by giving them unlimited resources
CTo allow containers to access the host's hardware directly
DTo automatically update the container software
Step-by-Step Solution
Solution:
  1. Step 1: Understand resource limits purpose

    Resource limits control how much CPU and memory a container can use to avoid overloading the host system.
  2. Step 2: Identify the effect of limits

    Setting limits prevents one container from hogging all resources, keeping the system stable for all containers.
  3. Final Answer:

    To prevent one container from using too many resources and slowing down the whole system -> Option A
  4. Quick Check:

    Resource limits = prevent overload [OK]
Quick Trick: Limits protect system by capping container resource use [OK]
Common Mistakes:
  • Thinking limits make containers faster
  • Believing containers get direct hardware access
  • Confusing resource limits with software updates

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes