High server loads, high memory usage.

I think MySQL is getting high off ram.. I have only 4,000KB of memory left.

top - 18:08:33 up 136 days, 49 min, 1 user, load average: 59.49, 40.38, 25.95
Tasks: 192 total, 3 running, 187 sleeping, 2 stopped, 0 zombie
Cpu(s): 59.0% us, 18.4% sy, 0.0% ni, 0.0% id, 20.0% wa, 1.0% hi, 1.6% si
Mem: 768500k total, 763564k used, 4936k free, 1244k buffers
Swap: 2249060k total, 886816k used, 1362244k free, 11972k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
38 root 16 0 0 0 0 S 3.5 0.0 35:02.55 kswapd0
14223 nobody 16 0 22600 9136 14m D 0.7 1.2 0:00.94 httpd
16199 nobody 15 0 17212 3808 14m S 0.7 0.5 0:00.22 httpd
16198 nobody 16 0 26012 11m 14m S 0.6 1.6 0:00.86 httpd
12702 nobody 16 0 27908 4996 14m S 0.5 0.7 0:02.94 httpd
13378 nobody 15 0 26600 8632 14m D 0.5 1.1 0:01.22 httpd
15812 nobody 15 0 25052 9.8m 14m S 0.5 1.3 0:01.25 httpd
15819 nobody 15 0 24868 10m 14m S 0.5 1.4 0:01.00 httpd
15860 nobody 15 0 25744 4424 14m S 0.5 0.6 0:00.58 httpd
16072 nobody 16 0 22596 9204 14m S 0.5 1.2 0:00.43 httpd
16074 nobody 15 0 19344 5904 14m S 0.5 0.8 0:00.31 httpd
16080 nobody 15 0 24056 10m 14m S 0.5 1.3 0:00.96 httpd
16238 nobody 17 0 26456 12m 14m S 0.5 1.6 0:01.03 httpd
13937 nobody 16 0 27172 11m 14m S 0.4 1.5 0:03.13 httpd
15090 nobody 15 0 26016 9984 14m S 0.4 1.3 0:01.28 httpd
15100 nobody 16 0 24076 10m 14m S 0.4 1.4 0:01.50 httpd
15202 nobody 16 0 25624 10m 14m S 0.4 1.3 0:01.19 httpd
15851 nobody 16 0 25204 4908 14m S 0.4 0.6 0:00.86 httpd
16073 nobody 16 0 25796 10m 14m S 0.4 1.4 0:00.92 httpd
16076 nobody 16 0 25124 9976 14m S 0.4 1.3 0:00.68 httpd
16168 nobody 16 0 25096 10m 14m S 0.4 1.5 0:00.81 httpd
10307 nobody 16 0 26064 9.9m 14m S 0.4 1.3 0:05.81 httpd
10846 nobody 15 0 26840 4984 14m S 0.4 0.6 0:06.06 httpd
12706 nobody 15 0 26028 8708 14m D 0.4 1.1 0:02.41 httpd
13499 nobody 16 0 26144 9.9m 14m S 0.4 1.3 0:03.22 httpd
13635 nobody 15 0 26404 9.8m 14m S 0.4 1.3 0:01.68 httpd
13918 nobody 16 0 24056 9.9m 14m S 0.4 1.3 0:02.19 httpd
15177 nobody 15 0 26044 4360 14m S 0.4 0.6 0:01.10 httpd
As you can see, my loads are 50! I only have 700MB of memory and mysql drained it down to 4MB. *sigh*

My current my.cnf configurations are as listed:

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
skip-locking
max_connections=300
connect_timeout=15
key_buffer=16M
join_buffer=1M
record_buffer=1M
sort_buffer=2M
table_cache=1028
thread_cache_size=286
max_allowed_packet=5M
wait_timeout=15
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
thread_concurrency=2
log-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
Urgent help is needed.

If these do not help, I'd like to know the specifications for a server that feeds the following needs:

700+ Visitors/day
Heavy SQL usage including search reliance


Thanks High server loads, high memory usage.
Mysqladmin returns:

Uptime: 7087 Threads: 41 Questions: 222725 Slow queries: 2956 Opens: 13897 Flush tables: 1 Open tables: 64 Queries pe
r second avg: 31.427

 

 

 

 

Top