Reputation: 537
I'm sorry I can't get into to much details, mostly because my own knowledge on the subject is not that great.
We have a application which is build in java. The frontend is served by an apache webserver. Part of the apache webserver is a module and small C application (I cannot control the sources of this application) which controls communication with the java application server and some caching mechanisms.
This C program does something with shared memory, which as I understand it allows part of the memory to be shared by different processes.
In the configuration files I can configure the shared memory key, which is something like 0x2001 and the size of the segment in bytes.
We are currently working on a containerized environment to run this application. We use docker to create the containers.
My question is:
Does anybody know, or knows some good documentation regarding shared memory and how Docker manages this? Does the memory key specify a part of memory specific to the container, or does this map directly to the host memory?
If we run two instances of the apache server (including the c program), both in their own container, they should not share the same piece of shared memory, but I don't know if the keys should be different, or maybe docker already makes a seperation.
I hope my question is clear, thank you in advance for any helpfull advice or documentation!
Upvotes: 1
Views: 534
Reputation: 3934
AFAIK shared memory is not shared between docker instances. Docker instance is suppose to simulate a separate machine and shared memory is only shared between processes on the same machine.
Upvotes: 4