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

Re: libc6's stack size and 1000+ theads

At Tue, 1 Feb 2005 20:21:52 +0100,
Christian Hammers wrote:
> MySQL has some problems with more than 1000 threads as the standard
> libc6 reserves 2MB stack size for each thread which alone consumes most of
> the memory. MySQL suggests to rebuild statically against a local modified
> libc with a stack size of 256kB which is nothing I have much interest in.
> uclibc and diet-libc also seem to be quite a lot work to build against
> (using a chroot/own toolchain) and still guarante no solving of the problem.
> Do you know a better way to use glibc2/libc6? 
> Maybe by setting some obscure environment variable or using LD_PRELOAD
> tricks?

I assume you use i386 architecture.

libc6-i686 was introduced for this purpose.  It used floating stack,
so it didn't reserve 2MB stack in glibc 2.3.2-*.deb series.  However
the current 2.3.2.ds1-*.deb series does not use linuxthreads on i686
optimized library.  Thus, we don't support linuxthreads + floating
stacks currently.

> MySQL does AFAIK not (yet) use NPTL.

I guess MySQL should work with NPTL - because we have not heard any
problems.  If you want to use NPTL, you need to upgrade your kernel 
to 2.6.

-- gotom

Reply to: