为什么docker正在启动如此多的守护进程?

时间:2016-04-13 12:41:27

标签: process docker daemon

为什么docker正在启动这么多的守护进程?

看来Docker forks主要流程是其他几个。例如,重新启动后,当我输入$ htop后跟F5时,这是我的控制台的输出:

many docker processes http://img15.hostingpics.net/pics/331078manydockerprocesses.png

已经有6个孩子!但是,我没有任何正在运行的容器,只有2个已停止的容器:

$ docker ps -a

CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS                   PORTS               NAMES
a24f25e42c50        jupyter/datascience-notebook   "tini -- start-notebo"   44 hours ago        Exited (0) 3 hours ago                       prickly_spence
728166c38396        nginx                          "nginx -g 'daemon off"   4 days ago          Exited (0) 3 hours ago                       some-nginx

这是有问题的,因为一段时间后很多的子进程开始出现......并且每一个都使用大约40 MB的内存,所以当你有几十个内存时会出现问题进程!所以我的两个问题是:

  • 我猜对了吗? docker run -d ...将分叉父守护进程,永远不会杀死孩子吗?
  • 重启后为什么还有6个子进程? 我该如何清理?

事先,非常感谢你的帮助! :)

额外信息:

$ docker info您看到我在 Ubuntu 14.04.4 LTS上运行

Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 1
Server Version: 1.10.3
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 10
 Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
 Volume: local
 Network: null host bridge
Kernel Version: 3.13.0-55-generic
Operating System: Ubuntu 14.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 3.767 GiB
Name: *I censored this*
ID: *I censored this*
WARNING: No swap limit support

$ docker version

Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:54:52 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:54:52 2016
 OS/Arch:      linux/amd64

0 个答案:

没有答案