Bird
0
0

Given the command docker service create --cpus=1.5 --reserve-cpu=1 myimage, what does this configuration mean?

medium📝 Command Output Q13 of 15
Docker - Resource Management
Given the command docker service create --cpus=1.5 --reserve-cpu=1 myimage, what does this configuration mean?
AThe container can use up to 1.5 CPUs and is guaranteed 1 CPU.
BThe container is limited to 1 CPU and has no guaranteed CPU.
CThe container can use up to 1 CPU and is guaranteed 1.5 CPUs.
DThe container is guaranteed 1.5 CPUs and limited to 1 CPU.
Step-by-Step Solution
Solution:
  1. Step 1: Interpret --cpus flag

    --cpus=1.5 means the container can use up to 1.5 CPUs maximum.
  2. Step 2: Interpret --reserve-cpu flag

    --reserve-cpu=1 means the container is guaranteed at least 1 CPU.
  3. Final Answer:

    The container can use up to 1.5 CPUs and is guaranteed 1 CPU. -> Option A
  4. Quick Check:

    --cpus = max CPU, --reserve-cpu = guaranteed CPU [OK]
Quick Trick: Max CPU = --cpus, guaranteed CPU = --reserve-cpu [OK]
Common Mistakes:
  • Swapping meanings of limit and reservation
  • Assuming reservation is max CPU
  • Ignoring one of the flags

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes