<img style="border: none; background:none; width: 0; height: 0;" src="https://share.polymail.io/v2/z/a/NWIxODIyOTlkNjNh/76QJ10IxeIDvVTY5MgvVfyqLVrNNST4GM4UFxMWAgtQoFl5Y-qQJm4Nh5vvdm_LUKRGC3H0nf-nTJvj_i0ISHgAr--GPBFyR-1ZmR2hdN_VHygSjbZRMe8H4AY0ygH6JVLQrQjBJXLlOYJW3CqH-u2_yZdDi8SeYrZLW57L3.png" alt="" width="0px" height="0px" border="0" /><div></div>
<div>
Hey,</div><div><br></div><div>Thanks for the reply!</div><div><br></div><div>Is there any way so scope the `available` memory so that it doesn’t the host’s total memory ?</div><div><br></div><div>Thanks!<br><br>
</div>
<div id="psignature"><div>Martín</div></div>
<div class="gmail_extra"><br/><div class="gmail_quote"><div dir="ltr">On Wed, Jun 06, 2018 at 2:54 PM Andrey Repin <anrdaemon> <<a href="mailto:Andrey Repin <anrdaemon@yandex.ru>">Andrey Repin <anrdaemon> </anrdaemon></a>> wrote:<br/></anrdaemon></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><style><![CDATA[a, pre, code, a:link, body { word-wrap: break-word !important; }]]></style><p>Greetings, Martín Fernández!
<br/>
<br/>> Stéphane,
<br/>> That seems to have done the trick :). Now a I see different outputs when
<br/>> running `free` on the container than in the host. At the same time,
<br/>> non-restarted containers are showing the host output which sound good as well.
<br/>> One last question, If I don’t limit the amount of memory a container has
<br/>> it should show the host available memory right ?
<br/>> Asking this because I have the following situation that for sure it not right.
<br/>> Host ```
<br/>> total used free shared buffers cached
<br/>> Mem: 32109 25432 6676 9 1297 18510
<br/>> -/+ buffers/cache: 5624 26484
<br/>> Swap: 138699 893 137806
<br/>> ```
<br/>
<br/>>
<br/>> Container (the restarted one):
<br/>> ```
<br/>>
<br/>> total used free shared buffers cached
<br/>> Mem: 32109 951 31157 9 0 256
<br/>> -/+ buffers/cache: 695 31414
<br/>> Swap: 138699 893 137806
<br/>> ```
<br/>
<br/>
<br/>> The container is showing that it has 31157 megabytes free but that is
<br/>> obviously this is not true based on what the host is showing (6676).
<br/>
<br/>The "free" memory is "available minus used (by non-discardable data)".
<br/>So, no, it just can't show actual free memory inside a container, no.
<br/>
<br/>
<br/>--
<br/>With best regards,
<br/>Andrey Repin
<br/>Wednesday, June 6, 2018 20:53:07
<br/>
<br/>Sorry for my terrible english...<br/>_______________________________________________<br/>lxc-users mailing list<br/><a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br/><a href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a></p></blockquote></div><br/></div>