PDA

View Full Version : Just migrated to a brand new DELL server, need optimisation (kudos to eva2000) ...


d3nnis
Tue 18th May '04, 12:00pm
Just got myself a DELL Poweredge 750.

1.
Dedicated Server

2.
cpu speed/type single or dual cpus): P4 2.8 Ghz
how much memory installed: 512mb ECC DDRAM
hard drive type/configuration: 80GB SATA hdd
linux distributor or windows version: freeBSD 4.9
apache/IIS version: apache 1.3.29
PHP version: php 4.3.4
MySQL version: mysql 3.23.58

3 & 4.
NA, using mysql 3 not mysql 4

5.

last pid: 84273; load averages: 0.29, 0.38, 0.34 up 1+14:45:57 22:43:49
103 processes: 1 running, 100 sleeping, 2 zombie
CPU states: 28.9% user, 0.0% nice, 7.9% system, 0.8% interrupt, 62.4% idle
Mem: 302M Active, 33M Inact, 100M Wired, 15M Cache, 60M Buf, 49M Free
Swap: 1024M Total, 65M Used, 959M Free, 6% Inuse, 36K In

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
83915 root 29 0 2036K 1060K RUN 0:03 1.71% 1.71% top
83460 apache 2 0 23152K 9204K sbwait 0:01 1.38% 1.37% httpd
71520 mysql 2 0 16588K 11064K poll 4:22 1.03% 1.03% mysqld
83897 apache 2 0 21320K 8204K sbwait 0:01 0.74% 0.73% httpd
83882 apache 2 0 21140K 8504K sbwait 0:00 0.59% 0.59% httpd
83426 apache 2 0 21560K 8424K sbwait 0:01 0.44% 0.44% httpd
83930 apache 2 0 21956K 9408K sbwait 0:01 0.30% 0.29% httpd
83510 apache 2 0 21640K 6400K sbwait 0:01 0.30% 0.29% httpd
83881 apache 2 0 17148K 4396K sbwait 0:00 0.25% 0.24% httpd
83842 apache 2 0 21640K 8896K sbwait 0:01 0.20% 0.20% httpd
83381 apache 2 0 21588K 7424K sbwait 0:02 0.15% 0.15% httpd
82338 apache 2 0 21644K 7868K sbwait 0:01 0.15% 0.15% httpd
83889 apache 2 0 20824K 8748K sbwait 0:00 0.10% 0.10% httpd
197 root 2 0 16800K 2920K select 0:25 0.00% 0.00% httpd
148 named 2 0 8084K 3352K select 0:24 0.00% 0.00% named
206 qmails 2 0 960K 284K select 0:10 0.00% 0.00% qmail-send
106 root 2 0 984K 304K select 0:06 0.00% 0.00% syslogd
114 root 2 0 1144K 256K select 0:06 0.00% 0.00% inetd
177 root 2 0 9416K 468K select 0:03 0.00% 0.00% httpsd
83406 apache 2 0 23880K 12276K sbwait 0:02 0.00% 0.00% httpd
83217 apache 2 0 24100K 10292K sbwait 0:02 0.00% 0.00% httpd
294 root 2 0 18364K 0K select 0:02 0.00% 0.00% <perl5.005
82810 apache 2 0 21228K 9344K sbwait 0:02 0.00% 0.00% httpd
83226 apache 2 0 21376K 9328K select 0:02 0.00% 0.00% httpd
83411 apache 2 0 21384K 8288K sbwait 0:02 0.00% 0.00% httpd
83410 apache 2 0 24088K 8932K sbwait 0:01 0.00% 0.00% httpd
79061 psaadm 2 0 16908K 0K accept 0:01 0.00% 0.00% <httpsd>
83218 apache 2 0 22004K 5168K sbwait 0:01 0.00% 0.00% httpd
83878 apache 2 0 21412K 8576K sbwait 0:01 0.00% 0.00% httpd
83409 apache 2 0 21608K 9696K sbwait 0:01 0.00% 0.00% httpd
208 qmaill -6 0 896K 308K piperd 0:01 0.00% 0.00% splogger
83405 apache 2 0 21492K 4172K select 0:01 0.00% 0.00% httpd
83220 apache 2 0 23644K 6520K sbwait 0:01 0.00% 0.00% httpd
83408 apache 2 0 21156K 7508K sbwait 0:01 0.00% 0.00% httpd
79685 psaadm 2 0 16876K 0K accept 0:01 0.00% 0.00% <httpsd>
79684 psaadm 2 0 13276K 0K accept 0:01 0.00% 0.00% <httpsd>
83429 apache 2 0 21600K 8748K sbwait 0:01 0.00% 0.00% httpd
79531 psaadm 2 0 15604K 0K accept 0:01 0.00% 0.00% <httpsd>


