[lxc-users] writeback cache for all container processes?

Fajar A. Nugraha list at fajar.net
Mon Feb 2 12:37:43 UTC 2015


On Mon, Feb 2, 2015 at 7:23 PM, Tomasz Chmielewski <mangoo at wpkg.org> wrote:

> On 2015-02-02 21:13, Fajar A. Nugraha wrote:
>
>> You do know that lxc share the same kernel instance as the host OS,
>> making such settings not applicable?
>>
>
> Why not? Perhaps I wasn't very specific when starting the thread.
>
>
>
KVM runs two kernels. One for the host, the other in the guest.

LXC only has one kernel, runs both host and guest, but with namespace
separation. All mounts used by the container is essentially the same (at
least in terms of cache and sync) as when the host mount and use it.



> It's certainly possible to do "not applicable" kinds of things with
> processes and their page cache, i.e.:
>
> https://code.google.com/p/pagecache-mangagement/
>
>
> Or here, disabling O_DIRECT and sync would be sort of matching
> "feature-wise" with KVM's cache=writeback:
>
> http://www.mcgill.org.za/stuff/software/nosync
>
>
> Is it possible to set things like this for all processes in a given lxc
> container?



What are you trying to achieve?

If you want to disable sync for the container, the best you can do is
probably use some filesystem that can do so. For example, zfs has
"sync=disabled" per-dataset settings. So you can have "sync=standard" for
filesystems used by the host, and "sync=disabled" for filesystems used by
containers.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150202/a6933459/attachment.html>


More information about the lxc-users mailing list