Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’m using the Docker default one-click-install from DO. If I restart my droplet, There are 5 docker processes running. My pstree looks something like this.
~# pstree -p
init(1)─┬─acpid(971)
├─atd(973)
├─cron(972)
├─dbus-daemon(741)
├─docker(1709)─┬─{docker}(1715)
│ ├─{docker}(1717)
│ ├─{docker}(1718)
│ ├─{docker}(1719)
│ └─{docker}(1720)
├─getty(931)
├─getty(934)
├─getty(939)
├─getty(940)
├─getty(942)
├─getty(1565)
├─nginx(1021)───nginx(1022)
├─rsyslogd(850)─┬─{rsyslogd}(851)
│ ├─{rsyslogd}(852)
│ └─{rsyslogd}(853)
├─sendmail-mta(1491)
├─sshd(966)───sshd(1348)───bash(1406)───pstree(1748)
├─systemd-logind(843)
├─systemd-udevd(385)
├─upstart-file-br(878)
├─upstart-socket-(680)
└─upstart-udev-br(371)
The problem is that if I have multiple containers running, they will also run 5x times and create a lot of unnecessary processes. Because of that, I’m have to use a 10gb droplet that runs out of memory very quickly, despite getting almost no traffic.
This is how my pstree looks like after building and running a container.
~# pstree -p
init(1)─┬─acpid(971)
├─atd(973)
├─cron(972)
├─dbus-daemon(741)
├─docker(1709)─┬─docker(1985)─┬─{docker}(1986)
│ │ ├─{docker}(1987)
│ │ ├─{docker}(1988)
│ │ ├─{docker}(1989)
│ │ └─{docker}(1990)
│ ├─ghost-start(1991)───su(2022)───bash(2023)───npm(2024)─┬─sh(2030)───node(2031)─┬─{node}(2032)
│ │ │ ├─{node}(2033)
│ │ │ ├─{node}(2034)
│ │ │ ├─{node}(2035)
│ │ │ └─{node}(2036)
│ │ ├─{npm}(2025)
│ │ ├─{npm}(2026)
│ │ ├─{npm}(2027)
│ │ ├─{npm}(2028)
│ │ └─{npm}(2029)
│ ├─{docker}(1715)
│ ├─{docker}(1717)
│ ├─{docker}(1718)
│ ├─{docker}(1719)
│ ├─{docker}(1720)
│ ├─{docker}(1910)
│ ├─{docker}(1911)
│ ├─{docker}(1912)
│ ├─{docker}(2013)
│ └─{docker}(2016)
├─getty(931)
├─getty(934)
├─getty(939)
├─getty(940)
├─getty(942)
├─getty(1565)
├─nginx(1021)───nginx(1022)
├─rsyslogd(850)─┬─{rsyslogd}(851)
│ ├─{rsyslogd}(852)
│ └─{rsyslogd}(853)
├─sendmail-mta(1491)
├─sshd(966)───sshd(2037)───bash(2085)───pstree(2100)
├─systemd-logind(843)
├─systemd-udevd(385)
├─upstart-file-br(878)
├─upstart-socket-(680)
└─upstart-udev-br(371)
Docker version:
~# docker -v
Docker version 1.6.0, build 4749651
I’m using fig 1.0.0 (Should probably switch to docker-compose).
Question
What’s the best way to reduce the number of processes to just one? Why are there 5 docker processes running? Is there a reason this was setup this way in the first place?
d1dd3d9538cc4d06b53e6d1d338d3f
50ff4e4b3c6c4999a12403b1ecda95
a6309a057c3f4cb38fb2e7feb67236
72e571841e7f4a6881090a2f3e93c0
57a72a98162f46a5a5cd04d9b
Thomas Brocken
11575c6d695643cdb40ad47d0f1aea
tez.saad
keneucker
keneucker
max johnson
max johnson