I’m currently working on optimizing the response time for real-time threads on my Linux machine. I have identified a few parameters that might be adjusted:
sched_rr_timeslice_ms
HZ
sched_latency_ns
sched_min_granularity_ns
Before making any changes, I want to ensure that my approach makes sense. Therefore, I would like to know:
Are these parameters the right knobs to turn to improve the response time for real-time threads?
Are there other parameters or settings I should also consider?
What are the specific impacts of modifying these parameters on the real-time behavior of the system?
For context: I’m using the kernel 6.1, and the real-time threads are time-critical. Overhead and power consumption are not a concern for me at this point. I have lost track of many changes over the recent kernel releases, so any advice or best practices would be greatly appreciated!I am aware that nice and priority settings also make a difference, but I am specifically looking into kernel parameters for this query.I should also mention that I have limited experience with kernel tweaking.
Thank you in advance!
So far, I have read through the kernel documentation and various online forums to understand the parameters that might impact real-time performance. I have identified sched_rr_timeslice_ms, HZ, sched_latency_ns, and sched_min_granularity_ns as potential candidates. However, I have not made any modifications yet because the system is currently live and I wanted to gather more information before proceeding.
user26102897 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.