PDA

View Full Version : Help Me :( Server Load


namso99
Sun 24th Dec '06, 2:15pm
CPU


processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.20GHz
stepping : 3
cpu MHz : 3192.840
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl cid xtpr
bogomips : 6388.09

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.20GHz
stepping : 3
cpu MHz : 3192.840
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl cid xtpr
bogomips : 6383.14

processor : 2
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.20GHz
stepping : 3
cpu MHz : 3192.840
cache size : 2048 KB
physical id : 3
siblings : 2
core id : 3
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl cid xtpr
bogomips : 6383.14

processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.20GHz
stepping : 3
cpu MHz : 3192.840
cache size : 2048 KB
physical id : 3
siblings : 2
core id : 3
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl cid xtpr
bogomips : 6383.17

Ram

total used free shared buffers cached
Mem: 4147240 3847252 299988 0 217824 2437852
-/+ buffers/cache: 1191576 2955664
Swap: 2031608 16100 2015508

top

top - 20:11:36 up 13 days, 6:00, 1 user, load average: 6.07, 7.06, 8.60
Tasks: 202 total, 3 running, 195 sleeping, 2 stopped, 2 zombie
Cpu(s): 30.7% us, 5.9% sy, 0.2% ni, 58.8% id, 4.3% wa, 0.1% hi, 0.0% si
Mem: 4147240k total, 4031524k used, 115716k free, 217880k buffers
Swap: 2031608k total, 16100k used, 2015508k free, 2438836k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20640 nobody 16 0 102m 21m 2944 S 45 0.5 0:00.27 httpd
20605 nobody 15 0 100m 19m 2932 S 25 0.5 0:00.21 httpd
20536 nobody 15 0 103m 22m 2952 S 23 0.6 0:01.97 httpd
20587 nobody 15 0 101m 21m 3624 S 21 0.5 0:00.23 httpd
20592 nobody 16 0 103m 22m 2940 R 21 0.5 0:00.80 httpd
20294 nobody 15 0 103m 23m 3588 S 17 0.6 0:00.90 httpd
20602 nobody 16 0 102m 21m 2872 R 17 0.5 0:00.33 httpd
20658 mailnull 17 0 10096 2844 1816 S 17 0.1 0:00.09 exim
7554 mysql 15 0 191m 95m 2996 S 14 2.4 120:46.81 mysqld
20603 nobody 15 0 102m 21m 2880 S 14 0.5 0:00.38 httpd
20588 nobody 15 0 103m 22m 2948 S 10 0.6 0:01.04 httpd
20471 nobody 15 0 102m 22m 2960 S 8 0.5 0:01.34 httpd
20612 nobody 15 0 101m 20m 2816 S 6 0.5 0:00.23 httpd
20618 nobody 16 0 98.6m 18m 3436 S 6 0.5 0:00.11 httpd
20637 nobody 16 0 98.5m 17m 2772 S 6 0.4 0:00.04 httpd
20643 nobody 15 0 99.5m 18m 2772 S 4 0.5 0:00.09 httpd
20659 root 15 0 2948 952 692 R 4 0.0 0:00.02 top
20311 nobody 15 0 102m 21m 2868 S 2 0.5 0:00.30 httpd
20514 nobody 15 0 106m 26m 3580 S 2 0.6 0:02.07 httpd
20545 nobody 15 0 104m 23m 2984 S 2 0.6 0:02.65 httpd
20547 nobody 15 0 0 0 0 Z 2 0.0 0:02.92 httpd <defunct>
20572 nobody 15 0 103m 23m 3692 S 2 0.6 0:01.74 httpd
20589 nobody 15 0 102m 22m 3596 S 2 0.6 0:00.56 httpd
20593 nobody 15 0 102m 21m 2860 S 2 0.5 0:00.39 httpd
20613 nobody 16 0 100m 19m 3536 S 2 0.5 0:00.13 httpd
20615 nobody 15 0 102m 21m 2876 S 2 0.5 0:00.31 httpd
20622 nobody 15 0 102m 21m 2816 S 2 0.5 0:00.32 httpd
20626 nobody 15 0 98.2m 17m 2760 S 2 0.4 0:00.03 httpd
20635 nobody 15 0 104m 24m 3568 S 2 0.6 0:00.83 httpd
20641 nobody 15 0 102m 21m 2860 S 2 0.5 0:00.32 httpd
1 root 16 0 2820 552 472 S 0 0.0 0:41.17 init
2 root RT 0 0 0 0 S 0 0.0 0:08.76 migration/0
3 root 35 19 0 0 0 S 0 0.0 0:04.40 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:06.85 migration/1
5 root 34 19 0 0 0 S 0 0.0 0:00.27 ksoftirqd/1
6 root RT 0 0 0 0 S 0 0.0 0:14.03 migration/2


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_connections=500
interactive_timeout=10
wait_timeout=10
connect_timeout=10
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
max_connect_errors=10
# Try number of CPU's*2 for thread_concurrency
thread_concurrency=4
myisam_sort_buffer_size=64M
log-bin
server-id=1
[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid <-- Not necessary
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
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


ulimit -aH


core file size (blocks, -c) 1000000
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
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




uname -a


Linux xxx.xxx.com 2.6.9-42.0.3.ELsmp #1 SMP Fri Oct 6 06:21:39 CDT 2006 i686 i686 i386 GNU/Linux


Help Me :(

eva2000
Thu 28th Dec '06, 8:41am
really need all info asked at http://www.vbulletin.com/forum/showthread.php?t=70117 include questions #6 and #7.

namso99
Fri 29th Dec '06, 2:05pm
+----------------------------+------------+
| Variable_name | Value |
+----------------------------+------------+
| Aborted_clients | 8444 |
| Aborted_connects | 260 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Bytes_received | 3260476094 |
| Bytes_sent | 1822814004 |
| Com_admin_commands | 69871 |
| Com_alter_db | 5 |
| Com_alter_table | 1182 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 2280 |
| Com_change_db | 4118883 |
| Com_change_master | 0 |
| Com_check | 338 |
| Com_checksum | 0 |
| Com_commit | 2131 |
| Com_create_db | 72 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 51270 |
| Com_dealloc_sql | 0 |
| Com_delete | 718191 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 90 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 10211 |
| Com_drop_user | 0 |
| Com_execute_sql | 0 |
| Com_flush | 2847 |
| Com_grant | 1727 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 1188532 |
| Com_insert_select | 13425 |
| Com_kill | 6 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 42862 |
| Com_optimize | 1860 |
| Com_preload_keys | 0 |
| Com_prepare_sql | 0 |
| Com_purge | 0 |
| Com_purge_before_date | 0 |
| Com_rename_table | 2 |
| Com_repair | 1 |
| Com_replace | 205627 |
| 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 | 12440927 |
| Com_set_option | 1241039 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 104 |
| Com_show_charsets | 1020 |
| Com_show_collations | 1020 |
| Com_show_column_types | 0 |
| Com_show_create_db | 0 |
| Com_show_create_table | 29351 |
| Com_show_databases | 2530 |
| Com_show_errors | 0 |
| Com_show_fields | 33281 |
| Com_show_grants | 2598 |
| Com_show_innodb_status | 0 |
| Com_show_keys | 242 |
| 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 | 1446 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 19 |
| Com_show_storage_engines | 4 |
| Com_show_tables | 39337 |
| Com_show_variables | 6347 |
| 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 | 41 |
| Com_unlock_tables | 43414 |
| Com_update | 3421614 |
| Com_update_multi | 104 |
| Connections | 3297910 |
| Created_tmp_disk_tables | 68337 |
| Created_tmp_files | 1864 |
| Created_tmp_tables | 1061617 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 1168 |
| Flush_commands | 2 |
| Handler_commit | 0 |
| Handler_delete | 647655 |
| Handler_discover | 0 |
| Handler_read_first | 1926205 |
| Handler_read_key | 1328315948 |
| Handler_read_next | 1306358120 |
| Handler_read_prev | 10330705 |
| Handler_read_rnd | 234385670 |
| Handler_read_rnd_next | 649049527 |
| Handler_rollback | 0 |
| Handler_update | 309552361 |
| Handler_write | 247862392 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 257 |
| Key_blocks_used | 14497 |
| Key_read_requests | 2759224167 |
| Key_reads | 6939438 |
| Key_write_requests | 17757861 |
| Key_writes | 6260443 |
| Max_used_connections | 138 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 1938 |
| Open_streams | 0 |
| Open_tables | 1024 |
| Opened_tables | 974332 |
| Qcache_free_blocks | 1741 |
| Qcache_free_memory | 5686992 |
| Qcache_hits | 29597448 |
| Qcache_inserts | 11984823 |
| Qcache_lowmem_prunes | 3738031 |
| Qcache_not_cached | 402606 |
| Qcache_queries_in_cache | 2322 |
| Qcache_total_blocks | 10253 |
| Questions | 56769672 |
| Rpl_status | NULL |
| Select_full_join | 50320 |
| Select_full_range_join | 128 |
| Select_range | 1725925 |
| Select_range_check | 3785 |
| Select_scan | 3115445 |
| Slave_open_temp_tables | 0 |
| Slave_retried_transactions | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 234 |
| Sort_merge_passes | 927 |
| Sort_range | 1503798 |
| Sort_rows | 361306469 |
| Sort_scan | 1279775 |
| Table_locks_immediate | 28661268 |
| Table_locks_waited | 11479 |
| Threads_cached | 44 |
| Threads_connected | 84 |
| Threads_created | 379 |
| Threads_running | 1 |
| Uptime | 428502 |
+----------------------------+------------+
Uptime: 428502 Threads: 84 Questions: 56769704 Slow queries: 234 Opens: 974332 Flush tables: 2 Open tables: 1024 Queries per second avg: 132.484
mysqladmin Ver 8.41 Distrib 4.1.21, for pc-linux-gnu on i686
Copyright (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.21-standard-log
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 4 days 23 hours 1 min 42 sec

Threads: 84 Questions: 56769704 Slow queries: 234 Opens: 974332 Flush tables: 2 Open tables: 1024 Queries per second avg: 132.484

eva2000
Sun 31st Dec '06, 7:03am
Try the following

1. Upgrade MySQL server to 4.1.22
2. Upgrade PHP to 4.4.4 and/or recompile PHP 4.4.4 after upgrading MySQL and upgrade to apache 1.3.37 if on 1.3.xx or apache 2.0.59 if on 2.0.xx
3. Edit /etc/my.cnf and place the following mysql server settings in /etc/my.cnf and restart mysql server afterwards


[mysqld]
safe-show-database
back_log = 75
skip-innodb
max_connections = 650
key_buffer = 192M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 2500
thread_cache_size = 512
wait_timeout = 15
connect_timeout = 10
tmp_table_size = 128M
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 = 6M
query_cache_size = 128M
query_cache_type = 1
query_prealloc_size = 163840
query_alloc_block_size = 32768
default-storage-engine = MyISAM
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysqld_safe]
err-log=/var/log/mysqld.log
nice = -5
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. OR try the alternative PHP caching software, Xcache which seems to be a bit faster than APC Cache - http://www.vbulletin.com/forum/showthread.php?t=213267

5. Upgrade to vB 3.0.17 http://www.vbulletin.com/forum/showthread.php?t=209720 if you're on vB 3.0.xx or upgrade to vB 3.5.7 http://www.vbulletin.com/forum/showthread.php?t=209719 if you're on vB 3.5.x. Upgrade to vB 3.6.4 http://www.vbulletin.com/forum/showthread.php?t=209717 if you're on vB 3.6.x

6. 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

7. If you're using CentOS 4.x linxu operating system, then read http://www.vbulletin.com/forum/showthread.php?t=171071 about 2.6.9-42.0.3 issues and maybe need to downgrade smp kernel to 2.6.9.42.02 or change swap settings

8. In httpd.conf set your maxclients value to 256 and maxrequestsperchild value to 500 and keep alive timeout to 5 and restart apache

Happy New Year :)