[lxc-users] Mounting huge pages on a conatiner

CDR venefax at gmail.com
Tue Sep 23 18:10:17 UTC 2014


It works finer for mysql without any special tricks

On Tue, Sep 23, 2014 at 1:37 PM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> Quoting Murthy, Krishna J (krishna.j.murthy at intel.com):
>> > I use Huge Pages inside a container routinely, for Mysql. I had to change
>> > /etc/sysctl.conf inside the container.
>> > that lines I included are
>> > kernel.shmall = 4294967296
>> > kernel.shmmax = 68719476736
>> > basically you need to make huge pages available in the host first, and
>> > they will be available in the container
>>
>> Ok. In this case we are allocating the shared memory. How do we make this memory
>> visible for apps that expect it be mounted as hugetlbfs.
>>
>> root at vc0:~# df -lh
>> Filesystem      Size  Used Avail Use% Mounted on
>> /dev/root        50G  7.6G   39G  17% /
>> none             16G     0   16G   0% /dev/shm
>>
>> root at vc0:~# cat /proc/sys/vm/nr_hugepages
>> 5
>
> Bind mount it to wherever your application expects to see it?
> I.e.
>
> lxc.mount.entry = /run/hugepages/kvm run/hugepages/kvm none bind,create=dir 0 0
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list