[Lxc-users] Hard links, code map sharing

Daniel Farina drfarina at acm.org
Mon Feb 21 09:42:53 UTC 2011


On Mon, Feb 21, 2011 at 1:33 AM, Daniel Lezcano <daniel.lezcano at free.fr> wrote:
> On 02/20/2011 08:08 PM, Daniel Farina wrote:
>>
>> Hello list,
>>
>> I've been scouring The Internet on and off for this, but have not come
>> to a conclusion:
>>
>> Does a linux host running LXC share code maps between containers? e.g.
>> redundant read-only maps to the same .so or /bin/foo, as defined by an
>> equivalent hardlink?
>
> Hmm, I suppose you are refering to similar feature than
> http://linux-vserver.org/util-vserver:Vhashify right ?

I think my need/question is simpler than that: basically, when running
a binary, I am asking if there is a way to arrange sharing of the
read-only code-segment/binary maps between processes, as they usually
do when using non-lxc process isolation.

Ex: if I have 1000 containers running, and all use libc, I'd want to
not spend a megabyte per libc (as seen in /proc/<pid>/smaps) per
container. I want to spend one megabyte for code space among all 1000
containers.

--
fdr




More information about the lxc-users mailing list