MySQL Conf suggestions on 512MB ram

taimz

Registered
Dec 7, 2004
2
0
151
Hello,

I have some difficulties about mysql. I currently host about 100 sites and I only have 512mb of ram. Server load is normal, about ~0.5 - 1, BUT in some time the SQL server crashes with overload. I may happend about 3 times per day or sometimes it happend once in a week. My current conf is:

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
skip-innodb
key_buffer = 90M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
myisam_sort_buffer_size = 8M
query_cache_size = 32M
max_connections = 200

log-bin

server-id = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 64M
sort_buffer_size = 64M
read_buffer = 2M
read_rnd_buffer_size = 768k
write_buffer = 2M

[myisamchk]
key_buffer = 64M
sort_buffer_size = 64M
read_buffer = 2M
read_rnd_buffer_size = 768k
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


Any suggestions on that?
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Just one thing I noticed - Is you query cache working? You might want to put the following after the query-cache-size directive:

query-cache-type = 1
 

eglwolf

Well-Known Member
Jan 1, 2004
190
0
166
This is what I use on smaller 756 MG RAm VPS servers:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
skip-innodb
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_connections=500
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
max_connect_errors=10
thread_concurrency=2
myisam_sort_buffer_size=64M
#log-bin
server-id=1
flush_time = 30


[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