Hacker News new | past | comments | ask | show | jobs | submit login

How do you deal with performance problem?

In a classic "apps run on a known instance" model, when the instance starts having performance issues, I can ssh to it and use the usual tools (iosat, top, atop, netstat, etc...). With docker, how do you correlate instance/docker, and do perf analysis?




Install the tools you need via the Dockerfile (iostat, top, atop, etc.), and an sshd. Then, instead of running the single web process, run supervisord via CMD, which will subsequently launch both your web app process, AND sshd. From there, EXPOSE 80 22, and you can SSH into the container to run any perf analysis tools as usual.

EXPOSE 80 22; CMD ["/usr/bin/supervisord"]


Couldn't you just connect to the master host? I'm not sure how namespacing is done inside the kernel, but I would assume that the host would have access to containers info.


Yes, at least with raw lxc containers that's the case. You can simply see the processes in the container in the host top.


Yes, you can, but then it means you need to keep track of which master your dockers are running on.


It's either tracking the slave you're on, or repackaging the whole linux userland in your container. I'd go for the first one.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: