← Back to team overview

maria-discuss team mailing list archive

Re: doubt with thread pool

 

sorry i sent before writing

the example of a thread that stoped, and is waiting a new "job", in this
case i should consider max connections or thread pool size? i think it's
the second, right?

i never used thread pool with many connection, that's the problem (no
experience), i will try a dev server to test and track the memory use, but
a previous experience is nice :) i didn't found it on google

2015-11-11 13:36 GMT-02:00 Roberto Spadim <roberto@xxxxxxxxxxxxx>:

> hm nice, but check my "problem"
> with one thread per connection, i can think about an estimation with
> max_connections
> with thread pool, what i could do? use the same max_connections or use
> another variable (thread size?), considering that i have a limit of threads
> running (i'm thinking that this one is better, right?)
>
> 2015-11-11 0:49 GMT-02:00 Justin Swanhart <greenlion@xxxxxxxxx>:
>
>> Hi,
>>
>> There is really no formula for predicting MySQL memory size.  There are
>> many factors.  But if your estimate uses max_connections, then use
>> max_connections/threads_in_pool.  That gives you the effective number of
>> queries running at once.  There are some things, like number of temporary
>> tables per connection, that has to use max_connections, because these
>> persist while a connection is not executing SQL in the pool of threads.
>>
>> On Tue, Nov 10, 2015 at 4:25 PM, Roberto Spadim <roberto@xxxxxxxxxxxxx>
>> wrote:
>>
>>> nice , if i have max_connections = thread_pool_size maybe i'm doing a
>>> one thread per connection right?
>>>
>>> other doubt.... about the memory use, i remember when mysqld crash
>>> there's a memory math formula using max_connections, when using thread pool
>>> are there the same memory limit?
>>>
>>> 2015-11-10 16:04 GMT-02:00 Vladislav Vaintroub <vvaintroub@xxxxxxxxx>:
>>>
>>>>
>>>>
>>>> On Tue, Nov 10, 2015 at 6:47 PM, Roberto Spadim <roberto@xxxxxxxxxxxxx>
>>>> wrote:
>>>>
>>>>> i'm with a doubt
>>>>> if i have a thread pool with 1000 threads and a max_connections with
>>>>> 100 connections
>>>>> can i have more than 100 clients connected (1000 threads for example)?
>>>>> dos thread pool size limit the max connections, or max connections limite
>>>>> the thread pol size?
>>>>>
>>>>>
>>>>
>>>> max_connections is the ultimate limit on number of total connections.
>>>> it does not make sense to have thread pool size larger as the max. number
>>>> of connections. thread pool size is something that limits number of
>>>> concurrently running ( executing on CPU rather than waiting) commands. It
>>>> does not make sense to have it larger than max. connections.
>>>>
>>>>> --
>>>>> Roberto Spadim
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~maria-discuss
>>>>> Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~maria-discuss
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>
>>>>>
>>>>
>>>> On Tue, Nov 10, 2015 at 6:47 PM, Roberto Spadim <roberto@xxxxxxxxxxxxx>
>>>> wrote:
>>>>
>>>>> i'm with a doubt
>>>>> if i have a thread pool with 1000 threads and a max_connections with
>>>>> 100 connections
>>>>> can i have more than 100 clients connected (1000 threads for example)?
>>>>> dos thread pool size limit the max connections, or max connections limite
>>>>> the thread pol size?
>>>>>
>>>>> --
>>>>> Roberto Spadim
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~maria-discuss
>>>>> Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~maria-discuss
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Roberto Spadim
>>> SPAEmpresarial - Software ERP
>>> Eng. Automação e Controle
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~maria-discuss
>>> Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~maria-discuss
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
>
> --
> Roberto Spadim
> SPAEmpresarial - Software ERP
> Eng. Automação e Controle
>



-- 
Roberto Spadim
SPAEmpresarial - Software ERP
Eng. Automação e Controle

References