PDA

View Full Version : Server Optimization Needed


Mobilestan
Thu 24th Aug '06, 6:43am
1. It's a dedicated server

2. Its Specs:
Processor: Pentium 4 3GHZ DUAL CORE
Memory: 1GB PC3200
Hd1: 120GB 7200RPM SATA / 8MB Cache
OS: Linux - CentOS 4
CPanel
Apache v1.3.37
PHP 4.4.4
Mysql 5.0.24


3. No innodbs

4. Not sure

5. Top Stats
top - 13:48:28 up 1 day, 12:12, 1 user, load average: 3.04, 33.73, 48.45
Tasks: 171 total, 4 running, 155 sleeping, 0 stopped, 12 zombie
Cpu(s): 20.9% us, 1.3% sy, 0.0% ni, 75.2% id, 2.6% wa, 0.0% hi, 0.0% si
Mem: 1026312k total, 819188k used, 207124k free, 8136k buffers
Swap: 2040244k total, 580484k used, 1459760k free, 305372k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3240 nobody 15 0 21436 8644 1420 S 3.6 0.8 13:55.56 httpd
29559 nobody 15 0 22236 9.9m 1616 S 3.6 1.0 2:18.40 httpd
21376 nobody 15 0 19912 8676 1612 S 3.6 0.8 0:51.27 httpd
5466 mysql 10 -5 268m 51m 3432 S 3.6 5.1 1:08.79 mysqld
16802 nobody 15 0 21416 8972 1420 S 3.0 0.9 10:32.28 httpd
25108 nobody 16 0 22604 9824 1408 S 1.7 1.0 9:57.61 httpd
3305 nobody 15 0 22344 9564 1408 S 1.3 0.9 13:39.74 httpd
3171 nobody 16 0 22924 10m 1608 R 1.0 1.0 1:50.28 httpd
3304 nobody 16 0 22408 9008 1400 R 0.7 0.9 13:22.28 httpd
1 root 15 0 1688 372 340 S 0.0 0.0 0:00.36 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/0
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
4 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/0
5 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 khelper
6 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
8 root 10 -5 0 0 0 S 0.0 0.0 0:51.60 kblockd/0
11 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 khubd


6. Mysql config

[mysqld]
port = 3306
set-variable = max_connections=1000
set-variable = wait_timeout=300
skip-locking
key_buffer = 48M
max_allowed_packet = 64M
table_cache = 1800
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 524288
myisam_sort_buffer_size = 64M
thread_cache_size = 512
query_cache_size = 96M
thread_concurrency = 8
old-passwords = 1
max_heap_table_size = 64M
tmp_table_size = 128M
join_buffer_size = 1M
bulk_insert_buffer_size = 8M
query_cache_limit = 6M
query_cache_type = 1
query_prealloc_size = 65536
query_alloc_block_size = 131072
max_connect_errors = 10
ft_min_word_len = 3

[mysqld_safe]
nice = -5
open_files_limit = 8192

[mysql]
no-auto-rehash

[mysqldump]
quick
max_allowed_packet = 16M

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 4M
write_buffer = 4M

[myisamchk]
ft_min_word_len = 3
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M


