Replies: 1 comment
-
@giuseppe PTAL |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am investigating the memory impact of containerizing two processes that depends on the same shared object. I constructed the following experiment:
Process A depends on shared object glib.
Process B depends on shared object glib and slib.
No containers used
First, I ran the processes on the host OS and I monitor the memory with free -m -s 2.
I observe that the free memory decreases by the size of the glib when I ran the A process and only by the size of slib when I ran the B process. Also, the cache increases by the same amounts at the same moment. If I interpret this correctly, the loaded shared object of process A is shared with Process B.
Containers used
Then, I ran the processes in containers. Below you can see the setup:
Base container:
Process A container:
Process B container:
When I run the processes inside the containers and monitor the memory (again free -m -s 2 from my host OS), I see quite different results. It appears that glib is loaded twice (I see an equivalent decrease in the free memory twice and an equivalent increase in cache).
According to the documentation I found online, the sharing of shared objects depends on the storage driver you are using. I am using the overlay storage driver, which suggests that sharing should occur. However, that's appears not to be the case.
Below you can find the podman info output related to the graphDriver:
I have the following questions:
Beta Was this translation helpful? Give feedback.
All reactions