"./start -t 2" does not start 2 but 4 threads
Hi all, I use Zope-2.6.2-linux2-x86 on RedHat-Linux7.2. When I want to start Zope with only 2 threads (I want to reduce the memory usage), 4 threads are started: $ pstree -a -c freifunk python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 2 `-python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 2 `-python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 2 |-python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 2 `-python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 2 (Yes, that are 5 not 4 processes, but only the last 4 consume a lot of memory [about 64MB]): PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 16284 freifunk 9 0 66124 64M 2216 S 0.0 7.3 3:07 python 16290 freifunk 9 0 66124 64M 2216 S 0.0 7.3 0:00 python 16291 freifunk 9 0 66124 64M 2216 S 0.0 7.3 72:00 python 16292 freifunk 18 0 66124 64M 2216 S 2.9 7.3 82:45 python Do I start it with "-t 3" then 5 threads are started: $ pstree -a -c freifunk python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 3 `-python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 3 `-python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 3 |-python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 3 |-python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 3 `-python) /home/www.freifunk.net/Zope-2.6.2-linux2-x86/z2.py -t 3 There always seem to be 2 more threads started then I want (4 instead of 2, 5 instead of 3). Is this normal behaviour or a bug? Best regards, Jens
Jens Nachtigall wrote at 2004-8-28 13:53 +0200:
I use Zope-2.6.2-linux2-x86 on RedHat-Linux7.2. When I want to start Zope with only 2 threads (I want to reduce the memory usage), 4 threads are started:
"-t 2" means 2 worker threads. There is also the main (ZServer) thread. Furthermore, the "libpthread" library activates an additional thread that it uses internally to help create and delete additional threads. -- Dieter
participants (2)
-
Dieter Maurer -
Jens Nachtigall