context switching pessimizations

From: Bruce Evans <bde_at_zeta.org.au>
Date: Sat, 5 Apr 2003 20:12:17 +1000 (EST)
Recent optimizations of context switching are large pessimizations
according to lmbench2, at least in the default case (no LAZY_SWITCH).

>From lmbench2 output on an AthlonXP-1600 overclocked with no acpi
(so the timecounter is the TSC and doesn't pessimize context switching
all by itself), and no debugging options like INVARIANTS of course:

%%%
Context switching - times in microseconds - smaller is better
-------------------------------------------------------------
Host                 OS 2p/0K 2p/16K 2p/64K 8p/16K 8p/64K 16p/16K 16p/64K
                        ctxsw  ctxsw  ctxsw ctxsw  ctxsw   ctxsw   ctxsw
--------- ------------- ----- ------ ------ ------ ------ ------- -------
besplex.b FreeBSD 4.5-S 0.540 1.1000   11.2 3.3600   82.0 9.22000    82.0
besplex.b FreeBSD 4.7-S 0.610 1.1900   11.3 3.8300   81.8 8.57000    81.7
bes4.bde. FreeBSD 5.0-C 1.020 2.3800   12.5 4.5000   83.8    16.2    84.6
bes4.bde. FreeBSD 5.0-C 1.780 3.7400   12.9 6.2000   87.1    20.8    87.5
bes4.bde. FreeBSD 5.0-C 2.650 3.6000   12.9 6.2900   87.1    19.0    87.5

*Local* Communication latencies in microseconds - smaller is better
-------------------------------------------------------------------
Host                 OS 2p/0K  Pipe AF     UDP  RPC/   TCP  RPC/ TCP
                        ctxsw       UNIX         UDP         TCP conn
--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
besplex.b FreeBSD 4.5-S 0.540 3.222 4.09 8.923  20.2  10.2  28.2
besplex.b FreeBSD 4.7-S 0.610 3.397 4.41 9.216  22.9  10.2  28.0
bes4.bde. FreeBSD 5.0-C 1.020 4.780 5.84  16.5  40.3  17.5  42.0 56.3
bes4.bde. FreeBSD 5.0-C 1.780  10.2 11.9  25.4  46.1  22.8  46.4 64.6
bes4.bde. FreeBSD 5.0-C 2.650  10.2 12.1  23.4  45.5  25.1  46.2 65.3
%%%

The first of each set of bes4's is for -current on Jan 3.  The second is
for today's -current with SCHED_ULE and the third is for today's -current
with SCHED_4BSD.  The other lines are for the indicated versions of stable.

The comm. latency benchmarks use context switching so they are slower
too.  Some of the other benchmarks are slower, but the cause is not as
obvious as for the comm. latency ones.

Bruce
Received on Sat Apr 05 2003 - 00:12:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:02 UTC