W
WebDork
Guest
I am having performance problems with my server where the load goes through the roof and I eventually run out of memory and the system reboots. I have read every post I can find on my.cnf and they are all somewhat contradictory - Im hoping that someone can check out my config and let me know what I have messed up if anything
System info:
- CPU: AMD Athlon(tm) 64 Processor 3400+
- 2Gb Ram
- 2.4.21-40.EL kernel
- centOS 3.6
- PLESK 7.5.4
Server info: http://www.angusserver1.com/
MySQL 4.1.15
PHP 4.4.2 (cgi) (built: Feb 19 2006 19:45:50)
Copyright 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright 1998-2004 Zend Technologies with the ionCube PHP Loader v2.5, Copyright 2002-2004, by ionCube Ltd.
my.cnf
TOP
23:12:04 up 1:38, 3 users, load average: 6.43, 4.59, 4.14
213 processes: 205 sleeping, 8 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 36.1% 0.0% 23.5% 5.0% 3.3% 31.9% 0.0%
Mem: 1993952k av, 1983328k used, 10624k free, 0k shrd, 50788k buff
1428844k actv, 270796k in_d, 29612k in_c
Swap: 4096532k av, 10760k used, 4085772k free 1268160k cached
TOP a bit later
23:26:16 up 1:53, 3 users, load average: 30.01, 20.26, 14.66
367 processes: 361 sleeping, 5 running, 1 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 49.6% 0.0% 15.3% 3.1% 1.7% 30.0% 0.0%
Mem: 1993952k av, 1978008k used, 15944k free, 0k shrd, 39352k buff
1529860k actv, 290660k in_d, 27496k in_c
Swap: 4096532k av, 70748k used, 4025784k free 1129056k cached
ps aux | grep -c httpd
132
mysqladmin status
Uptime: 1918 Threads: 125 Questions: 137530 Slow queries: 7 Opens: 398 Flush tables: 1 Open tables: 392 Queries per second avg: 71.705
mytop
MySQL on localhost (4.1.15) up 0+00:33:48 [23:23:51]
Queries: 140.4k qps: 71 Slow: 8.0 Se/In/Up/De(%): 85/00/06/01
qps now: 59 Slow qps: 0.0 Threads: 137 ( 118/ 4) 80/01/07/01
Cache Hits: 61.7k Hits/s: 31.1 Hits now: 27.5 Ratio: 51.8% Ratio now: 58.5%
Key Efficiency: 99.9% Bps in/out: 8.6k/229.8k Now in/out: 7.1k/219.6k
Anything else worth posting let me know
Ill post similar on WHT and then post whatever the outcome is here so hopefully others can benefit.
System info:
- CPU: AMD Athlon(tm) 64 Processor 3400+
- 2Gb Ram
- 2.4.21-40.EL kernel
- centOS 3.6
- PLESK 7.5.4
Server info: http://www.angusserver1.com/
MySQL 4.1.15
PHP 4.4.2 (cgi) (built: Feb 19 2006 19:45:50)
Copyright 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright 1998-2004 Zend Technologies with the ionCube PHP Loader v2.5, Copyright 2002-2004, by ionCube Ltd.
my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
#skip-locking
#skip-innodb
#log-bin
old_passwords=1
max_allowed_packet = 16M
max_connections = 500
max_connect_errors = 10
wait_timeout=100
connect_timeout = 10
interactive_timeout=100
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
table_cache = 1024
thread_concurrency=2
key_buffer=150M
join_buffer_size = 1M
record_buffer=1M
read_buffer_size = 1M
sort_buffer_size = 1M
read_rnd_buffer_size = 1M
myisam_sort_buffer_size=64M
#thread_cache_size = 256
thread_cache_size = 128
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
TOP
23:12:04 up 1:38, 3 users, load average: 6.43, 4.59, 4.14
213 processes: 205 sleeping, 8 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 36.1% 0.0% 23.5% 5.0% 3.3% 31.9% 0.0%
Mem: 1993952k av, 1983328k used, 10624k free, 0k shrd, 50788k buff
1428844k actv, 270796k in_d, 29612k in_c
Swap: 4096532k av, 10760k used, 4085772k free 1268160k cached
TOP a bit later
23:26:16 up 1:53, 3 users, load average: 30.01, 20.26, 14.66
367 processes: 361 sleeping, 5 running, 1 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 49.6% 0.0% 15.3% 3.1% 1.7% 30.0% 0.0%
Mem: 1993952k av, 1978008k used, 15944k free, 0k shrd, 39352k buff
1529860k actv, 290660k in_d, 27496k in_c
Swap: 4096532k av, 70748k used, 4025784k free 1129056k cached
ps aux | grep -c httpd
132
mysqladmin status
Uptime: 1918 Threads: 125 Questions: 137530 Slow queries: 7 Opens: 398 Flush tables: 1 Open tables: 392 Queries per second avg: 71.705
mytop
MySQL on localhost (4.1.15) up 0+00:33:48 [23:23:51]
Queries: 140.4k qps: 71 Slow: 8.0 Se/In/Up/De(%): 85/00/06/01
qps now: 59 Slow qps: 0.0 Threads: 137 ( 118/ 4) 80/01/07/01
Cache Hits: 61.7k Hits/s: 31.1 Hits now: 27.5 Ratio: 51.8% Ratio now: 58.5%
Key Efficiency: 99.9% Bps in/out: 8.6k/229.8k Now in/out: 7.1k/219.6k
Anything else worth posting let me know
Ill post similar on WHT and then post whatever the outcome is here so hopefully others can benefit.