MySQL Forums
Forum List  »  Optimizer & Parser

optimze for a mysql server - my.cnf
Posted by: kean galileo
Date: November 06, 2007 06:26PM

hi I'm new here and new with using this database. have little a backround with ms sql.
since I moved my site to a php on I have stared using mysql.

I have a site with 2 servers one is for the mysql database and one for files.
the server of the my sql is a dual XNON 2GB RAM very powerfull.
and it sould deal with a traffic of 15000 a day. and about 2000pepole /hour at heavy hours:

but since I belive the configurtion of my.cnf is bad I guess it has heavey loading time and sometimes not reasponding.
and maybe its a PHP.ini or httpd.conf problem so if you thing my my.cnf is good and you think of a good reason please write it here anyway.

THIS IS MY CURRENT MY.cnf


<-----------code---------------->
#DO NOT MODIFY THE FOLLOWING COMMENTED LINES!
#Created with ELS from www.servermonkeys.com
#els-build=4.1
[client]
#password = your_password
port = 3306
socket = /var/run/mysqld/mysqld.sock


[mysqld]
datadir=/var/lib/mysql
skip-locking
skip-innodb
# skip-networking
safe-show-database
query_cache_limit=1M
query_cache_size=32M ## 32MB for every 1GB of RAM
query_cache_type=1
max_user_connections=1200
max_connections=1500
interactive_timeout=100
wait_timeout=20
connect_timeout=20
thread_cache_size=128
key_buffer=128M ## 128MB for every 1GB of RAM
join_buffer=1M
max_connect_errors=1000
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=1M ## 1MB for every 1GB of RAM
read_buffer_size=1M ## 1MB for every 1GB of RAM
read_rnd_buffer_size=1M ## 1MB for every 1GB of RAM
thread_concurrency=4 ## Number of CPUs x 2
myisam_sort_buffer_size=64M
server-id=1
collation-server=latin1_general_ci
port=3306
bind-address=XXXXXXX
# bind-address=0.0.0.0
# skip-networking
old-passwords

[mysql.server]
user=mysql
basedir=/var/lib


[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash
#safe-updates

[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

[mysqlhotcopy]
interactive-timeout

<------------/code------------------>

Options: ReplyQuote


Subject
Views
Written By
Posted
optimze for a mysql server - my.cnf
4796
November 06, 2007 06:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.