Re: Periodic rant about SCHED_ULE
- Reply: George Mitchell : "Re: Periodic rant about SCHED_ULE"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 Mar 2023 20:50:35 UTC
> Yes, you've all heard it before, but I've just reverified on FreeBSD Yes, this is part of our culture: we need this periodic rant every once and again. > 13.1-RELEASE-p7 that SCHED_ULE gives terrible performance for "make > buildworld" in the presence of a totally compute-bound job (misc/dnetc Yes, this is well known, and works-as-designed. The reason is that a totally compute-bound job can only be preempted, it cannot be scheduled. A /mostly/ compute-bound job however does occasional system calls, and at that point it will be scheduled. Then, the design specifics of sched-ULE is that a preempted job will be re-positioned by the scheduler to it's former place, i.e. as said above, it will NOT be scheduled. In other words: it just continues to run until the quantum is empty. And that is the reason why your "totally compute-bound" job gets more compute than the competing one with i/o. You can actually ignore the responses with the naive questions here, because what you observe is what the code says that it has to happen. So, when I ran into this issue many years ago, I just fixed it, and my machines run fine since then. The only problem is: nobody wants the patch. (And no, I don't say that patch would solve all problems, but it did solve mine, and one could start from there.)