On Sun, Sep 22, 2002 at 01:36:49AM +0300, cristian ditoiu wrote:
> I saw the using show status smth like Threads_cached .
> I searched the mysql site with no luck , finding just a simple explanation
> like : Number of threads in the thread cache.
> That wasn't very .. explainng , so searching further i found how to enable
> the thread cache , using
> set-variable=thread_cache_size=4 .
> So i'd like to know how the thread cache working .

My guess is:

MySQL seems to start a separate thread for each concurrent query and
the thread exits when the query completes.

Creating a thread often involves an expensive system call.
The thread cache instructs MySQL to keep N threads around,
even if they're not actively running queries, thereby eliminating
thread creation overhead.

Setting this value higher had a noticeable effect for me.
Results may vary.

-- 
Michael Bacarella  | Netgraft Corp
                   | 545 Eighth Ave #401
 Systems Analysis  | New York, NY 10018
Technical Support  | 212 946-1038 | 917 670-6982
 Managed Services  | http://netgraft.com/


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to