Re: findind max number of processes systemwide

dhilipkumarg_at_gmail.com
Date: 10/04/05


Date: 4 Oct 2005 02:54:13 -0700


Peter T. Breuer wrote:
> dhilipkumarg@gmail.com wrote:
> >> I forgot to mention what is quoted there:
> >>
> >> % cat /proc/sys/kernel/threads-max
> >> 4087
> >>
> >> (on my puny sysem).
>
> > Thanks for your help.
> > I am sure that ulimit is set to unlimited. Also I have tried "% cat
> > /proc/sys/kernel/threads-max", I am getting 2048 as output.
>
> Then write it to something else or up your RAM. Your number indicates
> a >32MB system (thread structs are 8K each, I think, and the kernel
> limits them to half RAM, so your 2K structs are 16MB). You may be able
> to up the value if you really do have more RAM than 32MB. My reading
> of the code indicates that half ram is an absolute max, not a dynamic
> max.
>
> > What exactly I wants is, how can I get the maximum number of processes
> > that can be run in a system(not by a single user, but by all users
> > sumed together).
>
> That's the number given. ulimit gives the single user limit. In my
> case it is 2043:
>
> % limit
> cputime unlimited
> filesize unlimited
> datasize unlimited
> stacksize 2040 kbytes
> coredumpsize 0 kbytes
> memoryuse unlimited
> descriptors 1024
> memorylocked unlimited
> maxproc 2043
> ^^^^
> openfiles 1024
> %
>
> > It may be depend on the memory in my system, but how
> > can I get the value?
>
> You already have it. Can you tell me what you are missing?
>
> Peter

Thanks for your concern.
So you are saying, the maximum number of processes that can be run in
my system is directly related to the total amount of memory in my
system. But I think this is not true, just check this lines,

# cat /proc/sys/kernel/threads-max
32764
# echo 100000 > /proc/sys/kernel/threads-max
# cat /proc/sys/kernel/threads-max
100000
# gdb -q vmlinux /proc/kcore
Core was generated by `BOOT_IMAGE=240ac18 ro root=306
video=matrox:vesa:0x118'.
#0 0x0 in ?? ()
(gdb) p max_threads
$1 = 100000

These lines means to say that it depends on the value in the file
/proc/sys/kernel/threads-max.

I am confused after seeing this two contradictions. Will you please
help me out.

Thanks,
Dhilip



Relevant Pages

  • Re: SQL Express vs. Jet
    ... Peter Götz wrote: ... RAM oder CPU? ... > SQL-Server stelle ich bei einem Programm zur Messdatenerfassung fest. ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Re: I dropped from 3.5GB of RAM to 2.5GB and 4GL quit working
    ... decided to move 1GB of RAM from our db server and put it into our mail ... pulled out 512MB sticks of RAM. ... No changes to any configuration files, OS, or Informix. ... I'll try gdb. ...
    (comp.databases.informix)
  • panic: kmem_malloc(4096): kmem_map too small
    ... The machine is an old 300MHz Celeron with 64M Ram. ... GNU gdb 5.2.1 ... Copyright 2002 Free Software Foundation, ... panic: free locked buf ...
    (freebsd-current)
  • Re: Lange Bootzteit
    ... > Peter Addor wrote: ... Mit 512 MB RAM war er bedeutend schneller. ... Prev by Date: ... Next by Date: ...
    (microsoft.public.de.german.windowsxp.setup)
  • Re: Problems Increasing RAM
    ... Peter ... When you have 3 slots for RAM then the 1st ... > Please reply to newsgroup for the benefit of others. ... >> Crucial support isn't open and I can't find what we need on their web ...
    (microsoft.public.windowsxp.general)