6

I always read that swap on a Pi should be disabled because enabling it lowers SD card lifetime and is very slow anyways (no performance gain with swap). So I disabled it.

But is there a good reason why Raspbian has enabled swap by default anyways?

  • Some more information about swap here. – Jivings May 8 '14 at 22:01
6

IMHO, the swap was enabled by default because without the swap when you run out of the memory you'll get a kernel panic and/or the application killed, that might be avoided using swap. With the swap actually active, the performance might be really bad, but the execution still continues. Since nobody could possibly know in advance how the particular RasPi would be used, enabling swap is the safest choice.

Once you figured out how much memory you need and have changed CPU/GPU memory allocation, you might disable swap.

-3

You proabably want to use ext2 rather then ext3 or ext4 for the file system on a flash device to reduce writes (to file system logs)

  • 4
    What does this has to do with swap? – Foo Bar May 8 '14 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.