7. Mysql status
Aborted_clients 0
Aborted_connects 37
Binlog_cache_disk_use 0
Binlog_cache_use 0
Bytes_received 2216
Bytes_sent 393148
Com_admin_commands 0
Com_alter_db 0
Com_alter_table 0
Com_analyze 0
Com_backup_table 0
Com_begin 0
Com_change_db 1
Com_change_master 0
Com_check 0
Com_checksum 0
Com_commit 0
Com_create_db 0
Com_create_function 0
Com_create_index 0
Com_create_table 0
Com_dealloc_sql 0
Com_delete 0
Com_delete_multi 0
Com_do 0
Com_drop_db 0
Com_drop_function 0
Com_drop_index 0
Com_drop_table 0
Com_drop_user 0
Com_execute_sql 0
Com_flush 0
Com_grant 0
Com_ha_close 0
Com_ha_open 0
Com_ha_read 0
Com_help 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_preload_keys 0
Com_prepare_sql 0
Com_purge 0
Com_purge_before_date 0
Com_rename_table 0
Com_repair 0
Com_replace 0
Com_replace_select 0
Com_reset 0
Com_restore_table 0
Com_revoke 0
Com_revoke_all 0
Com_rollback 0
Com_savepoint 0
Com_select 3
Com_set_option 0
Com_show_binlog_events 0
Com_show_binlogs 0
Com_show_charsets 0
Com_show_collations 0
Com_show_column_types 0
Com_show_create_db 0
Com_show_create_table 0
Com_show_databases 0
Com_show_errors 0
Com_show_fields 0
Com_show_grants 0
Com_show_innodb_status 0
Com_show_keys 0
Com_show_logs 0
Com_show_master_status 0
Com_show_ndb_status 0
Com_show_new_master 0
Com_show_open_tables 0
Com_show_privileges 0
Com_show_processlist 0
Com_show_slave_hosts 0
Com_show_slave_status 0
Com_show_status 1
Com_show_storage_engines 0
Com_show_tables 0
Com_show_triggers 0
Com_show_variables 0
Com_show_warnings 0
Com_slave_start 0
Com_slave_stop 0
Com_stmt_close 0
Com_stmt_execute 0
Com_stmt_fetch 0
Com_stmt_prepare 0
Com_stmt_reset 0
Com_stmt_send_long_data 0
Com_truncate 0
Com_unlock_tables 0
Com_update 1
Com_update_multi 0
Com_xa_commit 0
Com_xa_end 0
Com_xa_prepare 0
Com_xa_recover 0
Com_xa_rollback 0
Com_xa_start 0
Compression OFF
Connections 12381
Created_tmp_disk_tables 0
Created_tmp_files 2657
Created_tmp_tables 1
Delayed_errors 0
Delayed_insert_threads 0
Delayed_writes 0
Flush_commands 1
Handler_commit 0
Handler_delete 0
Handler_discover 0
Handler_prepare 0
Handler_read_first 2
Handler_read_key 6
Handler_read_next 2
Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 2
Handler_rollback 0
Handler_savepoint 0
Handler_savepoint_rollback 0
Handler_update 1
Handler_write 130
Innodb_buffer_pool_pages_data 19
Innodb_buffer_pool_pages_dirty 0
Innodb_buffer_pool_pages_flushed 0
Innodb_buffer_pool_pages_free 493
Innodb_buffer_pool_pages_latched 0
Innodb_buffer_pool_pages_misc 0
Innodb_buffer_pool_pages_total 512
Innodb_buffer_pool_read_ahead_rnd 1
Innodb_buffer_pool_read_ahead_seq 0
Innodb_buffer_pool_read_requests 77
Innodb_buffer_pool_reads 12
Innodb_buffer_pool_wait_free 0
Innodb_buffer_pool_write_requests 0
Innodb_data_fsyncs 3
Innodb_data_pending_fsyncs 0
Innodb_data_pending_reads 0
Innodb_data_pending_writes 0
Innodb_data_read 2494464
Innodb_data_reads 25
Innodb_data_writes 3
Innodb_data_written 1536
Innodb_dblwr_pages_written 0
Innodb_dblwr_writes 0
Innodb_log_waits 0
Innodb_log_write_requests 0
Innodb_log_writes 1
Innodb_os_log_fsyncs 3
Innodb_os_log_pending_fsyncs 0
Innodb_os_log_pending_writes 0
Innodb_os_log_written 512
Innodb_page_size 16384
Innodb_pages_created 0
Innodb_pages_read 19
Innodb_pages_written 0
Innodb_row_lock_current_waits 0
Innodb_row_lock_time 0
Innodb_row_lock_time_avg 0
Innodb_row_lock_time_max 0
Innodb_row_lock_waits 0
Innodb_rows_deleted 0
Innodb_rows_inserted 0
Innodb_rows_read 0
Innodb_rows_updated 0
Key_blocks_not_flushed 0
Key_blocks_unused 25432
Key_blocks_used 18180
Key_read_requests 4330757
Key_reads 18209
Key_write_requests 5369
Key_writes 3151
Last_query_cost 0.000000
Max_used_connections 195
Not_flushed_delayed_rows 0
Open_files 821
Open_streams 0
Open_tables 478
Opened_tables 0
Qcache_free_blocks 1679
Qcache_free_memory 68479864
Qcache_hits 71230
Qcache_inserts 44895
Qcache_lowmem_prunes 0
Qcache_not_cached 119
Qcache_queries_in_cache 2980
Qcache_total_blocks 8377
Questions 162519
Rpl_status NULL
Select_full_join 0
Select_full_range_join 0
Select_range 0
Select_range_check 0
Select_scan 1
Slave_open_temp_tables 0
Slave_retried_transactions 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 113655
Table_locks_waited 151
Tc_log_max_pages_used 0
Tc_log_page_size 0
Tc_log_page_waits 0
Threads_cached 43
Threads_connected 152
Threads_created 195
Threads_running 1
Uptime 2477


