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 SIZE RES STATE TIME WCPU CPU COMMAND 55651 mysql 8 12 138M 33524K nanslp 0:21 0.00% 0.00% mysqld 55649 mysql 20 14 138M 33524K pause 0: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 mysql 110 14 138M 33524K select 0:01 0.00% 0.00% mysqld 55613 mysql 110 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 mysql 107 11 138M 33524K select 0:00 0.00% 0.00% mysqld 55607 mysql 107 11 138M 33524K select 0:00 0.00% 0.00% mysqld 56390 mysql 20 14 138M 33524K pause 0: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 pause 0:00 0.00% 0.00% mysqld 55610 mysql 20 14 138M 33524K pause 0:00 0.00% 0.00% mysqld 55615 mysql 20 11 138M 33524K pause 0:00 0.00% 0.00% mysqld 55609 mysql 20 14 138M 33524K pause 0:00 0.00% 0.00% mysqld 55611 mysql 20 14 138M 33524K pause 0:00 0.00% 0.00% mysqld 55608 mysql 20 14 138M 33524K pause 0:00 0.00% 0.00% mysqld 55616 mysql 20 12 138M 33524K pause 0:00 0.00% 0.00% mysqld 76746 squid 96 0 90756K 38016K select 4:16 0.00% 0.00% squid 56725 pmx4 96 0 36524K 34908K select 0:01 0.00% 0.00% perl 56724 pmx4 96 0 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: <mysql@lists.mysql.com>
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]