kern.sched.preemp_tresh

Hi!

I have long time in /etc/sysctl.conf kern.sched.preemp_thresh=224 but on 15-REELEASE-p1 doesn't works anymore.

Code:
 sysctl kern.sched.preemp_thresh
sysctl: unknown oid 'kern.sched.preemp_thresh'

Is it something with my system or it is removed.

Thank you.
 
Since 15.1 you can choose between the ULE and 4BSD scheduler, so that sysctl MIB was renamed accordingly; now it's kern.sched.ule.preempt_thresh or kern.sched.4bsd.preempt_thresh, depending on which scheduler you prefer.

EDIT. Corrected mispelling.
 
I used this for years as well

Code:
kern.sched.preempt_thresh=224

And noticed it disappeared in Freebsd 15

fernandel and Manix missed the t from preemp_thresh

it should be

Code:
kern.sched.preempt_thresh=224

and not

Code:
kern.sched.preemp_thresh=224

also this is wrong

Code:
sysctl kern.sched.ule.preemp_thresh

it should be

Code:
sysctl kern.sched.ule.preempt_thresh

which on my system outputs

Code:
kern.sched.ule.preempt_thresh: 40

And this doesnt exist for me

Code:
kern.sched.4bsd.preempt_thresh

This is the full output kern.sched

Code:
[i] Yes Master ? sysctl kern.sched
kern.sched.ule.always_steal: 0
kern.sched.ule.trysteal_limit: 2
kern.sched.ule.steal_thresh: 2
kern.sched.ule.steal_idle: 1
kern.sched.ule.balance_interval: 127
kern.sched.ule.balance: 1
kern.sched.ule.affinity: 1
kern.sched.ule.idlespinthresh: 157
kern.sched.ule.idlespins: 10000
kern.sched.ule.static_boost: 115
kern.sched.ule.preempt_thresh: 40
kern.sched.ule.interact: 30
kern.sched.ule.slice: 12
kern.sched.ule.quantum: 94488
kern.sched.topology_spec: <groups>
 <group level="1" cache-level="3">
  <cpu count="12" mask="fff,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11</cpu>
  <children>
   <group level="2" cache-level="2">
    <cpu count="2" mask="3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">0, 1</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="c,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">2, 3</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">4, 5</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">6, 7</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">8, 9</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="c00,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">10, 11</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
  </children>
 </group>
</groups>

kern.sched.available: 4BSD,ULE
kern.sched.name: ULE
kern.sched.4bsd.runq_fuzz: 1
kern.sched.4bsd.ipiwakeup.useloop: 0
kern.sched.4bsd.ipiwakeup.usemask: 1
kern.sched.4bsd.ipiwakeup.delivered: 0
kern.sched.4bsd.ipiwakeup.requested: 0
kern.sched.4bsd.ipiwakeup.enabled: 1
kern.sched.4bsd.slice: 12
kern.sched.4bsd.quantum: 94488
kern.sched.preemption: 1
kern.sched.cpusetsizemin: 2
kern.sched.cpusetsize: 128

So after some digging around it looks

this is the new code you should use

Code:
kern.sched.ule.preempt_thresh=224

as a replacement for the old code

Code:
kern.sched.preempt_thresh=224

which should be added to

Code:
 /etc/sysctl.conf

some one correct me if im wrong
 
I used this for years as well

Code:
kern.sched.preempt_thresh=224

And noticed it disappeared in Freebsd 15

fernandel and Manix missed the t from preemp_thresh

it should be

Code:
kern.sched.preempt_thresh=224

and not

Code:
kern.sched.preemp_thresh=224

also this is wrong

Code:
sysctl kern.sched.ule.preemp_thresh

it should be

Code:
sysctl kern.sched.ule.preempt_thresh

which on my system outputs

Code:
kern.sched.ule.preempt_thresh: 40

And this doesnt exist for me

Code:
kern.sched.4bsd.preempt_thresh

This is the full output kern.sched

Code:
[i] Yes Master ? sysctl kern.sched
kern.sched.ule.always_steal: 0
kern.sched.ule.trysteal_limit: 2
kern.sched.ule.steal_thresh: 2
kern.sched.ule.steal_idle: 1
kern.sched.ule.balance_interval: 127
kern.sched.ule.balance: 1
kern.sched.ule.affinity: 1
kern.sched.ule.idlespinthresh: 157
kern.sched.ule.idlespins: 10000
kern.sched.ule.static_boost: 115
kern.sched.ule.preempt_thresh: 40
kern.sched.ule.interact: 30
kern.sched.ule.slice: 12
kern.sched.ule.quantum: 94488
kern.sched.topology_spec: <groups>
 <group level="1" cache-level="3">
  <cpu count="12" mask="fff,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11</cpu>
  <children>
   <group level="2" cache-level="2">
    <cpu count="2" mask="3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">0, 1</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="c,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">2, 3</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">4, 5</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">6, 7</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">8, 9</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="c00,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">10, 11</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
  </children>
 </group>
