PDA

View Full Version : Server Upgrade - Request Optimization


hankster
Thu 15th Jan '04, 2:01pm
We've updated our server so are looking for optimization ideas. Here's the info:



Dedicated (managed) server.
Intel 2.4GHz P4 CPU
1GB DDR2100 SDRAM
40GB EIDE Hard Drive non-raid
Apache 1.3.29
MySQL 4.0.17 as a module
php 4.3.4
FreeBDS 4.8-STABLE
Average 150 users 250 max
Site is mainly vB with 70K PV per day. A couple small PostNuke sites with a total 10K PV per day. Bandwidth about 50G per month.

innodb type databases/tables enabled

top with 120 users on-line:
last pid: 5882; load averages: 0.07, 0.14, 0.15 up 0+01:47:23 12:54:22
73 processes: 1 running, 71 sleeping, 1 zombie
CPU states: 3.9% user, 0.4% nice, 1.2% system, 0.8% interrupt, 93.8% idle
Mem: 171M Active, 318M Inact, 78M Wired, 1916K Cache, 111M Buf, 428M Free
Swap: 1024M Total, 1024M Free

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
4454 mysql 2 10 49712K 27668K poll 0:31 1.51% 1.51% mysqld
4964 nobody 2 -10 47584K 18520K sbwait 0:04 0.73% 0.73% httpd
5877 nobody 2 -10 47580K 15432K sbwait 0:00 2.63% 0.68% httpd
4929 nobody 2 -10 51680K 22956K sbwait 0:04 0.49% 0.49% httpd
4938 nobody 2 -10 55360K 27228K sbwait 0:03 0.39% 0.39% httpd
4934 nobody 2 -10 52904K 24188K accept 0:03 0.39% 0.39% httpd
4939 nobody 2 -10 47772K 19688K sbwait 0:03 0.34% 0.34% httpd
4963 nobody 2 -10 47456K 19252K sbwait 0:03 0.29% 0.29% httpd
4936 nobody 2 -10 50828K 22916K sbwait 0:03 0.24% 0.24% httpd
4928 nobody 2 -10 51032K 22468K sbwait 0:03 0.15% 0.15% httpd
4941 nobody 2 -10 48464K 20468K sbwait 0:04 0.00% 0.00% httpd
4933 nobody 2 -10 52980K 25224K sbwait 0:04 0.00% 0.00% httpd
4927 nobody 2 -10 47572K 18220K sbwait 0:03 0.00% 0.00% httpd
4954 nobody 2 -10 47604K 19124K sbwait 0:03 0.00% 0.00% httpd
4935 nobody 2 -10 47732K 18476K sbwait 0:03 0.00% 0.00% httpd
4931 nobody 2 -10 50264K 20932K sbwait 0:03 0.00% 0.00% httpd
4946 nobody 2 -10 47740K 18544K sbwait 0:03 0.00% 0.00% httpd


my.cnf
[mysqld]
user = mysql
port = 3306
socket = /tmp/mysql.sock
log = /usr/local/var/logs/access_log
enable-locking
set-variable = max_connections=500
set-variable = max_connect_errors=10
set-variable = back_log=128
set-variable = myisam_sort_buffer_size=64M
set-variable = join_buffer=1M
set-variable = max_allowed_packet=16M
set-variable = wait_timeout=14400
set-variable = connect_timeout=10
set-variable = table_cache=1024
set-variable = thread_cache_size=64
set-variable = key_buffer=16M
set-variable = sort_buffer=2M
set-variable = record_buffer=1M

[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

Can't run mysql extended-status

phpinfo at http://www.hobbytalk.com/phpinfo.php

vB3 beta 4 - waiting for Gold to upgrade again.
Trying to find out what is contained in httpd.conf... no info yet

Thanks!!!!!

hankster
Thu 15th Jan '04, 2:29pm
Here is httpd.conf

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
MinSpareServers 8
MaxSpareServers 24
StartServers 16
MaxClients 400

eva2000
Fri 16th Jan '04, 2:31am
change maxclients in httpd.conf from 400 to 180 restart apache

chage my.cnf to below and restart mysql


[mysqld]
user = mysql
port = 3306
socket = /tmp/mysql.sock
log = /usr/local/var/logs/access_log
enable-locking
max_connections = 500
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
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 = 32M
query_cache_type = 1
skip-innodb

[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

hankster
Fri 16th Jan '04, 7:22pm
Thanks... won't be able to try it till next week but I'll let you know how it goes.