Bird
0
0

Which Docker run option limits the container to use at most 2 CPUs?

easy📝 Conceptual Q2 of 15
Docker - Resource Management
Which Docker run option limits the container to use at most 2 CPUs?
A--cpu-reservation=2
B--cpu-shares=2
C--cpu-quota=2
D--cpus=2
Step-by-Step Solution
Solution:
  1. Step 1: Identify option for max CPU usage

    The --cpus option limits the container to use at most the specified number of CPUs.
  2. Step 2: Understand other options

    --cpu-reservation reserves minimum CPU, --cpu-shares sets relative weight, --cpu-quota uses microseconds quota, but needs more config.
  3. Final Answer:

    --cpus=2 -> Option D
  4. Quick Check:

    Max CPU limit = --cpus [OK]
Quick Trick: Use --cpus to set max CPU usage limit [OK]
Common Mistakes:
  • Using --cpu-reservation to limit max CPU
  • Confusing --cpu-shares with CPU limit
  • Using --cpu-quota without proper values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes