What schedtool is good for
- Changing scheduling policy (SCHED_FIFO, SCHED_RR, SCHED_OTHER)
- Adjusting real-time priorities
- Inspecting process scheduling attributes
- Fine-tuning performance workloads
Improper real-time priority settings can make a system unresponsive. Use caution with SCHED_FIFO and SCHED_RR.
10 Practical Examples
1) Show scheduling info for PID
2) Set SCHED_FIFO policy
sudo schedtool -F -p 50 1234
3) Set SCHED_RR policy
sudo schedtool -R -p 60 1234
4) Set normal scheduling (SCHED_OTHER)
5) Launch command with FIFO priority
sudo schedtool -F -p 40 command
6) Launch command with RR policy
sudo schedtool -R -p 70 command
7) Check scheduling for service
pidof nginx | xargs schedtool
8) Combine with taskset
taskset -c 0 sudo schedtool -F -p 80 command
9) Lower priority example
sudo schedtool -R -p 10 1234
10) Compare with chrt
chrt -p 1234
schedtool 1234