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: [libc-alpha] Mysql and their patches to LinuxThread


On Mon, 3 Dec 2001, Yusuf Goolamabbas wrote:

> Date: Mon, 3 Dec 2001 13:18:09 +0800
> From: Yusuf Goolamabbas <yusufg@outblaze.com>
> To: libc-alpha@sources.redhat.com
> Cc: monty@mysql.com, sascha@mysql.com
> Subject: [libc-alpha] Mysql and their patches to LinuxThread
> 
> Hi, I came across this web page at mysql.com which suggests that
> Linuxthreads be patched in a certain way for mysql to be optimal in
> performance under high load
> 
> http://www.mysql.com/doc/L/i/Linux.html
> 
> http://www.mysql.com/Downloads/Linux/linuxthreads-2.2.2.patch

The MAX_ADAPTIVE_SPIN_COUNT part of the patch is already in CVS. I
think 100 is a little low, by the way.

As far as making the stacks smaller so you can cram more threads into
the address space; I don't agree with this at all.

A 128 kilobyte stack is risky; you never know when someone is going
to do some deep recursion or use variable length arrays or alloca()
or whatever.  UNIX programmers are accustomed to abusing stacks, which
likely carries over into threaded programming.  There may be programs
out there which depend on the 2 megabyte stack space that LinuxThreads
provides; you can't just suddenly sneak in a change that shrinks the
stack by a factor of 16.

If you want user-defined stacks, the support is there.

The library should be the last place to do MySQL-specific optimizations;
by doing that you are saying that there is no work left to be done
in the application, because it does everything perfectly. When I hear
about large numbers of connections requiring large numbers of threads,
I don't exactly have that impression.  Why is that the case? Is a new
thread dedicated to each new connection?


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