# Switched from scheduler ULE to 4BSD



## Alain De Vos (Dec 5, 2021)

I switched from scheduler ULE to 4BSD and while playing youtube & compiling ports on all cores. I don't see a big change.
Currently trying,

```
kern.sched.quantum=10000
kern.sched.ipiwakeup.enabled=0
kern.sched.preemption=0
```
Produces gstreamer errors. But "real-time problems" can be expected. Going back to ULE...
Note, the ULE scheduler has not many tuning parameters available.


----------



## hardworkingnewbie (Dec 5, 2021)

Well here's Kusick's nice 2020 paper about scheduling in the FreeBSD kernel:  https://papers.freebsd.org/2020/BSD...mckusick-Scheduling_in_the_FreeBSD_Kernel.pdf

In general after reading this my expectation is that ULE is more advanced than 4BSD, and especially designed to scale with a lots of CPUs. He cites a benchmark of it against the CFS scheduler from Linux, which there is the default, and it was slightly quicker than CFS. 

One of ULE's design goals also was to give lot latency to interactive threads.


----------



## Alain De Vos (Dec 5, 2021)

I give a nice value when i buid ports.

```
nice -n 20 /usr/local/bin/poudriere bulk  -J 8:8  -j $JAIL -p $PORTS -f $PACKAGES
```
But i had somewhere seen a bug with ULE-scheduler & not honoring enough nice values.


----------

