PDA

View Full Version : Server Optimization


Sinko
Mon 1st Sep '03, 3:03pm
Heya guys.

I am looking at ways to optimize my server. I had to upgrade from a Celeron to a Pentium 4 2.4 ghz Processor because VB3 was killing the Celeron. Now the VB3 is eating away at the RAM and I want to optimize my server so I don't kill a second server.

1. is this on dedicated or shared virual server

- Dedicated

2. your server specs. For example:

cpu speed/type single or dual cpus): p4 2.4 processor single
how much memory installed: 512mb PC133 Ram
hard drive type/configuration: 2x 80GB
linux distributor or windows version: FreeBSD 4.8
apache/IIS version: apache 1.3.28
PHP version: php 4.3.2
MySQL version: mysql 4.0.14


3. if you use mysql 4.x instead of mysql 3.23.x, do you have any innodb type databases/tables on your server ?

- No idea

4. if possible how mysql was compiled/installed

However CPanel installs it.

5. your top stats

48,000 posts, 1300 members, Current Stats: 0.23 0.40 0.30</B> | 66 Users Online (36 members and 30 guests)

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

mysqladmin -u root -p variables

copy and paste output here

- [mysqld]
set-variable = max_connections=500


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

mysqladmin -u root -p extended-status

copy and paste output here

+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 0 |
| Aborted_connects | 0 |
| Bytes_received | 23608542 |
| Bytes_sent | 1064118429 |
| Com_admin_commands | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 5193 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_commit | 0 |
| Com_create_db | 0 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 0 |
| Com_delete | 284 |
| Com_delete_multi | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_insert | 2361 |
| Com_insert_select | 52 |
| 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 | 153 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 1 |
| Com_savepoint | 0 |
| Com_select | 61824 |
| Com_set_option | 0 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_create | 0 |
| Com_show_databases | 1 |
| 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 | 1 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 3 |
| Com_show_innodb_status | 0 |
| Com_show_tables | 1 |
| Com_show_variables | 4 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 10337 |
| Connections | 5196 |
| Created_tmp_disk_tables | 101 |
| Created_tmp_tables | 4413 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 664 |
| Handler_read_first | 7736 |
| Handler_read_key | 1316513 |
| Handler_read_next | 473694 |
| Handler_read_prev | 39951 |
| Handler_read_rnd | 429569 |
| Handler_read_rnd_next | 1942931 |
| Handler_rollback | 0 |
| Handler_update | 56251 |
| Handler_write | 313041 |
| Key_blocks_used | 5850 |
| Key_read_requests | 2947802 |
| Key_reads | 5791 |
| Key_write_requests | 7195 |
| Key_writes | 5992 |
| Max_used_connections | 6 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 64 |
| Open_files | 108 |
| Open_streams | 0 |
| Opened_tables | 274 |
| Questions | 85403 |
| 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 | 380 |
| Select_full_range_join | 860 |
| Select_range | 20739 |
| Select_range_check | 0 |
| Select_scan | 12080 |
| Slave_open_temp_tables | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 0 |
| Sort_merge_passes | 0 |
| Sort_range | 4705 |
| Sort_rows | 442753 |
| Sort_scan | 6247 |
| Table_locks_immediate | 123837 |
| Table_locks_waited | 18 |
| Threads_cached | 0 |
| Threads_created | 5195 |
| Threads_connected | 5 |
| Threads_running | 1 |
| Uptime | 8301 |
+--------------------------+------------+


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

- Have currently another site up that is doing about 20,000 hits a day. The two sites are together.

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

I would say about 60 average at a time with 120 at night time.

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

http://serebii.net/phpinfo.php

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 secs
MinSpareServers - 5
MaxSpareServers - 10
StartServers - 5
MaxClients - 150

12. what version of vB are you running ?

VBulletin 3.0.0 Beta 5

eva2000
Tue 2nd Sep '03, 11:29am
okay i'd try this /etc/my.cnf below and restart mysql


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


and then try installing Turck Mmcache http://www.vbulletin.com/forum/showthread.php?t=75878 and see how it goes