Web Hosting Talk







View Full Version : mysql is killing my box :!!


blackmoont
01-10-2004, 04:48 AM
Hello . I have invision board with about 500 user online running in a box with : Dual Pentium Xeon 2.8 Ghz , 2Gram , 1SCSI and 80G IDE for backup . RedHat 9 , Cpanel , phpsuexe , apache 1.3.29 . I think my box quite strong but everytime mysql process eating about 70% resource in my server and it make a whole server load go over 40 . :(
This is my my.cnf :

[mysql]
no-auto-rehash

[mysqld]
max_connections=800
thread_concurrency=20
skip-networking
delay-key-write-for-all-tables
set-variable = long_query_time=3
set-variable = wait_timeout=60
skip-locking
safe-show-database
key_buffer=32M
myisam_sort_buffer_size=64M
join_buffer=1M
record_buffer=1M
sort_buffer=2M
read_buffer=1M
table_cache=1024
thread_cache_size=256
wait_timeout=100
connect_timeout=10
tmp_table_size=64M
max_allowed_packet=8M
max_connect_errors=10
log_bin
[safe_mysqld]
open_files_limit=8192

[mysqldump]
quick
set-variable = max_allowed_packet=16M

[myisamchk]
set-variable = key_buffer=64M
set-variable = sort_buffer=64M
set-variable = read_buffer=16M
set-variable = write_buffer=16M

[isamchk]
set-variable = key_buffer=64M
set-variable = sort_buffer=64M
set-variable = read_buffer=16M
set-variable = write_buffer=16M


Anyone have idea about this ?
Sorry for my bad english .

Atari
01-10-2004, 01:33 PM
Hey blackmoont,


Are you running out of available ram during your peak times?


You might also consider using PhpBB for your board software. The 4th largest forum on the net, go-gaia.com, is a PhpBB board (and hte first 3 are completely custom).

The person who runs go-gaia has contributed many of his hacks to the PhpBB community forum.. so if you are planning on running a truely big board, there is some tried & true advice up there.

Also, depending on if you are making enogh money to justify building a new box... you might consider building a opteron or dual opteron box.

The opteron runs under 64 bit linux & MySQL that has been optimized for the opteron (not sure if that means the opteron optimized MySQL is 64 bit as well).... but I have heard that you will get nearly twice as many connections dollar for dollar by building opteron boxes for a mysql server.

Hope this helps

Atari
01-10-2004, 01:35 PM
I forgot to add....

You might also consider making your xeon box a dedicated mysql-only box & running your other services from another box.

... and serve all of your forums images (icons, avatars etc) from a seperate machine as well if needed.

AP2k2
01-10-2004, 05:07 PM
try to convert to vbulletin.

bitserve
01-10-2004, 08:19 PM
Upgrade to MySQL 4 and use query caching. This helps message boards a lot.

Steven
01-10-2004, 08:23 PM
[mysqld]
no-auto-rehash
max_connections=800
thread_concurrency=4
skip-networking
delay-key-write-for-all-tables
long_query_time=3
wait_timeout=60
skip-locking
safe-show-database
key_buffer=42M
join_buffer=1M
record_buffer=1M
sort_buffer=2M
read_buffer=1M
table_cache=1024
thread_cache_size=256
wait_timeout=100
connect_timeout=10
tmp_table_size=42M
max_allowed_packet=8M
max_connect_errors=10
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
log_bin


[safe_mysqld]
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M


1.) upgrade to mysql4 and use this setup

2.)
thread_concurrency=20

WAY TO MUCH!!! no wonder it was killing the box

use 4 or 6 on this setup

thank you

blackmoont
01-11-2004, 03:46 AM
thank you . I will try this

LetsFly
01-11-2004, 05:54 AM
also limit the number of connections your users can have