PDA

View Full Version : Server Optimization Request


sleepper
Wed 19th Apr '06, 9:54am
Dedicated
Dual Xeon 3.2
+ 4gb ram
+ 4 x 73gb SCSI hd in RAID 0+1
MYSQL: 4.0.25-standard
PHP: 4.4.1
redhat ent.

[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
user = mysql
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
max_connections =1000
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 2M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 64
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 64M
query_cache_type = 1
skip-innodb

[mysqld_safe]
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


with this mysql config, at the server pick time, cpu usage is very high, is there any idea can get it lower ?

eva2000
Wed 19th Apr '06, 10:22am
will need all info asked at http://www.vbulletin.com/forum/showthread.php?t=70117 but for now try

1. Upgrade MySQL server to 4.0.26
2. Upgrade PHP to 4.4.2 if you use phpadsnew make sure to update to phpadsnew 2.0.7 or higher to work with PHP 4.4.1/4.4.2
3. Edit /etc/my.cnf and place the following mysql server settings in /etc/my.cnf and restart mysql server afterwards


[client]
port = 3306
socket = /var/lib/mysql/mysql.sock

[mysqld]
user = mysql
port = 3306
socket = /var/lib/mysql/mysql.sock
safe-show-database
skip-innodb
max_connections = 800
key_buffer = 128M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1800
thread_cache_size = 384
wait_timeout = 90
connect_timeout = 10
tmp_table_size = 128M
max_heap_table_size = 128M
max_allowed_packet = 64M
max_connect_errors = 10
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
query_cache_limit = 4M
query_cache_size = 128M
query_cache_type = 1
query_prealloc_size = 163840
query_alloc_block_size = 32768

[mysqld_safe]
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

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

[mysqlhotcopy]
interactive-timeout


4. Install APC Cache lastest version from http://pecl.php.net/package/APC. Read install guide at http://www.vbulletin.com/forum/showthread.php?t=165367 - please remove Zend Optimizer from php.ini before installing APC Cache

5. Upgrade to vB 3.0.13 http://www.vbulletin.com/forum/showthread.php?t=176176 if you're on vB 3.0.xx or upgrade to vB 3.5.4 http://www.vbulletin.com/forum/showthread.php?t=176170 if you're on vB 3.5.x

6. If you just upgraded to vB 3.5.x try to disable these 4 options:

Admin CP -> vBulletin Options -> Forums Home Page Options -> Display Logged in Users?

Admin CP -> vBulletin Options -> Forum Display Options (forumdisplay) -> Show Users Browsing Forums

Admin CP -> vBulletin Options -> Thread Display Options -> Show Users Browsing Thread

Admin CP -> vBulletin Options -> Message Searching Options -> Automatic Similar Thread search