when I run docker exec --user root btc-server btc cpulimit -l 20 -q -- nice -n 19 bitcoind -datadir=/home/BTC/data -daemon 1> /dev/null $3 $4 $5 &
I see in top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1823899 root 39 19 0 0 0 Z 0.0 0.0 0:00.00 bitcoind
1823901 root 39 19 3248028 840572 137932 S 0.0 1.3 1:33.63 bitcoind
You can see that it appears twice and that one instance looks weird.
So I googled ubuntu top Process Status Z and it says
Z’ is a state where the process is dead (it has finished its execution) , and the only thing left is the structure describing it on the kernel. It is waiting for its parent process to retrieve its exit code, and not much more. After its parent process is finished with it, it will disappear
so how do I call a process with exec so that it wont be waiting like this?
Docker is waaaaaaaay better for me than LXD by the way #loveIt!
Are you sure the process is not created by your entrypoint script?
Great to hear!
Just keep in mind, that both container technologies aim for a different type of virtualization. Docker provides application virtualization, while LXD provides OS level virtualization. None of both provides machine virtualization.
You need to wait till someone comes around that actually uses nice.
The only thing that comes kind of close to it is to set relative weight using cpu-shares to prioritize amongst containers that have--cpu-shares set. Unlike nice, it will not affect containers without the --cpu-shares setting or host processes. By default, Docker tries to evenly share the cpu time amongst all containers.