The container I run plex on has plenty of spare memory but is still using 100% SWAP. First off, is this an issue I should be concerned with or try to fix? If so, any ideas?

  • phanto@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    A few of my Proxmox containers do this. They all work fine, so I never questioned it. Not my Plex container though.

  • areyouevenreal@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    10 months ago

    That’s because your swap is set too small. It’s actually using more RAM than swap, but because swap is 1/8th the size it’s already full. Normally swap size is equal to ram. If you don’t like the behavior of using swap with low ram usage check out swapinness.

    • alexrmay91@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      I figured swap would only be used if I ran out of available memory. I’m not an expert at all, so I could be totally wrong about that.

      Is it possible that the container is allocating the space preemptively but not actively using it? So proxmox would see it as being used, but plex is simply reserving it. I think I’ve seen that occur on other containers like home assistant (but this is a VM not LXC). Proxmox says it’s using almost all the memory available to it, but going into home assistant itself says it’s only using a fraction of that amount.

      • areyouevenreal@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        10 months ago

        I figured swap would only be used if I ran out of available memory. I’m not an expert at all, so I could be totally wrong about that.

        Yeah this is a fundamental misunderstanding of how swap works on modern systems. Unfortunately a common one as well. Lots of people think using swap is bad and that they should eliminate it or that they need more RAM when they really don’t.

        Is it possible that the container is allocating the space preemptively but not actively using it? So proxmox would see it as being used, but plex is simply reserving it. I think I’ve seen that occur on other containers like home assistant (but this is a VM not LXC). Proxmox says it’s using almost all the memory available to it, but going into home assistant itself says it’s only using a fraction of that amount.

        Just as likely to be disk caching. Sometimes it’s counted as using memory and sometimes not.