Shapers in Linux
From NuclearCat's homepage
HZ or HRTICKS mode
- Your kernel must have option CONFIG_HIGH_RES_TIMERS=y
- Prefferable(or mandatory? not sure) also to have CONFIG_NO_HZ=y
- If your kernel works in HRTICKS mode you will see:
Switched to high resolution mode on CPU 0
In case of failure, you can see
Could not switch to high resolution mode on CPU 0
If it is failed, you will run in HZ mode.
cat /proc/net/psched
# cat /proc/net/psched 000003e8 00000400 000f4240 000003e8
0x3e8 - means 1/1000 sec resolution, not hrtick.
Router-Dora ~ # cat /proc/net/psched 000003e8 00000400 000f4240 3b9aca00
Means 0x3b9aca00 = 1/1000000000 sec resolution. Hrtimer. Thats what we need!
- In HZ mode - HZ matter. 100 HZ will have much worse precision than 1000 HZ.
- In HRTICKS mode HZ PROBABLY matter. I'm still researching this.
- With 100 Hz imprecision can be +-5%. 1000 Hz - around 1-0.5%
