SlideShare una empresa de Scribd logo
1 de 7
Descargar para leer sin conexión
Controlling Processor C-State
Usage in Linux
A Dell technical white paper describing the use of C-states with
Linux operating systems
Stuart Hayes | Enterprise Linux Engineering
Controlling Processor C-State Usage in Linux
Page ii
THIS DOCUMENT IS FOR INFORMATIONAL PURPOSES ONLY, AND MAY CONTAIN TYPOGRAPHICAL ERRORS
AND TECHNICAL INACCURACIES. THE CONTENT IS PROVIDED AS IS, WITHOUT EXPRESS OR IMPLIED
WARRANTIES OF ANY KIND.
© 2012 Dell Inc. All rights reserved. Reproduction of this material in any manner whatsoever without
the express written permission of Dell Inc. is strictly forbidden. For more information, contact Dell.
Dell, the DELL logo, and the DELL badge are trademarks of Dell Inc. Intel and Xeon are registered
trademarks of Intel Corporation in the U.S. and other countries. Other trademarks and trade names
may be used in this document to refer to either the entities claiming the marks and names or their
products. Dell Inc. disclaims any proprietary interest in trademarks and trade names other than its
own.
November 2012 | Revision 1.0
Controlling Processor C-State Usage in Linux
Page iii
Contents
Introduction ................................................................................................................4
Background .................................................................................................................4
Checking C-State Usage ..................................................................................................4
Disabling C-States for Low Latency ....................................................................................5
Dynamic Control of C-States ............................................................................................6
Summary ....................................................................................................................7
Figures
Figure 1. i7z showing C-state usage when processors limited to C1 ..........................................5
Figure 2. setcpulatency.c.............................................................................................7
Controlling Processor C-State Usage in Linux
Page 4
Introduction
This paper briefly describes when and how to take advantage of C-states on systems running Linux on
x86 computers.
Background
In many computers, processors can use a significant amount of power when they are active. However,
there are many times when the processors in the system are not busy running useful code. There are
several methods designed to lower power usage on a processor when its full capacity isn’t needed.
One of these is the ability to lower the frequency at which a processors is running when it isn’t being
heavily used (each possible frequency is referred to as a processor performance state, or ―P-state‖).
Another is to put various processor subsystems to sleep completely when the CPU is idle (these are
called processor (CPU) power states, or ―C-states‖).
However, while it does save power, it takes time to enter and exit C-states. Generally the higher the
C-state, more power is saved when the processor is idle, but it takes longer to get the CPU back up
again when it is needed. The C-states are:
C0 The CPU is actively running code
C1 The CPU uses the HLT instruction when idle—the clock is gated off to parts of
the core, but it is relatively quick to wake up
C1E This is actually just C1, except when C1E is enabled, the CPU lowers the CPU’s
speed & voltage when it is in C1
C2 & up The CPU will shut off various parts of the core for greater power savings, at the
cost of taking longer to wake up
In most Linux distributions today, C-states are enabled by default, which is great for most users. The
operating system will choose which C-state to use based on processor utilization and other factors.
Some users, though, want very low latency, and are very sensitive to how quickly a CPU can run code
when needed, so user control is desired.
Checking C-State Usage
There are several ways to see how much idle time is being spent in the various C-states.
First check the kernel messages from boot (―dmesg |grep idle‖ or ―grep idle /var/log/messages‖, for
instance) to see which idle driver is in use.
If the acpi_idle driver is being used, the quickest method is to look at
/proc/acpi/processor/CPU0/power, if it is available. It will show how many times each C-state has
been entered, and how much time has been spent in each C-state. This method is not very user-
friendly, though, because it has to be checked separately for each processor, it only shows cumulative
totals for usage (so you have to check several times to see if a given C-state is currently in use).
Controlling Processor C-State Usage in Linux
Page 5
Another option when using acpi_idle is the ―acpitool‖ program, but this not included in all Linux
distributions and may have to be downloaded separately.
If the system is using Intel processors, the program ―i7z‖ can be used to check C-state usage regardless
of which idle driver is being used (it accesses processor registers directly to see which C-states are
being used). Another option for use with Intel processors is ―powertop.‖ Note that programs such as
i7z, which directly access processor registers and do not use ACPI, may not number states C2 and
higher the same as they are numbered in ACPI.
Figure 1 – i7z showing C-state usage when processors limited to C1
Disabling C-States for Low Latency
Most newer Linux distributions (Red Hat Enterprise Linux 6, Update 3, for example), on systems with
Intel processors, use the ―intel_idle‖ driver (probably compiled into your kernel and not a separate
module) to use C-states. This driver uses knowledge of the various CPUs to control C-states without
input from system firmware (BIOS). This driver will mostly ignore any other BIOS setting and kernel
parameters, so if you want control over C-states, or if your system might have CPUs that are newer
than the version of intel_idle in your kernel, you should use kernel parameter
―intel_idle.max_cstate=0‖ to disable this driver.
You should also disable C1E in BIOS setup, if you are looking for low latency. As mentioned above,
when C1E is enabled, the processor will try to lower processor clock speed and voltage when it enters
the C1 C-state, which might result in higher latency.
Controlling Processor C-State Usage in Linux
Page 6
When the intel_idle driver is disabled, the Linux kernel will use the acpi_idle driver to use C-states.
System firmware (BIOS) provides a list of available C-states to the operating system using an ACPI
table. So, once intel_idle is disabled, users who want low latency can disable C-states by going into
system (BIOS) setup during boot and telling BIOS to disable C-states (which takes them out of the ACPI
tables).
Disabling C-states in this way will typically result in Linux using the C1 state for idle processors, which
is fairly fast. If BIOS doesn’t allow C-states to be disabled, C-states can also be limited to C1 with the
kernel parameter ―idle=halt‖ (assuming the intel_idle driver is disabled).
If a user wants the absolute minimum latency, kernel parameter ―idle=poll‖ can be used to keep the
processors in C0 even when they are idle (the processors will run in a loop when idle, constantly
checking to see if they are needed). If this kernel parameter is used, it should not be necessary to
disable C-states in BIOS (or use the ―idle=halt‖ kernel parameter). Take care when keeping processors
in C0, though--this will increase power usage considerably. Also, hyperthreading should probably be
disabled, as keeping processors in C0 can interfere with proper operation of logical cores
(hyperthreading). (The hyperthreading hardware works best when it knows when the logical processors
are idle, and it doesn’t know that if processors are kept busy in a loop when they are not running
useful code.)
And, to reiterate—there are a number of kernel parameters and BIOS settings that deal with C-states,
but most of these will be ignored if intel_idle is in use. Disabling intel_idle with kernel parameter
―intel_idle.max_cstate=0‖ will result in more intuitive control of C-states, and there should not be any
disadvantage to disabling it on systems that provide correct C-state information to the operating
system via ACPI.
Dynamic Control of C-States
The methods to limit C-states above will all be permanent (until the system is rebooted). If you would
like to have a system have extremely low latency during certain hours, but want more power savings at
other times, there is a method to dynamically control which C-states are used.
To dynamically control C-states, open the file /dev/cpu_dma_latency and write the maximum
allowable latency to it. This will prevent C-states with transition latencies higher than the specified
value from being used, as long as the file /dev/cpu_dma_latency is kept open. Writing a maximum
allowable latency of 0 will keep the processors in C0 (like using kernel parameter ―idle=poll‖), and
writing 1 should force the processors to C1 when idle. Higher values could also be written to restrict
the use of C-states with latency greater than the value written.
One simple way to do this is by compiling a simple program that will write to this file, and stay open
until it is killed. An example of such a program is below, and can be compiled by cutting and pasting
the code into a file called setcpulatency.c, and running ―make setcpulatency‖.
So, to minimize latency during certain hours, say from 8AM until 5PM, a cron job could be set up to run
at 8AM. This cron job could run setcpulatency in the background with an argument of 0, with a cron
table entry like this:
00 08 * * * /path/to/setcpulatency 0 &
Then, at 5PM, another cron job could kill any program that’s holding /dev/cpu_dma_latency open:
Controlling Processor C-State Usage in Linux
Page 7
00 17 * * * kill -9 `lsof –t /dev/cpu_dma_latency`
Of course, this is just an example to show how C-states can be dynamically controlled… the crond
service is often disabled in low latency environments, but these steps could be taken manually or run
by other means.
#include <stdio.h>
#include <fcntl.h>
int main(int argc, char **argv) {
int32_t l;
int fd;
if (argc != 2) {
fprintf(stderr, "Usage: %s <latency in us>n", argv[0]);
return 2;
}
l = atoi(argv[1]);
printf("setting latency to %d usn", l);
fd = open("/dev/cpu_dma_latency", O_WRONLY);
if (fd < 0) {
perror("open /dev/cpu_dma_latency");
return 1;
}
if (write(fd, &l, sizeof(l)) != sizeof(l)) {
perror("write to /dev/cpu_dma_latency");
return 1;
}
while (1) pause();
}
Figure 2 – setcpulatency.c
Summary
Normally C-States should be enabled by default, which is what is best for most users.
For users who want low latency under all circumstances, C-states should be disabled completely. To
do this, use kernel parameter ―intel_idle.max_cstate=0‖. In addition, to allow use of the C1 state,
disable the C1E state in BIOS, and use kernel parameter ―idle=halt‖ (or disable C-states in BIOS in lieu
of ―idle=halt‖). To keep the processors in C0, ―idle=poll‖.
For users who want low latency sometimes, but want the power savings associated with C-states at
other times, dynamic control of C-states is possible.
There are several ways to check C-state usage, which should be used to verify that any attempt to
control C-state usage is working correctly.

