On Tue, 17 Apr 2018 09:05:48 -0700 Freddie Cash <fjwcash at gmail.com> wrote:> # Tune for desktop usage > kern.sched.preempt_thresh=224 > > ?Works quite nicely on a 4-core AMD Phenom-II X4 960T Processor > (3010.09-MHz K8-class CPU) running KDE4 using an Nvidia 210 GPU.For interactive tasks, there is a "special" tunable: % sysctl kern.sched.interact kern.sched.interact: 10 # default is 30 % sysctl -d kern.sched.interact kern.sched.interact: Interactivity score threshold reducing the value from 30 to 10-15 keeps your gui/system responsive, even under high load.
On 04/17/18 17:20, EBFE via freebsd-stable wrote:> On Tue, 17 Apr 2018 09:05:48 -0700 > Freddie Cash <fjwcash at gmail.com> wrote: > >> # Tune for desktop usage >> kern.sched.preempt_thresh=224 >> >> ?Works quite nicely on a 4-core AMD Phenom-II X4 960T Processor >> (3010.09-MHz K8-class CPU) running KDE4 using an Nvidia 210 GPU. > > For interactive tasks, there is a "special" tunable: > % sysctl kern.sched.interact > kern.sched.interact: 10 # default is 30 > % sysctl -d kern.sched.interact > kern.sched.interact: Interactivity score threshold > > reducing the value from 30 to 10-15 keeps your gui/system responsive, > even under high load. > [...]I suspect my case (make buildworld while running misc/dnetc) doesn't qualify. However, I just completed a SCHED_ULE run with preempt_thresh set to 5, and "time make buildworld" reports: 7336.748u 677.085s 9:25:19.86 23.6% 27482+473k 42147+431581io 38010pf+0w Much closer to SCHED_4BSD! I'll try preempt_thresh=0 next, and I guess I'll at least try preempt_thresh=224 to see how that works for me. -- George -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20180417/5c5e4a06/attachment.sig>
EBFE via freebsd-stable wrote:> On Tue, 17 Apr 2018 09:05:48 -0700 > Freddie Cash <fjwcash at gmail.com> wrote: > >> # Tune for desktop usage >> kern.sched.preempt_thresh=224 >> >> ?Works quite nicely on a 4-core AMD Phenom-II X4 960T Processor >> (3010.09-MHz K8-class CPU) running KDE4 using an Nvidia 210 GPU. > > For interactive tasks, there is a "special" tunable: > % sysctl kern.sched.interact > kern.sched.interact: 10 # default is 30 > % sysctl -d kern.sched.interact > kern.sched.interact: Interactivity score threshold > > reducing the value from 30 to 10-15 keeps your gui/system responsive, > even under high load.Yes, this may improve the "irresponsive-desktop" problem. Because threads that are scored interactive, are run as realtime threads, ahead of all regular workload queues. But it will likely not solve the problem described by George, having two competing batch jobs. And for my problem as described at the beginning of the thread, I could probably tune so far that my "worker" thread would be considered interactive, but then it would just toggle between realtime and timesharing queues - and while this may make things better, it will probably not lead to a smooth system behaviour. P.