rosnode CPU usage in Dockercontainer vs Bare Metal
Hello there,
i've noticed a strange property regarding ROS and Docker. Just executing roscore &
(and thus rosout) results in vastly different cpu usages.
When executing on bare-metal i get about 0-0.3% CPU usage. I guess that's how it's supposed to be, since there is nothing else running.
On the other hand, executing the same command roscore &
inside a docker container results in 100-150% CPU usage on the same PC.
Can somebody explain this to me or help me fixing this? I wanted to run a couple of nodes in the container but since the CPU usage is so high i'm not sure i should. Thanks in advance!
Edit: Okay, so using roscore
after i stopped a roslaunch
file results in 130%. When restarting the container (with bash only, nothing else) and then executing roscore
i get 0-0.3, which looks fine to me. Still - after stopping roslaunch
i doublechecked via ps aux
if there really wasn't anything else running and there wasn't. Any ideas?
Related: #q298348.