[Xperia Z General] Tha TechnoCrat:
As you can guess from the title, this article will focus on the CPU behaviour and how it affects the performance and battery life of your device. So I will start off with this:

What is a CPU?

A CPU(central processing unit) processes instructions that it gathers from decoding the code in programs and other such files. It has a clock which produces a signal that acts to synchronize the logic units within the CPU as they execute the instructions given in a program. So, the speed at which a CPU processes instructions depends upon the clock speed of the CPU itself. And now I will relate the above definition to the way the CPU behaviour affects the battery backup and the device’s performance. Like said earlier, the CPU processes and executes instructions given in a program and the speed with which it processes these instructions would influence the speed with which the program is run. Now to clarify this in relevant terms , the ability of your device to run a program smoothly to its best potential will depend on the speed with which the CPU processes the program’s instructions which implies that it will depend on the clock speed of the CPU. This clock speed is measured in frequencies(Hertz). Thus, the CPU Clock speed refers to the number of times that a CPU’s clock cycles per second. So we would want to have a high operating frequency for our CPU. But now the battery makes an entry. To run the clock at such high frequencies, the device makes use of the battery power. More the frequency, more the battery is used. So the bottom line is that for good performance you need a higher operating frequency of the CPU but for that equally higher amount of power is used. Now this brings us to CPU Governors. A governor is a set of commands/instructions which governs the behaviour of the CPU according to different situations. It dictates the CPU to operate at different frequencies depending on the demand. There are many governors which are included in custom kernels. The stock kernel includes the OnDemand, PowerSave, Performance and Conservative Governors. In this article , i will be explaining about these along with the SmartassV2 and UserSpace Governors.

1. OnDemand - You must have seen this as the first governor as it used as default in stock. As its name suggests, it changes the CPU frequency according to the demand of the system. It switches to the Maximum CPU frequency as soon as it detects that there is load on the CPU and then decreases the frequency gradually when the load is less. By all of this, you might think that OnDemand is a pretty reliable governor for the balance between Performance and battery but actually it is not. The frequency change between maximum and minimum is too frequent for the balance. It calculates the requirement to change the frequency to maximum. This requirement can respond quickly to the workload change, but it does not usually reflect workload real CPU usage requirement. But nevertheless, it is the best stock Governor when it comes to finding the right balance.

2. PowerSave - A stock kernel made to preserve power. This is pretty straightforward one along with the Performance Governor. It fixes the maximum frequency equal to the minimum frequency of the CPU and always operates in this frequency. This way , the least amount of power is used but the performance is the poorest.

3. Performance- Straightforward again like PowerSave. It fixes the minimum frequency equal to the maximum frequency such that the CPU always operates at the the highest frequency giving the best performance possible within the stock limits but it uses the power at the highest rate as well.

4. Conservative - It is similar to the OnDemand Governor but is specifically developed to conserve power. It does the operate the same as OnDemand which is changing the frequency based upon the CPU usage but it does this gradually than OnDemand. This means, it does not jump to its next target frequency but instead it moves to its target in steps.

5. SmartassV2 - . It is based on the stock OnDemand but it much more performance and battery friendly than OnDemand. It has the system of ‘Ideal Frequency’. Whenever there is Workload on the CPU, SmartassV2 increases the frequency upto this ideal frequency at a fast rate and then it goes slowly to the maximum frequency. Then when there is less workload, it rapidly scales down.

6. UserSpace - It gives the user the right to set the frequencies at different situations according to the requirement

HOPE YOU LIKED IT !!