Linux

禁用 CPU 管理

  • November 8, 2012

如果我將以下內容添加processor.max_cstate=0到核心命令行以進行啟動,是否會禁用所有 CPU 電源管理和節流?

我還發現: http ://www.experts-exchange.com/OS/Linux/Administration/A_3492-Avoiding-CPU-speed-scaling-in-modern-Linux-distributions-Running-CPU-at-full-speed-提示.html

該連結討論了將所有 CPU/核心的 CPU 調控器從“按需”更改為“性能”,並從核心禁用 kondemand。

伺服器用於網路託管

更新:

2.6.32-379.1.1.lve1.1.7.6.el6.x86_64 #1 SMP Sat Aug 4 09:56:37 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

.

   # dmidecode 2.11
   SMBIOS 2.6 present.
   74 structures occupying 2878 bytes.
   Table at 0x0009F000.

   Handle 0x0000, DMI type 0, 24 bytes
   BIOS Information
           Vendor: American Megatrends Inc.
           Version: 1.0c
           Release Date: 05/27/2010
           Address: 0xF0000
           Runtime Size: 64 kB
           ROM Size: 4096 kB
           Characteristics:
                   ISA is supported
                   PCI is supported
                   PNP is supported
                   BIOS is upgradeable
                   BIOS shadowing is allowed
                   ESCD support is available
                   Boot from CD is supported
                   Selectable boot is supported
                   BIOS ROM is socketed
                   EDD is supported
                   5.25"/1.2 MB floppy services are supported (int 13h)
                   3.5"/720 kB floppy services are supported (int 13h)
                   3.5"/2.88 MB floppy services are supported (int 13h)
                   Print screen service is supported (int 5h)
                   8042 keyboard services are supported (int 9h)
                   Serial services are supported (int 14h)
                   Printer services are supported (int 17h)
                   CGA/mono video services are supported (int 10h)
                   ACPI is supported
                   USB legacy is supported
                   LS-120 boot is supported
                   ATAPI Zip drive boot is supported
                   BIOS boot specification is supported
                   Targeted content distribution is supported
           BIOS Revision: 8.16

   Handle 0x0001, DMI type 1, 27 bytes
   System Information
           Manufacturer: Supermicro
           Product Name: X8SIE
           Version: 0123456789
           Serial Number: 0123456789
           UUID: 49434D53-0200-9033-2500-33902500D52C
           Wake-up Type: Power Switch
           SKU Number: To Be Filled By O.E.M.
           Family: To Be Filled By O.E.M.
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
       Manufacturer: Supermicro
       Product Name: X8SIE
       Version: 0123456789
       Serial Number: VM11S61561
       Asset Tag: To Be Filled By O.E.M.
       Features:
               Board is a hosting board
               Board is replaceable
       Location In Chassis: To Be Filled By O.E.M.
       Chassis Handle: 0x0003
       Type: Motherboard
       Contained Object Handles: 0

Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
       Manufacturer: Supermicro
       Type: Sealed-case PC
       Lock: Not Present
       Version: 0123456789
       Serial Number: 0123456789
       Asset Tag: To Be Filled By O.E.M.
       Boot-up State: Safe
       Power Supply State: Safe
       Thermal State: Safe
       Security Status: None
       OEM Information: 0x00000000
       Height: Unspecified
       Number Of Power Cords: 1
       Contained Elements: 0

這將取決於您的硬體設置。

請提供伺服器品牌/型號和 Linux 發行版/版本和核心。

最大化伺服器性能的過程因您可用的資源而異…

例如:

  • Red Hat 6 系統具有禁用 CPU 調控器的 tune-adm 框架。(另見此圖。
  • HP ProLiant 伺服器(和其他伺服器)具有針對低延遲和性能優化設置的特定調整指南和步驟。
  • 大多數硬體供應商都有特定的 BIOS 設置可以提供幫助(禁用 C-States 和 P-States - 以及頻率縮放)。

因此,請提供有關您要查找的內容的更多上下文。

檢查此答案中列出的矩陣以獲取有關 RHEL 方法的一些一般資訊。

編輯:從您的核心字元串來看,這似乎是一個類似 Red Hat 的基於 RPM 的系統。

我建議下載 tune-adm 實用程序並更改系統的性能配置文件以完成您想要的。

在你的情況下:

yum install tuned tuned-utils
tuned-adm profile latency-performance

或許:

tuned-adm profile enterprise storage

兩者都將禁用 CPU 調控器。

系統設置和配置文件按照以下時間表排列:

引用自:https://serverfault.com/questions/446750