Michael Bacarella wrote:
Does Red Hat have some kind of userland address space hack that
we're not aware of?

Do you have any special kernel config options that you did not use before?


the thread stacks are 2MB apiece (bf601000-bf800000 is
2093056 bytes, or 2044kB)!  Yet:

# mysql -e 'show variables' | grep thread_stack
thread_stack    196608

It seems like the setting does nothing for us.  We top out at
exactly 256 threads.


Ok, that's the problem. Thread stack on older glibc versions is hard-coded. Newer versions (at least 2.3.2) will have a truly adjustable stack size if it is compiled with FLOATING_STACKS defined, which is off by default. One possibility is that the MySQL build team moved to linking against glibc 2.3.2, but did not enable floating stacks in it. Maybe Lenz can comment on it.


We wrote a wrapper with LD_PRELOAD.  When mysqld does
pthread_attr_setstacksize() we translate it into an anonymous mmap()
and use pthread_attr_setstackaddr() instead.  It's the equivalent
of FLOATING_STACKS. ;)

Our mysqld (which is running as slave) will seg fault if we set
the thread_stack to 256k.  Running it with thread_stack set to 2MB
works flawlessly (that is until we allocate 256 threads).

mysql 3.23.58 doesn't like <2MB thread stacks in our environment.

Is this normal?

I suspect you have a bug in your wrapper somewhere. Note that you delegate the stack creation at 2MB or higher to the regular pthread_attr_setstacksize()



-- Sasha Pachev Create online surveys at http://www.surveyz.com/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to