• Draconic NEO@lemmy.world
    link
    fedilink
    arrow-up
    27
    ·
    8 hours ago

    Gives a lot of Space for running Virtual machines.

    Also browsers can chew that up fast if you have a lot of tabs, Firefox has managed to do it a few times. At least until I started limiting its RAM to 8GB (best decision ever)

    Limit Firefox to 8GB of RAM .desktop file
    [Desktop Entry]
    Version=1.0
    Name=Firefox RAM limit 8GB
    GenericName=Firefox Ram limit 8GB
    Comment=Limit RAM for Firefox to 8GB;
    Exec=systemd-run --user --scope -p MemoryLimit=8G firefox
    Icon=firefox
    Type=Application
    Terminal=false
    Categories=Utility;Development;
    StartupWMClass=Firefox
    

    (To use it with other apps like Chrome or Electron apps just replace the command at the end and startup class with the ones from the program you’d like to run).

    • uis@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      23 minutes ago

      Alternatively you can open about:config and limit memory usage there. For example limit in-memory cache.

    • Mwa@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 hour ago

      Oh my god thanks but what if someone had a systemd free system

    • QuazarOmega@lemy.lol
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      Does it kill Firefox if it tries to go over the limit? I think I tried this once and if there is a memory leak it just closes itself (which is batter than hogging the whole system, bit still)

      • SaharaMaleikuhm@feddit.org
        link
        fedilink
        arrow-up
        2
        ·
        44 minutes ago

        I think Firefox only sees 8 GB and limits itself ideally. So if it goes over it just unloads unused tabs and such.