openwrt/target/linux/x86
John Audia 92ff3dfd84 x86: switch from CONFIG_HZ_PERIODIC to CONFIG_NO_HZ_IDLE
Running with CONFIG_HZ_PERIODIC=y keeps the scheduler tick running
continuously, which produces higher jitter and lower power efficiency.
In contrast, CONFIG_NO_HZ_IDLE=y (the upstream default) stops the tick
only when the CPU is idle, giving lower idle power and normal runtime
jitter.

An Intel N150-based router/firewall was tested using two kernel builds:
one with CONFIG_HZ_PERIODIC=y, and one with CONFIG_NO_HZ_IDLE=y. Power
consumption was measured while the system was essentially idle (no
meaningful traffic). The CONFIG_NO_HZ_IDLE=y build consistently used
less power.

Details: The two power-measurement methods were:

 1. PkgWatt from turbostat (software)
 2. Wall-power measurement using a Kill-A-Watt (hardware)

The test began by zeroing the Kill-A-Watt and simultaneously running:
turbostat --quiet --Summary --interval 10 --show Busy%,PkgWatt

The test duration was defined by the time required for the Kill-A-Watt
to accumulate 0.005 kWh, after which the average wattage was calculated.

Results:
+----------------------+-----------------+----------------+-----------+
|  Metric              |   HZ_PERIODIC   |   NO_HZ_IDLE   | Delta %   |
+----------------------+-----------------+----------------+-----------+
|  PkgWatt             |  3.59 ± 0.38    |  3.38 ± 0.34   |  -5.9 %   |
+----------------------+-----------------+----------------+-----------+
| Avg wattage at wall  |      12.47      |     12.00      |  -3.77 %  |
+----------------------+-----------------+----------------+-----------+

The mean PkgWatt difference is 210 mW (5.9%) in favor of
CONFIG_NO_HZ_IDLE=y, with a t-statistic of ~3.17 and p ≈ 0.002.

Wall-power measurements show a 470 mW (3.77%) reduction under
CONFIG_NO_HZ_IDLE=y.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21470
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-09 16:35:34 +01:00
..
64 x86/64: enable 8250_DW 2025-10-10 10:32:20 +02:00
base-files x86: rename and configure Mellanox Spectrum interfaces 2025-10-06 19:06:26 +02:00
generic x86: move common kconfig symbols into target shared config 2025-06-19 22:49:43 +02:00
geode x86: move common kconfig symbols into target shared config 2025-06-19 22:49:43 +02:00
image x86: Add kmod-drm-i915 as default package 2025-01-30 13:08:17 +01:00
legacy x86: move common kconfig symbols into target shared config 2025-06-19 22:49:43 +02:00
patches-6.12 kernel: bump 6.12 to 6.12.60 2025-12-02 22:51:19 +01:00
base-files.mk target: Make TARGET_SERIAL independent of GRUB configuration 2023-11-29 23:43:01 +01:00
config-6.12 x86: switch from CONFIG_HZ_PERIODIC to CONFIG_NO_HZ_IDLE 2026-01-09 16:35:34 +01:00
Makefile x86: use kernel 6.12 by default 2025-05-20 11:52:07 +02:00
modules.mk x86: modules: fix wrong Kconfig symbol 2025-07-17 11:45:13 +01:00