6.

/etc/my.cnf

[mysqld]
#default-character-set=latin1
#datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
#log=/tmp/mylog

[mysql.server]
#user=mysql
#basedir=/var/lib

[safe_mysqld]
#err-log=/var/log/mysqld.log
#pid-file=/var/run/mysqld/mysqld.pid

mysqladmin -u root -p variables

back_log 50
basedir /usr/local/psa/mysql/
binlog_cache_size 32768
character_set latin1
character_sets latin1 big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin2 latin5 swe7 usa7 win1250 win1251ukr ujis sjis tis620 win1251
concurrent_insert ON
connect_timeout 5
datadir /usr/local/psa/mysql/var/
delay_key_write ON
delayed_insert_limit 100
delayed_insert_timeout 300
delayed_queue_size 1000
flush OFF
flush_time 0
have_bdb NO
have_gemini NO
have_innodb NO
have_isam YES
have_raid NO
have_openssl NO
init_file
interactive_timeout 28800
join_buffer_size 131072
key_buffer_size 8388600
language /usr/local/psa/mysql/share/mysql/english/
large_files_support ON
log OFF
log_update OFF
log_bin OFF
log_slave_updates OFF
log_long_queries OFF
long_query_time 10
low_priority_updates OFF
lower_case_table_names 0
max_allowed_packet 1048576
max_binlog_cache_size 4294967295
max_binlog_size 1073741824
max_connections 100
max_connect_errors 10
max_delayed_threads 20
max_heap_table_size 16777216
max_join_size 4294967295
max_sort_length 1024
max_user_connections 0
max_tmp_tables 32
max_write_lock_count 4294967295
myisam_max_extra_sort_file_size 256
myisam_max_sort_file_size 2047
myisam_recover_options 0
myisam_sort_buffer_size 8388608
net_buffer_length 16384
net_read_timeout 30
net_retry_count 1000000
net_write_timeout 60
open_files_limit 0
pid_file /usr/local/psa/mysql/var/harlow.keeptouch.net.pid
port 3306
protocol_version 10
record_buffer 131072
record_rnd_buffer 131072
query_buffer_size 0
safe_show_database OFF
server_id 0
slave_net_timeout 3600
skip_locking OFF
skip_networking OFF
skip_show_database OFF
slow_launch_time 2
socket /var/lib/mysql/mysql.sock
sort_buffer 2097144
sql_mode 0
table_cache 64
table_type MYISAM
thread_cache_size 0
thread_stack 65536
transaction_isolation READ-COMMITTED
timezone SGT
tmp_table_size 33554432
tmpdir /var/tmp/
version 3.23.58
wait_timeout 28800

mysqladmin -u root -p extended-status

Aborted_clients 58
Aborted_connects 1
Bytes_received 40086210
Bytes_sent 2061076979
Com_admin_commands 0
Com_alter_table 0
Com_analyze 0
Com_backup_table 0
Com_begin 0
Com_change_db 13038
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 0
Com_delete 704
Com_drop_db 0
Com_drop_function 0
Com_drop_index 0
Com_drop_table 0
Com_flush 0
Com_grant 0
Com_insert 4291
Com_insert_select 26
Com_kill 0
Com_load 0
Com_load_master_table 0
Com_lock_tables 0
Com_optimize 0
Com_purge 0
Com_rename_table 0
Com_repair 0
Com_replace 478
Com_replace_select 0
Com_reset 0
Com_restore_table 0
Com_revoke 0
Com_rollback 0
Com_select 120790
Com_set_option 0
Com_show_binlogs 0
Com_show_create 1
Com_show_databases 0
Com_show_fields 0
Com_show_grants 0
Com_show_keys 0
Com_show_logs 0
Com_show_master_status 0
Com_show_open_tables 0
Com_show_processlist 0
Com_show_slave_status 0
Com_show_status 1
Com_show_innodb_status 0
Com_show_tables 1
Com_show_variables 3
Com_slave_start 0
Com_slave_stop 0
Com_truncate 0
Com_unlock_tables 0
Com_update 21054
Connections 13661
Created_tmp_disk_tables 67
Created_tmp_tables 3346
Created_tmp_files 0
Delayed_insert_threads 0
Delayed_writes 0
Delayed_errors 0
Flush_commands 1
Handler_delete 848
Handler_read_first 27826
Handler_read_key 4077110
Handler_read_next 11158088
Handler_read_prev 12
Handler_read_rnd 1462854
Handler_read_rnd_next 7699492
Handler_update 66574
Handler_write 222621
Key_blocks_used 7793
Key_read_requests 10511118
Key_reads 43327
Key_write_requests 14126
Key_writes 8990
Max_used_connections 26
Not_flushed_key_blocks 0
Not_flushed_delayed_rows 0
Open_tables 64
Open_files 122
Open_streams 0
Opened_tables 7958
Questions 173980
Select_full_join 282
Select_full_range_join 992
Select_range 32742
Select_range_check 0
Select_scan 21650
Slave_running OFF
Slave_open_temp_tables 0
Slow_launch_threads 0
Slow_queries 9
Sort_merge_passes 0
Sort_range 20358
Sort_rows 4308686
Sort_scan 6127
Table_locks_immediate 217716
Table_locks_waited 240
Threads_cached 0
Threads_created 13660
Threads_connected 8
Threads_running 1
Uptime 8253