</groups>

kern.sched.available: 4BSD,ULE
kern.sched.name: ULE
kern.sched.4bsd.runq_fuzz: 1
kern.sched.4bsd.ipiwakeup.useloop: 0
kern.sched.4bsd.ipiwakeup.usemask: 1
kern.sched.4bsd.ipiwakeup.delivered: 0
kern.sched.4bsd.ipiwakeup.requested: 0
kern.sched.4bsd.ipiwakeup.enabled: 1
kern.sched.4bsd.slice: 12
kern.sched.4bsd.quantum: 94488
kern.sched.preemption: 1
kern.sched.cpusetsizemin: 2
kern.sched.cpusetsize: 128

So after some digging around it looks

this is the new code you should use

Code:
kern.sched.ule.preempt_thresh=224

as a replacement for the old code

Code:
kern.sched.preempt_thresh=224

which should be added to

Code:
 /etc/sysctl.conf

some one correct me if im wrong
D'oh! That's what happens when carelessly using copy/paste! 😅
Thank you for the correction. 🙂
 
I used this for years as well

Code:
kern.sched.preempt_thresh=224

And noticed it disappeared in Freebsd 15

fernandel and Manix missed the t from preemp_thresh

it should be

Code:
kern.sched.preempt_thresh=224

and not

Code:
kern.sched.preemp_thresh=224

also this is wrong

Code:
sysctl kern.sched.ule.preemp_thresh

it should be

Code:
sysctl kern.sched.ule.preempt_thresh

which on my system outputs

Code:
kern.sched.ule.preempt_thresh: 40

And this doesnt exist for me

Code:
kern.sched.4bsd.preempt_thresh

This is the full output kern.sched

Code:
[i] Yes Master ? sysctl kern.sched
kern.sched.ule.always_steal: 0
kern.sched.ule.trysteal_limit: 2
kern.sched.ule.steal_thresh: 2
kern.sched.ule.steal_idle: 1
kern.sched.ule.balance_interval: 127
kern.sched.ule.balance: 1
kern.sched.ule.affinity: 1
kern.sched.ule.idlespinthresh: 157
kern.sched.ule.idlespins: 10000
kern.sched.ule.static_boost: 115
kern.sched.ule.preempt_thresh: 40
kern.sched.ule.interact: 30
kern.sched.ule.slice: 12
kern.sched.ule.quantum: 94488
kern.sched.topology_spec: <groups>
 <group level="1" cache-level="3">
  <cpu count="12" mask="fff,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11</cpu>
  <children>
   <group level="2" cache-level="2">
    <cpu count="2" mask="3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">0, 1</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="c,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">2, 3</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">4, 5</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">6, 7</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">8, 9</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
   <group level="2" cache-level="2">
    <cpu count="2" mask="c00,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">10, 11</cpu>
    <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
   </group>
  </children>
 </group>
</groups>

kern.sched.available: 4BSD,ULE
kern.sched.name: ULE
kern.sched.4bsd.runq_fuzz: 1
kern.sched.4bsd.ipiwakeup.useloop: 0
kern.sched.4bsd.ipiwakeup.usemask: 1
kern.sched.4bsd.ipiwakeup.delivered: 0
kern.sched.4bsd.ipiwakeup.requested: 0
kern.sched.4bsd.ipiwakeup.enabled: 1
kern.sched.4bsd.slice: 12
kern.sched.4bsd.quantum: 94488
kern.sched.preemption: 1
kern.sched.cpusetsizemin: 2
kern.sched.cpusetsize: 128

So after some digging around it looks

this is the new code you should use

Code:
kern.sched.ule.preempt_thresh=224

as a replacement for the old code

Code:
kern.sched.preempt_thresh=224

which should be added to

Code:
 /etc/sysctl.conf

some one correct me if im wrong
It was copy/paste...sorry
 
No problem mate happens to all of us

So to recap it looks like this is the new code

Code:
kern.sched.ule.preempt_thresh=224

for the old code

Code:
kern.sched.preempt_thresh=224

and this doesnt seem to exist

Code:
kern.sched.4bsd.preempt_thresh

I think we need SirDice to confirm that
or if he's not about Sir David Beckham instead
 
No problem mate happens to all of us

So to recap it looks like this is the new code

Code:
kern.sched.ule.preempt_thresh=224

for the old code

Code:
kern.sched.preempt_thresh=224

and this doesnt seem to exist

Code:
kern.sched.4bsd.preempt_thresh

I think we need SirDice to confirm that
or if he's not about Sir David Beckham instead
:beer:

Yes, it works.
 
Back
Top