Más contenido relacionado

La actualidad más candente

CLP S7 300 E S7 400
CLP S7 300 E S7 400 CLP S7 300 E S7 400
CLP S7 300 E S7 400 confidencial
 
XPDDS18: Intel Processor Trace for Xen Hypervisor - Luwei Kang, Intel
XPDDS18: Intel Processor Trace for Xen Hypervisor - Luwei Kang, IntelXPDDS18: Intel Processor Trace for Xen Hypervisor - Luwei Kang, Intel
XPDDS18: Intel Processor Trace for Xen Hypervisor - Luwei Kang, IntelThe Linux Foundation
 
AAME ARM Techcon2013 003v02 Software Development
AAME ARM Techcon2013 003v02  Software DevelopmentAAME ARM Techcon2013 003v02  Software Development
AAME ARM Techcon2013 003v02 Software DevelopmentAnh Dung NGUYEN
 
Interrupt handling
Interrupt handlingInterrupt handling
Interrupt handlingmaverick2203
 
ARM AAE - Memory Systems
ARM AAE - Memory SystemsARM AAE - Memory Systems
ARM AAE - Memory SystemsAnh Dung NGUYEN
 
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64 BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64 Linaro
 
AAME ARM Techcon2013 005v02 System Startup
AAME ARM Techcon2013 005v02 System StartupAAME ARM Techcon2013 005v02 System Startup
AAME ARM Techcon2013 005v02 System StartupAnh Dung NGUYEN
 
