Google engineer proposed increasing the timer generation frequency in the Linux nucleus to 1000HZ by default, aiming to enhance task switching frequency and decrease the time quantum in the task scheduler. Currently, the default frequency is set at 250HZ, balancing performance, delays, and energy consumption.
When using displays with a 120HZ update frequency, common in modern PCs and mobile devices, along with a timer frequency of 250HZ, the time quantum inaccuracy is around half of the frame time. This mismatch reduces resource allocation efficiency and prevents an optimal productivity-to-energy consumption ratio. Lower timer frequencies can lead to higher system power consumption due to more aggressive frequency selection by the Dynamic Voltage and Frequency Scaling mechanism to maintain performance.
Situations arise where a task completes its operations that demanded active calculations, yet the processor continues to run at an elevated frequency due to the remaining time quantum. Increasing task switching frequency can reduce energy consumption by improving Dynamic Voltage and Frequency Scaling efficiency, ensuring more precise task scheduling, frequent CPU load statistic updates, and reducing wait times.
On the other hand, another Google engineer suggested keeping the timer frequency at 250HZ, warning that increasing it to 1000HZ could raise power consumption in low-power devices like IoT devices. Setting the frequency to 1000HZ resulted in a 7% increase in energy consumption on some Android devices. Additionally, with a higher timer frequency, more frequent CPU wake-ups occur, as timers set at intervals of t + 1 ms, t + 2 ms, t + 3 ms, and t + 4 ms at 250HZ trigger a single wake-up compared to four separate wake-ups at 1000HZ.
A comparison conducted by Phoronix on PC performance based on the AMD Ryzen 9 9950x CPU revealed varying results. PCs configured at 1000HZ showed faster performance in tests for Llama.cpp, Nginx, SupertUXKART, Selenium, and kernel assembly time measurements. Conversely, tests for Darktable, PostgreSQL, Unwanquished, Xonetic, Blender, SVT-AV1, RAWTHERAPEE showed higher performance at 250HZ. The average energy consumption at 1000HZ was 144.2 W, with a minimum of 0.18 W and a maximum of 202.13 W; at 250HZ, the average consumption was 144.37 W, with a minimum of 0.07 W and a maximum of