CPU的電源管理是會影響性能的。
pstate指CPU忙時的電源管理,為了省電會調節主頻和電壓。cstate是cpu閑時的電壓管理。
詳細資料見:
https://software.intel.com/en-us/blogs/2008/05/29/what-exactly-is-a-p-state-pt-1
https://www.thomas-krenn.com/en/wiki/Processor_P-states_and_C-states
linux與kernel如何針對電源管理進行調度:
https://www.kernel.org/doc/html/v4.12/admin-guide/kernel-parameters.html
https://www.kernel.org/doc/html/v4.12/admin-guide/pm/cpufreq.html
https://www.kernel.org/doc/html/v4.12/admin-guide/pm/intel_pstate.html
最簡單的,直接關掉它的方法:(見紅字)
intel_pstate=disable intel_idle.max_cstate=0 processor.max_cstate=0
[root@tong ~]# cat /proc/cmdline BOOT_IMAGE=/vmlinuz-3.10.0-693.21.4.el7.x86_64 root=UUID=027f3098-783a-491a-9b1a-4d78a910952a ro crashkernel=auto isolcpus=1,4,6,17,20,22 intel_pstate=disable intel_idle.max_cstate=0 processor.max_cstate=0 rhgb quiet