Live data from Hacker News

How does Docker affect energy consumption?

arxiv.org

61–70 of 88 posts

Re: How does Docker affect energy consumption?

#61
post #47
post #34

Doesn't this article fail to consider the bigger, practical picture, i.e. overall resource efficiency/footprint in multi-component architectures? Containers allow us to condense workloads in a single OS runtime –while preserving isolation– where otherwise the same workloads would have spanned multiple machines or VMs, each with its overhead and slack (unused resources). Example: consider you need to deploy not just a…

d) Deploy them directly to the same bare-metal non-virtual machine, without a VM or container. Yes, you can get cross-app deployment conflicts (packaging, etc), and limits your cloud deployment options, but it is definitely another option and has lower overhead than any of the first three.

On packaging, can't this be solved by static linking or something like Nix?

Re: How does Docker affect energy consumption?

#62

It would be awesome if the comparisons would include tests of Linux in a VM. Does anyone have such data? (bare Linux vs. Docker vs. VM)

I did a test of 'Bare metal Linux' vs 'Containers on bare metal linux' for our product. In this case it is just 2 processes a 'search component' and an 'analytics and logging component'. Under heavy load the 'search' uses a lot of disk reads, CPU and network, while the logging module uses a lot of disk writes.

The comparison was done on

1) Ubuntu server 16.04 with both processes running as they usually do (Search with higher priority)

2) Core OS - Both processes running each in a separate rkt container (search with higher priority).

I saw no change in CPU / Network / Disk access metrics and my throughput remained the same.

Please note though, in my case I do not have way too many microservices as the general usage is. Also I use host networking. I also had no need for orchestration services like Kubernetes / swarm etc.,

TLDR:; No change between running product in container vs no-container mode with host networking, minimal containers and no orchestration.

Re: How does Docker affect energy consumption?

#63
post #46
post #42

Earlier quoted context omitted.

> If you're running 20-30 containers on a beefy VM, you're not really condensing anything. You're just moving from running hundreds of small VMs on a single server to running much less larger VMs. Of course you are condensing. Those small VMs would have been running a full OS runtime each . Assuming you relocate those workloads onto a single machine (1 process = 1 container), you no longer run 20-30 copies of an OS,…

> Of course you are condensing. Those small VMs would have been running a full OS runtime each. That's something but probably not as much as you think since hypervisors can share identical pages (e.g. the Linux kernel) across guests and the base footprint for a server Linux install is not that high as a percentage of the private data most applications use. Unless you're running a ton of unnecessary services on those…

> since hypervisors can share identical pages (e.g. the Linux kernel)

With ASLR, I'm now sure the gains are that substantial.

Re: How does Docker affect energy consumption?

#64
post #56

Earlier quoted context omitted.

I'm not sure that e.g. OpenVZ or LXC would have that much larger a footprint in RAM, even if they do have a full OS runtime. A few more daemons running, that would be it. Everything else is mapped onto the single Linux kernel, and many pages are shared as a result; I think that even libs are able to be shared across VMs; so if you had 2 identical versions of glibc in 2 VMs, only 1 would be loaded and used.

Doesn't LXC also mean containers? Like, the C literally stands for "Container."

LXC (with LXD) or OpenVZ containers are typically shipping full OS in the container. Docker is different in that it typically only have a few processes per containers.

Re: How does Docker affect energy consumption?

#67

Who'd have thought that an additional layer of abstraction has a small impact on performance. Nothing else in computers work that way.

Great - you've made a hypothesis using your intuition. It seems like it's probably true. The science part is then checking that this it actually is, rather than just assuming, which is what this paper is.

No hypothesis or intuition at play. I've read some of the many articles covering the performance impact of using docker on various metrics. Useful metrics, unlike an electric bill.

Re: How does Docker affect energy consumption?

#68
post #66

This is just a paper presented for the sake of a paper presentation, like myriad of papers presented. Nothing to see here, should move on.

What do you mean?

Its common sense to understand that when you run an extra application (docker) in one machine and compare it with another machine which do have it, everything else remaining the same, the machine which runs the extra application consumes more energy. Don't need a paper or watts up to prove that. That is the reason I said, its a paper presented for the sake of it and nothing more.

Re: How does Docker affect energy consumption?

#69
Running multiple containers on a single core or hyper-thread (which seems to be the primary way that containers are used), will obviously have a lot of non-cooperative context-switching, and will therefore have a very significant overhead compared to a solution that takes advantage of cooperative multitasking and cooperative context-switching.

Re: How does Docker affect energy consumption?

#70
post #66

Earlier quoted context omitted.

What do you mean?

Its common sense to understand that when you run an extra application (docker) in one machine and compare it with another machine which do have it, everything else remaining the same, the machine which runs the extra application consumes more energy. Don't need a paper or watts up to prove that. That is the reason I said, its a paper presented for the sake of it and nothing more.

Well, common sense won't tell you the amount of extra energy used, or which specific aspects of the extra application are particularly responsible for it, like this paper does.
Post reply on HN