Live data from Hacker News

How does Docker affect energy consumption?

arxiv.org

31–40 of 88 posts

Re: How does Docker affect energy consumption?

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

Yeah, of course. On the network overhead aspect, and as an extra data point, I'm using macvlan with great success on the Raspberry Pi (https://github.com/rcarmo/docker-plex-armhf/blob/master/Make...), but on cloud services that's pretty much impossible...

(I've also investigated the Ubuntu fan technique to lower overhead, but am looking for a more definitive solution)

Re: How does Docker affect energy consumption?

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

> However, you might see docker-proxy eating a lot of CPU due to increased traffic.

You can say that again. Tried running Docker container with large range of exposed ports once (because SIP)... Each port got its own docker-proxy and the system basically suffocated. Not a nice view. :)

Re: How does Docker affect energy consumption?

#33
post #25

Earlier quoted context omitted.

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.

Not OP, but if you are measuring the complete system with similar functionality then the comparison would be fair.

Re: How does Docker affect energy consumption?

#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 single instance of Wordpress, Redis, Postgres, etc., but a complex application consisting of many of those components.

You can either choose to (a) deploy each in a different machine [incurring in the overhead of OS + unused resources]; (b) in different VMs [incurring in the cost of OS, but being able to share a resource pool]; or (c) in containers, sharing the OS and incurring in the overhead of the container daemon.

I would love to see an article that takes these points into account.

Re: How does Docker affect energy consumption?

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

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

Re: How does Docker affect energy consumption?

#36
I would guess that the process change that usually comes with Docker has more of an impact.

Since most people adopt the "ephemeral" notion for containers, there's probably a lot higher rate of wiping and recreating bits, especially during dev and test.

I assume though, that a new process was designed to create efficiency in some other area that is more significant than any increase in energy consumption.

Re: How does Docker affect energy consumption?

#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 filesystem/network overlays with multiple virtualized kernels) but also because containerization goes hand-in-hand with microservices thus increasing the number of components (often times with no real reason other than to be hip).

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.

Re: How does Docker affect energy consumption?

#38

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)

Phoronix used to run some. Typically below 10% for disk heavy loads when KVM and virtio is used, bit more if not. I have no data on network heavy loads.

Generally containers vs VMs is a wash... except when considering security.

There used to be some issues with power saving in Xen that increased power use when idle, but have been fixed around 4.4 or so.

Re: How does Docker affect energy consumption?

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

Containers are an abstraction that exist using cgroups and namespaces for isolation. They use the hosts' kernel, it's not virtualized. Containers are only limited by the capabilities of namespaces and cgroups, unlike vms.

You might be dismissing microservices too quickly. They do have overhead but so does any level of abstract; the benefit of them though is clear separation of responsibilities between services and residency(Swarms, clusters, etc). Both can be achieved with Vms but VMs weren't built with these goals in mind

Re: How does Docker affect energy consumption?

#40

Earlier quoted context omitted.

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

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

Post reply on HN