8. Only vbulletin
9. Average 250, max 500 (so far..). Cookies timeout is 900
10. http://www.mobilestan.net/phpinfo.php
11. KeepAlive = off
MinSpareServers = 5
MaxSpareServers = 25
MaxClients = 1400
Maxrequestsperchild value = 0

12. vb 3.5.5 (i want upgarde to 3.6.0 but i cant with high server load )
13. cpanel backups
14.
]uname -a
Linux host.mahvareh.net 2.6.17.9 #1 Sun Aug 20 22:35:10 IRDT 2006 i686 i686 i386 GNU/Linux

ulimit -aH
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 16251
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 16251
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 6
model name : Intel(R) Pentium(R) D CPU 3.40GHz
stepping : 4
cpu MHz : 3393.900
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc up pni monitor ds_cpl est cid cx16 xtpr lahf_lm
bogomips : 6794.62



thanks

eva2000
Sat 26th Aug '06, 6:08am
Okay try the following

1. Edit /etc/my.cnf and place the following mysql server settings in /etc/my.cnf and restart mysql server afterwards


[mysqld]
old_passwords
back_log = 50
skip-innodb
max_connections = 500
key_buffer = 32M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1800
thread_cache_size = 384
wait_timeout = 25
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
max_connect_errors = 10
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
query_cache_limit = 3M
query_cache_size = 64M
query_cache_type = 1
query_prealloc_size = 65536
query_alloc_block_size = 131072
default-storage-engine = MyISAM
ft_min_word_len = 3

[mysqld_safe]
nice = -5
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
ft_min_word_len = 3
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M


2. Install APC Cache lastest version from http://pecl.php.net/package/APC. Read install guide at http://www.vbulletin.com/forum/showthread.php?t=165367

3. Edit httpd.conf values from

KeepAlive = off
MinSpareServers = 5
MaxSpareServers = 25
MaxClients = 1400
Maxrequestsperchild value = 0

to

KeepAlive = off
MinSpareServers = 10
MaxSpareServers = 15
MaxClients = 150
Maxrequestsperchild value = 500

restart apache

4. If you just upgraded to vB 3.5.x/3.6.x try to disable these 4 options:

Admin CP -> vBulletin Options -> Forums Home Page Options -> Display Logged in Users?

Admin CP -> vBulletin Options -> Forum Display Options (forumdisplay) -> Show Users Browsing Forums

Admin CP -> vBulletin Options -> Thread Display Options -> Show Users Browsing Thread

Admin CP -> vBulletin Options -> Message Searching Options -> Automatic Similar Thread search

Mobilestan
Sat 26th Aug '06, 7:27am
Thank you for support
can i upgrade to 3.6.x with this settings now ?

Mobilestan
Sat 26th Aug '06, 5:54pm
after edit #1 (server load is very high)

