Hi,
Thanks for contribution support.
Am a newbie to MySQL DB, i run a web server using Mysql DB / Apache / PHP. Currently my web server has around 50,000 post.
Past few months MySQL server seem to be using more Memory and very high CPU, also tables are getting fragmented very often.
Some times DB gets hung and it need to be optimized in daily basis.
Here is more detail about my server
My.cnf
[mysqld]
Datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
Default to using old password format for compatibility with mysql 3.x
clients (those using the mysqlclient10 compatibility package).
old_passwords=1
skip-external-locking
#skip-bdb
skip-innodb
Disabling symbolic-links is recommended to prevent assorted security risks;
to do so, uncomment this line:
symbolic-links=0
slow_query_log=/home/XXX/XXX/log_slow_query.txt
max_user_connections = 25
max_connections=500
wait_timeout=20
interactive_timeout=20
connect_timeout = 20
key_buffer_size = 256M
query_cache_type=1
query_cache_size = 400M
query_cache_limit = 350M
tmp_table_size = 1500M
max_heap_table_size = 350M
thread_cache_size = 24
#open_tables = 256
table_cache = 2000
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 2M
thread_concurrency = 8
#long_query_time=1
myisam_sort_buffer_size = 64M
#join_buffer_size = 256K
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet=16M
[isamchk]
key_buffer=32M
sort_buffer=32M
read_buffer=16M
write_buffer=16M
[myisamchk]
key_buffer=32M
sort_buffer=32M
read_buffer=16M
write_buffer=16M
Apache version 2.2.3
Mysql Version 5.1.54
Php Version 5.2.17 with eaccelerator
OS: CentOS 5.5 64 Bit
Mem: 5G
CPU: Xeon Quad Core
Any help will be appreciated.
Thanks in Advance.
Bharath