• dan@upvote.au
    link
    fedilink
    arrow-up
    4
    ·
    23 days ago

    you can disable swap.

    Be careful with disabling swap if you don’t have a very large amount of RAM, as many apps rely on memory overcommitment and a large virtual address space, which can behave erratically without swap.

    You’d be better off keeping swap enabled and instead setting vm.swappiness = 0 in sysctl.conf.

    Swappiness is a value between 0 and 100, where 0 means to never swap unless absolutely necessary (only if you completely run out of RAM), and 100 means all programs and data will be swapped nearly instantly. Think of it like a target for the percentage of RAM to keep available. The default is usually 40 which is fine for a low-RAM system, but swaps way too often for a system with more RAM.