Hi, Hi,
It depends also of how many threads are running at the same time + sort buffer / record buffer values. The memory consumption can be roughly calculated as key buffer + (sort buffer + record buffer) * number of thread. As you can see, only the key buffer is shared between all the threads. If you want to lower the number of "sleeping" thread, take a look at the wait_timeout variable in your my.cnf file. Regards, Jocelyn ----- Original Message ----- From: "Dave" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 04, 2002 8:39 AM Subject: Re: Growing memory usage/processes > Thanks for the confirmation Dan, > > I will look a little closer but I could have sworn when I shutdown MySQL > about 300MB of memory got freed. > > I had a suspicion the case was one process and ps/top could not > distinguish...I just needed to hear confirmation of it I guess. > > > -Dave > > > > In the last episode (Jul 03), Dave said: > > > Hello all, > > > > > > I have mysql running on a 2.4.18 kernel: > > > > > > /usr/libexec/mysqld Ver 3.23.49 for redhat-linux-gnu on i386 > > > > > > and note that one started about 4 processes (threads?) began to > > > handle the various signal/table tasks and such. After several random > > > queries the process list grows accordingly. > > > > > > After a couple hours all processes which showed consumption of about > > > 8MB of memory initially are now 25MB each and growing as queries are > > > received. > > > > > > My question is...Why if these are threads does it require each thread > > > to utilize so much memory? 4 threads using 10MB each is ok, 10 > > > threads using 10MB each is ok. 20 threads using 25MB each is too > > > much. > > > > No. Threads share the same address space. You are seeing one threaded > > application consuming 25MB. Linux's threads implentation creates a > > separate process for each thread and top has no idea they're really all > > one application. Linux is the only OS that does this, afaik, and you > > would not believe the number of times your question has been asked on > > this list. On Solaris and Tru64, at least, a threaded app shows up as > > one entry in top. > > > > -- > > Dan Nelson > > [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > > 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 > > > > > > > --------------------------------------------------------------------- > 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 > > > > --------------------------------------------------------------------- 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