kernel - Greatly reduce usched_bsd4_decay default
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 10 Feb 2011 21:15:51 +0000 (13:15 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 10 Feb 2011 21:15:51 +0000 (13:15 -0800)
commit5c559233582a8c95893c37a28c5c9798afebe3dc
tree82e929aa0c71a6c9cbe7df2cc2879f593896c8e6
parent526fce4d2d2ce75e17fa89715624fe1e7349cc05
kernel - Greatly reduce usched_bsd4_decay default

* Reduce the usched_bsd4_decay default to 1.  It may be removed entirely
  in the future.

* This improves the dynamic priority handling by reducing ad-hoc estcpu
  decreases from the 1-second interval clock.  The tsleep code handles
  this a lot better already and the ad-hoc decreases don't do a good job
  handling the case where there are a very large number of runnable
  cpu-bound processes (because they don't actually get a lot of cpu but
  still eat a large proportion of the scheduled time in aggregate).

  Tested with blogbench during stage 1.  Prior to this fix the 100+ blogbench
  threads were being dropped down to almost realtime priorities even though
  they remained in a 100% 'R'un state.

* Also reduce the amount the parent process of a fork() is docked for cpu
  due to the fork.  The value was high enough that interactive sessions were
  being pushed up to batch priorities with only a moderate number of forks
  and not decaying quickly enough to stabilize.

  The child process is docked the same as before (handling the fork chaining
  case).

  Tested with blogbench and parallel makes of /usr/src/lib/libc.  The
  blogbench uniformly increases to batch priority and didn't need the
  higher boost the old values gave it while the parallel compile's fork
  chaining gave it a good shove towards batch priority while the repeated
  forks slowly pushed the higher level make and /bin/sh's to more batch-like
  priorities.
sys/kern/usched_bsd4.c