PDA

View Full Version : Request Server optimization asap .. ty


Mixq8
Tue 27th Jun '06, 6:20pm
Hello,

I would like a server optimization ASAP

1- Dedicated Server
2- Pentium IV Server
3.0 Ghz PIV (with HT)
HDD:120 GB
120 GB
Memory:1024 MB
CentOS 4.3
Linux
php version 5.0.5
mysql version 4.1.19
Apache 1.3.36

4- mysql came with server
5-
total number of members: 36,381
total number of topics: 25,725
total number of posts: 487,310

6- my.cnf

[mysqld]
max_connections=1000
skip-locking
skip-innodb
query_cache_limit=4M
query_cache_size=64M
query_cache_type=1
wait_timeout=900
connect_timeout=10
thread_cache_size=128
key_buffer=256M
max_allowed_packet=16M
table_cache=2048
join_buffer=1M
sort_buffer_size=1M
read_buffer_size=1M
max_connect_errors=10
thread_concurrency=4
myisam_sort_buffer_size=64M
old-passwords = 1
[safe_mysqld]
open_files_limit=8192
[mysqldump]
quick
max_allowed_packet=16M
[mysql]
no-auto-rehash
[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


7-

| new | OFF |
| old_passwords | ON |
| open_files_limit | 5106 |
| pid_file | /var/lib/mysql/ok.mixq8.com.pid |
| port | 3306 |
| preload_buffer_size | 32768 |
| prepared_stmt_count | 0 |
| protocol_version | 10 |
| query_alloc_block_size | 8192 |
| query_cache_limit | 4194304 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 67108864 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | 8192 |
| range_alloc_block_size | 2048 |
| read_buffer_size | 1044480 |
| 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 | 0 |
| 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 | 1048568 |
| 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 | EDT |
| table_cache | 2048 |
| 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 | 900 |
+---------------------------------+------------------------------------------+
+----------------------------+------------+
| Variable_name | Value |
+----------------------------+------------+
| Aborted_clients | 1445 |
| Aborted_connects | 11 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Bytes_received | 1436800528 |
| Bytes_sent | 1851529438 |
| Com_admin_commands | 0 |
| Com_alter_db | 0 |
| Com_alter_table | 1474 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 348054 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_checksum | 0 |
| Com_commit | 0 |
| Com_create_db | 1 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 499 |
| Com_dealloc_sql | 0 |
| Com_delete | 24003 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 464 |
| Com_drop_user | 0 |
| Com_execute_sql | 0 |
| Com_flush | 17 |
| Com_grant | 24 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 160489 |
| Com_insert_select | 3200 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 20059 |
| 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 | 87515 |
| 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 | 7595419 |
| Com_set_option | 7989 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 7 |
| Com_show_charsets | 48 |
| Com_show_collations | 48 |
| Com_show_column_types | 0 |
| Com_show_create_db | 0 |
| Com_show_create_table | 115 |
| Com_show_databases | 39 |
| Com_show_errors | 0 |
| Com_show_fields | 124 |
| Com_show_grants | 34 |
| Com_show_innodb_status | 0 |
| Com_show_keys | 9 |
| 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 | 1867 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 1 |
| Com_show_storage_engines | 0 |
| Com_show_tables | 209 |
| Com_show_variables | 310 |
| 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 | 14016 |
| Com_update | 455982 |
| Com_update_multi | 27 |
| Connections | 359144 |
| Created_tmp_disk_tables | 347 |
| Created_tmp_files | 341339 |
| Created_tmp_tables | 1039369 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 186938 |
| Handler_discover | 0 |
| Handler_read_first | 105094 |
| Handler_read_key | 1454775778 |
| Handler_read_next | 2197829236 |
| Handler_read_prev | 1623320 |
| Handler_read_rnd | 2880282 |
| Handler_read_rnd_next | 1457341111 |
| Handler_rollback | 0 |
| Handler_update | 548820991 |
| Handler_write | 176853270 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 205244 |
| Key_blocks_used | 27428 |
| Key_read_requests | 2524276292 |
| Key_reads | 129779 |
| Key_write_requests | 13182448 |
| Key_writes | 451760 |
| Max_used_connections | 171 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 1005 |
| Open_streams | 0 |
| Open_tables | 857 |
| Opened_tables | 3913 |
| Qcache_free_blocks | 2312 |
| Qcache_free_memory | 53143872 |
| Qcache_hits | 3965120 |
| Qcache_inserts | 6639638 |
| Qcache_lowmem_prunes | 8023 |
| Qcache_not_cached | 956553 |
| Qcache_queries_in_cache | 3333 |
| Qcache_total_blocks | 9511 |
| Questions | 13046544 |
| Rpl_status | NULL |
| Select_full_join | 71321 |
| Select_full_range_join | 0 |
| Select_range | 477572 |
| Select_range_check | 0 |
| Select_scan | 1295306 |
| Slave_open_temp_tables | 0 |
| Slave_retried_transactions | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 9 |
| Slow_queries | 699 |
| Sort_merge_passes | 170660 |
| Sort_range | 1613390 |
| Sort_rows | 2990999942 |
| Sort_scan | 1346875 |
| Table_locks_immediate | 10897770 |
| Table_locks_waited | 107486 |
| Threads_cached | 125 |
| Threads_connected | 3 |
| Threads_created | 171 |
| Threads_running | 1 |
| Uptime | 558520 |
+----------------------------+------------+
Uptime: 558521 Threads: 3 Questions: 13046550 Slow queries: 699 Opens: 3913 Flush tables: 1 Open tables: 857 Queries per second avg: 23.359
mysqladmin Ver 8.41 Distrib 4.1.19, 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.19-standard
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 6 days 11 hours 8 min 41 sec
Threads: 3 Questions: 13046550 Slow queries: 699 Opens: 3913 Flush tables: 1 Open tables: 857 Queries per second avg: 23.359


8-Only Vbulletin 3.5.4 running as well as an upload script http://up.mixq8.com

9-Mostly 200-300 active members at the same time and the cookie-timeout is 900

10- mixq8.com/phpinfo.php
11-

KeepAlive off
MaxKeepAliveRequests 200
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 650
Maxrequestsperchild 10000

12- Vbulletin 3.5.4
13-
find: /home/modgziptmp/_8974_105_6.wrk: No such file or directory
/usr/local/apache/logs/audit_log
find: /proc/9478/task/9478/fd/4: No such file or directory
find: /proc/9595/task: No such file or directory

14-
uname -a

Linux ok.mixq8.com 2.6.9-11.ELsmp #1 SMP Wed Jun 8 17:54:20 CDT 2005 i686 i686 i386 GNU/Linux

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

cat /proc/cpuinfo

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
root@ok [~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 1
cpu MHz : 3002.050
cache size : 1024 KB
physical id : 0
siblings : 2
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 pni monitor ds_cpl cid xtpr
bogomips : 5931.00
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 1
cpu MHz : 3002.050
cache size : 1024 KB
physical id : 0
siblings : 2
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 pni monitor ds_cpl cid xtpr
bogomips : 5996.54


Thats all the information

And I hope i get my server optimized

Thank You

Mixq8
Wed 28th Jun '06, 1:47am
thats also the top processes, however i have the forum closes because am adding hacks to it, so nothing is using mysql


root@ok [~]# top
top - 00:44:59 up 57 days, 15:01, 0 users, load average: 0.04, 0.01, 0.00
Tasks: 144 total, 1 running, 143 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2% us, 0.0% sy, 0.0% ni, 99.8% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 2074812k total, 2042780k used, 32032k free, 110752k buffers
Swap: 1052248k total, 202064k used, 850184k free, 1056108k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4398 root 16 0 3832 980 744 R 0.3 0.0 0:00.05 top
1 root 16 0 3396 416 388 S 0.0 0.0 1:42.42 init
2 root RT 0 0 0 0 S 0.0 0.0 0:06.78 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.43 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 0:04.89 migration/1
5 root 34 19 0 0 0 S 0.0 0.0 0:00.35 ksoftirqd/1
6 root 5 -10 0 0 0 S 0.0 0.0 0:00.60 events/0
7 root 5 -10 0 0 0 S 0.0 0.0 0:00.14 events/1
8 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 khelper
9 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid
30 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
31 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/1
32 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khubd
44 root 13 -10 0 0 0 S 0.0 0.0 0:00.00 aio/0
45 root 9 -10 0 0 0 S 0.0 0.0 0:00.00 aio/1
43 root 15 0 0 0 0 S 0.0 0.0 15:53.62 kswapd0
119 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
182 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 ata/0
183 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 ata/1
185 root 22 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
187 root 19 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
206 root 15 0 0 0 0 S 0.0 0.0 1:08.33 kjournald
1049 root 6 -10 2620 320 316 S 0.0 0.0 0:00.01 udevd
1298 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 kmirrord/0
1299 root 7 -10 0 0 0 S 0.0 0.0 0:00.00 kmirrord/1
1345 root 15 0 0 0 0 S 0.0 0.0 0:00.00 kjournald
1346 root 15 0 0 0 0 S 0.0 0.0 4:14.20 kjournald
1347 root 15 0 0 0 0 S 0.0 0.0 5:46.74 kjournald
1348 root 15 0 0 0 0 S 0.0 0.0 5:02.13 kjournald
1349 root 15 0 0 0 0 S 0.0 0.0 7:05.26 kjournald
1630 root 18 0 5160 460 456 S 0.0 0.0 0:00.00 bash
1917 root 16 0 2208 564 476 S 0.0 0.0 0:40.31 syslogd
1921 root 16 0 2384 440 384 S 0.0 0.0 0:00.18 klogd
1931 root 16 0 2736 436 380 S 0.0 0.0 0:45.01 irqbalance
1980 root 16 0 4992 472 444 S 0.0 0.0 0:46.47 rpc.idmapd



mixq8mixq8.com57.7380.862.5Top Process%CPU 65.0httpd [www.mixq8.com] [/354/showthread.php?t15369]Top Process%CPU 63.0httpd [www.mixq8.com] [/354/showthread.php?t23998]Top Process%CPU 61.5httpd [www.mixq8.com] [/354/showthread.php?p528682#post528682]root0.7116.222.0Top Process%CPU 7.0/bin/bash /etc/init.d/apf stopTop Process%CPU 6.1[split] Top Process%CPU 6.0/bin/bash /etc/init.d/apf stopnobody0.020.030.0Top Process%CPU 65.0/usr/local/apache/bin/httpd -DSSLTop Process%CPU 63.0/usr/local/apache/bin/httpd -DSSLTop Process%CPU 61.5/usr/local/apache/bin/httpd -DSSLcpanel0.010.010.0Top Process%CPU 2.0cpaneld - serving 24.247.169.212Top Process%CPU 0.5cpaneld - serving 24.247.169.212mailnull0.010.120.0Top Process%CPU 2.0/usr/sbin/exim -bd -q60mTop Process%CPU 0.4/usr/sbin/exim -bd -q60mTop Process%CPU 0.1/usr/sbin/exim -bd -q60mpostgres0.000.000.0mailman0.000.000.0named0.00 0.100.0m0.000.000.0xfs0.000.000.0n0.000.000.0p0.00 0.000.0dbus0.000.000.0r0.000.000.0s0.000.000.0sshd 0.000.000.0c0.000.000.0d0.000.000.0x0.000.000.0mix q0.000.030.0mysql0.007.840.0htt0.000.000.0


the problems i had was that there is a wait time for the topics with lots of posts to show up.

so i just need my server to be optimized with the new 3.5.4 and what settings are better for my forum

thanks

eva2000
Fri 30th Jun '06, 8:24am
1. Upgrade MySQL server to 4.1.20 http://www.vbulletin.com/forum/showthread.php?t=186856
2. Upgrade PHP to 5.1.4
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
old_passwords
back_log = 75
skip-innodb
max_connections = 500
key_buffer = 64M
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 = 90
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 = 80M
query_cache_type = 1
query_prealloc_size = 163840
query_alloc_block_size = 32768
default-storage-engine = MyISAM

[mysqld_safe]
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. Edit httpd.conf from

KeepAlive off
MaxKeepAliveRequests 200
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 650
Maxrequestsperchild 10000

to

KeepAlive on
MaxKeepAliveRequests 120
KeepAliveTimeout 6
MinSpareServers 15
MaxSpareServers 20
StartServers 15
MaxClients 180
Maxrequestsperchild 500

restart apache

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

Mixq8
Fri 30th Jun '06, 9:13am
Thank You so much

I will try all of this and give you the results thanks again :)