Linux – Do I even need a swap partition with Linux

linuxmemoryswap

I have a core 2 laptop with 4gb of ram. I use the machine for browsing, network stuff and simple programming. (I use this machine to host a small ftp and web server semi-occasionally.)

Would there be any benefit to having a swap partition? My understanding is that with that much memory, there would be no need to have a swap for my mediocre usage. In fact, the kernel will be forced to use my ram, which will be faster.

Is this correct?

Best Answer

Do I need a swap partition?

You need a swap partition (not a swap file) to send your workstation to sleep.

How can I force the kernel not to use swap?

sysctl vm.swappiness=0

On another note: How is that related to server administration?