need optimization from server guru, server lag
I'm running a forum board using vB.
with 150-300 ppl online at the same time 300-350 during peak hour
sometime it's fast and mostly all the time slow. can the guru help me optimize please.
My server specs : AMD 2.4 Gz, 1GB RAM
Sat Apr 24 15:01:19 PDT 2004
15:01:20 up 3:54, 0 users, load average: 0.07, 0.24, 0.42
225 processes: 224 sleeping, 1 running, 0 zombie, 0 stopped
Mem: 998616k av, 945956k used, 52660k free, 0k shrd, 39084k buff
749020k actv, 24484k in_d, 19652k in_c
Swap: 979956k av, 18032k used, 961924k free 652704k cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
22066 nobody 22 0 1264 1264 856 R 0.9 0.1 0:00 0 top
Http processes currently running = 86
Mysql processes currently running = 89
Netstat information summary
1 CLOSING
4 FIN_WAIT2
7 CLOSE_WAIT
21 SYN_RECV
25 FIN_WAIT1
35 LISTEN
72 ESTABLISHED
513 TIME_WAIT
+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 2154 |
| Aborted_connects | 2 |
| Bytes_received | 100132054 |
| Bytes_sent | 1879281391 |
| Com_admin_commands | 0 |
| Com_alter_table | 9 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 1 |
| Com_change_db | 60593 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_commit | 1 |
| Com_create_db | 1 |
| Com_create_function | 0 |
| Com_create_index | 7 |
| Com_create_table | 8 |
| Com_delete | 3605 |
| Com_delete_multi | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_flush | 5 |
| Com_grant | 9 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_insert | 3815 |
| Com_insert_select | 142 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 535 |
| Com_optimize | 0 |
| Com_purge | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 339 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 182934 |
| 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 | 47 |
| 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 | 1 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 535 |
| Com_update | 54966 |
| Connections | 62350 |
| Created_tmp_disk_tables | 6 |
| Created_tmp_tables | 8172 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 3173 |
| Handler_read_first | 19598 |
| Handler_read_key | 3440858 |
| Handler_read_next | 32916422 |
| Handler_read_prev | 1038420 |
| Handler_read_rnd | 1056014 |
| Handler_read_rnd_next | 6400110 |
| Handler_rollback | 0 |
| Handler_update | 76086 |
| Handler_write | 454522 |
| Key_blocks_used | 13307 |
| Key_read_requests | 11656123 |
| Key_reads | 13240 |
| Key_write_requests | 13928 |
| Key_writes | 13023 |
| Max_used_connections | 82 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 320 | 21% of table_cache in use
| Open_files | 407 |
| Open_streams | 0 |
| Opened_tables | 372 |
| Questions | 651771 |
| Qcache_queries_in_cache | 2815 |
| Qcache_inserts | 182800 |
| Qcache_hits | 282968 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 113 |
| Qcache_free_memory | 20502064 |
| Qcache_free_blocks | 1321 |
| Qcache_total_blocks | 7119 |
| Rpl_status | NULL |
| Select_full_join | 0 |
| Select_full_range_join | 0 |
| Select_range | 34661 |
| Select_range_check | 0 |
| Select_scan | 15102 |
| Slave_open_temp_tables | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 3 | (execution time > 10 secs)
| Sort_merge_passes | 0 |
| Sort_range | 33593 |
| Sort_rows | 1267129 |
| Sort_scan | 10715 |
| Table_locks_immediate | 372418 |
| Table_locks_waited | 644 |
| Threads_cached | 61 |
| Threads_created | 83 |
| Threads_connected | 22 |
| Threads_running | 1 |
| Uptime | 14004 | 3 hrs 53 mins 24 secs
+--------------------------+------------+
Key Reads/Key Read Requests = 0.001136 (Cache hit = 99.998864%)
Key Writes/Key Write Requests = 0.935023
Connections/second = 4.452 (/hour = 16028.278)
KB received/second = 6.983 (/hour = 25137.532)
KB sent/second = 131.051 (/hour = 471782.776)
Temporary Tables Created/second = 0.584 (/hour = 2100.771)
Opened Tables/second = 0.027 (/hour = 95.630)
Slow Queries/second = 0.000 (/hour = 0.771)
% of slow queries = 0.000%
Queries/second = 46.542 (/hour = 167550.386)
MySQL Query Cache hits = 282968/465881(61%)
and my.cnf :
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
skip-innodb
max_connections=500
key_buffer=16M
myisam_sort_buffer_size=64M
join_buffer_size=3M
read_buffer_size=3M
sort_buffer_size=5M
table_cache=1500
thread_cache_size=256
wait_timeout=100
connect_timeout=10
interactive_timeout=100
max_allowed_packet=1M
max_connect_errors=10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
skip-innodb
thread_concurrency=2
server-id=1
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
#safe-updates
[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[mysqlhotcopy]
interactive-timeout