Live data from Hacker News

How does Docker affect energy consumption?

arxiv.org

51–60 of 88 posts

Re: How does Docker affect energy consumption?

#51
post #42
post #37

Earlier quoted context omitted.

> 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). I'm starting to believe that the increased density provided by containerization is a myth, in practice. Both because orchestration tools bring their own overhead (compare all the proxies and…

> 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,…

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.

Re: How does Docker affect energy consumption?

#52

Earlier quoted context omitted.

FYI: VMWare is 0% CPU overhead. CPU instructions are executed as-is. Running on VmWare, ESX, Xen, Docker, LXD makes no difference. It's a different story with network and storage access. Impact of containerization/virtualization is variable(5 to 95% performance drop).

Usually true. That said, some instructions and hardware are emulated or virtualised. (E.g. APIC, clocks, privileged instructions) The main overhead is in IO though. Closer to 10% with KVM virtio than 95%.

And this is why friends don't let friends run databases in containers.

Re: How does Docker affect energy consumption?

#53
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…

> 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). Ultimately there's no reason why containerization can't be pushed right down to the language level. Consider .NET's AppDomains, or even further, a capability-secure programming language which…

For many classes of software, sure. But there are plenty of reasons to isolate the entire OS. And Linux containers (not docker per se) are very inexpensive. Being able to compose using off the shelf packages and binaries and use userspace effectively provides a wonderful space to build solutions. I can use any language I want, any tools I want.

Re: How does Docker affect energy consumption?

#54
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…

> 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). Ultimately there's no reason why containerization can't be pushed right down to the language level. Consider .NET's AppDomains, or even further, a capability-secure programming language which…

> no reason why containerization can't be pushed right down to the language level

I started my reply by listing a plethora of reasons why this wouldn't work. (For one, this would work because it does work, right now in Erlang.) But they all came down to that it seems like you're missing some of the problems that containerization solves. You can wrap up almost any service -- regardless of language or versions or runtimes or how it interacts with the filesystem or what versions of libraries it depends on or what global configs it expects or anything -- and ship it as a self-contained normalized service that can run right alongside any other number of other self-contained normalized services that require their own global configs and libraries etc etc even if they're incompatible and whoever is deploying them doesn't even need to care.

Everyone has their own language and toolset that they're comfortable with and productive in. That will never change. Containerization abstracts over all of them and normalizes their deployment. You can never get that with a solution at the language level.

Re: How does Docker affect energy consumption?

#55

Earlier quoted context omitted.

FYI: VMWare is 0% CPU overhead. CPU instructions are executed as-is. Running on VmWare, ESX, Xen, Docker, LXD makes no difference. It's a different story with network and storage access. Impact of containerization/virtualization is variable(5 to 95% performance drop).

Usually true. That said, some instructions and hardware are emulated or virtualised. (E.g. APIC, clocks, privileged instructions) The main overhead is in IO though. Closer to 10% with KVM virtio than 95%.

[deleted]

Re: How does Docker affect energy consumption?

#56
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,…

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."

Re: How does Docker affect energy consumption?

#57

Earlier quoted context omitted.

Usually true. That said, some instructions and hardware are emulated or virtualised. (E.g. APIC, clocks, privileged instructions) The main overhead is in IO though. Closer to 10% with KVM virtio than 95%.

And this is why friends don't let friends run databases in containers.

Don't Virtio and devicemapper have different performance characteristics, though?

Re: How does Docker affect energy consumption?

#58
post #37
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…

> 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). I'm starting to believe that the increased density provided by containerization is a myth, in practice. Both because orchestration tools bring their own overhead (compare all the proxies and…

Well, at least for our company we definitely see the gains and we absolutely don't see it as a Myth.. Previous project without docker to support all of our dev and QA environments: 9 VMs that we paid for. Most recent project with Docker: 2 VMs we pay for which includes all Dev and QA environments, with natively installed Nginx to hide the port differences.

Re: How does Docker affect energy consumption?

#59
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,…

Docker is great cpu wise unless you're running on macos. It still likes to go nuts every now and then.

Re: How does Docker affect energy consumption?

#60
post #57

Earlier quoted context omitted.

And this is why friends don't let friends run databases in containers.

Don't Virtio and devicemapper have different performance characteristics, though?

If any of them give near native IO, would love to see. Haven't tested anything like that yet myself.
Post reply on HN