top - 01:23:55 up 5:33, 1 user, load average: 25.09, 22.28, 21.66
Tasks: 194 total, 24 running, 170 sleeping, 0 stopped, 0 zombie
Cpu(s): 70.4% us, 5.6% sy, 0.0% ni, 3.8% id, 20.1% wa, 0.2% hi, 0.0% si
Mem: 1026236k total, 996360k used, 29876k free, 2020k buffers
Swap: 2040244k total, 101656k used, 1938588k free, 214660k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22829 mysql 10 -5 315m 86m 3356 S 99.9 8.7 0:47.67 mysqld
20143 nobody 16 0 20580 10m 3236 R 3.6 1.1 0:05.69 httpd
20146 nobody 16 0 20068 10m 3236 R 3.3 1.0 0:08.30 httpd
20308 nobody 15 0 20588 10m 3232 S 3.3 1.1 0:02.77 httpd
20869 nobody 16 0 20604 10m 3244 R 3.3 1.1 0:05.08 httpd
20915 nobody 15 0 20336 10m 3248 S 3.3 1.0 0:02.38 httpd
20900 nobody 15 0 20516 10m 3244 S 3.0 1.1 0:05.10 httpd
20153 nobody 16 0 20976 11m 3244 R 2.6 1.1 0:07.83 httpd
20190 nobody 16 0 20152 10m 3244 R 2.6 1.0 0:06.81 httpd
20169 nobody 16 0 21164 11m 3244 R 2.3 1.1 0:07.50 httpd
20887 nobody 16 0 20184 10m 3232 R 2.0 1.0 0:05.46 httpd
20911 nobody 16 0 19844 9m 3232 R 2.0 1.0 0:02.53 httpd
20154 nobody 16 0 20076 10m 3236 R 1.6 1.0 0:06.44 httpd
20159 nobody 16 0 20348 10m 3236 S 1.6 1.0 0:04.39 httpd
23006 nobody 16 0 20456 10m 3228 R 1.6 1.1 0:01.27 httpd
20162 nobody 16 0 21160 11m 3244 S 1.3 1.1 0:05.80 httpd
20342 nobody 15 0 20464 10m 3240 S 1.3 1.1 0:05.34 httpd


please help me

eva2000
Mon 28th Aug '06, 7:44am
after mysql my.cnf changes only or after doing all changes ?

can you repost output for these commands


top

mysqladmin -u root -p var ext ver > stats.txt

open the stats.txt file to copy and paste it's contents.

Mobilestan
Mon 28th Aug '06, 8:54am
i changed 1,3,4
and after this changes my site not load
and my cpu load & memory use is very high
Servel Load 11.08 (2 cpu)
Memory Used 81.2%
Swap Used 18.68%
httpd connection is very high
i think that i have Dos Attack

top - 16:19:23 up 1 day, 20:28, 2 users, load average: 4.61, 5.99, 11.04
Tasks: 171 total, 7 running, 163 sleeping, 1 stopped, 0 zombie
Cpu(s): 88.5% us, 8.0% sy, 0.0% ni, 3.2% id, 0.2% wa, 0.2% hi, 0.0% si
Mem: 1026236k total, 900172k used, 126064k free, 3428k buffers
Swap: 2040244k total, 199656k used, 1840588k free, 255716k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22478 mysql 10 -5 290m 161m 2332 S 99.9 16.1 51:48.34 mysqld
7109 nobody 15 0 21060 11m 3688 S 8.3 1.1 0:09.51 httpd
7141 nobody 16 0 21740 11m 3696 R 8.3 1.2 0:08.43 httpd
7106 nobody 16 0 22832 13m 3696 S 6.7 1.3 0:09.51 httpd
7107 nobody 15 0 20944 11m 3688 S 6.7 1.1 0:07.53 httpd
7856 nobody 15 0 24016 14m 3696 S 6.7 1.4 0:03.77 httpd
7127 nobody 16 0 20968 11m 3696 R 6.0 1.1 0:09.00 httpd
8344 nobody 15 0 21700 12m 3696 S 6.0 1.2 0:02.44 httpd
7113 nobody 16 0 20376 10m 3688 S 5.7 1.1 0:07.79 httpd
7133 nobody 16 0 22192 12m 3688 S 5.1 1.3 0:07.35 httpd
7119 nobody 17 0 20964 11m 3688 S 4.1 1.1 0:08.90 httpd
7123 nobody 16 0 21684 12m 3696 S 4.1 1.2 0:05.25 httpd
8383 nobody 16 0 20664 11m 3688 S 4.1 1.1 0:01.18 httpd
7136 nobody 16 0 23080 13m 3696 S 2.9 1.3 0:08.65 httpd
7122 nobody 16 0 21680 12m 3688 S 1.9 1.2 0:08.43 httpd
7126 nobody 16 0 21596 12m 3688 R 1.3 1.2 0:08.17 httpd
7142 nobody 16 0 20432 10m 3700 S 1.0 1.1 0:07.84 httpd



