Interview Prep/Docker/Resources, health checks, logging and restarts

`docker stats` shows 100%+ CPU and the container is slow.

IntermediateTroubleshootingResources, health checks, logging and restarts
Answer

Likely causes → Multi-core usage above 100% is normal (200% = two cores); with --cpus limit the app is throttled.

Diagnose →

docker exec c cat /sys/fs/cgroup/cpu.stat
docker exec c top -b -n1 | head -15

Fix → Increase --cpus, profile the hot path, scale out.

Prevent → Track nr_throttled metrics.

All Docker questions Roadmap: Docker & containers

More on Resources, health checks, logging and restarts