Subject: Swapping
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: current-users
Date: 10/11/1994 22:41:18
Hi!
Does NetBSD ever swap or is that a forgotten art?
I've been trying to run more things than fit in memory and
I think NetBSD behave in a very suboptimal way. Even when
the free memory goes to 0 it refuses to completely swap
out a process and let the rest of them make progress.
All code that concerns swapping seems to be surrounded by
'#ifdef OMIT' and similar things. This leads me to assume
that swapping is now a lost art. Too bad, performance degrades
incredibly when there isn't enough memory. (I know, I know,
you can buy more memory :-)
Setup: two process each wanting around 10M of memory
running on a 60MHz Pentium with 16M memory, using
NetBSD 1.0_BETA.
Below is an excerpt from 'vmstat 1' and 'vmstat -s'.
*BSD Unix used to be (in the good ole vaxen days) good at handling
more processes than it had memory for.
(FYI, Solaris 2.3 is about as bad as NetBSD at this test
whereas SunOS 4.1.3 does much better (but noot good),
and Dynix does really well.)
-- Lennart
vmstat 1: Notice, the free memory is 0 for a long while.
procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr ?0 ?1 ?2 ?3 in sy cs us sy id
0 9 0 66724 204 2 12 1 61 0 99 0 0 0 0 1 26 6 0 0 100
0 9 0 66724 224 7 1 6 61 0 71 0 0 0 0 1 26 10 0 0 100
0 9 0 66724 336 6 4 5 44 0 79 0 0 0 0 1 26 54 0 0 100
1 3 0 66724 172 430 177 160 76 0 839 0 0 0 0 1 40 114 26 23 51
0 4 0 66724 0 46 1 44 16 0 16 0 0 0 0 1 28 10 5 0 95
0 4 0 66724 0 14 1 12 58 0 69 0 0 0 0 1 28 9 1 0 99
0 4 0 66724 0 5 2 4 56 0 60 0 0 0 0 1 28 9 1 0 99
0 4 0 71500 0 3 1 2 59 0 60 0 0 0 0 1 52 13 0 0 100
1 4 0 80768 0 7 4 6 57 0 65 0 0 0 0 1 32 10 1 0 99
0 6 0 85348 0 4 1 1 60 0 60 0 0 0 0 1 31 13 0 0 100
0 6 0 85348 0 3 1 2 57 0 58 0 0 0 0 1 28 11 0 0 100
0 8 0 85348 0 6 31 9 58 0 98 0 0 0 0 1 28 11 0 1 99
0 7 0 85348 0 6 9 3 339 0 348 0 0 0 0 1 61 38 0 0 100
1 4 0 85348 272 25 7 24 48 0 148 0 0 0 0 1 52 95 1 1 98
vmstat -s: Notice, no swaps.
(I had a quick look in the source and the vm_swpout counter
does not seem to be incremented anywhere.)
1422835 cpu context switches
0 device interrupts
917468 software interrupts
4033376 traps
6138877 system calls
3172220 total faults taken
0 swap ins
0 swap outs
0 pages swapped in
0 pages swapped out
424793 page ins
241135 page outs
348521 pages paged in
237964 pages paged out
831677 pages reactivated
...