mysql taking up a lot of memory

Something seems to be wrong with mysql, it takes so much memory.

Top process:

User Domain %CPU %MEM Mysql Processes
mysql 0.91 196.71 0.0
Top Process %CPU 1.0 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/domain.com.pid --skip-locking --socket/var/lib/mysql/mysql.sock
Top Process %CPU 0.5 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/domain.com.pid --skip-locking --socket/var/lib/mysql/mysql.sock
Top Process %CPU 0.4 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/domain.com.pid --skip-locking --socket/var/lib/mysql/mysql.sock

my forums were running slower than normal. Here's my.cnf

[mysqld]
max_connections=600
max_user_connections=1000
skip-locking
skip-innodb
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
interactive_timeout=50
wait_timeout=50
connect_timeout=10
thread_cache_size=128
key_buffer=256M
max_allowed_packet=16M
table_cache=1024
join_buffer=1M
sort_buffer_size=1M
read_buffer_size=1M
safe-show-database
max_connect_errors=10
thread_concurrency=4
myisam_sort_buffer_size=64M
log-bin
server-id=1
old-passwords
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[safe_mysqld]
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout
Anything wrong? When I do a top -c (sort by memory) All I see is this:

21209 mysql 9 0 41856 40M 1932 S 0.0 4.0 0:02 1 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-fi
21207 mysql 10 0 41852 40M 1932 R 0.1 4.0 0:01 0 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-fi
21196 mysql 9 0 41844 40M 1932 D 0.4 4.0 0:02 0 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-fi
21169 mysql 9 0 41836 40M 1932 S 0.0 4.0 0:01 1 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-fi
21165 mysql 9 0 41828 40M 1932 S 0.0 4.0 0:00 1 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-fi
21164 mysql 9 0 41820 40M 1932 S 0.0 4.0 0:00 1 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-fi
21163 mysql 9 0 41808 40M 1932 S 0.0 4.0 0:00 1 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-fi
Seems like each process is using 40MB of memorY?? I see at least 20 of those before restarting mysql.
After I restarted mysql service, many of them were gone. Seems like it's the processes is not killing itself or something.

 

 

 

 

Top