3

We have 3 servers, each of which are running RHEL 7.6. Each machine has 64G of RAM and 15 CPUs.

We are preparing to install a set of services --- kafka, zookeeper, schema registry --- on all of the machines. Each service is based on a docker container.

We are planning to install docker on all machines, and each machine will have three docker containers.

Do docker containers have a negative impact when all containers are part of the OS disk? Should we add additional disks on each machine and allocate the docker containers on the addition disk? What is the best practice here?

Andy Dalton
  • 13,993
yael
  • 13,106

1 Answers1

4

I'll answer this from the theoretical standpoint, I don't have the experience with Kafka on Docker.

Docker is largely an isolation technology NOT a virtual machine. This means that it is much lighter weight than you might expect. A large portion of it is built around namespaces and mounts including bind mounts.

It will depend a little on what you are asking Docker to do:

  • If you use a bind mount or a Docker volume then these are stored directly as files on the host system. Their performance overhead should be no more than that of a Linux bind mount because that's exactly what you get. This performance overhead is near zero.

  • Other storage volumes such as those backed by amazon S3 can come with an overhead.

In short the result on disk should generally be very similar to that of running on the host system. Docker just creates a neat sandbox and calls it a container.

  • regarding to you what said in your post , can you also give some documentation that support what you said ? – yael Aug 15 '20 at 17:28
  • I've added a ref for docker not being a VM. Regarding the translation between volumes and Linux bind mounts, this should be trivial enough to check manually. I'll put together a set of steps to test when I get a little time to write it up. – Philip Couling Aug 15 '20 at 21:40
  • please remind me which link is about "docker not being a VM", since O not remember what was before links – yael Aug 16 '20 at 05:16
  • Strange the edit didn't commit. This one https://www.docker.com/blog/containers-are-not-vms/ – Philip Couling Aug 16 '20 at 09:58
  • Worth mentioning: disk IO isn't particularly impacted, but network IO is (unless you use --network=host). At least that was the case when I was benchmarking Cassandra a couple of years ago. – muru Aug 16 '20 at 10:22
  • @muru , not understand , so do you recommended to add another disk in-order to install the docker , or we can just install the docker on OS disk ? – yael Aug 16 '20 at 10:47
  • 2
    @yael no, muru was pointing out there might be a network performance overhead (not disk IO). This can be avoided by specifying --network=host when you create the container. – Philip Couling Aug 16 '20 at 12:55