• mlg
    link
    fedilink
    English
    arrow-up
    5
    ·
    24 hours ago

    Same man. Got an old R730 with like 16 slots that I could fill to the brim, but I was like “nah it’s not like I need that much”.

    Then I realized how much Linux caching was doing when I did fill it up with only a handful of contsiners and VMs.

    • jj4211
      link
      fedilink
      arrow-up
      2
      ·
      15 hours ago

      In hopes of making you feel better, the cache amount consumed hardly matters. It’s evictable. So if you read a gigabyte in once that you’ll never ever need again, it’ll probably just float in cache because, well, why not? It’s not like an application needs it right now.

      If you really want to feel better about your reported memory usage, sync; echo 3 > /proc/sys/vm/drop_caches. You’ll slow things down a bit as it rereads the stuff it actually needs to reuse, but particularly if your system has a lot of I/O at bootup that never happens again, a single pass can make the accounting look better.

      You could at least do it once to see how much cache can be dropped so you can feel good about the actual amount of memory if an application really needs it.

      Though the memory usage of VMs gets tricky, especially double-caching, since inside the VM it is evictable, but the host has no idea that it is evictable, so memory pressure won’t reclaim stuff in a guest or peer VM.

    • captcha_incorrect
      link
      fedilink
      arrow-up
      4
      ·
      23 hours ago

      I have an R710 collecting dust in the basement. When it was alive, I used to have one VM for each service I used. While having multiple VMs is useful, containers has greatly reduced the amount of RAM I need.