This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re[2]: DLOPEN and Statically linked executable


Hello Jakub,

Friday, June 21, 2002, 2:42:03 PM, you wrote:
>> The question is not in having some special static thread stack size by
>> default, but rather possibility to dynamically select it.  Currently
>> even if you set thread stack to smaller value it will still be
>> allocated on 2M boundaries not allowing to have that much number of
>> threads.

JJ> Which is not true, as has been mentioned several times.
JJ> You can set default thread size with setrlimit(RLIMIT_STACK, XXX); before
JJ> first pthread_create as well as using pthread attributes on a thread
JJ> by thread basis (unless you are on PPC, m68k or unless you have old kernel on
JJ> IA-32).

The old kernel is enough. We need our MySQL distribution to work as
well as possible, not forcing clients to upgrade.  Unfortunately there
is quite high number of people using 2.2.x kernels still.

>> Also I would not agree about such architecture.  Thread-per client
>> architecture is quite convenient for many applications.   Not only

JJ> It may be convenient, but it also means you don't care
JJ> at all about wasting system resources (every thread currently eats some
JJ> unswappable kernel stack, its userland stack, etc.). Also, on IA-32 there
JJ> is hardware limitation that you can have only up to 8192 threads
JJ> in one application (though glibc limits this to 1024 threads normally).

User stack is the only not avoidable limitation here, thus as you can
select it size and  there are some application level data stored per
thread it is not real issue. Other limit is just thread implementation
limits which you can avoid more or less. The examples to avoid kernel
multiple ok kernel stack allocated is - user level threading or  mixed
level threading (Solaris implementation).






-- 
For technical support contracts, visit https://order.mysql.com/?ref=mpza
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Peter Zaitsev <peter@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
/_/  /_/\_, /___/\___\_\___/   Moscow, Russia
       <___/   www.mysql.com   M: +7 095 725 4955


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]