Bringing this back up again, because the number of extra 'threads' mysql is using seems to vary widely, from I've noticed sometimes, from 5 more than the threads I'm using to more than 50!
My memory usage also seems to differ accordingly. It seems to be because my thread cache is set to 40, so 'mytop' shows 38 threads cached, with only 20 connected right now. Shouldn't it kill off those threads after awhile? Is that what the wait_timeout field is for? I thought it was for keeping the connection open, rather than the connection cached. Mine is currently at '600', and it doesn't seem to be clearing up the cache... The reason this is important is because I suspect my 'slow queries' comes up when I run out of ram and it starts using disk swap - which happens because mysql is taking up so much extra memory. Thanks, Kevin Watt Community Manager, Allpoetry.com What happened to the cow who went for a drive? He got a Moo_ving violation What do you call someone who is crazy about hot chocolate? A cocoa nut What do bees use to cut wood? Buzz saws Who eats at underwater resturants ? Suba diners How do really small people call each other ? On Microphones How do you fix a broken chimp? With a monkey wrench > -----Original Message----- > From: Lenz Grimmer [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 25, 2003 2:08 PM > To: [EMAIL PROTECTED]; Kevin > Subject: Re: # processes vs. #threads, and memory usage > > > *** PGP Signature Status: unknown > *** Signer: Unknown, Key ID = 0xB27291F2 > *** Signed: 9/25/2003 2:07:43 PM > *** Verified: 9/25/2003 3:02:03 PM > *** BEGIN PGP VERIFIED MESSAGE *** > > Hi, > > On Thu, 25 Sep 2003, Kevin wrote: > > > When I start mysql, the processlist shows 10 processes: > > > > Ps aux | grep mysql | wc -l > > 10 > > On Linux (I assume this is what we're talking about here), threads are > shown as separate processes, too. On other OS'es you will only see one > mysqld process in the process table. > > > But 'mytop' (handy command line utility to see processes) shows only the > > number of threads I'm using. > > Yes, but only the threads that serve client requests. The MySQL daemon > spawns a few other helper threads as well (e.g. some for InnoDB, some for > replication). These are not shown in mytop, but the OS process list (if it > supports showing threads as well) > > > Anyone know why its using 10 processes if it only has 1 thread? I'm not > > familiar with how 'ps' tries to report on threads (since mysql > > technically supposedly has only 1 process). Is it doing something > > wrong? > > No, you're all fine. No worries :) > > > My main concern is for the reported memory usage. If ps is right, and > > it IS using that memory, what is it doing? > > > > 1 31454 mysql 23M 2.1M 108M 23M 34819 S mysqld > > 2 31456 mysql 23M 2.1M 108M 23M 34819 S mysqld > > .. continue until .. > > 29 31639 mysql 23M 2.1M 108M 23M 34819 S mysqld > > 30 31709 mysql 23M 2.1M 108M 23M 34819 S mysqld > > That's the total number of memory for the mysqld process including all > it's threads - it's just being repeated for every thread. > > Bye, > LenZ > -- > Lenz Grimmer <[EMAIL PROTECTED]> > Senior Production Engineer > MySQL GmbH, http://www.mysql.de/ > Hamburg, Germany > > For technical support contracts, visit https://order.mysql.com/?ref=mlgr > > *** END PGP VERIFIED MESSAGE *** > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]