Author: wierzba
Date: 23-11-00 15:13
I installed my FreeBSD 4.1.1 on a Pentium 60 box with 16Mb
of memory and 36 Mb of swap, with generic kernel.
Then I wanted to try how
it behaves under a heavy load. I simulated it by compiling
a small program, let's call it "eatmem":
#include<stdlib.h>
#define N 1000000L
static long x[N];
void main() { long i;
for(i=0;i<N;i++)
x=random();}
and I run a shell script:
#!/bin/csh
while(1)
./eatmem
end
It went printing pids of "eatmem" processes up to about
40 and then I got a message:
swap_pager: out of swap space
swap_pager_getswapspace: failed
and it was all. No more disc activity, unable to type
anything except on the first console, where all input
is ignored, no reaction to C-A-D keys.
(kernel responded to magic C-A-Esc keys,
but it it a generic kernel without debugging,
so I could not check what was really going on)
I repeated the same trick on a second disk with
Slackware 3.6 GNU/Linux, kernel 2.0.38
and there I was able to shutdown the machine
with C-A-D keys (after few minutes of waiting,
disc was active swapping all the time).
It looks to me that in case of FreeBSDt
probably a single "eatmem" process took all the CPU time.
wierzba
|
|