Re: Maximum number of processes in Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 16 August 2006 11:01, Helge Hafting wrote:
> linux-os (Dick Johnson) wrote:
> > Yep....
> >
> > #include <stdio.h>
> > #include <signal.h>
> > int main()
> > {
> >      unsigned long i;
> >      for(i = 0; ; i++)
> >      {
> >          switch(fork())
> >          {
> >          case 0:		// kid
> >  	pause();
> >          break;
> >          case -1:	// Failed
> >          printf("%lu\n", i);
> >              kill(0, SIGTERM);
> >              exit(0);
> >          default:
> >              break;
> >          }
> >      }
> >      return 0;
> > }
> >
> > Shows a consistent 6140.
>
> Doesn't work here.  Without ulimit, I wasn't surprised
> about the resulting OOM mess.
>
> Problem was, it never stopped.  I expected OOM to kill
> this program, and quite possibly lots of other running programs
> as well.  What I got, was ever-rolling OOM messages
> with stack traces inbetween.
> 2.6.18-rc4-mm1 never recovered and had to be killed by sysrq.

It took 4.5 minutes to recover on my X2 3800+, 2GB RAM, 512MB swap, when I 
tried without ulimit on 2.6.18-rc4. However, the OOM killer did call all of 
the offending processes and I was able to use the machine for many hours 
afterwards. The VM didn't even mind after a swapoff -a.

Maybe an -mm patch?

-- 
Cheers,
Alistair.

Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux