You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/irq-tuning-guide/patterns.md
+17-21Lines changed: 17 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,26 +14,26 @@ Network interrupt requests (IRQs) can be distributed across CPU cores in various
14
14
15
15
The following patterns have been tested on various systems and can be implemented using the provided scripts. An optimal pattern is suggested at the conclusion of this Learning Path, but your specific workload may benefit from a different approach.
16
16
17
-
### Patterns
17
+
##Common IRQ distribution patterns
18
18
19
-
1. Default: IRQ pattern provided at boot.
20
-
2. Random: All IRQs are assigned a core and do not overlap with network IRQs.
21
-
3. Housekeeping: All IRQs outside of network IRQs are assigned to specific core(s).
22
-
4. NIC IRQs are assigned to single or multiple ranges of cores, including pairs.
19
+
Four main distribution strategies offer different performance characteristics:
23
20
24
-
### Scripts to change IRQ
21
+
Default: uses the IRQ pattern provided at boot time by the Linux kernel
22
+
Random: assigns all IRQs to cores without overlap with network IRQs
23
+
Housekeeping: assigns all non-network IRQs to specific dedicated cores
24
+
NIC-focused: assigns network IRQs to single or multiple ranges of cores, including pairs
25
+
26
+
## Scripts to implement IRQ management patterns
25
27
26
28
The scripts below demonstrate how to implement different IRQ management patterns on your system. Each script targets a specific distribution strategy:
27
29
28
30
Before running these scripts, identify your network interface name using `ip link show` and determine your system's CPU topology with `lscpu`. Always test these changes in a non-production environment first, as improper IRQ assignment can impact system stability.
29
31
30
-
To change the NIC IRQs or IRQs in general you can use the following scripts.
31
-
32
-
### Housekeeping
32
+
## Housekeeping pattern
33
33
34
-
The housekeeping pattern isolates non-network IRQs to dedicated cores.
34
+
The housekeeping pattern isolates non-network IRQs to dedicated cores, reducing interference with your primary workloads.
35
35
36
-
You need to add more to account for other IRQs on your system.
36
+
Replace `#core range here` with your desired CPU range (for example: "0,3"):
37
37
38
38
```bash
39
39
HOUSEKEEP=#core range here (example: "0,3")
@@ -43,13 +43,11 @@ for irq in $(awk '/ACPI:Ged/ {sub(":","",$1); print $1}' /proc/interrupts); do
43
43
done
44
44
```
45
45
46
-
### Paired core
46
+
### Paired core pattern
47
47
48
-
The paired core assignment pattern distributes network IRQs across CPU core pairs for better cache coherency.
48
+
The paired core assignment pattern distributes network IRQs across CPU core pairs for better cache coherency.
49
49
50
-
This is for pairs on a 16 vCPU machine.
51
-
52
-
You need to add the interface name.
50
+
This example works for a 16 vCPU machine. Replace `#interface name` with your network interface (for example: "ens5"):
53
51
54
52
```bash
55
53
IFACE=#interface name (example: "ens5")
@@ -68,13 +66,11 @@ for irq in "${irqs[@]}"; do
68
66
done
69
67
```
70
68
71
-
### Range assignment
72
-
73
-
The range assignment pattern assigns network IRQs to a specific range of cores.
69
+
### Range assignment pattern
74
70
75
-
This will assign a specific core(s) to NIC IRQs only.
71
+
The range assignment pattern assigns network IRQs to a specific range of cores, providing dedicated network processing capacity.
76
72
77
-
You need to add the interface name.
73
+
Replace `#interface name` with your network interface (for example: "ens5"):
0 commit comments