+---------------------------------+------------------------------------------+
| Variable_name | Value |
+---------------------------------+------------------------------------------+
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
| automatic_sp_privileges | ON |
| back_log | 75 |
| basedir | / |
| binlog_cache_size | 32768 |
| bulk_insert_buffer_size | 8388608 |
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
| collation_connection | latin1_swedish_ci |
| collation_database | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
| completion_type | 0 |
| concurrent_insert | 1 |
| connect_timeout | 10 |
| datadir | /var/lib/mysql/ |
| date_format | %Y-%m-%d |
| datetime_format | %Y-%m-%d %H:%i:%s |
| default_week_format | 0 |
| delay_key_write | ON |
| delayed_insert_limit | 100 |
| delayed_insert_timeout | 300 |
| delayed_queue_size | 1000 |
| div_precision_increment | 4 |
| engine_condition_pushdown | OFF |
| expire_logs_days | 0 |
| flush | OFF |
| flush_time | 0 |
| ft_boolean_syntax | + -><()~*:""&| |
| ft_max_word_len | 84 |
| ft_min_word_len | 3 |
| ft_query_expansion_limit | 20 |
| ft_stopword_file | (built-in) |
| group_concat_max_len | 1024 |
| have_archive | YES |
| have_bdb | NO |
| have_blackhole_engine | NO |
| have_compress | YES |
| have_crypt | YES |
| have_csv | NO |
| have_dynamic_loading | YES |
| have_example_engine | NO |
| have_federated_engine | NO |
| have_geometry | YES |
| have_innodb | DISABLED |
| have_isam | NO |
| have_ndbcluster | NO |
| have_merge_engine | YES |
| have_openssl | NO |
| have_query_cache | YES |
| have_raid | NO |
| have_rtree_keys | YES |
| have_symlink | YES |
| init_connect | |
| init_file | |
| init_slave | |
| innodb_additional_mem_pool_size | 1048576 |
| innodb_autoextend_increment | 8 |
| innodb_buffer_pool_awe_mem_mb | 0 |
| innodb_buffer_pool_size | 8388608 |
| innodb_checksums | ON |
| innodb_commit_concurrency | 0 |
| innodb_concurrency_tickets | 500 |
| innodb_data_file_path | |
| innodb_data_home_dir | |
| innodb_doublewrite | ON |
| innodb_fast_shutdown | 1 |
| innodb_file_io_threads | 4 |
| innodb_file_per_table | OFF |
| innodb_flush_log_at_trx_commit | 1 |
| innodb_flush_method | |
| innodb_force_recovery | 0 |
| innodb_lock_wait_timeout | 50 |
| innodb_locks_unsafe_for_binlog | OFF |
| innodb_log_arch_dir | |
| innodb_log_archive | OFF |
| innodb_log_buffer_size | 1048576 |
| innodb_log_file_size | 5242880 |
| innodb_log_files_in_group | 2 |
| innodb_log_group_home_dir | |
| innodb_max_dirty_pages_pct | 90 |
| innodb_max_purge_lag | 0 |
| innodb_mirrored_log_groups | 1 |
| innodb_open_files | 300 |
| innodb_support_xa | ON |
| innodb_sync_spin_loops | 20 |
| innodb_table_locks | ON |
| innodb_thread_concurrency | 8 |
| innodb_thread_sleep_delay | 10000 |
| interactive_timeout | 28800 |
| join_buffer_size | 1044480 |
| key_buffer_size | 50331648 |
| key_cache_age_threshold | 300 |
| key_cache_block_size | 1024 |
| key_cache_division_limit | 100 |
| language | /usr/share/mysql/english/ |
| large_files_support | ON |
| large_page_size | 0 |
| large_pages | OFF |
| license | GPL |
| local_infile | ON |
| locked_in_memory | OFF |
| log | OFF |
| log_bin | OFF |
| log_bin_trust_function_creators | OFF |
| log_error | |
| log_queries_not_using_indexes | OFF |
| log_slave_updates | OFF |
| log_slow_queries | OFF |
| log_warnings | 1 |
| long_query_time | 10 |
| low_priority_updates | OFF |
| lower_case_file_system | OFF |
| lower_case_table_names | 0 |
| max_allowed_packet | 67107840 |
| max_binlog_cache_size | 4294967295 |
| max_binlog_size | 1073741824 |
| max_connect_errors | 10 |
| max_connections | 800 |
| max_delayed_threads | 20 |
| max_error_count | 64 |
| max_heap_table_size | 67107840 |
| max_insert_delayed_threads | 20 |
| max_join_size | 18446744073709551615 |
| max_length_for_sort_data | 1024 |
| max_prepared_stmt_count | 16382 |
| max_relay_log_size | 0 |
| max_seeks_for_key | 4294967295 |
| max_sort_length | 1024 |
| max_sp_recursion_depth | 0 |
| max_tmp_tables | 32 |
| max_user_connections | 0 |
| max_write_lock_count | 4294967295 |
| multi_range_count | 256 |
| myisam_data_pointer_size | 6 |
| myisam_max_sort_file_size | 2147483647 |
| myisam_recover_options | OFF |
| myisam_repair_threads | 1 |
| myisam_sort_buffer_size | 67108864 |
| myisam_stats_method | nulls_unequal |
| net_buffer_length | 16384 |
| net_read_timeout | 30 |
| net_retry_count | 10 |
| net_write_timeout | 60 |
| new | OFF |
| old_passwords | ON |
| open_files_limit | 4410 |
| optimizer_prune_level | 1 |
| optimizer_search_depth | 62 |
| pid_file | /var/lib/mysql/host.mahvareh.net.pid |
| port | 3306 |
| preload_buffer_size | 32768 |
| prepared_stmt_count | 0 |
| protocol_version | 10 |
| query_alloc_block_size | 131072 |
| query_cache_limit | 3145728 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 67108864 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | 64512 |
| range_alloc_block_size | 2048 |
| read_buffer_size | 1044480 |
| read_only | OFF |
| read_rnd_buffer_size | 520192 |
| relay_log_purge | ON |
| relay_log_space_limit | 0 |
| rpl_recovery_rank | 0 |
| secure_auth | OFF |
| server_id | 0 |
| skip_external_locking | ON |
| skip_networking | OFF |
| skip_show_database | OFF |
| slave_compressed_protocol | OFF |
| slave_load_tmpdir | /tmp/ |
| slave_net_timeout | 3600 |
| slave_skip_errors | OFF |
| slave_transaction_retries | 10 |
| slow_launch_time | 2 |
| socket | /var/lib/mysql/mysql.sock |
| sort_buffer_size | 2097144 |
| sql_big_selects | ON |
| sql_mode | |
| sql_notes | ON |
| sql_warnings | OFF |
| ssl_ca | |
| ssl_capath | |
| ssl_cert | |
| ssl_cipher | |
| ssl_key | |
| storage_engine | MyISAM |
| sync_binlog | 0 |
| sync_frm | ON |
| system_time_zone | IRDT |
| table_cache | 1800 |
| table_lock_wait_timeout | 50 |
| table_type | MyISAM |
| thread_cache_size | 512 |
| thread_stack | 196608 |
| time_format | %H:%i:%s |
| time_zone | SYSTEM |
| timed_mutexes | OFF |
| tmp_table_size | 67108864 |
| tmpdir | /tmp/ |
| transaction_alloc_block_size | 8192 |
| transaction_prealloc_size | 4096 |
| tx_isolation | REPEATABLE-READ |
| updatable_views_with_limit | YES |
| version | 5.0.24-standard |
| version_comment | MySQL Community Edition - Standard (GPL) |
| version_compile_machine | i686 |
| version_compile_os | pc-linux-gnu |
| wait_timeout | 15 |
+---------------------------------+------------------------------------------+
+-----------------------------------+------------+
| Variable_name | Value |
+-----------------------------------+------------+
| Aborted_clients | 1474 |
| Aborted_connects | 149 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Bytes_received | 114549811 |
| Bytes_sent | 2543867068 |
| Com_admin_commands | 16681 |
| Com_alter_db | 0 |
| Com_alter_table | 27 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 3 |
| Com_change_db | 50286 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_checksum | 0 |
| Com_commit | 3 |
| Com_create_db | 1 |
| Com_create_function | 0 |
| Com_create_index | 39 |
| Com_create_table | 21 |
| Com_dealloc_sql | 0 |
| Com_delete | 1810 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_drop_user | 0 |
| Com_execute_sql | 0 |
| Com_flush | 3 |
| Com_grant | 21 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 7727 |
| Com_insert_select | 44 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 0 |
| Com_optimize | 0 |
| Com_preload_keys | 0 |
| Com_prepare_sql | 0 |
| Com_purge | 0 |
| Com_purge_before_date | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 1052 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_revoke_all | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 129892 |
| Com_set_option | 1 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_charsets | 0 |
| Com_show_collations | 0 |
| Com_show_column_types | 0 |
| Com_show_create_db | 0 |
| Com_show_create_table | 0 |
| Com_show_databases | 0 |
| Com_show_errors | 0 |
| Com_show_fields | 0 |
| Com_show_grants | 0 |
| Com_show_innodb_status | 0 |
| Com_show_keys | 0 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_ndb_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_privileges | 0 |
| Com_show_processlist | 29 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 1 |
| Com_show_storage_engines | 0 |
| Com_show_tables | 0 |
| Com_show_triggers | 0 |
| Com_show_variables | 5 |
| Com_show_warnings | 0 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_stmt_close | 0 |
| Com_stmt_execute | 0 |
| Com_stmt_fetch | 0 |
| Com_stmt_prepare | 0 |
| Com_stmt_reset | 0 |
| Com_stmt_send_long_data | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 37221 |
| Com_update_multi | 0 |
| Com_xa_commit | 0 |
| Com_xa_end | 0 |
| Com_xa_prepare | 0 |
| Com_xa_recover | 0 |
| Com_xa_rollback | 0 |
| Com_xa_start | 0 |
| Compression | OFF |
| Connections | 33779 |
| Created_tmp_disk_tables | 47 |
| Created_tmp_files | 9692 |
| Created_tmp_tables | 8809 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 3384 |
| Handler_discover | 0 |
| Handler_prepare | 0 |
| Handler_read_first | 25565 |
| Handler_read_key | 14482532 |
| Handler_read_next | 31086087 |
| Handler_read_prev | 367873 |
| Handler_read_rnd | 2268801 |
| Handler_read_rnd_next | 512177535 |
| Handler_rollback | 0 |
| Handler_savepoint | 0 |
| Handler_savepoint_rollback | 0 |
| Handler_update | 65042 |
| Handler_write | 843637 |
| Innodb_buffer_pool_pages_data | 0 |
| Innodb_buffer_pool_pages_dirty | 0 |
| Innodb_buffer_pool_pages_flushed | 0 |
| Innodb_buffer_pool_pages_free | 0 |
| Innodb_buffer_pool_pages_latched | 0 |
| Innodb_buffer_pool_pages_misc | 0 |
| Innodb_buffer_pool_pages_total | 0 |
| Innodb_buffer_pool_read_ahead_rnd | 0 |
| Innodb_buffer_pool_read_ahead_seq | 0 |
| Innodb_buffer_pool_read_requests | 0 |
| Innodb_buffer_pool_reads | 0 |
| Innodb_buffer_pool_wait_free | 0 |
| Innodb_buffer_pool_write_requests | 0 |
| Innodb_data_fsyncs | 0 |
| Innodb_data_pending_fsyncs | 0 |
| Innodb_data_pending_reads | 0 |
| Innodb_data_pending_writes | 0 |
| Innodb_data_read | 0 |
| Innodb_data_reads | 0 |
| Innodb_data_writes | 0 |
| Innodb_data_written | 0 |
| Innodb_dblwr_pages_written | 0 |
| Innodb_dblwr_writes | 0 |
| Innodb_log_waits | 0 |
| Innodb_log_write_requests | 0 |
| Innodb_log_writes | 0 |
| Innodb_os_log_fsyncs | 0 |
| Innodb_os_log_pending_fsyncs | 0 |
| Innodb_os_log_pending_writes | 0 |
| Innodb_os_log_written | 0 |
| Innodb_page_size | 0 |
| Innodb_pages_created | 0 |
| Innodb_pages_read | 0 |
| Innodb_pages_written | 0 |
| Innodb_row_lock_current_waits | 0 |
| Innodb_row_lock_time | 0 |
| Innodb_row_lock_time_avg | 0 |
| Innodb_row_lock_time_max | 0 |
| Innodb_row_lock_waits | 0 |
| Innodb_rows_deleted | 0 |
| Innodb_rows_inserted | 0 |
| Innodb_rows_read | 0 |
| Innodb_rows_updated | 0 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 13988 |
| Key_blocks_used | 29624 |
| Key_read_requests | 38520605 |
| Key_reads | 29763 |
| Key_write_requests | 20935 |
| Key_writes | 11716 |
| Last_query_cost | 0.000000 |
| Max_used_connections | 306 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 2044 |
| Open_streams | 0 |
| Open_tables | 1680 |
| Opened_tables | 1713 |
| Qcache_free_blocks | 2551 |
| Qcache_free_memory | 33764168 |
| Qcache_hits | 188018 |
| Qcache_inserts | 124923 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 4934 |
| Qcache_queries_in_cache | 4089 |
| Qcache_total_blocks | 11709 |
| Questions | 448259 |
| Rpl_status | NULL |
| Select_full_join | 37 |
| Select_full_range_join | 0 |
| Select_range | 18085 |
| Select_range_check | 0 |
| Select_scan | 32376 |
| Slave_open_temp_tables | 0 |
| Slave_retried_transactions | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 1459 |
| Sort_merge_passes | 4846 |
| Sort_range | 14106 |
| Sort_rows | 30079452 |
| Sort_scan | 16396 |
| Table_locks_immediate | 312760 |
| Table_locks_waited | 15714 |
| Tc_log_max_pages_used | 0 |
| Tc_log_page_size | 0 |
| Tc_log_page_waits | 0 |
| Threads_cached | 33 |
| Threads_connected | 273 |
| Threads_created | 306 |
| Threads_running | 81 |
| Uptime | 8677 |
+-----------------------------------+------------+
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 2 hours 24 min 37 sec
Threads: 273 Questions: 448260 Slow queries: 1459 Opens: 1713 Flush tables: 1 Open tables: 1680 Queries per second avg: 51.661

eva2000
Tue 29th Aug '06, 5:40am
it's a coincidence that actually your traffic to php/mysql has increased

before you posted max_used_connections = 196 that's 196 mysql concurrent connections to mysql

now with high loads you have 306 mysql concurrent connections meaning your traffic to your forum/mysql has increased by 50%!

to handle 300+ mysql concurrent connections you will need a proper dual cpu server like dual Pentium 4 3.2ghz Xeon cpus with 2-3GB memory. Or better yet dual Opteron 246-248 cpus with 2-3GB of memory.

whether or not it's DDOS attack driving up connections to db server that i wouldn't know