2

From what I have read I believe CoreOS to be a bare-bones Linux distribution which essentially facilitates running Docker containers that contain any applications or services that you require.

From the CoreOS documentation I gather that the intention is that you separate most of your services into separate Docker containers so that you can then scale horizontally, allowing fleet to manage the container over multiple nodes.

Where I am getting a little confused is when you want to run a service that needs a specific linux userland (e.g. apache running on Ubuntu or Fendora or something). Say for example I have a container with Ubunutu and apache running on it, and I want another container running a Samba instance (also on Ubunutu), am I not effectively running 2 copies of Ubuntu, with all the overheads of running those OS's?

I think I am very likely mis-understanding how containers work - if I run Ubuntu in a container, then presumably I am sharing the CoreOS kernel, and only the "userland" part of the OS is "running"?

So then might question might be, is running the kernel the expensive part of running an OS? So when you are running virtual machines you are loosing alot of resource by not only having to simulate hardware, but also running multiple kernels?

1

Yes, you're running multiple user-lands but only one kernel, which means the kernel has the full view of all memory management and can most efficiently split it up between the running containers, based on their CPU shares, etc. To the kernel, a container is just another process that needs access to the hardware. Each container process just happens to use a specific user-land, which is just a name-spaced pile of files on disk when it comes down to it.

  • 1
    Right ok, so the userland is essentially just a bunch of files/config/executables. So the companies like Ubuntu who make Linux distributions are taking the linux kernel and adding a few libraries and deciding on the folder structure etc...? – rgvcorley Jan 30 '15 at 19:57
  • You make it sound simple what debian ubuntu does. The point is that the files are sitting there and not running any services. So you are using more disk space but not more memory or cpu resources. – RoboTamer Feb 4 '15 at 15:28
  • You're not actually using much more disc space - if you run two ubuntu based containers, then they'll share a lot of 'layers' in common - docs.docker.com/terms/layer. – Paul Dixon Feb 6 '15 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.