• As an admin, I prefer no swap on prod machines because I’d rather have the oom killer kill a process that will automatically be brought back up or replaced than grind everything to a crawl swapping. A dead process can be restarted. A swapped to death server can be challenging to even get into.

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      ·
      13 days ago

      I think the biggest reason that’s fallen out of favor is that normal sleep now works pretty well on most systems. It adds wear to your SSD to do that.

      • trolololol@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        13 days ago

        What do you mean by normal sleep and pretty well? My XPS isn’t that old and it drinks from battery while sleeping quite fast, 12h and 50% goes down.

        My older Dell laptop only drains 1-2% per hour on normal sleep which is also not acceptable, I can’t leave it like that over the weekend.

        • Possibly linux@lemmy.zip
          link
          fedilink
          English
          arrow-up
          3
          ·
          13 days ago

          I’ve always had bad experiences with Dell hardware. The battery life of there devices doesn’t seem to last more than a few hours and the batteries where out.

          I have a System76 laptop and I can close the lid for a full day and not have issues. The only thing powered is the ram so it lasts a long time.

      • olympicyes@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        13 days ago

        In this case the web server will temporarily exceed 1GB RAM and crash. It’s usually hovering around 700MB. I configured 4GB swap but I haven’t seen it use more than 1.5GB. I honestly doubt they would even have a way to know, but thanks for the warning.

        • Possibly linux@lemmy.zip
          link
          fedilink
          English
          arrow-up
          1
          ·
          13 days ago

          I guess you will find out

          Its probably fine. Just make sure you have a backup outside of the cloud provider.

      • bitfucker@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        13 days ago

        Are you sure? Because that’s fucking dumb. If it was alà ISP, then it is understandable. Most ISP CANNOT GUARANTEE the maximum advertised speed, not outright violating ToS when you are able to use those full speed. Big difference there.

        • Possibly linux@lemmy.zip
          link
          fedilink
          English
          arrow-up
          1
          ·
          13 days ago

          It depends on weither you are on the shared CPU plan. I’m quite sure but I think they may have ram limits along with CPU limits.

          • bitfucker@programming.dev
            link
            fedilink
            arrow-up
            2
            ·
            13 days ago

            Maybe it is a violation when you are doing it all the time? Like, 24/7 you are using the whole resources available. Then yeah, I could see it.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    6
    ·
    14 days ago

    I was forced to enable swap because it I run out of RAM without swap then 95% of the time my laptop hard reboots. Adding a ton of swap fixed it.

    My next issue is that sometimes it just hard-freezes. Zero warning, under no load, I can’t even move the mouse. Linux on the desktop!

      • FizzyOrange@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        13 days ago

        Yeah that was the first thing I did - 16 to 32GB but apparently the hardware doesn’t support more. At least that’s what the IT guys told me and it isn’t worth fighting them.

        Seems a bit shit of the hardware to me. I bought a second hand desktop for very cheap and it came with 128GB which seems like a more reasonable amount for a professional programmer…

        • Possibly linux@lemmy.zip
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          13 days ago

          16GB should be fine for just about anything. It is fine in 8GB and you probably can get away with 4GB. You need to check what is using up all the ram as there is a serious problem somewhere.

          I’ve only really seen 64+ on servers since that’s a bit insane for desktop use. 128GB is what you use for ZFS file servers and stuff like that.

          Can you post your specs? Also I would double check that you didn’t mismatch memory timings. You can mix brands as long as the speed and pattern are the same. It sounds a lot like a much bigger issue.

    • Lee Duna@lemmy.nz
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      13 days ago

      My next issue is that sometimes it just hard-freezes. Zero warning, under no load, I can’t even move the mouse. Linux on the desktop

      You may want to consider fixing the system cache value.

      https://lkml.org/lkml/2013/10/25/39

      I use lower values than Linus suggested.

      • FizzyOrange@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        13 days ago

        I don’t see why that would cause lock ups? I’m pretty sure it’s just a driver bug. Didn’t used to do it but I upgraded the kernel recently and then it started.

        Interesting thread anyway - do you know if they ever fixed the defaults?

    • sip@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      14 days ago

      I added a userland OOM and now my browsers or slack dissapears and I’m confused for 5-10 secunds every time. sometimes my editor or one of the lsp servers.

      cspell also leaks like crazy

  • mvirts@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    13 days ago

    My experience is that without swap my system will eventually lock up, without a clear sign of why. This was especially true when disabling memory overcommit, but I blame applications for that one.

    Who knows maybe my ram is failing.