How to configure swappiness in Linux Memory Management?

From Swappiness, Wikipedia

You could set this value in a virtual file /proc/sys/vm/swappiness The mentioned value will be deciding how the swap space should be used, below are the values with their intents.

vm.swappiness = 0   # Swap is disabled. In earlier versions, this meant that the kernel would swap only to avoid an out of memory condition, but in later versions this is achieved by setting to 1.
vm.swappiness = 1   # Kernel version 3.5 and over, as well as kernel version 2.6.32-303 and over: Minimum amount of swapping without disabling it entirely.
vm.swappiness = 10  # This value is sometimes recommended to improve performance when sufficient memory exists in a system, this value *10* could be considered for the performance being expected. 
vm.swappiness = 60  # The default value.
vm.swappiness = 100 # The kernel will swap aggressively.

Although it actually depends upon the need too, if the physical memory available is sufficient, there may not be a great need of swap space, in Layman's terms there won't be a need of changing the default value of 60.


The Linux kernel provides a tweakable setting that controls swappiness

$ cat /proc/sys/vm/swappiness
60  

open /etc/sysctl.conf as root. Then, change or add this line to the file:

vm.swappiness = 10

for changing the swappiness value temporarily try this command:

$ echo 50 > /proc/sys/vm/swappiness

In RedHat/CentOS the default value is 60.
"In order to improve performance" is very broad term. What performance are you trying to improve?

Do you have issues with low memory?
Does your system SWAP when there's still free memory/cached memory?

In Linux free RAM = wasted RAM, so almost all free memory is used for disc caches.
There are cases with swappiness=60 where pages in memory are moved to SWAP if they haven't been accessed for extended time periods, no matter you have unallocated RAM.
Moving some memory pages to SWAP is not necessary a bad thing.

Please shed some more light on your issue for more detailed answer.