1

Amazon provides services to maintain (docker i.e) container services working on EC2 instances.

To my knowledge on a simple server, if you have 5 containers running the identical OSs as base, for instance docker doesnt invade separate resources for the OS itself 5 times. Despite 5 separate containers, identical reources are kept in memory once.

So if I use AWS EC2 container service, do I still have the same advantage? In one way, it seems like AWS infrastructure should already have identical base OSs under some other users. In one way they may not give you this advantage: each docker pretends like that is the only container running on a separate machine.

Any ideas?

JSBach
  • 111
  • 3

1 Answers1

1

I'm not sure I completely understand your question, but let me take a stab at answering it.

Docker and most containerization tools rely on a few kernel level features that allow programs to isolate off their processes and 'vision' into what else is running on the system. Conceptually, you're right; from within a docker container, it has no idea of the existence of any other containers.

Now to answer your question about resource sharing. In my personal experience, I've not seen this example of memory sharing you talk about. If you have 5 exact containers, each container has its own memory and that memory isn't reduced because you have identical containers. That's not how it works. However, you can over commit memory just like many virtualization products. Typically your containers will only use the amount of memory currently allocated, and not the max amount that container requested on start. I'm sure there is a configuration option for this.

comjf
  • 156
  • 3