Re: mysql mem usage
PID USERNAME PRI NICE SIZERES STATETIME WCPUCPU COMMAND 55651 mysql 8 12 138M 33524K nanslp 0:21 0.00% 0.00% mysqld 55649 mysql 20 14 138M 33524K pause0:21 0.00% 0.00% mysqld 55866 mysql 4 14 138M 33524K sbwait 0:12 0.00% 0.00% mysqld Ya, since you're using linuxthreads, these are all really one process with one single 138MB address space; note that SIZE and RES are identical all the way down. 76746 squid 960 90756K 38016K select 4:16 0.00% 0.00% squid 56725 pmx4 960 36524K 34908K select 0:01 0.00% 0.00% perl 56724 pmx4 960 36172K 34560K select 0:00 0.00% 0.00% perl Try running "ps axlm", which will show all the processes sorted by memory usage. If there are more of those perl scripts running, they may be a contributing factor. Apache with script modules (perl/php etc) can also suck up lots of memory if you get lots of hits at once. You learn something new every day. It seems the culprit actually was our anti-spam engines + apache/mod_fastcgi. We're down to 100MB Swap used and 100MB free MEM - big difference. We'll need to get a upgrade though, we must be able to carry the load... Thanks for the help -- Chris. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql mem usage
In the last episode (May 03), Chris Knipe said: > top... > FreeBSD 5.4-STABLE, linuxthreads > > last pid: 56803; load averages: 0.29, 0.31, 0.14 up 5+11:10:10 20:09:05 > 174 processes: 1 running, 169 sleeping, 4 zombie > CPU states: 0.0% user, 2.3% nice, 1.2% system, 0.0% interrupt, 96.5% idle > Mem: 422M Active, 237M Inact, 217M Wired, 43M Cache, 111M Buf, 73M Free > Swap: 512M Total, 297M Used, 215M Free, 58% Inuse, 16K In > > PID USERNAME PRI NICE SIZERES STATETIME WCPUCPU COMMAND > 55651 mysql 8 12 138M 33524K nanslp 0:21 0.00% 0.00% mysqld > 55649 mysql 20 14 138M 33524K pause0:21 0.00% 0.00% mysqld > 55866 mysql 4 14 138M 33524K sbwait 0:12 0.00% 0.00% mysqld Ya, since you're using linuxthreads, these are all really one process with one single 138MB address space; note that SIZE and RES are identical all the way down. > 76746 squid 960 90756K 38016K select 4:16 0.00% 0.00% squid > 56725 pmx4 960 36524K 34908K select 0:01 0.00% 0.00% perl > 56724 pmx4 960 36172K 34560K select 0:00 0.00% 0.00% perl Try running "ps axlm", which will show all the processes sorted by memory usage. If there are more of those perl scripts running, they may be a contributing factor. Apache with script modules (perl/php etc) can also suck up lots of memory if you get lots of hits at once. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql mem usage
top... last pid: 56803; load averages: 0.29, 0.31, 0.14 up 5+11:10:10 20:09:05 174 processes: 1 running, 169 sleeping, 4 zombie CPU states: 0.0% user, 2.3% nice, 1.2% system, 0.0% interrupt, 96.5% idle Mem: 422M Active, 237M Inact, 217M Wired, 43M Cache, 111M Buf, 73M Free Swap: 512M Total, 297M Used, 215M Free, 58% Inuse, 16K In PID USERNAME PRI NICE SIZERES STATETIME WCPUCPU COMMAND 55651 mysql 8 12 138M 33524K nanslp 0:21 0.00% 0.00% mysqld 55649 mysql 20 14 138M 33524K pause0:21 0.00% 0.00% mysqld 55866 mysql 4 14 138M 33524K sbwait 0:12 0.00% 0.00% mysqld 55912 mysql 8 12 138M 33524K nanslp 0:04 0.00% 0.00% mysqld 55697 mysql 4 14 138M 33524K sbwait 0:03 0.00% 0.00% mysqld 55612 mysql110 14 138M 33524K select 0:01 0.00% 0.00% mysqld 55613 mysql110 14 138M 33524K select 0:00 0.00% 0.00% mysqld 55652 mysql 8 12 138M 33524K nanslp 0:00 0.00% 0.00% mysqld 55606 mysql107 11 138M 33524K select 0:00 0.00% 0.00% mysqld 55607 mysql107 11 138M 33524K select 0:00 0.00% 0.00% mysqld 56390 mysql 20 14 138M 33524K pause0:00 0.00% 0.00% mysqld 55653 mysql 4 14 138M 33524K sbwait 0:00 0.00% 0.00% mysqld 55614 mysql 20 14 138M 33524K pause0:00 0.00% 0.00% mysqld 55610 mysql 20 14 138M 33524K pause0:00 0.00% 0.00% mysqld 55615 mysql 20 11 138M 33524K pause0:00 0.00% 0.00% mysqld 55609 mysql 20 14 138M 33524K pause0:00 0.00% 0.00% mysqld 55611 mysql 20 14 138M 33524K pause0:00 0.00% 0.00% mysqld 55608 mysql 20 14 138M 33524K pause0:00 0.00% 0.00% mysqld 55616 mysql 20 12 138M 33524K pause0:00 0.00% 0.00% mysqld 76746 squid 960 90756K 38016K select 4:16 0.00% 0.00% squid 56725 pmx4 960 36524K 34908K select 0:01 0.00% 0.00% perl 56724 pmx4 960 36172K 34560K select 0:00 0.00% 0.00% perl FreeBSD 5.4-STABLE, linuxthreads -- Chris. I love deadlines. I especially love the whooshing sound they make as they fly by..." - Douglas Adams, 'Hitchhiker's Guide to the Galaxy' - Original Message - From: "Dan Nelson" <[EMAIL PROTECTED]> To: "Chris Knipe" <[EMAIL PROTECTED]> Cc: Sent: Tuesday, May 03, 2005 7:34 PM Subject: Re: mysql mem usage In the last episode (May 03), Chris Knipe said: I have a P4 system with 1GB Ram and 512MB Swap (a little low I know). I'm running a multi threaded MySQL installation on it. With a bit of shock, I realised today that I ran completely out of swap space!!! Each MySQL thread is consuming about 160MB of ram, and I had close to 40 threads running. All my databases currently are approximately 1.5GB as far as file size goes, so it's not *that* much really. The biggest table is MyISAM (for delayed inserts), holding approximately 2million records currently. Threads don't have their own memory. The process as a whole does. I can only assume you're running a Linux 2.4 kernel that displays threads with separate pids in top, which causes all sorts of confusion. They all share the same address space though so it's only using 160MB. If you're swapping, chances are it's something else at fault. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql mem usage
In the last episode (May 03), Chris Knipe said: > I have a P4 system with 1GB Ram and 512MB Swap (a little low I know). > > I'm running a multi threaded MySQL installation on it. With a bit of > shock, I realised today that I ran completely out of swap space!!! > Each MySQL thread is consuming about 160MB of ram, and I had close to > 40 threads running. All my databases currently are approximately > 1.5GB as far as file size goes, so it's not *that* much really. The > biggest table is MyISAM (for delayed inserts), holding approximately > 2million records currently. Threads don't have their own memory. The process as a whole does. I can only assume you're running a Linux 2.4 kernel that displays threads with separate pids in top, which causes all sorts of confusion. They all share the same address space though so it's only using 160MB. If you're swapping, chances are it's something else at fault. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]