Skip to content

Commit 7a344a4

Browse files
committed
chore: add cpu goverance
1 parent 75482a2 commit 7a344a4

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

‎.vitepress/config.mts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ export default defineConfig({
9999
text: "CPU Pinning",
100100
link: "/servers/cpu-pinning",
101101
},
102+
{
103+
text: "CPU Governance",
104+
link: "/servers/cpu-governance",
105+
},
102106
{
103107
text: "Low Latency Kernel",
104108
link: "/servers/low-latency-kernel",

‎servers/cpu-governance.md‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# CPU Governance
2+
3+
Your server has a concept of CPU governance, which controls how the CPU manages its frequency and power consumption. There are several governor modes available, each with different characteristics.
4+
5+
## Available CPU Governors
6+
7+
| Governor | Description |
8+
| -------------- | -------------------------------------------------- |
9+
| `performance` | CPU runs at maximum frequency at all times |
10+
| `powersave` | CPU runs at minimum frequency to save power |
11+
| `ondemand` | CPU frequency scales based on current load |
12+
| `conservative` | Similar to ondemand but more gradual scaling |
13+
| `userspace` | Allows manual control of CPU frequency |
14+
| `schedutil` | Uses scheduler information for frequency decisions |
15+
16+
## Recommended Configuration
17+
18+
For game servers, it is **strongly recommended** to set the CPU governor to `performance` to ensure consistent, low-latency performance.
19+
20+
## Ubuntu/Debian Configuration
21+
22+
If you're using Ubuntu or Debian, you can install `cpufrequtils` and configure the governor:
23+
24+
1. Install cpufrequtils:
25+
26+
```bash
27+
apt update
28+
apt install cpufrequtils
29+
```
30+
31+
2. Edit the configuration file:
32+
33+
```bash
34+
nano /etc/default/cpufrequtils
35+
```
36+
37+
3. Set the governor to performance:
38+
39+
```bash
40+
GOVERNOR="performance"
41+
```
42+
43+
4. Restart the service:
44+
```bash
45+
systemctl restart cpufrequtils
46+
```
47+
48+
## Verification
49+
50+
To verify your current CPU governor settings:
51+
52+
```bash
53+
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
54+
```

0 commit comments

Comments
 (0)