PDA

View Full Version : Server Optimization for a busy board.


mike_one
Tue 13th Feb '01, 10:02pm
Just installed vb2.0beta....wondering on how we can optimize? Heres the info I think you need.

OS: FreeBSD 4.0-RELEASE
CPU: 733mhz Pentium III
RAM: 512megs
DISK: Western Digital 15gig, WDC WD153BA (ata0-master using UDMA66)


USERS AT PEAK: 300-350 (thats all the server can do)


APACHE INFO:


Apache 1.3.12 PHP 4.0.1pl2 with Zend engine, and modperl.


apache -v
Server version: Apache/1.3.12 (Unix)
Server built: Jul 22 2000 16:06:14


apache -l


Compiled-in modules:
http_core.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_speling.c
mod_php4.c
mod_userdir.c
mod_alias.c
mod_access.c
mod_auth.c
mod_setenvif.c
mod_perl.c
suexec: disabled; invalid wrapper /web/httpd/bin/suexec


httpd.conf


Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 175
#its gets to max clients in about 10 seconds
MaxRequestsPerChild 300
User web
Group web
<VirtualHost 209.126.149.17>
ServerAdmin webmaster@superhonda.com
DocumentRoot /web/docs/www.superhonda.org/htdocs
ServerName superhonda.org
ServerAlias *.superhonda.org
ErrorLog
/web/docs/www.superhonda.org/logs/www.superhonda.org-error_log
CustomLog
/web/docs/www.superhonda.org/logs/www.superhonda.org-access_log common
</VirtualHost>



For PHP info:


http://lithium.tiora.net/~liam/info.php

last pid: 11856; load averages: 1.88, 1.57, 1.55 up 10+00:22:55
14:34:22
189 processes: 3 running, 185 sleeping, 1 zombie
CPU states: 77.4% user, 0.0% nice, 18.7% system, 3.8% interrupt, 0.0%
idle
Mem: 351M Active, 51M Inact, 61M Wired, 16M Cache, 30M Buf, 22M Free
Swap: 512M Total, 65M Used, 447M Free, 12% Inuse

Server version 3.23.24-beta
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 8 days 2 hours 40 min 13 sec


Threads: 114 Questions: 18169236 Slow queries: 114833 Opens: 18828
Flush tables: 1 Open tables: 255 Queries per second avg: 25.926


(its a little older version. But its very stable.)

+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 92408 |
| Aborted_connects | 0 |
| Bytes_received | 3108687385 |
| Bytes_sent | 1854433067 |
| Connections | 93046 |
| Created_tmp_disk_tables | 0 |
| Created_tmp_tables | 618201 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 107935 |
| Handler_read_first | 137006 |
| Handler_read_key | 267561096 |
| Handler_read_next | 3288690119 |
| Handler_read_prev | 4788690 |
| Handler_read_rnd | 84076834 |
| Handler_read_rnd_next | 2706859639 |
| Handler_update | 2058966 |
| Handler_write | 31557410 |
| Key_blocks_used | 63651 |
| Key_read_requests | 594805407 |
| Key_reads | 40754 |
| Key_write_requests | 5903796 |
| Key_writes | 2883812 |
| Max_used_connections | 151 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 255 |
| Open_files | 51 |
| Open_streams | 0 |
| Opened_tables | 18867 |
| Questions | 18175085 |
| Slow_launch_threads | 722 |
| Slow_queries | 114873 |
| Slave_running | OFF |
| Threads_cached | 0 |
| Threads_connected | 135 |
| Threads_running | 71 |
| Uptime | 700951 |
+--------------------------+------------+

Variable_name | Value
ansi_mode | OFF
back_log | 50
basedir | /web/mysql/
character_set | latin1
character_sets | latin1 big5 czech euc_kr gb2312 gbk sjis tis620
ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew
win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257


connect_timeout | 5
concurrent_insert | ON
datadir | /usr/local/mysql/var/


(/usr/local/mysql is a symlink to /web/mysql)


delay_key_write | ON
delayed_insert_limit | 100
delayed_insert_timeout | 300
delayed_queue_size | 1000
join_buffer_size | 131072
flush | OFF
flush_time | 0
init_file |
interactive_timeout | 28800
key_buffer_size | 134213632
language | /web/mysql/share/mysql/english/
log | OFF
log_update | OFF
log_bin | OFF
log_slave_updates | OFF
long_query_time | 10
low_priority_updates | OFF
lower_case_table_names | 0
max_allowed_packet | 1048576
max_connections | 400
max_connect_errors | 10
max_delayed_threads | 20
max_heap_table_size | 16777216
max_join_size | 4294967295
max_sort_length | 1024
max_tmp_tables | 32
max_write_lock_count | 4294967295
myisam_sort_buffer_size | 8388608
net_buffer_length | 16384
net_retry_count | 1000000
pid_file | /usr/local/mysql/var/lithium.tiora.net.pid
port | 3306
protocol_version | 10
record_buffer | 2093056
skip_locking | OFF
skip_networking | OFF
skip_show_database | OFF
slow_launch_time | 2
socket | /tmp/mysql.sock
sort_buffer | 10485752
table_cache | 256
table_type | MYISAM
thread_stack | 65536
thread_cache_size | 0
timezone | PST
tmp_table_size | 1048576
tmpdir | /var/tmp/
version | 3.23.24-beta
wait_timeout | 2400



>
> Also, if you have a file called /etc/my.cnf, could you post the contents of
> that as well.


[mysqld]
set-variable=key_buffer=128M
set-variable=table_cache=256
set-variable=sort_buffer=10M
set-variable=record_buffer=2M
set-variable=max_connections=400
set-variable=wait_timeout=2400

Thanks.

Freddie Bingham
Tue 13th Feb '01, 10:20pm
Well I don't think you will have alot of luck with 350 users on only 350 megs of ram.

Also considering your lack of ram this setting seems to high

set-variable=key_buffer=128M

Also upgrade to mysql 3.23.32