PDA

View Full Version : Server optimization help needed (George we need you! :D)


Aaow AnD wHiTe
Mon 25th Aug '03, 6:37pm
Hello there, eva ^^

Some months ago, you helped us tuning up our server (thank you, it was really useful!), and now that we're going to move servers (so we can avoid Ensim 3.1 EOL), we would really love to have your help tunning this new server. Please, keep in mind that we haven't moved our vBulletin yet, that's why top and other stats show this low load :)

Thanx in advance, here you have the details of our server:


1. is this on dedicated or shared virual server

Dedicated server on RackShack

2. your server specs

Celeron 1,7, 512 MB RAM, (1) 60GB IDE HD 7200RPM, RedHat Linux 7.3, Apache 1.3.28, PHP 4.3.2, MySQL 4.0.14-standard

3. do you have any innodb type databases/tables on your server ?

No that I know.

4. how mysql was compiled/installed

Through WHM settings, was MySQL 3 then switched to MySQL 4, after that, I rebuild apache using easyapache.

5. Your top stats: (Remember I have yet to move my vB, that's why the load is so low

2:09pm up 1 day, 9:36, 2 users, load average: 0.00, 0.00, 0.00
89 processes: 88 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 1.0% user, 0.6% system, 0.0% nice, 27.2% idle
Mem: 506048K av, 485400K used, 20648K free, 0K shrd, 111680K buff
Swap: 1020116K av, 88K used, 1020028K free 253876K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
8886 root 13 0 1016 1016 800 R 0.9 0.2 0:00 top
1 root 8 0 272 240 208 S 0.0 0.0 0:06 init
2 root 8 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 9 0 0 0 0 SW 0.0 0.0 0:00 kapmd
4 root 18 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
5 root 9 0 0 0 0 SW 0.0 0.0 0:00 kswapd
6 root 13 0 0 0 0 SW 0.0 0.0 4:19 kscand
7 root 9 0 0 0 0 SW 0.0 0.0 0:00 bdflush
8 root 9 0 0 0 0 SW 0.0 0.0 0:00 kupdated
9 root -1 -20 0 0 0 SW< 0.0 0.0 0:00 mdrecoveryd
13 root 9 0 0 0 0 SW 0.0 0.0 0:01 kjournald
91 root 9 0 0 0 0 SW 0.0 0.0 0:00 khubd
286 root 9 0 0 0 0 SW 0.0 0.0 0:00 kjournald
605 root 9 0 0 0 0 SW 0.0 0.0 0:00 eth0
712 root 9 0 404 392 316 S 0.0 0.0 0:01 syslogd
717 root 9 0 252 252 188 S 0.0 0.0 0:00 klogd
863 nobody 8 0 1348 1348 892 S 0.0 0.2 0:00 proftpd
882 root 9 0 1012 1012 792 S 0.0 0.1 0:00 sshd
916 root 9 0 672 672 504 S 0.0 0.1 0:00 xinetd
947 mailnull 9 0 9168 9168 1160 S 0.0 1.8 0:00 MailScanner
968 root 9 0 1072 1072 888 S 0.0 0.2 0:00 antirelayd
987 root 9 0 2292 2292 1084 S 0.0 0.4 0:01 chkservd
1018 root 9 0 3120 3120 1756 S 0.0 0.6 0:01 cpaneld
1062 nobody 9 0 1652 1652 940 S 0.0 0.3 0:00 entropychat
1067 nobody 9 0 424 424 188 S 0.0 0.0 0:00 melange
1159 cpanel 9 0 1568 1568 1144 S 0.0 0.3 0:00 stunnel-4.04loc
1168 named 9 0 2260 2260 1500 S 0.0 0.4 0:00 named
1170 named 9 0 2260 2260 1500 S 0.0 0.4 0:00 named
1171 named 9 0 2260 2260 1500 S 0.0 0.4 0:00 named
1172 named 9 0 2260 2260 1500 S 0.0 0.4 0:00 named
1173 named 9 0 2260 2260 1500 S 0.0 0.4 0:00 named
1184 root 9 0 2900 2900 1692 S 0.0 0.5 0:00 whostmgrd
1211 mailnull 9 0 1276 1272 1000 S 0.0 0.2 0:00 exim
1220 mailnull 9 0 1176 1172 900 S 0.0 0.2 0:00 exim
1225 mailnull 9 0 1168 1164 892 S 0.0 0.2 0:00 exim
1230 root 9 0 1060 1060 888 S 0.0 0.2 0:00 antirelayd
1238 root 9 0 14512 14M 1164 S 0.0 2.8 0:00 spamd


6. your mysql configuration variables located at /etc/my.cnf

[mysqld]
set-variable = max_connections=500

7. your mysql extended-status output

+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| Aborted_clients | 0 |
| Aborted_connects | 2 |
| Bytes_received | 4619 |
| Bytes_sent | 17784 |
| Com_admin_commands | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 0 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_commit | 0 |
| Com_create_db | 1 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 4 |
| Com_delete | 0 |
| Com_delete_multi | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_flush | 2 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_insert | 0 |
| Com_insert_select | 0 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 0 |
| Com_optimize | 0 |
| Com_purge | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 2 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 0 |
| Com_set_option | 0 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_create | 0 |
| Com_show_databases | 2 |
| Com_show_fields | 0 |
| Com_show_grants | 0 |
| Com_show_keys | 0 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_processlist | 32 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 1 |
| Com_show_innodb_status | 0 |
| Com_show_tables | 0 |
| Com_show_variables | 2 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 1 |
| Connections | 51 |
| 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_commit | 0 |
| Handler_delete | 0 |
| Handler_read_first | 3 |
| Handler_read_key | 0 |
| Handler_read_next | 21 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 2 |
| Handler_read_rnd_next | 73 |
| Handler_rollback | 0 |
| Handler_update | 4 |
| Handler_write | 2 |
| Key_blocks_used | 5 |
| Key_read_requests | 8 |
| Key_reads | 5 |
| Key_write_requests | 0 |
| Key_writes | 0 |
| Max_used_connections | 1 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 0 |
| Open_files | 0 |
| Open_streams | 0 |
| Opened_tables | 16 |
| Questions | 94 |
| Qcache_queries_in_cache | 0 |
| Qcache_inserts | 0 |
| Qcache_hits | 0 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 0 |
| Qcache_free_memory | 0 |
| Qcache_free_blocks | 0 |
| Qcache_total_blocks | 0 |
| Rpl_status | NULL |
| Select_full_join | 0 |
| Select_full_range_join | 0 |
| Select_range | 0 |
| Select_range_check | 0 |
| Select_scan | 0 |
| Slave_open_temp_tables | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 0 |
| Sort_merge_passes | 0 |
| Sort_range | 0 |
| Sort_rows | 0 |
| Sort_scan | 0 |
| Table_locks_immediate | 19 |
| Table_locks_waited | 0 |
| Threads_cached | 0 |
| Threads_created | 50 |
| Threads_connected | 1 |
| Threads_running | 1 |
| Uptime | 9084 |
+--------------------------+-------+

8. is your vB the only thing on the server?

Is the main thing going on in my server, I'll have to install a couple of things, like PafileDB and maybe a gallery, but they won't even use a 5% of the resources my vB will. Hosting a few sites (less than 5), but small ones.

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

Average around 40-60. Max 115

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

If you don't mind, I would prefer PMing the link to you.

11. httpd.conf

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

12. what version of vB are you running ?
2.3.0 Will be switching to vB3 soon, hopefully as soon as the final style is done.

;)

eva2000
Mon 25th Aug '03, 10:16pm
since you're using mysql 4.0.14 try this new my.cnf file and restart mysql


[mysqld]
max_connections = 400
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

Aaow AnD wHiTe
Tue 26th Aug '03, 12:47pm
Thank you, will try that out ^^ Would you advice installing Turck MMCache in our machine with the setup we have?

BTW, we have a big database, 700+++ MB :-S

eva2000
Wed 27th Aug '03, 1:14am
yeah give turck mmcache a few days trial run