Server Optimization request (AMD sep 2600+)
March 15th, 2010i have load on my server
Processor #1 Vendor: AuthenticAMD
Processor #1 Name: AMD Sempron(tm) Processor 2600+
Processor #1 speed: 1600.527 MHz
Processor #1 cache size: 128 KB
Hard Desk # 160 GB sata
Memory: 969364k/982208k available (1881k kernel code, 12212k reserved, 724k data, 156k init, 64704k highmem)
Linux server.xxxxxx.com 2.6.16.1 #1 Wed Jul 12 02:11:17 AST 2006 i686 athlon i386 GNU/Linux
apache/IIS version: apache 1.3.35
PHP version: php 4.4.2
MySQL version: mysql 4.1.19
root@server [~]# top
top - 16:39:06 up 2 days, 11:40, 1 user, load average: 12.27, 17.93, 19.22
Tasks: 181 total, 1 running, 180 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.7% us, 8.6% sy, 7.0% ni, 0.0% id, 83.1% wa, 0.7% hi, 0.0% si
Mem: 970248k total, 952500k used, 17748k free, 38512k buffers
Swap: 1959920k total, 253272k used, 1706648k free, 277988k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13093 nobody 19 4 34400 8756 3384 S 6.0 0.9 0:00.78 httpd
3158 root 0 -20 0 0 0 D 3.7 0.0 84:57.05 loop0
8 root 10 -5 0 0 0 S 2.7 0.0 13:43.81 kblockd/0
11483 mysql 22 6 98.4m 64m 2264 S 1.3 6.8 287:35.43 mysqld
13200 nobody 20 4 35140 17m 12m S 1.0 1.9 1:40.06 httpd
12721 root 16 0 2080 1024 740 R 0.7 0.1 0:00.92 top
142 root 15 0 0 0 0 S 0.3 0.0 1:51.47 kswapd0
331 root 15 0 0 0 0 D 0.3 0.0 6:33.50 kjournald
3173 root 15 0 0 0 0 D 0.3 0.0 2:08.48 kjournald
13214 nobody 20 4 42704 21m 12m D 0.3 2.3 1:38.10 httpd
1 root 16 0 1684 556 480 S 0.0 0.1 0:00.68 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.13 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.02 events/0
5 root 16 -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.02 kthread
9 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
93 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 khubd
143 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
229 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod
291 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kpsmoused
305 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 ata/0
309 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
310 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
322 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_2
323 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_3
1174 root 11 -5 1580 436 372 S 0.0 0.0 0:00.01 udevd
1329 root 20 0 0 0 0 S 0.0 0.0 0:00.00 shpchpd_event
1354 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kauditd
1494 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kmirrord
1511 root 19 0 0 0 0 S 0.0 0.0 0:00.00 kjournald
2118 root 16 0 1596 524 452 S 0.0 0.1 0:03.18 syslogd
2122 root 16 0 1540 308 296 S 0.0 0.0 0:00.00 klogd
/etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
skip-innodb
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_user_connections=25
max_connections=300
interactive_timeout=10
wait_timeout=10
connect_timeout=180
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=400M
table_cache=1800
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
max_connect_errors=10
thread_concurrency=4
myisam_sort_buffer_size=64M
server-id=1
[mysql.server]
user=mysql
basedir=/var/lib
old-passwords = 1
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid
open_files_limit=8192
[mysqldump]
quick
max_allowed_packet=600M
[mysql]
no-auto-rehash
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[mysqlhotcopy]
interactive-timeout
root@server [~]# mysqladmin -u root -p var ext stat ver
Enter
+---------------------------------+------------------------------------------+
Variable_name Value
+---------------------------------+------------------------------------------+
back_log 50
basedir /
binlog_cache_size 32768
bulk_insert_buffer_size 8388608
character_set_client latin1
character_set_connection latin1
character_set_database latin1
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
concurrent_insert ON
connect_timeout 180
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
expire_logs_days 0
flush OFF
flush_time 0
ft_boolean_syntax + -><()~*:""&
ft_max_word_len 84
ft_min_word_len 4
ft_query_expansion_limit 20
ft_stopword_file (built-in)
group_concat_max_len 1024
have_archive NO
have_bdb NO
have_blackhole_engine NO
have_compress YES
have_crypt YES
have_csv NO
have_example_engine NO
have_geometry YES
have_innodb DISABLED
have_isam NO
have_ndbcluster NO
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_data_file_path
innodb_data_home_dir
innodb_fast_shutdown ON
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_table_locks ON
innodb_thread_concurrency 8
interactive_timeout 10
join_buffer_size 1044480
key_buffer_size 16777216
key_cache_age_threshold 300
key_cache_block_size 1024
key_cache_division_limit 100
language /usr/share/mysql/english/
large_files_support ON
license GPL
local_infile ON
locked_in_memory OFF
log OFF
log_bin OFF
log_error
log_slave_updates OFF
log_slow_queries OFF
log_update 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 419429376
max_binlog_cache_size 4294967295
max_binlog_size 1073741824
max_connect_errors 10
max_connections 300
max_delayed_threads 20
max_error_count 64
max_heap_table_size 16777216
max_insert_delayed_threads 20
max_join_size 4294967295
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_tmp_tables 32
max_user_connections 25
max_write_lock_count 4294967295
myisam_data_pointer_size 4
myisam_max_extra_sort_file_size 2147483648
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 OFF
open_files_limit 4096
pid_file /var/lib/mysql/server.xxxxxxx.com.pid
port 3306
preload_buffer_size 32768
prepared_stmt_count 0
protocol_version 10
query_alloc_block_size 8192
query_cache_limit 1048576
query_cache_min_res_unit 4096
query_cache_size 33554432
query_cache_type ON
query_cache_wlock_invalidate OFF
query_prealloc_size 8192
range_alloc_block_size 2048
read_buffer_size 2093056
read_only OFF
read_rnd_buffer_size 262144
relay_log_purge ON
relay_log_space_limit 0
rpl_recovery_rank 0
secure_auth OFF
server_id 1
skip_external_locking ON
skip_networking OFF
skip_show_database OFF
slave_net_timeout 3600
slave_transaction_retries 0
slow_launch_time 2
socket /var/lib/mysql/mysql.sock
sort_buffer_size 2097144
sql_mode
sql_notes ON
sql_warnings ON
storage_engine MyISAM
sync_binlog 0
sync_frm ON
sync_replication 0
sync_replication_slave_id 0
sync_replication_timeout 0
system_time_zone AST
table_cache 1800
table_type MyISAM
thread_cache_size 128
thread_stack 196608
time_format %H:%i:%s
time_zone SYSTEM
tmp_table_size 33554432
tmpdir
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
tx_isolation REPEATABLE-READ
version 4.1.19-standard
version_comment MySQL Community Edition - Standard (GPL)
version_compile_machine i686
version_compile_os pc-linux-gnu
wait_timeout 10
+---------------------------------+------------------------------------------+
+----------------------------+-----------+
Variable_name Value
+----------------------------+-----------+
Aborted_clients 16
Aborted_connects 2350
Binlog_cache_disk_use 0
Binlog_cache_use 0
Bytes_received 190291384
Bytes_sent 95604175
Com_admin_commands 28
Com_alter_db 0
Com_alter_table 0
Com_analyze 0
Com_backup_table 0
Com_begin 0
Com_change_db 75479
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 3340
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 30
Com_grant 0
Com_ha_close 0
Com_ha_open 0
Com_ha_read 0
Com_help 0
Com_insert 12753
Com_insert_select 538
Com_kill 0
Com_load 0
Com_load_master_data 0
Com_load_master_table 0
Com_lock_tables 214
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 5818
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 234807
Com_set_option 1763
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 1396
Com_show_databases 15
Com_show_errors 0
Com_show_fields 1411
Com_show_grants 57
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 329
Com_show_slave_hosts 0
Com_show_slave_status 0
Com_show_status 1
Com_show_storage_engines 0
Com_show_tables 1557
Com_show_variables 17
Com_show_warnings 0
Com_slave_start 0
Com_slave_stop 0
Com_stmt_close 0
Com_stmt_execute 0
Com_stmt_prepare 0
Com_stmt_reset 0
Com_stmt_send_long_data 0
Com_truncate 0
Com_unlock_tables 231
Com_update 59369
Com_update_multi 75
Connections 76971
Created_tmp_disk_tables 145
Created_tmp_files 31008
Created_tmp_tables 14459
Delayed_errors 0
Delayed_insert_threads 0
Delayed_writes 0
Flush_commands 1
Handler_commit 0
Handler_delete 16363
Handler_discover 0
Handler_read_first 35259
Handler_read_key 8515758
Handler_read_next 908086608
Handler_read_prev 201082
Handler_read_rnd 1315024
Handler_read_rnd_next 113995311
Handler_rollback 0
Handler_update 95458
Handler_write 1377077
Key_blocks_not_flushed 0
Key_blocks_unused 0
Key_blocks_used 14497
Key_read_requests 89585995
Key_reads 142098
Key_write_requests 117778
Key_writes 91428
Max_used_connections 52
Not_flushed_delayed_rows 0
Open_files 3079
Open_streams 0
Open_tables 1705
Opened_tables 1711
Qcache_free_blocks 1423
Qcache_free_memory 13430384
Qcache_hits 261830
Qcache_inserts 224412
Qcache_lowmem_prunes 0
Qcache_not_cached 8905
Qcache_queries_in_cache 5346
Qcache_total_blocks 12668
Questions 735815
Rpl_status NULL
Select_full_join 24
Select_full_range_join 2
Select_range 90234
Select_range_check 0
Select_scan 49506
Slave_open_temp_tables 0
Slave_retried_transactions 0
Slave_running OFF
Slow_launch_threads 0
Slow_queries 1045
Sort_merge_passes 15504
Sort_range 66800
Sort_rows 893113319
Sort_scan 29619
Table_locks_immediate 631315
Table_locks_waited 23916
Threads_cached 21
Threads_connected 31
Threads_created 52
Threads_running 1
Uptime 98417
+----------------------------+-----------+
Uptime: 98419 Threads: 34 Questions: 735832 Slow queries: 1045 Opens: 1711 Flush tables: 1 Open tables: 1705 Queries per second avg: 7.477
mysqladmin Ver 8.41 Distrib 4.1.19, for pc-linux-gnu on i686
(C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 4.1.19-standard
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 1 day 3 hours 20 min 19 sec
Threads: 34 Questions: 735832 Slow queries: 1045 Opens: 1711 Flush tables: 1 Open tables: 1705 Queries per second avg: 7.477
root@server [~]#
[I]mysqlreport --all -tab /statistics.txt
8. is your vB the only thing on the server? or other scripts & sites which utilise php and mysql?
the server contain about 20 sites most of them are using mysql and most them are forum vb or ib
Timeout 200
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 32
MaxSpareServers 64
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
some of then are 3.0.x and 3.5.4 and ib 2.1.16
Linux server.xxxxx.com 2.6.16.1 #1 Wed Jul 12 02:11:17 AST 2006 i686 athlon i386 GNU/Linux
root@server [/usr/local/apache/conf]# ulimit -aH
core file size (blocks, -c) 1000000
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 15347
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14335
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
root@server [/usr/local/apache/conf]# cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 44
model name : AMD Sempron(tm) Processor 2600+
stepping : 2
cpu MHz : 1600.527
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm ts ttp tm stc
bogomips : 3205.97
Before you do any upgrades try the following
1. Upgrade MySQL server to 4.1.20 http://www.vbulletin.com/forum/showthread.php?t=186856
2. Upgrade PHP to 4.4.2 or recompile PHP 4.4.2 after upgrading mysql
3. Edit /etc/my.cnf and place the following mysql server settings in /etc/my.cnf and restart mysql server afterwards
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
safe-show-database
back_log = 75
skip-innodb
max_connections = 650
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 = 10
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 = 2M
query_cache_size = 64M
query_cache_type = 1
query_prealloc_size = 163840
query_alloc_block_size = 32768
default-storage-engine = MyISAM
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
[mysqlhotcopy]
interactive-timeout
4. 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 - please remove Zend Optimizer from php.ini before installing APC Cache
5. Upgrade to vB 3.0.14 http://www.vbulletin.com/forum/showthread.php?t=183331 if you're on vB 3.0.xx or upgrade to vB 3.5.4 http://www.vbulletin.com/forum/showthread.php?t=176170 if you're on vB 3.5.x
6. If you just upgraded to vB 3.5.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
7. Edit httpd.conf values from
Timeout 200
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 32
MaxSpareServers 64
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
to
Timeout 200
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
MinSpareServers 5
MaxSpareServers 15
StartServers 5
MaxClients 150
MaxRequestsPerChild 500
restart apache server
do you advice me ,, to remove it and install APC Cache?
#If you have any other info about this subject , Please add it free.# |