• macniel@feddit.org
    link
    fedilink
    arrow-up
    8
    ·
    5 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
      ·
      5 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.