|
Home > Archive > MySQL ODBC Connector > August 2005 > Per-thread memory use question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Per-thread memory use question
|
|
| Pete Harlan 2005-08-25, 8:24 pm |
| Hi,
This formula shows up in a few places (this is from
<http://dev.mysql.com/books/hpmysql-excerpts/ch06.html> ):
min_memory_needed = global_buffers + (thread_buffers * max_connections)
where thread_buffers includes the following:
sort_buffer
myisam_sort_buffer
read_buffer
join_buffer
read_rnd_buffer
My question is, once one of the buffers (e.g., sort_buffer) is needed
by a thread, does the thread hold onto it in case it needs it again,
or does the thread free it as soon as it can? I'm using 4.1.13.
I'm trying to figure out an optimum value for max_connections. If the
threads don't release their memory, then I really do have to account
for the fact that each thread over time will probably be holding each
of those buffers. If threads give up the memory as soon as the, e.g.,
sort, is finished, then I only have to figure out how many threads are
likely to need a sort_buffer at any given time.
I looked through the manual, various online documentation, and the
source, but haven't been able to determine an answer.
Thanks,
--
Pete Harlan
harlan@artselect.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw
| |
| Gleb Paharenko 2005-08-26, 7:23 am |
| Hello.
Have a look here:
http://dev.mysql.com/doc/mysql/en/memory-use.html
Pete Harlan <harlan@artselect.com> wrote:
> Hi,
>
> This formula shows up in a few places (this is from
> <http://dev.mysql.com/books/hpmysql-excerpts/ch06.html> ):
>
> min_memory_needed = global_buffers + (thread_buffers * max_connections)
>
> where thread_buffers includes the following:
>
> sort_buffer
> myisam_sort_buffer
> read_buffer
> join_buffer
> read_rnd_buffer
>
> My question is, once one of the buffers (e.g., sort_buffer) is needed
> by a thread, does the thread hold onto it in case it needs it again,
> or does the thread free it as soon as it can? I'm using 4.1.13.
>
> I'm trying to figure out an optimum value for max_connections. If the
> threads don't release their memory, then I really do have to account
> for the fact that each thread over time will probably be holding each
> of those buffers. If threads give up the memory as soon as the, e.g.,
> sort, is finished, then I only have to figure out how many threads are
> likely to need a sort_buffer at any given time.
>
> I looked through the manual, various online documentation, and the
> source, but haven't been able to determine an answer.
>
> Thanks,
>
> --
> Pete Harlan
> harlan@artselect.com
>
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Gleb Paharenko
/ /|_/ / // /\ \/ /_/ / /__ Gleb.Paharenko@ensita.net
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw
| |
| Pete Harlan 2005-08-26, 11:23 am |
| On Fri, Aug 26, 2005 at 10:39:16AM +0300, Gleb Paharenko wrote:
> Hello.
>
> Have a look here:
>
> http://dev.mysql.com/doc/mysql/en/memory-use.html
Hi,
I had looked there, and other pages like it, but haven't found
anything that says specifically whether threads free the memory as
soon as they're done with it or hold onto it for (probable) future
use. If I had to guess from reading that page, I'd say they probably
free it, but if I had to guess from the memory use of our db server,
I'd say they don't.
--Pete
[color=darkred]
> Pete Harlan <harlan@artselect.com> wrote:
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw
|
|
|
|
|