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>
Hi all of You, thank You very much for Your commenting and reports! From what I see, we have (at least) two rather different demands here: while George looks at the over-all speed of compute throughput, others are concerned about interactive response. My own issue is again a little bit different: I am running this small single-CPU machine as my home-office router, and it also runs a backup service, which involves compressing big files and handling an outgrown database (but that does not need to happen fast, as it's just backup stuff). So, my demand is to maintain a good balance between realtime network activity being immediately served, and low-priority batch compute jobs, while still staying responsive to shell-commands - but the over-all compute throughput is not important here. But then, I find it very difficult to devise some metrics, by which such a demand could be properly measured, to get compareable figures. George Mitchell wrote:> 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 >I found that preempt_thresh=0 cannot be used in practice: When I try to do this on my quadcode desktop, and then start four endless-loops to get the cores busy, the (internet)radio will have a dropout every 2-3 seconds (and there is nothing else running, just a sleeping icewm and a mostly sleeping firefox)! So, the (SMP) system *depends* on preemption, it cannot handle streaming data without it. (@George: Your buildworld test is pure batch load, and may not be bothered by this effect.) I think the problem is *not* to be solved by finding a good setting for preempt_thresh (or other tuneables). I think the problem lies deeper, and these tuneables only change its appearance. I have worked out a writeup explaining my thoughts in detail, and I would be glad if You stay tuned and evaluate that. P.
On 04/17/18 19:01, George Mitchell wrote:> On 04/17/18 17:20, EBFE via freebsd-stable wrote: >> [...] >> 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 >I've now done SCHED_ULE runs with preempt_thresh set to 0, 1, 5, 80, and 224. The wall clock time is uniformly in the vicinity of 10 hours. The "time" output is consistent with SCHED_4BSD, but the wall clock time is really what I care about. Now I have set kern.sched.preempt_thresh back to the default of 80 and I am experimenting with kern.sched.interact. I'm pretty sure that setting kern.sched.preempt_thresh is not the answer to my problem. -- 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/20180420/9b937930/attachment.sig>