Subject: Re: hanging processes
To: None <jonathan@DSG.Stanford.EDU, port-pmax@NetBSD.ORG>
From: Arne Henrik Juul <arnej@phys.unit.no>
List: port-pmax
Date: 05/11/1995 19:03:18
 > >> An unrelated problem: Some times inetd will (seemingly) stop working.
 > >> The console works fine (running a make, probably) but telnet/ftp etc
 > >> will get 'Connected to' etc but nothing more. Anyone else see this?
 > 
 > I used to see this, and I found it was cured by turning off read-
 > and write-clustering -- either via sysctl in rc.local, or (more permanently,
 > modulo sup updates) by hacking the kernel source. I don't recall
 > seeing it since, either on a machine *with* swap space, or  one without.
 > (Both have 32 Mbytes of memory.)

I've put it into one of the rc files:
	sysctl -w debug.doclusterread=0
	sysctl -w debug.doclusterwrite=0
and I have the subjective impression that it doesn't hang as often,
but it still does from time to time. This on a DS3100 with 16M
ram.  It seems that heavy paging activity will provoke it -
try running this program:

#define MEG   5
#define KB    (MEG << 10)
#define BYTES (KB << 10)

int main()
{
  char *buf;
  int i;

  buf = malloc(BYTES);
  for (i=0; i< KB; i++) {
    buf[i << 10] = i&0xff;
  }
  sleep(1000000);
  exit(0);
}

last time I tried running this a couple of times, the system hung
solid.  With more RAM increase MEG or run more simultaneously.

 - Arne H. J.