The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 how to hang FreeBSD
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


Reply To This Message
 
 RE: how to ha
Author: HUB 
Date:   29-11-00 19:29

1: this was just my attempt at doing dialog
:23456789 123456789 123456789 123456789 1234?____ 123456789 123456789
I gues I ?10 should 20 be more30 clear 40
November 29, 2000 9:31 A.M. PST JD2451878
5: end of test: thank you all:

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org