HZGN.COM welcome to my space |
HOME Slow Forum, Server Optimization Request |
Slow Forum, Server Optimization Request | | Published by: anonym 2009-01-07 |
| | 1) Dedicated
2) Server specs:
Intel(R) Celeron(TM) CPU 1300MHz
1GB RAM
54GB IDE
Red Hat Enterprise Linux ES release 3 (Taroon)
Apache/2.0.46
PHP 4.3.10 (with eAccelerator-0.9.4-rc1 support )
mysql Ver 4.0.25-standard for pc-linux-gnu on i686 (Official MySQL RPM)
3) No.
4) Mysql Installed using Official MySQL RPM.
5) top Output
11:33:07 up 109 days, 2:11, 1 user, load average: 0.43, 0.71, 0.91
136 processes: 133 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 7.1% 0.0% 0.9% 0.0% 0.3% 3.5% 87.8%
Mem: 1020416k av, 989080k used, 31336k free, 0k shrd, 67184k buff
651084k actv, 58004k in_d, 13984k in_c
Swap: 2048276k av, 116936k used, 1931340k free 504776k cached phpBB • View topic - SiteGround - Server Overload Problems:: The slow query I pasted is simply for generating a page in your forum. Nothing special. I have ran optimization for your forum database which should resolve http://www.phpbb.com/community/viewtopic.php?f=46&t=1292155HOME |
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
27631 apache 15 0 8856 7832 4368 S 4.9 0.7 0:00 0 httpd Server Needs a Supercharge - Page 4 - UsingEnglish.com ESL Forum:: 10 posts - 1 author - Last post: Dec 2, 2006View Poll Results: Is this forum slow - does it take a long time to open pages? .. Search Engine Optimization by vBSEO 3.2.0 http://www.usingenglish.com/forum/support-area/18416-server-needs-supercharge-4.htmlHOME |
12033 mysql 15 0 177M 144M 1256 S 0.5 14.4 5:32 0 mysqld
7536 mysql 15 0 177M 144M 1256 S 0.3 14.4 8:18 0 mysqld
27542 apache 15 0 10816 9820 5260 R 0.3 0.9 0:03 0 httpd
27636 root 15 0 1308 1308 900 R 0.3 0.1 0:00 0 top
27080 root 15 0 760 616 372 R 0.1 0.0 0:00 0 sshd
27487 apache 15 0 11164 9924 5404 S 0.1 0.9 0:04 0 httpd
27489 apache 15 0 11456 9M 5908 S 0.1 1.0 0:09 0 httpd
27500 apache 15 0 10992 9808 5452 S 0.1 0.9 0:03 0 httpd
27543 apache 15 0 10484 9480 5008 S 0.1 0.9 0:03 0 httpd Server tips? Drupal is slow =/ | Ubercart:: 8 posts - 7 authors - Last post: Dec 11, 2007Found 178 comments when searching for 'slow server'. All may not be on topic, but the Drupal forum is a great resource. http://www.ubercart.org/forum/support/2130/server_tips_drupal_slowHOME |
27573 apache 15 0 10396 9384 4904 S 0.1 0.9 0:02 0 httpd
27609 apache 15 0 10676 9656 5160 S 0.1 0.9 0:02 0 httpd
27630 apache 15 0 6864 5828 3208 S 0.1 0.5 0:00 0 httpd
27635 apache 15 0 4384 3260 1680 S 0.1 0.3 0:00 0 httpd
1 root 15 0 116 84 60 S 0.0 0.0 3:08 0 init
2 root RT 0 0 0 0 SW 0.0 0.0 0:00 0 migration/0
3 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 keventd
4 root 15 0 0 0 0 SW 0.0 0.0 11:42 0 kapmd
5 root 34 19 0 0 0 SWN 0.0 0.0 0:00 0 ksoftirqd/0
8 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush
6 root 15 0 0 0 0 SW 0.0 0.0 33:56 0 kswapd
7 root 15 0 0 0 0 SW 0.0 0.0 15:32 0 kscand
9 root 15 0 0 0 0 SW 0.0 0.0 3:54 0 kupdated
10 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 mdrecoveryd
14 root 15 0 0 0 0 SW 0.0 0.0 51:20 0 kjournald
70 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 khubd
1567 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
1849 root 15 0 0 0 0 SW 0.0 0.0 0:02 0 eth0
1897 root 15 0 284 256 204 S 0.0 0.0 24:08 0 syslogd
1901 root 15 0 168 156 112 S 0.0 0.0 7:40 0 klogd
2003 root 16 0 400 268 164 S 0.0 0.0 2:17 0 sshd
2018 root 15 0 292 252 172 S 0.0 0.0 0:03 0 xinetd
2035 root 15 0 124 88 48 S 0.0 0.0 0:00 0 vsftpd
2090 root 15 0 468 216 148 S 0.0 0.0 13:43 0 master
2099 postfix 15 0 7192 4456 380 S 0.0 0.4 15:20 0 nqmgr
6) /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
skip-innodb
key_buffer=32M
table_cache=1800
record_buffer=1M
myisam_sort_buffer_size=64M
thread_cache_size = 384
wait_timeout = 300
connect_timeout = 10
tmp_table_size = 64M
max_allowed_packet = 64M
max_connect_errors = 10
thread_cache=64
thread_concurrency=4
join_buffer_size=1M
max_connections=350
max_connect_errors=10
read_buffer_size=1M
read_rnd_buffer_size=2M
sort_buffer_size=2M
query_cache_size=250M
query_cache_limit=1M
query_cache_type=1
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
7) mysqladmin -u root -p extended-status
+--------------------------+------------+
Variable_name Value
+--------------------------+------------+
Aborted_clients 6484
Aborted_connects 1928
Bytes_received 1260412827
Bytes_sent 239561453
Com_admin_commands 0
Com_alter_table 3
Com_analyze 0
Com_backup_table 0
Com_begin 0
Com_change_db 2964444
Com_change_master 0
Com_check 0
Com_commit 0
Com_create_db 0
Com_create_function 0
Com_create_index 0
Com_create_table 7
Com_delete 353894
Com_delete_multi 0
Com_drop_db 0
Com_drop_function 0
Com_drop_index 0
Com_drop_table 3
Com_flush 0
Com_grant 0
Com_ha_close 0
Com_ha_open 0
Com_ha_read 0
Com_insert 966078
Com_insert_select 518367
Com_kill 0
Com_load 0
Com_load_master_data 0
Com_load_master_table 0
Com_lock_tables 23
Com_optimize 0
Com_purge 0
Com_rename_table 0
Com_repair 0
Com_replace 719869
Com_replace_select 0
Com_reset 0
Com_restore_table 0
Com_revoke 0
Com_rollback 0
Com_savepoint 0
Com_select 6041675
Com_set_option 2070
Com_show_binlog_events 0
Com_show_binlogs 2
Com_show_create 2070
Com_show_databases 14
Com_show_fields 2075
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 29
Com_show_slave_hosts 0
Com_show_slave_status 0
Com_show_status 30
Com_show_innodb_status 0
Com_show_tables 2409
Com_show_variables 123
Com_slave_start 0
Com_slave_stop 0
Com_truncate 0
Com_unlock_tables 23
Com_update 2246729
Com_update_multi 0
Connections 2967825
Created_tmp_disk_tables 8370
Created_tmp_tables 631262
Created_tmp_files 0
Delayed_insert_threads 0
Delayed_writes 0
Delayed_errors 0
Flush_commands 1
Handler_commit 0
Handler_delete 3233057
Handler_read_first 103387
Handler_read_key 230637620
Handler_read_next 229887722
Handler_read_prev 3966107
Handler_read_rnd 114527619
Handler_read_rnd_next 3887339075
Handler_rollback 0
Handler_update 14683042
Handler_write 39146674
Key_blocks_used 31172
Key_read_requests 784338074
Key_reads 8147381
Key_write_requests 12807699
Key_writes 5355159
Max_used_connections 250
Not_flushed_key_blocks 0
Not_flushed_delayed_rows 0
Open_tables 1481
Open_files 1564
Open_streams 0
Opened_tables 1496
Questions 27161745
Qcache_queries_in_cache 7501
Qcache_inserts 5914346
Qcache_hits 10379154
Qcache_lowmem_prunes 0
Qcache_not_cached 127329
Qcache_free_memory 236226400
Qcache_free_blocks 4176
Qcache_total_blocks 19811
Rpl_status NULL
Select_full_join 230
Select_full_range_join 0
Select_range 2153303
Select_range_check 0
Select_scan 1421271
Slave_open_temp_tables 0
Slave_running OFF
Slow_launch_threads 15
Slow_queries 17095
Sort_merge_passes 0
Sort_range 920843
Sort_rows 322245118
Sort_scan 1181679
Table_locks_immediate 18049973
Table_locks_waited 203889
Threads_cached 61
Threads_created 751
Threads_connected 3
Threads_running 1
Uptime 1975263
+--------------------------+------------+
8) phpAdsNew (http://phpadsnew.com) - PHP script which we use to serve ads in our forum header.
9) 70 average users/ 130 max concurrent users. Cookie timeout is: 900
10) http://bahrainevents.com/test.php
11) Apache configuration
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 20
KeepAliveTimeout 15
StartServers 15
MinSpareServers 25
MaxSpareServers 30
MaxClients 250
Maxrequestsperchild 1000
12) VB 3.0.6
13) None.
The server's cpu is a under powered for 250+ mysql concurrent connections (max_used_connections) and you are swapping to disk by 100+ MB. But I suggest the following in this order first to see how it helps
1. Remove Eaccelerator from server
2. Upgrade PHP to 4.4.1 if you use phpadsnew make sure to update to phpadsnew 2.0.7 to work with PHP 4.4.1
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
skip-innodb
max_connections = 500
key_buffer = 16M
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 = 180
connect_timeout = 10
tmp_table_size = 64M
max_allowed_packet = 64M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 128M
query_cache_type = 1
query_prealloc_size = 16384
query_alloc_block_size = 16384
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
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
5. Upgrade to vB 3.0.11 http://www.vbulletin.com/forum/showthread.php?t=166389
6. Edit httpd.conf values
from
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 20
KeepAliveTimeout 15
StartServers 15
MinSpareServers 25
MaxSpareServers 30
MaxClients 250
Maxrequestsperchild 1000
to
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 8
StartServers 10
MinSpareServers 10
MaxSpareServers 15
MaxClients 150
Maxrequestsperchild 1000
restart apache
Red Hat's Rough Recovery From CFO Exit
Windows Live Finds a New, Pre-installed Home
|
#If you have any other info about this subject , Please add it free.# | |
|