Re: stress testing and loadavg

David S. Miller (davem@jenolan.rutgers.edu)
Sun, 3 Aug 1997 02:23:35 -0400


Date: Sun, 3 Aug 1997 07:55:48 +0200 (MET DST)
From: "Michael L. Galbraith" <mikeg@weiden.de>

What loadavg can a guy reasonably expect his system to handle? I
keep pushing until it either turns into a paperweight or goes
ballistic.. where should I draw the line?

I've gotten some machines past a load of say 300 or 400, and still saw
work getting done. I've hit past 600 (after changing NR_TASKS in
task.h first of course), but it took 15 minutes to get a shell prompt
back after that, and only an hour later could I get the machine back
to a usable state (but it _did_ survive, and I could cleanly reboot
it).

The problem is that our scheduler is linear, ie. nr_running ==
complexity of the task selection, every single task switch. 8-(

Here is a fun program, I fire off 50 or 60 of these when stress
testing sparc64/SMP lately. Run a bunch of these, a 'top d 0' in
an xterm, and a 'make -j' in another window. That should make
interesting things happen, especially under SMP.

int main(void)
{
int pid;

while(1) {
switch (pid = fork()) {
case -1:
exit(1);
case 0:
exit(1);
default:
while(wait(0) != pid)
;
};
}
return 0;
}