I was reading about swappiness in various forums and I saw some videos. Many stated that it's a good thing for desktop users to decrease the swappiness value below 60 (which is the default). Some stated that 60 is good for servers. Exactly why would it be better for me to lower it and why is 60 good for servers? I tried to search for an answer (I looked here for example) but couldn't understand. ...Please use easy terms :D
Your premise is wrong. There is no 'good for servers' swapiness value.
Swapiness is the amount of swapping that is done, especially how aggressively you swap. For my servers the swappiness is close to zero, as I make damn sure they have memory enough for everything. There is no 'best for servers' value. there is 60, which is the default, and then there is "your value" which depends on usage and available memory.
If you have servers that sometimes use LOADS of memory, you could have them higher than default, but I would say that some servers (database servers?) might want to keep them way lower than a home computer would.
The swappiness value is scaled in a way that confuses people. They see it has a range of 0-100 so they think of percent, when really the effective minimum is around 50.
60 roughly means don't swap until we reach about 80% memory usage, leaving 20% for cache and such. 50 means wait until we run out of memory. Lower values mean the same, but with increasing aggressiveness in trying to free memory by other means.
The describe it pretty well at http://lwn.net/Articles/83588/
The swappiness setting is a tweak to the way Linux calculates the benefits/drawbacks to swapping in a particular scenario. A high swappiness will not cause the system to swap when it doesn't need to, and a low swappiness, providing you don't disable swapping completely, will not prevent your system from swapping when it absolutely has to.
The default swappiness of 60 or so is a very good compromise ensuring good performance of your system by ensuring it is not struggling too hard to allocate cache memory while there is unused allocated program memory.
Remember that if you have plenty of RAM for all your processes plus cache, which should usually be the case if you have plenty of physical RAM, swapping should not be an issue for you anyway. The preferred way to fix issues of too much swapping is to decrease RAM use by processes, and/or to increase physical RAM. Reducing swappiness will have a negative effect if what you really need is more RAM.
Please see the answer I wrote to a very similar question:
https://askubuntu.com/a/184221/54256
Excerpt:
Feel free to read the whole post at https://askubuntu.com/a/184221/54256
Swappiness is completely contradicting to all these answers.
Real Working of swappiness is described in the article: https://gokulvasanblog.wordpress.com/2016/11/14/empathising-mammoths-mentality-a-study-on-linux-memory-management/
The ambiguity is corroborated by the statement from Andrew Morton: https://lwn.net/Articles/83593/
I'm gonna stick my fingers in my ears and sing "la la la" until people tell me "I set swappiness to zero and it didn't do what I wanted it to do".
Hope its useful