• mvirts@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 hours 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.

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      14 hours 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
        2
        ·
        edit-2
        12 hours 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
          1
          ·
          6 hours 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.

      • bitfucker@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        4 hours 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
          ·
          3 hours 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.

  • 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.

    • Onihikage@piefed.social
      link
      fedilink
      English
      arrow-up
      17
      arrow-down
      1
      ·
      1 day ago

      EarlyOOM is great for keeping systems responsive. I can’t understand why the default memory management on many distros still seems to be “do everything possible to avoid automatic termination of processes even if that means the system becomes borderline unusable.” It makes for a terrible user experience, and most users are just going to restart the machine when it happens rather than try to struggle through a slide show to manually kill whatever’s causing the problem.

      • backgroundcow@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        3 hours ago

        I couldn’t agree more. If there only was a somewhat user-friendly setting that allowed the oom killer to be far more aggressive, killing or freezing processes as soon as their memory use starts to affect system responsiveness, and just tell me this is what has happened.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    2 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
        ·
        3 hours 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
          2 hours 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
      17 hours 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
        ·
        3 hours 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
      2
      ·
      1 day 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

      • trolololol@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        20 hours ago

        Oh how do I do this? Can you choose what processes it kills first even if they’re not the worst offenders?

  • macniel@feddit.org
    link
    fedilink
    arrow-up
    8
    ·
    2 days ago

    Mhm something doesn’t add up (well atleast on my system)

    The kernel’s swappiness option (a sysctl parameter ranging from 0 to 100) controls how aggressively the kernel prefers to swap out pages. A lower value tells the kernel to avoid swapping whenever possible, while a higher value allows more proactive swapping. The default value is 60, and you can check it using:

        cat /proc/sys/vm/swappiness
    

    In other words, a low value (e.g., 10) means that the system prefers to keep things in RAM as long as possible. On the contrary, a high value (e.g., 80 or 100) tells the kernel to start swapping earlier to free up more cache.

    I have 64 Gigs of RAM (only 8 are used by endeavour OS at all time), No Swap Partition yet my swappiness is at 60?

    Is something wrong, even though I don’t feel anything off, with my System O.o?

    • Are you me‽

      I put 64GiB of RAM in my mini desktop just to never have to deal with swap paging. AMD with integrated GPU, so it immediately steals, like, 4GiB for graphics, but even so I think I’ve never seen it go past 50% usage.

      I think 60 is just a default. That’s what mine says, too, and I have 0 swap allocated:

                     total        used        free      shared  buff/cache   available
      Mem:            59Gi        16Gi       2.1Gi        72Mi        41Gi        43Gi
      Swap:             0B          0B          0B
      
    • Jo Miran@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      In some of my systems with a lot of RAM, I pre-cache as much as possible (DBs) and disable swap altogether.

      Most people won’t notice a difference, especially if you are running on SSD. That said, swapping will kill that SSD a lot quicker.