Another reason why your Docker containers may be slow
https://hackernoon.com/another-reason-why-your-docker-containers-may-be-slow-d37207dec27f
- They use docker for dev,CI/CD
- Dockerized prod was VERY slow (comparing to bare-metal installation)
- 72CPU / 512GB Hosts -> 3-4 copies of containers, and then slows down
- Requests: seconds to process
- Found article https://sysdig.com/blog/container-isolation-gone-wrong/.
- Used perf for debugging
posix_fadvise
call (announce an intention to access file data in a specific pattern in the future)
- glog used it to “LogFileObject::Write”, can be turned off by an option
- Improved: 2sec -> 8ms! Bingo.
- “because there we had only one copy of each process per machine/kernel” - they didn’t see a problem on bare metal
- their conclusions:
- “isolated” processes compete not only for CPU, RAM, disk, network, but also Linux
- intruders could slow down / break your system even in containers
- perf - must have
- IMHO:
- docker in the title is for buzzzz
- just a happy-end story about perf-debugging