How to Permanently Set CPU Governor to Performance in Linux

How to Permanently set cpu governor to performance or what is the purpose of setting this like this ?
Well, the CPU Governor set/adjust the cpu to maximum or minimum usage. In most the operating systems the default CPU governor is on demand. On demand is a very good option, which will save a lot of battery if there is not too much applications working and will switch performance mode when you opens a task intensive application.

The CPU Governors available in Linux:
Governor – Description
ondemand – Dynamically switch between CPU(s) available if at 95% CPU load
performance – Run the CPU at max frequency
conservative – Dynamically switch between CPU(s) available if at 75% load
powersave – Run the CPU at the minimum frequency
userspace – Run the CPU at user specified frequencies

Depending on the scaling driver, the default drivers loaded will be:
ondemand for AMD and older Intel CPU.
powersave for Intel Sandy Bridge and newer CPU.

Benefits of changing CPU Governor from powersave to performance
Improve the over all performance and all. Applications can execute much faster.Also, power consumption will not increase too much, however you may lose half an hour of extra time on performance mode.

How to Permanently Set CPU Governor to Performance in Linux
Steps to follow:
1.) Install cpufrequtils:

sudo apt-get install cpufrequtils

2.) Now, Edit the following file (if it not exist, you create one):

sudo nano /etc/default/cpufrequtils

3.) And add the following line to the newly created file:

GOVERNOR="performance"

4.) Now,Save and exit.
5.) What you have to now is,disable ondemand daemon (if not after you reboot the settings will be overwritten)

sudo update-rc.d ondemand disable

You are all done now.

If you want to check your settings use this command :

cpufreq-info

It’s a good thing to try, if you are a linux user (You can advance yourself in to next level).In windows, you can just put the system to Performance mode from the power options.That’s all.
Thanks for reading.