AAME ARM Techcon2013 004v02 Debug and Optimization
AAME ARM Techcon2013 004v02 Debug and OptimizationAAME ARM Techcon2013 004v02 Debug and Optimization
AAME ARM Techcon2013 004v02 Debug and OptimizationAnh Dung NGUYEN
 
XPDDS18: EPT-Based Sub-page Write Protection On Xenc - Yi Zhang, Intel
XPDDS18: EPT-Based Sub-page Write Protection On Xenc - Yi Zhang, IntelXPDDS18: EPT-Based Sub-page Write Protection On Xenc - Yi Zhang, Intel
XPDDS18: EPT-Based Sub-page Write Protection On Xenc - Yi Zhang, IntelThe Linux Foundation
 
ARM AAE - Developing Code for ARM
ARM AAE - Developing Code for ARMARM AAE - Developing Code for ARM
ARM AAE - Developing Code for ARMAnh Dung NGUYEN
 
ARM Processor architecture
ARM Processor  architectureARM Processor  architecture
ARM Processor architecturerajkciitr
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogicAleem Shariff
 
HKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyHKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyLinaro
 
AAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation DiversityAAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation DiversityAnh Dung NGUYEN
 
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driverSFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driverLinaro
 

La actualidad más candente (20)

CLP S7 300 E S7 400
CLP S7 300 E S7 400 CLP S7 300 E S7 400
CLP S7 300 E S7 400
 
ARM AAE - System Issues
ARM AAE - System IssuesARM AAE - System Issues
ARM AAE - System Issues
 
XPDDS18: Intel Processor Trace for Xen Hypervisor - Luwei Kang, Intel
XPDDS18: Intel Processor Trace for Xen Hypervisor - Luwei Kang, IntelXPDDS18: Intel Processor Trace for Xen Hypervisor - Luwei Kang, Intel
XPDDS18: Intel Processor Trace for Xen Hypervisor - Luwei Kang, Intel
 
Ch5 v70 cfc_en
Ch5 v70 cfc_enCh5 v70 cfc_en
Ch5 v70 cfc_en
 
AAME ARM Techcon2013 003v02 Software Development
AAME ARM Techcon2013 003v02  Software DevelopmentAAME ARM Techcon2013 003v02  Software Development
AAME ARM Techcon2013 003v02 Software Development
 
