<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Joe,</p>
    <p>i'd suggest to check memory limits for root and &quot;machine.slice&quot;
      memory cgroups<br>
    </p>
    <p>/sys/fs/cgroup/memory/*limit_in_bytes<br>
      /sys/fs/cgroup/memory/machine.slice/*limit_in_bytes<br>
    </p>
    <p>All of them should be unlimited.</p>
    <p>If not - search who limit them.<br>
    </p>
    <pre class="moz-signature" cols="179">--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team
</pre>
    <div class="moz-cite-prefix">On 01/27/2021 10:28 PM, Joe Dougherty
      wrote:<br>
    </div>
    <blockquote cite="mid:CAPoKwR2TeRevh_2V=LXioWbAC_d23vFHq0zdYo-D9wLZdrg5dA@mail.gmail.com" type="cite">
      
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">I'm running into an issue on only 1 of my
                OpenVZ 7 nodes where it's unable to create a directory
                on /sys/fs/cgroup/memory/machine.slice due to &quot;Cannot
                allocate memory&quot; whenever I try to start a new container
                or restart and existing one. I've been trying to
                research this but I'm unable to find any concrete info
                on what could cause this. It appears to be memory
                related because sometimes if I issue &quot;echo 1
                /proc/sys/vm/drop_caches&quot; it allows me to start a
                container (this only works sometimes) but my RAM usage
                is extremely low with no swapping (swappiness even set
                to 0 for testing). Thank you in advance for your help.</div>
              <div dir="ltr"><br>
              </div>
              <div dir="ltr"><br>
              </div>
              <div dir="ltr">Example:</div>
              <div dir="ltr">
                <div dir="ltr"><b># vzctl start 9499</b></div>
                <div dir="ltr"><b>Starting Container ...</b></div>
                <div dir="ltr"><b>Mount image: /vz/private/9499/root.hdd</b></div>
                <div dir="ltr"><b>Container is mounted</b></div>
                <div dir="ltr"><b>Can't create directory
                    /sys/fs/cgroup/memory/machine.slice/9499: Cannot
                    allocate memory</b></div>
                <div dir="ltr"><b>Unmount image:
                    /vz/private/9499/root.hdd (190)</b></div>
                <div dir="ltr"><b>Container is unmounted</b></div>
                <div dir="ltr"><b>Failed to start the Container</b></div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div>Node Info:<br>
                </div>
                <div>
                  <div><b>Uptime:&nbsp; &nbsp; &nbsp; 10 days</b></div>
                  <div><b>OS:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Virtuozzo 7.0.15</b></div>
                  <div><b>Kernel:&nbsp; &nbsp; &nbsp; 3.10.0-1127.18.2.vz7.163.46
                      GNU/Linux</b></div>
                  <div><b>System Load: 3.1</b></div>
                  <div><b>/vz Usage:&nbsp; &nbsp;56% of 37T</b></div>
                  <div><b>Swap Usage:&nbsp; 0%</b></div>
                  <div><b>RAM Free:&nbsp; &nbsp; 84% of 94.2GB</b></div>
                </div>
                <div><b><br>
                  </b></div>
                <div>
                  <div><b># free -m</b></div>
                  <div><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total&nbsp; &nbsp; &nbsp; &nbsp; used&nbsp; &nbsp; &nbsp; &nbsp;
                      free&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; shared&nbsp; &nbsp;buff/cache&nbsp; &nbsp;available</b></div>
                  <div><b>Mem:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 96502&nbsp; &nbsp; &nbsp; &nbsp;14259&nbsp; &nbsp; &nbsp;49940&nbsp; &nbsp; &nbsp;
                      &nbsp; &nbsp;413&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;32303&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80990</b></div>
                  <div><b>Swap:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;32767&nbsp; &nbsp; &nbsp; &nbsp;93&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;32674</b></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openvz.org">Users@openvz.org</a>
<a class="moz-txt-link-freetext" href="https://lists.openvz.org/mailman/listinfo/users">https://lists.openvz.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>