[lxc-devel] Kernel Samepage Merging

richard -rw- weinberger richard.weinberger at gmail.com
Tue Feb 8 11:34:36 UTC 2011


On Tue, Feb 8, 2011 at 12:10 PM, Guido Trotter <ultrotter at google.com> wrote:
> On Mon, Feb 7, 2011 at 9:04 PM, Daniel Lezcano <daniel.lezcano at free.fr> wrote:
>> On 02/07/2011 08:19 PM, richard -rw- weinberger wrote:
>>> Hi,
>>>
>>> Can KSM (http://lwn.net/Articles/306704/) help LXC?
>>> I guess there are a lot of identical pages when logs of containers are running.
>>
>> Yes, absolutely. As it is very CPU consuming that should be optional.
>> I looked at it last year but I have no idea on how to use the madvice
>> syscall ...
>> Hints are welcome :)
>
> Well, using it is easy, the problem is in this case it's not LXC who
> allocates the memory (and could then madvice about it), but the
> processes inside the container.
> And it would be wrong for things like syslog to run it "generically"
> (as on a single host system the hint would be wrong).
> I guess one way would be patching the various deamons to do it in a
> configurable way, the other one to ask the container people to add an
> option to make sure that memory allocated by processes (or only
> certain processes) in a container is automatically marked as
> mergeable.
> Or that you can edit some other process' memory via /sys or /cgroups
> value changes. Perhaps we can bring this to discussion with the kernel
> people and ask for their thoughts?

I like the cgroups idea.
A setting a la
"all processes within this control group have per default mergeable pages"
would be nice to have.

Thanks,
//richard

> Thanks,
>
> Guido
>



-- 
Thanks,
//richard




More information about the lxc-devel mailing list