update 3.PVE系统调整.md.

This commit is contained in:
秋刀狐狸
2022-08-10 15:59:05 +00:00
committed by Gitee
parent 5c1faec47c
commit a65439d173
+20 -10
View File
@@ -115,7 +115,7 @@ Wed, 20 Jul 2022 16:21:28 +0800
## 检查 CPU 当前调度器
cpufreq-info
```
**CPU - J4125 设备参考输出**
**设备 CPU - J4125 参考输出**
```bash
## J4125 参考输出
@@ -134,7 +134,7 @@ analyzing CPU 0:
current CPU frequency is 1.84 GHz.
```
**CPU - N5105 设备参考输出**
**设备 CPU - N5105 参考输出**
```bash
## N5105 参考输出
@@ -154,8 +154,8 @@ analyzing CPU 0:
```
这里面主要关注两个点:
- driver: intel_cpufreq
- current policy: governor "ondemand"
- driver: `intel_cpufreq``intel_pstate`
- current policy: `governor "ondemand"``governor "performance"`
当然还有另外一个命令可以用来显示 CPU 调度器:
@@ -163,11 +163,14 @@ analyzing CPU 0:
## 检查 CPU 当前调度器
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
## 参考输出
## J4125 参考输出
ondemand
## N5105 参考输出
performance
```
驱动一般不建议手动调整,而 `governor "ondemand"` 则显示了当前 CPU 的调度器是什么。
驱动一般不建议手动调整,而 `governor` 后面的参数则显示了当前 CPU 的调度器是什么。
接下来,我们需要了解当前系统 CPU 支持的调度器有哪些:
@@ -175,13 +178,20 @@ ondemand
## 检查 CPU 调度器支持情况
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
## 参考输出
## J4125 参考输出
conservative ondemand userspace powersave performance schedutil
## N5105 参考输出
performance powersave
```
这里有很多种调度器可供选择,至于每种调度器有什么优劣,欢迎大家深度挖掘。
根据 CPU 所使用的驱动不同,可选调度器也不同,至于每种调度器有什么优劣,欢迎大家深度挖掘。
本文以使用 `schedutil` 调度器为演示
CPU 驱动为 `intel_pstate` 时,建议使用 `powersave` 调度器。
CPU 驱动为 `intel_cpufreq` 时,建议使用 `schedutil` 调度器。
本文以使用 `powersave` 调度器为演示。
使用 `vim` 编辑器来编辑 `cpufrequtils` 的配置文件:
@@ -192,7 +202,7 @@ vim /etc/init.d/cpufrequtils
## 在配置文件中修改调度器
ENABLE="true"
GOVERNOR="schedutil" ## 修改本行的调度器为 schedutil
GOVERNOR="powersave" ## 修改本行的调度器为 powersave
MAX_SPEED="0"
MIN_SPEED="0"
```