3.4. Disabling C-states by using a kernel command line option


To test whether the latency of applications on a host are being affected by C-states, temporarily disable consumption states (C-state) in a kernel command line option.

The processor.max_cstate and intel_idle.max_cstate kernel command line parameters configure the maximum C-state CPU cores can use. For example, setting the parameters to 1 ensures that the CPU will never request a C-state below C1.

To not hard code a specific state, consider using a more dynamic solution. See Disabling C-states by using a custom TuneD profile.

Prerequisites

  • The tuned service is not running or configured to not update C-state settings.

Procedure

  1. Display the idle driver the system uses:

    # cat /sys/devices/system/cpu/cpuidle/current_driver
    intel_idle

    For details about the driver, see the /usr/share/doc/kernel-doc-<version>/Documentation/admin-guide/pm/cpuidle.rst file provided by the kernel-doc package.

  2. If the host uses the intel_idle driver, set the intel_idle.max_cstate kernel parameter to define the highest C-state that CPU cores should be able to use:

    # grubby --update-kernel=ALL --args="intel_idle.max_cstate=0"

    Setting intel_idle.max_cstate=0 disables the intel_idle driver. Consequently, the kernel uses the acpi_idle driver that uses the C-state values set in the EFI firmware. For this reason, also set processor.max_cstate to override these C-state settings.

  3. On every host, independent from the CPU vendor, set the highest C-state that CPU cores should be able to use:

    # grubby --update-kernel=ALL --args="processor.max_cstate=0"
    重要

    If you set processor.max_cstate=0 in addition to intel_idle.max_cstate=0, the acpi_idle driver overrides the value of processor.max_cstate and sets it to 1. As a result, with processor.max_cstate=0 intel_idle.max_cstate=0, the highest C-state the kernel will use is C1, not C0.

  4. Restart the host for the changes to take effect:

    # reboot

Verification

  1. Display the maximum C-state:

    # cat /sys/module/processor/parameters/max_cstate
    1
  2. If the host uses the intel_idle driver, display the maximum C-state:

    # cat /sys/module/intel_idle/parameters/max_cstate
    0
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部