Interrupt handling
Interrupt handlingInterrupt handling
Interrupt handling
 
ARM AAE - Memory Systems
ARM AAE - Memory SystemsARM AAE - Memory Systems
ARM AAE - Memory Systems
 
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64 BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64
 
AAME ARM Techcon2013 005v02 System Startup
AAME ARM Techcon2013 005v02 System StartupAAME ARM Techcon2013 005v02 System Startup
AAME ARM Techcon2013 005v02 System Startup
 
AAME ARM Techcon2013 004v02 Debug and Optimization
AAME ARM Techcon2013 004v02 Debug and OptimizationAAME ARM Techcon2013 004v02 Debug and Optimization
AAME ARM Techcon2013 004v02 Debug and Optimization
 
XPDDS18: EPT-Based Sub-page Write Protection On Xenc - Yi Zhang, Intel
XPDDS18: EPT-Based Sub-page Write Protection On Xenc - Yi Zhang, IntelXPDDS18: EPT-Based Sub-page Write Protection On Xenc - Yi Zhang, Intel
XPDDS18: EPT-Based Sub-page Write Protection On Xenc - Yi Zhang, Intel
 
ARM AAE - Developing Code for ARM
ARM AAE - Developing Code for ARMARM AAE - Developing Code for ARM
ARM AAE - Developing Code for ARM
 
Scl 1e
Scl 1eScl 1e
Scl 1e
 
ARM Processor architecture
ARM Processor  architectureARM Processor  architecture
ARM Processor architecture
 
Microcontroller part 7_v1
Microcontroller part 7_v1Microcontroller part 7_v1
Microcontroller part 7_v1
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
 
HKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyHKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case study
 
AAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation DiversityAAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation Diversity
 
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driverSFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
 
Microcontroller part 1
Microcontroller part 1Microcontroller part 1
Microcontroller part 1
 

Destacado

Doldoggi bisiri
Doldoggi bisiriDoldoggi bisiri
Doldoggi bisirisprdd
 
Linux con europe_2014_f
Linux con europe_2014_fLinux con europe_2014_f
Linux con europe_2014_fsprdd
 
Openstack v4 0
Openstack v4 0Openstack v4 0
Openstack v4 0sprdd
 
Why opensource cloud
Why opensource cloudWhy opensource cloud
Why opensource cloudsprdd
 
Lkda facebook seminar_140419
Lkda facebook seminar_140419Lkda facebook seminar_140419
Lkda facebook seminar_140419sprdd
 
Hardware accelerated virtio networking for nfv linux con
Hardware accelerated virtio networking for nfv linux conHardware accelerated virtio networking for nfv linux con
Hardware accelerated virtio networking for nfv linux consprdd
 
Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0sprdd
 

Destacado (9)

Doldoggi bisiri
Doldoggi bisiriDoldoggi bisiri
Doldoggi bisiri
 
Linux con europe_2014_f
Linux con europe_2014_fLinux con europe_2014_f
Linux con europe_2014_f
 
praveen sharma.
praveen sharma.praveen sharma.
praveen sharma.
 
Openstack v4 0
Openstack v4 0Openstack v4 0
Openstack v4 0
 
Why opensource cloud
Why opensource cloudWhy opensource cloud
Why opensource cloud
 
Globalization & Post Cold War
Globalization & Post Cold WarGlobalization & Post Cold War
Globalization & Post Cold War
 
Lkda facebook seminar_140419
Lkda facebook seminar_140419Lkda facebook seminar_140419
Lkda facebook seminar_140419
 
Hardware accelerated virtio networking for nfv linux con
Hardware accelerated virtio networking for nfv linux conHardware accelerated virtio networking for nfv linux con
Hardware accelerated virtio networking for nfv linux con
 
Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0
 

Similar a Controlling Processor C-States in Linux for Low Latency

Similar a Controlling Processor C-States in Linux for Low Latency (20)

Optiplex 380 service manual2-en-us
Optiplex 380 service manual2-en-usOptiplex 380 service manual2-en-us
Optiplex 380 service manual2-en-us
 
Pdf c1t tlawaxb
Pdf c1t tlawaxbPdf c1t tlawaxb
Pdf c1t tlawaxb
 
chapter 1 of Operating system by gagne.ppt
chapter 1 of Operating system by gagne.pptchapter 1 of Operating system by gagne.ppt
chapter 1 of Operating system by gagne.ppt
 
