PDA

View Full Version : Eva - New server, needs tuning...


mickmel
Wed 25th Sep '02, 11:01pm
Here's all of the info you need. The server is up, and a few things are on it, but the traffic is still on the old server. I'd like to tweak this as well as possible before I unleash the masses on it. :) Thanks for your help!


1. your server specs, such as mysql and php version

Dual P3 - 1.2 Ghz (512k cache)
1 gig, although it will be 2 gigs very soon.
RedHat Linux/Cpanel/WHM
SCSI hard drives
PHP version 4.2.3
MySQL version 3.23.39


2. if possible how mysql was compiled/installed

I don't know - host did it. :)


3. your top stats

8:45pm up 7:50, 1 user, load average: 0.15, 0.03, 0.01
73 processes: 72 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states: 0.2% user, 0.2% system, 0.0% nice, 99.1% idle
CPU1 states: 0.0% user, 0.1% system, 0.0% nice, 99.4% idle
Mem: 1031064K av, 474640K used, 556424K free, 0K shrd, 88180K buff
Swap: 2096472K av, 0K used, 2096472K free 305092K cached


4. your mysql configuration variables located at /etc/my.cnf or c:\my.cnf if on Windows server if you don't have that file you need to log into telnet and as root user type

[mysqld]
set-variable = max_connections=500


5. your mysql extended-status output either still telnet as root user type

+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| Aborted_clients | 0 |
| Aborted_connects | 147 |
| Bytes_received | 54473 |
| Bytes_sent | 85089 |
| Connections | 560 |
| Created_tmp_disk_tables | 0 |
| Created_tmp_tables | 0 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 0 |
| Handler_read_first | 93 |
| Handler_read_key | 0 |
| Handler_read_next | 709 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 105 |
| Handler_read_rnd_next | 513 |
| Handler_update | 107 |
| Handler_write | 115 |
| Key_blocks_used | 96 |
| Key_read_requests | 309 |
| Key_reads | 96 |
| Key_write_requests | 18 |
| Key_writes | 18 |
| Max_used_connections | 1 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 1 |
| Open_files | 2 |
| Open_streams | 0 |
| Opened_tables | 157 |
| Questions | 948 |
| Select_full_join | 0 |
| Select_full_range_join | 0 |
| Select_range | 0 |
| Select_range_check | 0 |
| Select_scan | 62 |
| Slave_running | OFF |
| Slave_open_temp_tables | 0 |
| Slow_launch_threads | 0 |
| Slow_queries | 0 |
| Sort_merge_passes | 0 |
| Sort_range | 0 |
| Sort_rows | 0 |
| Sort_scan | 0 |
| Table_locks_immediate | 333 |
| Table_locks_waited | 0 |
| Threads_cached | 0 |
| Threads_created | 559 |
| Threads_connected | 1 |
| Threads_running | 1 |
| Uptime | 28510 |
+--------------------------+-------+


6. oh and is your vB the only thing on the server? or other scripts? sites?

vB is technically about 1/3 of our traffic, but 99.9% of the site is driven by scripts that use vB HEAVILY.


7. how many average and max concurrent users on your vB forum ?

Average = 200-300
Max ("most users ever online) = 675


8. create a file named phpinfo.php and place this code in it and post the url/link to it from your web site

http://www.christianguitar.org/phpinfo.php


9. if you run Apache and you have your own dedicated server or access to your httpd.conf (apache configuration file)

can you post the values you have set for the following :

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150

eva2000
Wed 25th Sep '02, 11:29pm
1. upgrade mysql to 3.23.52
2. create or replace /etc/my.cnf file with the below one and restart mysql


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

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
set-variable = max_connections=650
set-variable = key_buffer=16M
set-variable = myisam_sort_buffer_size=64M
set-variable = join_buffer=1M
set-variable = record_buffer=1M
set-variable = sort_buffer=2M
set-variable = table_cache=1024
set-variable = thread_cache_size=256
set-variable = wait_timeout=9600
set-variable = connect_timeout=10
set-variable = max_allowed_packet=16M
set-variable = max_connect_errors=10

[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
set-variable = read_buffer=16M
set-variable = write_buffer=16M

mickmel
Thu 26th Sep '02, 10:02pm
Superb. We're running about 300 people on the boards right now, and the load is staying in the 0.7-0.8 range, which I think is quite good. Thanks!

Mickey

eva2000
Fri 27th Sep '02, 11:15am
Originally posted by mickmel
Superb. We're running about 300 people on the boards right now, and the load is staying in the 0.7-0.8 range, which I think is quite good. Thanks!

Mickey no probs .. great to hear it's performing well :D