PDA

View Full Version : Please help to optimize (New Debian Server)


dslteam
Sat 13th Mar '04, 9:27am
Hello,

Please help me to optimize my new server:

1. dedicated server
2.
Dual AMD MP 2,4 ghz
at the moment 1,5 GB RAM , but in 2 day -> 2 GB RAM
80GB EIDE non raid
Debian (2.4.20-6)
apache 1.3.26
PHP version: php 4.1.2
MySQL version: mysql 4.0.18

3. I dont use any innodb type databases/tables
4. mysql was installed by a debian packet
5. my top stats

14:27:06 up 1 day, 12:53, 2 users, load average: 0.10, 0.09, 0.11
207 processes: 205 sleeping, 1 running, 1 zombie, 0 stopped
CPU states: 2.8% user, 1.3% system, 0.0% nice, 95.9% idle
Mem: 1551112K total, 1016188K used, 534924K free, 75492K buffers
Swap: 1502036K total, 92K used, 1501944K free, 578912K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
25147 root 18 0 1048 1048 748 R 7.3 0.0 0:00 top
4723 mysql 11 0 35864 35M 2800 S 1.8 2.3 0:40 mysqld
4732 mysql 11 0 35864 35M 2800 S 1.8 2.3 0:46 mysqld
24789 www-data 9 0 7448 7448 5676 S 0.9 0.4 0:00 apache
25143 www-data 9 0 4204 4204 3788 S 0.9 0.2 0:00 apache
25144 www-data 10 0 0 0 0 Z 0.9 0.0 0:00 apache <defunct>
1 root 8 0 492 492 424 S 0.0 0.0 0:04 init
2 root 8 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 9 0 0 0 0 SW 0.0 0.0 0:00 kswapd
6 root 9 0 0 0 0 SW 0.0 0.0 0:00 bdflush
7 root 9 0 0 0 0 SW 0.0 0.0 0:03 kupdated
85 root 9 0 0 0 0 SW 0.0 0.0 0:15 kjournald
133 root 9 0 0 0 0 SW 0.0 0.0 0:00 khubd
244 root 9 0 664 664 548 S 0.0 0.0 0:00 syslogd


6. my mysql configuration


[client]
#password = my_password
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
err-log = /var/log/mysql/mysql.err
socket = /var/run/mysqld/mysqld.sock
[mysqld]
max_connections = 600
key_buffer = 32M
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 = 900
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
skip-networking
[mysqld_safe]
open_files_limit = 8192
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M


7. my mysql extended-status
+--------------------------------+-----------+
| Variable_name | Value |
+--------------------------------+-----------+
| Aborted_clients | 272 |
| Aborted_connects | 1 |
| Bytes_received | 119906144 |
| Bytes_sent | 335258062 |
| Com_admin_commands | 3 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 88598 |
| 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 | 7648 |
| 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 | 22235 |
| Com_insert_select | 372 |
| 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 | 682 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 419348 |
| Com_set_option | 0 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_create | 0 |
| Com_show_databases | 8 |
| Com_show_fields | 8 |
| Com_show_grants | 16 |
| Com_show_keys | 13 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_processlist | 5 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 125 |
| Com_show_innodb_status | 0 |
| Com_show_tables | 99 |
| Com_show_variables | 8 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 51420 |
| Connections | 67602 |
| Created_tmp_disk_tables | 739 |
| Created_tmp_tables | 7718 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 222 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 12312 |
| Handler_read_first | 5224 |
| Handler_read_key | 6856072 |
| Handler_read_next | 177473264 |
| Handler_read_prev | 160701 |
| Handler_read_rnd | 1999748 |
| Handler_read_rnd_next | 59131656 |
| Handler_rollback | 0 |
| Handler_update | 148478 |
| Handler_write | 1325513 |
| Key_blocks_used | 11330 |
| Key_read_requests | 25108900 |
| Key_reads | 10295 |
| Key_write_requests | 57133 |
| Key_writes | 31529 |
| Max_used_connections | 25 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 164 |
| Open_files | 302 |
| Open_streams | 0 |
| Opened_tables | 170 |
| Questions | 828067 |
| Qcache_queries_in_cache | 1622 |
| Qcache_inserts | 97123 |
| Qcache_hits | 170146 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 322739 |
| Qcache_free_memory | 25573912 |
| Qcache_free_blocks | 628 |
| Qcache_total_blocks | 4067 |
| Rpl_status | NULL |
| Select_full_join | 7 |
| Select_full_range_join | 9 |
| Select_range | 14238 |
| Select_range_check | 0 |
| Select_scan | 69720 |
| Slave_open_temp_tables | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 0 |
| Sort_merge_passes | 0 |
| Sort_range | 18294 |
| Sort_rows | 3048551 |
| Sort_scan | 42459 |
| Ssl_accepts | 0 |
| Ssl_finished_accepts | 0 |
| Ssl_finished_connects | 0 |
| Ssl_accept_renegotiates | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_callback_cache_hits | 0 |
| Ssl_session_cache_hits | 0 |
| Ssl_session_cache_misses | 0 |
| Ssl_session_cache_timeouts | 0 |
| Ssl_used_session_cache_entries | 0 |
| Ssl_client_connects | 0 |
| Ssl_session_cache_overflows | 0 |
| Ssl_session_cache_size | 0 |
| Ssl_session_cache_mode | NONE |
| Ssl_sessions_reused | 0 |
| Ssl_ctx_verify_mode | 0 |
| Ssl_ctx_verify_depth | 0 |
| Ssl_verify_mode | 0 |
| Ssl_verify_depth | 0 |
| Ssl_version | |
| Ssl_cipher | |
| Ssl_cipher_list | |
| Ssl_default_timeout | 0 |
| Table_locks_immediate | 592608 |
| Table_locks_waited | 89 |
| Threads_cached | 14 |
| Threads_created | 26 |
| Threads_connected | 12 |
| Threads_running | 1 |
| Uptime | 55363 |
+--------------------------------+-----------+


8. vb is the only thing on this server

9.
average: 300 users
max: 700 users

10. www.dslteam.de/in.php (http://www.dslteam.de/in.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
MinSpareServers: 5
MaxSpareServers: 10
StartServers: 5
MaxClients: 150

12. vbulleton 3 rc3

scotty
Sat 13th Mar '04, 9:56am
short tip: update to RC4 - there is a significant speed difference!
http://www.vbulletin.com/forum/showthread.php?t=97561

dslteam
Sat 13th Mar '04, 11:09am
Thanks scotty, but I think that it would make more sense to wait until the next week to upgrade to the final :-)

Nevertheless I wish to have an optimized server too

scotty
Sat 13th Mar '04, 11:13am
Thanks scotty, but I think that it would make more sense to wait until the next week to upgrade to the final :-)
you're right! sorry - was only my own experience with a simliar hardware to yours

Nevertheless I wish to have an optimized server too
just wait a little bit - it's night in australia at the moment... ;)

eva2000
Tue 16th Mar '04, 4:40am
hi dslteam, your my.cnf looks optimised and is fine

you might want to upgrade to PHP 4.3.4 and then upgrade to vB 3 RC4