Topics - , Addressing modes, GPU, .pdf
Topics - , Addressing modes, GPU,  .pdfTopics - , Addressing modes, GPU,  .pdf
Topics - , Addressing modes, GPU, .pdf
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
Introduction_to_OperatingSystems_ch1.ppt
Introduction_to_OperatingSystems_ch1.pptIntroduction_to_OperatingSystems_ch1.ppt
Introduction_to_OperatingSystems_ch1.ppt
 
operating system of the computer/PC/laptop.pptx
operating system of the computer/PC/laptop.pptxoperating system of the computer/PC/laptop.pptx
operating system of the computer/PC/laptop.pptx
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.pptx
ch1.pptxch1.pptx
ch1.pptx
 
ch1.ppthjhgjhghjghjgjhgugugugmhjgh iyuyuy
ch1.ppthjhgjhghjghjgjhgugugugmhjgh iyuyuych1.ppthjhgjhghjghjgjhgugugugmhjgh iyuyuy
ch1.ppthjhgjhghjghjgjhgugugugmhjgh iyuyuy
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
cs8493 - operating systems unit 1
cs8493 - operating systems unit 1cs8493 - operating systems unit 1
cs8493 - operating systems unit 1
 
Linux operating system fundamentals of Operating System
Linux operating system fundamentals of Operating SystemLinux operating system fundamentals of Operating System
Linux operating system fundamentals of Operating System
 

Más de sprdd

난공불락세미나 Ldap
난공불락세미나 Ldap난공불락세미나 Ldap
난공불락세미나 Ldapsprdd
 
Glusterfs 소개 v1.0_난공불락세미나
Glusterfs 소개 v1.0_난공불락세미나Glusterfs 소개 v1.0_난공불락세미나
Glusterfs 소개 v1.0_난공불락세미나sprdd
 
Zinst 패키지 기반의-리눅스_중앙관리시스템_20140415
Zinst 패키지 기반의-리눅스_중앙관리시스템_20140415Zinst 패키지 기반의-리눅스_중앙관리시스템_20140415
Zinst 패키지 기반의-리눅스_중앙관리시스템_20140415sprdd
 
Summit2014 riel chegu_w_0340_automatic_numa_balancing_0
Summit2014 riel chegu_w_0340_automatic_numa_balancing_0Summit2014 riel chegu_w_0340_automatic_numa_balancing_0
Summit2014 riel chegu_w_0340_automatic_numa_balancing_0sprdd
 
오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0sprdd
 
HP NMI WATCHDOG
HP NMI WATCHDOGHP NMI WATCHDOG
HP NMI WATCHDOGsprdd
 
H2890 emc-clariion-asymm-active-wp
H2890 emc-clariion-asymm-active-wpH2890 emc-clariion-asymm-active-wp
H2890 emc-clariion-asymm-active-wpsprdd
 
Cluster pitfalls recommand
Cluster pitfalls recommandCluster pitfalls recommand
Cluster pitfalls recommandsprdd
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1sprdd
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1sprdd
 
2013fooscoverpageimage 130417105210-phpapp01
2013fooscoverpageimage 130417105210-phpapp012013fooscoverpageimage 130417105210-phpapp01
2013fooscoverpageimage 130417105210-phpapp01sprdd
 
Openstackinsideoutv10 140222065532-phpapp01
Openstackinsideoutv10 140222065532-phpapp01Openstackinsideoutv10 140222065532-phpapp01
Openstackinsideoutv10 140222065532-phpapp01sprdd
 
Rhel cluster gfs_improveperformance
Rhel cluster gfs_improveperformanceRhel cluster gfs_improveperformance
Rhel cluster gfs_improveperformancesprdd
 
유닉스 리눅스 마이그레이션_이호성_v1.0
유닉스 리눅스 마이그레이션_이호성_v1.0유닉스 리눅스 마이그레이션_이호성_v1.0
유닉스 리눅스 마이그레이션_이호성_v1.0sprdd
 
세미나설문
세미나설문세미나설문
세미나설문sprdd
 
5231 140-hellwig
5231 140-hellwig5231 140-hellwig
5231 140-hellwigsprdd
 
Glusterfs 파일시스템 구성_및 운영가이드_v2.0
Glusterfs 파일시스템 구성_및 운영가이드_v2.0Glusterfs 파일시스템 구성_및 운영가이드_v2.0
Glusterfs 파일시스템 구성_및 운영가이드_v2.0sprdd
 
