PDA

View Full Version : VB on Raq3 Optimization - anything else I _can_ do?


Swamper
Sat 20th Oct '01, 7:28pm
Ok this is what I'm running on a dedicated Raq3 at tera-byte:

Apache 1.3.20 + lingerd 0.93 (http://www.iagora.com/about/software/lingerd)
(php compiled into apache)

MySql 3.23.43
./configure --prefix=/usr/local/mysql --with-charset=latin1 --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static

Mod_Gzip 1.3.19.1a

PHP 4.0.6 + APC 1.1.0pl1
./configure --with-mysql=/usr/local/mysql --with-zlib --enable-track-vars --enable-ftp --with-xml --enable-trans-sid --with-gd --with-apache=../apache_1.3.20 --enable-apc --with-gd --with-png --enable-inline-optimization --disable-debug

APC stats:
apc.mode=SHM
apc.relative_includes=1
apc.shm_segments = 1
apc.shm_segment_size=6000000

124497 Hits & 50 Misses.

Some Apache httpd.conf settings:

Timeout 175
SendBufferSize 50000
KeepAlive Off
MinSpareServers 10
MaxSpareServers 30
StartServers 10
MaxClients 200
MaxRequestsPerChild 75
ThreadsPerChild 250

mod_gzip_on Yes
mod_gzip_item_exclude file "\.js$"
mod_gzip_item_exclude file "\.css$"
mod_gzip_item_exclude mime ^cgi-bin/.*mod_gzip_item_exclude mime ^image/.*
mod_gzip_minimum_file_size 300
mod_gzip_maximum_file_size 0

my.cnf settings
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
set-variable = max_connections=120
set-variable = key_buffer=64M
set-variable = join_buffer=8M
set-variable = record_buffer=8M
set-variable = sort_buffer=6M
set-variable = table_cache=1024
set-variable = myisam_sort_buffer_size=32M
set-variable = thread_cache_size=512

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


mysql show status:


+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 761 |
| Aborted_connects | 2 |
| Bytes_received | 136331950 |
| Bytes_sent | 2002002199 |
| Connections | 52341 |
| Created_tmp_disk_tables | 28 |
| Created_tmp_tables | 16220 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 7401 |
| Handler_read_first | 3 |
| Handler_read_key | 15208743 |
| Handler_read_next | 71124959 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 5569943 |
| Handler_read_rnd_next | 610187044 |
| Handler_update | 151428 |
| Handler_write | 1189506 |
| Key_blocks_used | 20097 |
| Key_read_requests | 54232296 |
| Key_reads | 19779 |
| Key_write_requests | 42144 |
| Key_writes | 36828 |
| Max_used_connections | 111 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 303 |
| Open_files | 328 |
| Open_streams | 0 |
| Opened_tables | 309 |
| Questions | 828194 |
| Select_full_join | 153 |
| Select_full_range_join | 0 |
| Select_range | 162665 |
| Select_range_check | 0 |
| Select_scan | 137048 |
| Slave_running | OFF |
| Slave_open_temp_tables | 0 |
| Slow_launch_threads | 12 |
| Slow_queries | 516 |
| Sort_merge_passes | 0 |
| Sort_range | 168789 |
| Sort_rows | 5583375 |
| Sort_scan | 70643 |
| Table_locks_immediate | 867665 |
| Table_locks_waited | 3095 |
| Threads_cached | 109 |
| Threads_created | 112 |
| Threads_connected | 3 |
| Threads_running | 1 |
| Uptime | 88330 |
+--------------------------+------------+


(If bytes sent seems high it's because I have a section where users can post mp3 song clips from mixes that they need identified (500k max size))

Persistent Connections are off - gzip forums content is on.

HD default settings changed to
/sbin/hdparm -c1 -d1 -X66 -u1 /dev/hda


total used free shared buffers cached
Mem: 517188 388232 128956 208712 29384 238124
-/+ buffers/cache: 120724 396464
Swap: 131536 380 131156


Forums (Vbulletin 2.0.3) receive about 35000+ pageviews a day, anywhere from 60-110 simultaneous users usually...

Load averages are anywhere from 1 to 8 usually with spikes going to 15+ maybe 4 or 5 times a day for periods of a few minutes... I don't know what else to try hopefully one of you knows something I can change/do to get even more out of this slow cpu.. :confused:

Thanks all.

eva2000
Sat 20th Oct '01, 7:38pm
few things

1. lower key_buffer in my.cnf file from 64M to 16M
2. increase max_connections in my.cnf from 120 to 200
3. lower thread_cache_size from 512 to 256
4. lower MAXCLIENTS from 200 to 150 in httpd.conf

you need to restart mysql and apache for these to take effect

other than that cpu and memory upgradeability is your limitation