PDA

View Full Version : Server Optimization Suggestion


foam
Sun 31st Aug '03, 7:03am
1. is this on dedicated or shared virual server
This is a dedicated server for shared hosting

2. your server specs. For example:

cpu speed/type single or dual cpus): Dual Intel Xeon 2.0GHz
how much memory installed: 1GB DDR RAM
hard drive type/configuration: 2x 73GB 10k RPM SCSI (I also have another server with a single 73GB SCSI HD so if that matters at all)
linux distributor or windows version: redhat linux 7.3
apache/IIS version: apache 1.3.28
PHP version: PHP 4.3.2
MySQL version: mysql Ver 12.21 Distrib 4.0.14, for pc-linux (i686)


3. if you use mysql 4.x instead of mysql 3.23.x, do you have any innodb type databases/tables on your server ?
I apologize, I do not handle admin tasks, what is an innodb?

4. if possible how mysql was compiled/installed
RackShack installed it with CPanel so I do not know.

5. your top stats
3:02pm up 8 days, 23:48, 1 user, load average: 1.04, 0.66, 0.48
113 processes: 105 sleeping, 2 running, 6 zombie, 0 stopped
CPU0 states: 19.0% user, 4.0% system, 0.0% nice, 75.1% idle
CPU1 states: 4.0% user, 2.0% system, 0.0% nice, 92.0% idle
CPU2 states: 7.0% user, 1.0% system, 0.0% nice, 90.0% idle
CPU3 states: 0.0% user, 0.0% system, 0.0% nice, 100.0% idle
Mem: 1033824K av, 993840K used, 39984K free, 0K shrd, 94728K buff
Swap: 2048276K av, 76928K used, 1971348K free 714376K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
3430 nobody 12 0 0 0 0 Z 6.7 0.0 0:00 httpd <defunct>
24454 nobody 15 0 0 0 0 Z 5.7 0.0 0:00 httpd <defunct>
31849 root 13 0 1908 1908 1660 R 2.8 0.1 0:00 top
7772 nobody 9 0 0 0 0 Z 0.9 0.0 0:00 httpd <defunct>
1039 nobody 9 0 0 0 0 Z 0.9 0.0 0:00 httpd <defunct>
2352 root 18 0 4072 3524 3044 R 0.9 0.3 0:00 cppop
1 root 4 0 936 876 856 S 0.0 0.0 0:30 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 19 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
4 root 19 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU1
5 root 19 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU2
6 root 19 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU3
7 root 9 0 0 0 0 SW 0.0 0.0 2:44 kswapd
8 root 9 0 0 0 0 SW 0.0 0.0 0:00 bdflush

Generally the load is around 1.00-1.50. At peak times it can reach 2 and 3.


6. 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




7. your mysql extended-status output either still telnet as root user type
+--------------------------+----------+
| Variable_name | Value |
+--------------------------+----------+
| Aborted_clients | 0 |
| Aborted_connects | 1 |
| Bytes_received | 301436 |
| Bytes_sent | 18666813 |
| Com_admin_commands | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 200 |
| 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 | 21 |
| Com_delete_multi | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_flush | 1 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_insert | 49 |
| Com_insert_select | 3 |
| 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 | 6 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 1749 |
| Com_set_option | 1 |
| 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 | 0 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 1 |
| Com_show_innodb_status | 0 |
| Com_show_tables | 2 |
| Com_show_variables | 0 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 242 |
| Connections | 203 |
| Created_tmp_disk_tables | 5 |
| Created_tmp_tables | 95 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 11 |
| Handler_read_first | 347 |
| Handler_read_key | 12300 |
| Handler_read_next | 134546 |
| Handler_read_prev | 8768 |
| Handler_read_rnd | 137418 |
| Handler_read_rnd_next | 1619825 |
| Handler_rollback | 0 |
| Handler_update | 257 |
| Handler_write | 3294 |
| Key_blocks_used | 1545 |
| Key_read_requests | 37186 |
| Key_reads | 1541 |
| Key_write_requests | 350 |
| Key_writes | 96 |
| Max_used_connections | 5 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 64 |
| Open_files | 121 |
| Open_streams | 0 |
| Opened_tables | 615 |
| Questions | 2570 |
| 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 | 10 |
| Select_full_range_join | 0 |
| Select_range | 51 |
| Select_range_check | 0 |
| Select_scan | 915 |
| Slave_open_temp_tables | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 0 |
| Sort_merge_passes | 0 |
| Sort_range | 76 |
| Sort_rows | 137424 |
| Sort_scan | 368 |
| Table_locks_immediate | 2744 |
| Table_locks_waited | 1 |
| Threads_cached | 0 |
| Threads_created | 202 |
| Threads_connected | 2 |
| Threads_running | 1 |
| Uptime | 89 |
+--------------------------+----------+



8. oh and is your vB the only thing on the server? or other scripts? sites?
vBulletin is one of MANY scripts on the server

9. how many average and max concurrent users on your vB forum ?
There are a couple of vB forums on my server so I couldn't tell you. Other kinds of forums are also on the server as well.

10. create a file named phpinfo.php and place this code in it and post the url/link to it from your web site
I would feel more comfortable if I could PM this to you.

11. 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

12. what version of vB are you running ?
2.3.0 and other various versions around there.

eva2000
Sun 31st Aug '03, 11:32am
hi foam,

Can you please enter your vBulletin.com forum username on the form on this page to receive support for this issue: http://www.vbulletin.com/members/forums.php
- you will need your vB license customer number and password to access this form.

foam
Sun 31st Aug '03, 1:43pm
I have added my email address to the form, thanks :)

eva2000
Sun 31st Aug '03, 2:37pm
thanks foam.. okay since it's a standard cpanel install it's easy

edit and/or replace contents of your /etc/my.cnf file with below 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

foam
Sun 31st Aug '03, 6:38pm
thanks foam.. okay since it's a standard cpanel install it's easy

edit and/or replace contents of your /etc/my.cnf file with below and restart mysql

THANKS EVA2000!!!!

I appreciate it a ton.

eva2000
Mon 1st Sep '03, 10:50am
no probs :)