Glusterfs 구성제안 및_운영가이드_v2.0
Glusterfs 구성제안 및_운영가이드_v2.0Glusterfs 구성제안 및_운영가이드_v2.0
Glusterfs 구성제안 및_운영가이드_v2.0sprdd
 
Glusterfs 구성제안서 v1.0
Glusterfs 구성제안서 v1.0Glusterfs 구성제안서 v1.0
Glusterfs 구성제안서 v1.0sprdd
 
Glusterfs 구성제안 v1.0
Glusterfs 구성제안 v1.0Glusterfs 구성제안 v1.0
Glusterfs 구성제안 v1.0sprdd
 

Más de sprdd (20)

난공불락세미나 Ldap
난공불락세미나 Ldap난공불락세미나 Ldap
난공불락세미나 Ldap
 
Glusterfs 소개 v1.0_난공불락세미나
Glusterfs 소개 v1.0_난공불락세미나Glusterfs 소개 v1.0_난공불락세미나
Glusterfs 소개 v1.0_난공불락세미나
 
Zinst 패키지 기반의-리눅스_중앙관리시스템_20140415
Zinst 패키지 기반의-리눅스_중앙관리시스템_20140415Zinst 패키지 기반의-리눅스_중앙관리시스템_20140415
Zinst 패키지 기반의-리눅스_중앙관리시스템_20140415
 
Summit2014 riel chegu_w_0340_automatic_numa_balancing_0
Summit2014 riel chegu_w_0340_automatic_numa_balancing_0Summit2014 riel chegu_w_0340_automatic_numa_balancing_0
Summit2014 riel chegu_w_0340_automatic_numa_balancing_0
 
오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0
 
HP NMI WATCHDOG
HP NMI WATCHDOGHP NMI WATCHDOG
HP NMI WATCHDOG
 
H2890 emc-clariion-asymm-active-wp
H2890 emc-clariion-asymm-active-wpH2890 emc-clariion-asymm-active-wp
H2890 emc-clariion-asymm-active-wp
 
Cluster pitfalls recommand
Cluster pitfalls recommandCluster pitfalls recommand
Cluster pitfalls recommand
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1
 
2013fooscoverpageimage 130417105210-phpapp01
2013fooscoverpageimage 130417105210-phpapp012013fooscoverpageimage 130417105210-phpapp01
2013fooscoverpageimage 130417105210-phpapp01
 
Openstackinsideoutv10 140222065532-phpapp01
Openstackinsideoutv10 140222065532-phpapp01Openstackinsideoutv10 140222065532-phpapp01
Openstackinsideoutv10 140222065532-phpapp01
 
Rhel cluster gfs_improveperformance
Rhel cluster gfs_improveperformanceRhel cluster gfs_improveperformance
Rhel cluster gfs_improveperformance
 
유닉스 리눅스 마이그레이션_이호성_v1.0
유닉스 리눅스 마이그레이션_이호성_v1.0유닉스 리눅스 마이그레이션_이호성_v1.0
유닉스 리눅스 마이그레이션_이호성_v1.0
 
세미나설문
세미나설문세미나설문
세미나설문
 
5231 140-hellwig
5231 140-hellwig5231 140-hellwig
5231 140-hellwig
 
Glusterfs 파일시스템 구성_및 운영가이드_v2.0
Glusterfs 파일시스템 구성_및 운영가이드_v2.0Glusterfs 파일시스템 구성_및 운영가이드_v2.0
Glusterfs 파일시스템 구성_및 운영가이드_v2.0
 
Glusterfs 구성제안 및_운영가이드_v2.0
Glusterfs 구성제안 및_운영가이드_v2.0Glusterfs 구성제안 및_운영가이드_v2.0
Glusterfs 구성제안 및_운영가이드_v2.0
 
Glusterfs 구성제안서 v1.0
Glusterfs 구성제안서 v1.0Glusterfs 구성제안서 v1.0
Glusterfs 구성제안서 v1.0
 
Glusterfs 구성제안 v1.0
Glusterfs 구성제안 v1.0Glusterfs 구성제안 v1.0
Glusterfs 구성제안 v1.0
 

