MySQL load insane

HorseOfCourse

New member
Joined
Jun 8, 2007
Messages
3
Hello, I am hosting a phpBB forum, and a phpBB3 forum. Probably got around 300 users online in total, by MySQL is insane, and only has been today... There's too many processes running.

Top:
8433 apache 15 0 22296 6876 1832 S 12 0.3 0:01.50 httpd
18401 mysql 15 0 65156 13m 1776 S 10 0.7 0:10.60 mysqld
18417 mysql 15 0 65156 13m 1776 S 10 0.7 0:02.62 mysqld
18442 mysql 15 0 65156 13m 1776 S 10 0.7 0:07.08 mysqld
18452 mysql 15 0 65156 13m 1776 S 10 0.7 0:05.01 mysqld
18399 mysql 16 0 65156 13m 1776 S 7 0.7 0:18.58 mysqld
18406 mysql 15 0 65156 13m 1776 S 7 0.7 0:12.54 mysqld
18413 mysql 15 0 65156 13m 1776 R 7 0.7 0:09.12 mysqld
18414 mysql 15 0 65156 13m 1776 S 7 0.7 0:10.35 mysqld
18419 mysql 15 0 65156 13m 1776 S 7 0.7 0:08.17 mysqld
18445 mysql 16 0 65156 13m 1776 S 7 0.7 0:03.26 mysqld
18457 mysql 15 0 65156 13m 1776 S 7 0.7 0:05.84 mysqld
17193 apache 15 0 25756 10m 1924 S 5 0.5 0:07.86 httpd
18434 root 15 0 3180 1028 768 R 5 0.0 0:02.31 top
17191 apache 15 0 25640 9m 1912 S 2 0.5 0:07.13 httpd
17211 apache 15 0 25916 10m 1920 S 2 0.5 0:08.69 httpd
17373 apache 15 0 24840 9516 1928 S 2 0.5 0:05.15 httpd
18400 mysql 16 0 65156 13m 1776 S 2 0.7 0:10.18 mysqld


What would be causing this? my.cnf:

[mysqld]
skip-innodb
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
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=300
interactive_timeout=100
wait_timeout=60
connect_timeout=10
thread_cache_size=50
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=512
record_buffer=1M
sort_buffer_size=1M
read_buffer_size=1M
max_connect_errors=10
myisam_sort_buffer_size=64M
log-bin

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

[safe_mysqld]
err-log=/var/log/mysqld.log
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[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
 
Last edited:
You can reduce your Apache/PHP/MYSQL load with some simple system, such as :

- Changing the value of the keepalive in apache (if too short it create more mysql connections)
- Changing the number of child in apache
- Installing a cache system (it wont make query for static content until it is not changed)

software solutions can already help you a lot, but also remember that you are limited by your hardware.

Check in Apache documentation, or/and maybe some howto about handling more traffic with boards systems.
 
Back
Top