Fine tune NetBSD kernel preemption

Submitted by Fekete Zoltán on Tue, 01/24/2017 - 07:13

If you feel little breaks in moving the mouse pointer or any other stuttering on the gui during I/O operations, here is how to tweak kernel preemption to improve user experience in smooth running of the gui.

You have to set two kernel parameters with the help os sysctl(7):

1. kern.sched.kpreempt_pri

Defaults to 128. I have tried 256, and goes well.

2. kern.sched.upreempt_pri

Defaults to 0,. I set up to 64.

Test your results, then read the documentation of the scheduler on the link attached.