Live data from Hacker News

How does Docker affect energy consumption?

arxiv.org

21–30 of 88 posts

Re: How does Docker affect energy consumption?

#22
I wonder what the numbers look like for microservices, or the modern "burn down and rebuild everything" deployment methods.

Fleet management tools easily create hundreds or thousands of new virtual machines and run them through a complex npm bootstrap, when all you wanted to do was edit a file in /etc and restart node.

Re: How does Docker affect energy consumption?

#23

Earlier quoted context omitted.

Probably more likely due to the cost of breaking compatibility. It's probably the most popular rolling release distribution out there, and I imagine a large part of that is because they'll do anything they can to avoid breaking compatibility.

I am not sure. In theory it is easy to convert init.d scripts to systemd service programatically. I see energy/CPU consumption a much bigger problem with it. We did some performance testing and systemd was using way much CPU time than sysv/upstart under similar cirtumstances. I guess the difference is huge when you apply it to 2M computers (this is how many Amazon used to have) https://www.bloomberg.com/news/2014-11-…

How did you compare the two? Systemd replaces more components than sysv alone, like rsyslog; was that taken into account?

Re: How does Docker affect energy consumption?

#24
While an interesting observation and research area, I'd be curious how much of these effects are offset by the better utilization that containers enable. I'd bet that the reduction in idling server capacity much more than equalizes these effects. However, this would probably be hard to measure.

Re: How does Docker affect energy consumption?

#25

Earlier quoted context omitted.

I am not sure. In theory it is easy to convert init.d scripts to systemd service programatically. I see energy/CPU consumption a much bigger problem with it. We did some performance testing and systemd was using way much CPU time than sysv/upstart under similar cirtumstances. I guess the difference is huge when you apply it to 2M computers (this is how many Amazon used to have) https://www.bloomberg.com/news/2014-11-…

How did you compare the two? Systemd replaces more components than sysv alone, like rsyslog; was that taken into account?

Does it matter? If one were to find out that it uses more energy because of those components, would that change anything regarding the decision of using it or not because of that higher energy usage?

Re: How does Docker affect energy consumption?

#26
post #22

I wonder what the numbers look like for microservices, or the modern "burn down and rebuild everything" deployment methods. Fleet management tools easily create hundreds or thousands of new virtual machines and run them through a complex npm bootstrap, when all you wanted to do was edit a file in /etc and restart node.

Fleet management tools usually guide you not to have any files in /etc, injecting instead the configuration from outside the container, often stored in Kafka or equivalent. So you shouldn't have to recreate the container image, just stop them and re-launch.

Re: How does Docker affect energy consumption?

#27
post #25

Earlier quoted context omitted.

How did you compare the two? Systemd replaces more components than sysv alone, like rsyslog; was that taken into account?

Does it matter? If one were to find out that it uses more energy because of those components, would that change anything regarding the decision of using it or not because of that higher energy usage?

It matters that you're measuring equivalent things. If systemd replaces three components, you need to compare its energy consumption with those three components, not just with sysv/upstart.

Re: How does Docker affect energy consumption?

#28
post #22

I wonder what the numbers look like for microservices, or the modern "burn down and rebuild everything" deployment methods. Fleet management tools easily create hundreds or thousands of new virtual machines and run them through a complex npm bootstrap, when all you wanted to do was edit a file in /etc and restart node.

I really hope you are not running npm commands during container start versus build ?

Re: How does Docker affect energy consumption?

#29
post #11

Honestly, I'd very much like to see more deep studies into container overhead - not just from a kernel standpoint, but actual tit-for-tat measures for storage and networking overhead that spanned the different filesystem options (I know that aufs is old hat, but I've used overlay and btrfs too) and, probably most importantly, the networking overhead. I've had slowdowns in the order of 30% in terms of requests per sec…

It really depends on what is being used. There are studies showing the overhead for containers is minimum, CPU-wise.

However, you might see docker-proxy eating a lot of CPU due to increased traffic. Or dockerd adding overhead to collect statistics, manage log buffers, etc.

My point is, pure containers using basic kernel features don't seem to add a lot of overhead. It's the sugar on top that sometimes is the problem, but that will vary depending on the container runtime, the app being contained, extra features that were enabled, etc.

I've seen CouchDB perform just fine in a container when using Docker's "bridge" network and drop to a halt if using Docker's "host" network. It seemed to dislike the situation and was doing way more syscalls than usual. Just to show the app might not like a certain environment.

Even with some overhead, it's a trade-off I'm willing to accept considering the advantages in the development workflow and managing the infrastructure. Most of what I've seen are rough edges that will get ironed out with time.

Post reply on HN