57. Container CPU Limit Configuration
Beginner Mode
Start your terminal to use beginner mode.
Scenario:
You have a container named cpu_test running from the image myapp:cpu that performs CPU-intensive computations. When monitoring with docker stats, the container regularly spikes to 150-200% CPU usage, consuming multiple CPU cores and impacting other services on the host.
Task:
Update the container configuration to limit CPU usage so that docker stats shows the cpu_test container consistently using less than 60% CPU during validation; You need to assign 500m CPU for that.
Terminal requires a larger screen
Open this page on a desktop or tablet (≥ 768px) to launch the terminal and practice hands-on.
Linux Terminal Environment
Write and execute your solution in the terminal below.
Essential
Linux 0/29
AWS 0/10
Kubernetes 0/15
CI/CD 0/5
Networking 0/9
Need more practice in this area? Explore more questions →
IBM
Accenture
Coinbase
Adobe
EPAM
Twitch
Amazon
Kayak
Autodesk
Lyft
Revolut
RedHat
Bloomberg
Datadog
Palantir
TCS
HashiCorp
Google
DeutscheBank
GitHub
Apple
Cloudflare
Stripe
Microsoft
NVIDIA
GoDaddy
X
SAP
Spotify
Airbnb
Meta
Reddit
Yelp
Okta
Dropbox
Slack
ActivisionBlizzard
Zscaler
Uber
DeliveryHero
Robinhood
GitLab
Shopify
Samsung
Elastic
Twilio
Netflix
CrowdStrike
Ubisoft
Anthropic
Capital One
Splunk
Intel
AMD
Databricks