Último

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Último (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Controlling Processor C-States in Linux for Low Latency

  • 1. Controlling Processor C-State Usage in Linux A Dell technical white paper describing the use of C-states with Linux operating systems Stuart Hayes | Enterprise Linux Engineering
  • 2. Controlling Processor C-State Usage in Linux Page ii THIS DOCUMENT IS FOR INFORMATIONAL PURPOSES ONLY, AND MAY CONTAIN TYPOGRAPHICAL ERRORS AND TECHNICAL INACCURACIES. THE CONTENT IS PROVIDED AS IS, WITHOUT EXPRESS OR IMPLIED WARRANTIES OF ANY KIND. © 2012 Dell Inc. All rights reserved. Reproduction of this material in any manner whatsoever without the express written permission of Dell Inc. is strictly forbidden. For more information, contact Dell. Dell, the DELL logo, and the DELL badge are trademarks of Dell Inc. Intel and Xeon are registered trademarks of Intel Corporation in the U.S. and other countries. Other trademarks and trade names may be used in this document to refer to either the entities claiming the marks and names or their products. Dell Inc. disclaims any proprietary interest in trademarks and trade names other than its own. November 2012 | Revision 1.0
  • 3. Controlling Processor C-State Usage in Linux Page iii Contents Introduction ................................................................................................................4 Background .................................................................................................................4 Checking C-State Usage ..................................................................................................4 Disabling C-States for Low Latency ....................................................................................5 Dynamic Control of C-States ............................................................................................6 Summary ....................................................................................................................7 Figures Figure 1. i7z showing C-state usage when processors limited to C1 ..........................................5 Figure 2. setcpulatency.c.............................................................................................7
  • 4. Controlling Processor C-State Usage in Linux Page 4 Introduction This paper briefly describes when and how to take advantage of C-states on systems running Linux on x86 computers. Background In many computers, processors can use a significant amount of power when they are active. However, there are many times when the processors in the system are not busy running useful code. There are several methods designed to lower power usage on a processor when its full capacity isn’t needed. One of these is the ability to lower the frequency at which a processors is running when it isn’t being heavily used (each possible frequency is referred to as a processor performance state, or ―P-state‖). Another is to put various processor subsystems to sleep completely when the CPU is idle (these are called processor (CPU) power states, or ―C-states‖). However, while it does save power, it takes time to enter and exit C-states. Generally the higher the C-state, more power is saved when the processor is idle, but it takes longer to get the CPU back up again when it is needed. The C-states are: C0 The CPU is actively running code C1 The CPU uses the HLT instruction when idle—the clock is gated off to parts of the core, but it is relatively quick to wake up C1E This is actually just C1, except when C1E is enabled, the CPU lowers the CPU’s speed & voltage when it is in C1 C2 & up The CPU will shut off various parts of the core for greater power savings, at the cost of taking longer to wake up In most Linux distributions today, C-states are enabled by default, which is great for most users. The operating system will choose which C-state to use based on processor utilization and other factors. Some users, though, want very low latency, and are very sensitive to how quickly a CPU can run code when needed, so user control is desired. Checking C-State Usage There are several ways to see how much idle time is being spent in the various C-states. First check the kernel messages from boot (―dmesg |grep idle‖ or ―grep idle /var/log/messages‖, for instance) to see which idle driver is in use. If the acpi_idle driver is being used, the quickest method is to look at /proc/acpi/processor/CPU0/power, if it is available. It will show how many times each C-state has been entered, and how much time has been spent in each C-state. This method is not very user- friendly, though, because it has to be checked separately for each processor, it only shows cumulative totals for usage (so you have to check several times to see if a given C-state is currently in use).
  • 5. Controlling Processor C-State Usage in Linux Page 5 Another option when using acpi_idle is the ―acpitool‖ program, but this not included in all Linux distributions and may have to be downloaded separately. If the system is using Intel processors, the program ―i7z‖ can be used to check C-state usage regardless of which idle driver is being used (it accesses processor registers directly to see which C-states are being used). Another option for use with Intel processors is ―powertop.‖ Note that programs such as i7z, which directly access processor registers and do not use ACPI, may not number states C2 and higher the same as they are numbered in ACPI. Figure 1 – i7z showing C-state usage when processors limited to C1 Disabling C-States for Low Latency Most newer Linux distributions (Red Hat Enterprise Linux 6, Update 3, for example), on systems with Intel processors, use the ―intel_idle‖ driver (probably compiled into your kernel and not a separate module) to use C-states. This driver uses knowledge of the various CPUs to control C-states without input from system firmware (BIOS). This driver will mostly ignore any other BIOS setting and kernel parameters, so if you want control over C-states, or if your system might have CPUs that are newer than the version of intel_idle in your kernel, you should use kernel parameter ―intel_idle.max_cstate=0‖ to disable this driver. You should also disable C1E in BIOS setup, if you are looking for low latency. As mentioned above, when C1E is enabled, the processor will try to lower processor clock speed and voltage when it enters the C1 C-state, which might result in higher latency.
  • 6. Controlling Processor C-State Usage in Linux Page 6 When the intel_idle driver is disabled, the Linux kernel will use the acpi_idle driver to use C-states. System firmware (BIOS) provides a list of available C-states to the operating system using an ACPI table. So, once intel_idle is disabled, users who want low latency can disable C-states by going into system (BIOS) setup during boot and telling BIOS to disable C-states (which takes them out of the ACPI tables). Disabling C-states in this way will typically result in Linux using the C1 state for idle processors, which is fairly fast. If BIOS doesn’t allow C-states to be disabled, C-states can also be limited to C1 with the kernel parameter ―idle=halt‖ (assuming the intel_idle driver is disabled). If a user wants the absolute minimum latency, kernel parameter ―idle=poll‖ can be used to keep the processors in C0 even when they are idle (the processors will run in a loop when idle, constantly checking to see if they are needed). If this kernel parameter is used, it should not be necessary to disable C-states in BIOS (or use the ―idle=halt‖ kernel parameter). Take care when keeping processors in C0, though--this will increase power usage considerably. Also, hyperthreading should probably be disabled, as keeping processors in C0 can interfere with proper operation of logical cores (hyperthreading). (The hyperthreading hardware works best when it knows when the logical processors are idle, and it doesn’t know that if processors are kept busy in a loop when they are not running useful code.) And, to reiterate—there are a number of kernel parameters and BIOS settings that deal with C-states, but most of these will be ignored if intel_idle is in use. Disabling intel_idle with kernel parameter ―intel_idle.max_cstate=0‖ will result in more intuitive control of C-states, and there should not be any disadvantage to disabling it on systems that provide correct C-state information to the operating system via ACPI. Dynamic Control of C-States The methods to limit C-states above will all be permanent (until the system is rebooted). If you would like to have a system have extremely low latency during certain hours, but want more power savings at other times, there is a method to dynamically control which C-states are used. To dynamically control C-states, open the file /dev/cpu_dma_latency and write the maximum allowable latency to it. This will prevent C-states with transition latencies higher than the specified value from being used, as long as the file /dev/cpu_dma_latency is kept open. Writing a maximum allowable latency of 0 will keep the processors in C0 (like using kernel parameter ―idle=poll‖), and writing 1 should force the processors to C1 when idle. Higher values could also be written to restrict the use of C-states with latency greater than the value written. One simple way to do this is by compiling a simple program that will write to this file, and stay open until it is killed. An example of such a program is below, and can be compiled by cutting and pasting the code into a file called setcpulatency.c, and running ―make setcpulatency‖. So, to minimize latency during certain hours, say from 8AM until 5PM, a cron job could be set up to run at 8AM. This cron job could run setcpulatency in the background with an argument of 0, with a cron table entry like this: 00 08 * * * /path/to/setcpulatency 0 & Then, at 5PM, another cron job could kill any program that’s holding /dev/cpu_dma_latency open:
  • 7. Controlling Processor C-State Usage in Linux Page 7 00 17 * * * kill -9 `lsof –t /dev/cpu_dma_latency` Of course, this is just an example to show how C-states can be dynamically controlled… the crond service is often disabled in low latency environments, but these steps could be taken manually or run by other means. #include <stdio.h> #include <fcntl.h> int main(int argc, char **argv) { int32_t l; int fd; if (argc != 2) { fprintf(stderr, "Usage: %s <latency in us>n", argv[0]); return 2; } l = atoi(argv[1]); printf("setting latency to %d usn", l); fd = open("/dev/cpu_dma_latency", O_WRONLY); if (fd < 0) { perror("open /dev/cpu_dma_latency"); return 1; } if (write(fd, &l, sizeof(l)) != sizeof(l)) { perror("write to /dev/cpu_dma_latency"); return 1; } while (1) pause(); } Figure 2 – setcpulatency.c Summary Normally C-States should be enabled by default, which is what is best for most users. For users who want low latency under all circumstances, C-states should be disabled completely. To do this, use kernel parameter ―intel_idle.max_cstate=0‖. In addition, to allow use of the C1 state, disable the C1E state in BIOS, and use kernel parameter ―idle=halt‖ (or disable C-states in BIOS in lieu of ―idle=halt‖). To keep the processors in C0, ―idle=poll‖. For users who want low latency sometimes, but want the power savings associated with C-states at other times, dynamic control of C-states is possible. There are several ways to check C-state usage, which should be used to verify that any attempt to control C-state usage is working correctly.