How to force the system to donot use the swap memory in fedora 21?
How to force the system to do not use the swap memory in fedora 21? System become very slow when its uses the swap memory of hdd and even ram is still 50% available in memory...
How much RAM do you have?
On Linux machines with 8 GiB or more, you can often get away without having a swap file. Ultimately it will depend on how many memory intensive applications you have running concurrently.
I have a 16 GiB machine, which is often running an 8 GiB KVM instance, plus Firefox, Thunderbird, Nautilus, Libre Office, Totem, Clementine, Evince and numerous Gnome shell plugins (not to mention the plugins for the other apps). I rarely hit more than 80% usage and I don't have a swap file.
One other thing to consider with the swap file is Hibernate. If you use hibernate to suspend your machine, then the swap file is used to offload the entire RAM to disk. Consequently you will need the swap file and it will need to be at least as big as the amount of RAM you have - I recommend more to allow for the possibility that the swap file is already in use.