8.
Currently I have 3 forums on my server running vbulletin, (v 3.0.1, v 2.3.2, v 2.3.4), 1 forum using phpbb (v 2.0.6), 1 forum using invision board (v 1.1.2), 1 site using phpnuke (version unknown)

9.
Average users = 100, Max users = 300, cookie timeout set to 3600



11.
KeepAlive - On
MaxKeepAliveRequests - 1000
KeepAliveTimeout - 15
MinSpareServers - 5
MaxSpareServers - 10
StartServers - 5
MaxClients - 2048

12.
I am using vb 3.0.1 but I have got two other forum using vb 2.3.2 and vb 2.3.4




****Hope to hear from you soon eva2000!****

Thanks in advanced! :)

d3nnis
Tue 18th May '04, 11:16pm
ohh by the way i am using this new server for webhosting purposes as well. :)

eva2000
Wed 19th May '04, 6:19am
1. upgrade to mysql 4.0.18 right away for a big boost in performance
2. httpd.conf reduce maxclients from 2048 to 180 and restart apache
3. change my.cnf after upgrading mysql to 4.0.18 and use the following settings in my.cnf and restart mysql


[mysqld]
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 = 1024
thread_cache_size = 64
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
skip-innodb

[mysqld_safe]
open_files_limit = 8192

[mysql.server]
#user=mysql
#basedir=/var/lib

[mysqldump]
quick
max_allowed_packet = 16M

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

d3nnis
Wed 19th May '04, 6:42am
1. upgrade to mysql 4.0.18 right away for a big boost in performance
2. httpd.conf reduce maxclients from 2048 to 180 and restart apache
3. change my.cnf after upgrading mysql to 4.0.18 and use the following settings in my.cnf and restart mysql


hi eva2000, for some reason I would love to upgrade to 4.0.18 (I am using it previously while on another server using Cpanel), the hosting panel that I am using currently, plesk 7 only supports up till 3.23.58 ...

by the way reducing 2048 to 180... will it impact my other hosting account clients?

as my site alot I have lots of traffic (100-300 users each day), will my site close connection to my clients's users if my site has 180 users already?

eva2000
Wed 19th May '04, 9:08am
ah in that case keep maxclients set at 256 first and monitor your apache logs for any maxclients exceeded messages

as to plesk haven't looked at it in over a yr... 3.23.58 is too outdated for the performance you get from 4.0.18 - consider another hosting control panel ;)

d3nnis
Wed 19th May '04, 9:11pm
ah in that case keep maxclients set at 256 first and monitor your apache logs for any maxclients exceeded messages

as to plesk haven't looked at it in over a yr... 3.23.58 is too outdated for the performance you get from 4.0.18 - consider another hosting control panel ;)


but i just bought it... also due to budget constraints... they announce that they will upgrade it in the next release (wonder which release that will be...)

is 256 a safe number? As i am also hosting other forums (2 vb, 1 phpbb, 1 IPB)

or is there a higher and safer value...

so besides this maxclients, anything else i should change?

So do I still need to change anything to my /etc/my.cnf ?

eva2000
Thu 20th May '04, 12:43am
stick with 256 and see how it goes

d3nnis
Thu 20th May '04, 2:10am
stick with 256 and see how it goes


ok thanks. By the way I also have this WAP site for ppl to download free mobile contents, and traffic is rather high, will adjusting the maxclient to 256 affect the rest of the normal web site operation?

eva2000
Thu 20th May '04, 5:55am
ok thanks. By the way I also have this WAP site for ppl to download free mobile contents, and traffic is rather high, will adjusting the maxclient to 256 affect the rest of the normal web site operation?
should be fine but hard to say... trial and error mate ;)

d3nnis
Thu 20th May '04, 6:36am
should be fine but hard to say... trial and error mate ;)

what symptons will i see if maxclients reach its limit? server loads goes up?