PDA

View Full Version : Opimization Help Request.


RMS-Chef
Tue 22nd Nov '05, 6:01pm
1.
-Dedicated Server with no other sites. We just moved to this server today as the other machine (a single Althon64 w/1GB RAM) was getting killed.

2.
-Dual Xeon 2.8GHz w/HT
-2GB RAM
-2x 80GB IDE (one in use - one for backups)
-Linux FC3 (Kernel v2.6.12-1.1381_FC3smp)
-Apache v1.3.34
-PHP v4.4.1
-MySQL v4.0.25-standard

3.
HELP?
This vB install is the only current site.

4.
No Idea

5.
HELP?

6.

[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=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=8
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
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


7.
I will list both from vB ACP as stated in your follow up post to the sticky thread:
MySQL Variables

back_log 50
basedir /
binlog_cache_size 32768
bulk_insert_buffer_size 8388608
character_set latin1
character_sets latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis
dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251
estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5
concurrent_insert ON
connect_timeout 5
convert_character_set
datadir /var/lib/mysql/
default_week_format 0
delay_key_write ON
delayed_insert_limit 100
delayed_insert_timeout 300
delayed_queue_size 1000
flush OFF
flush_time 0
ft_boolean_syntax + -><()~*:""&|
ft_min_word_len 4
ft_max_word_len 254
ft_max_word_len_for_sort 20
ft_stopword_file (built-in)
have_bdb NO
have_crypt YES
have_innodb YES
have_isam YES
have_raid NO
have_symlink YES
have_openssl NO
have_query_cache YES
init_file
innodb_additional_mem_pool_size 1048576
innodb_autoextend_increment 8
innodb_buffer_pool_size 8388608
innodb_data_file_path ibdata1:10M:autoextend
innodb_data_home_dir
innodb_file_io_threads 4
innodb_force_recovery 0
innodb_thread_concurrency 8
innodb_flush_log_at_trx_commit 1
innodb_fast_shutdown ON
innodb_flush_method
innodb_lock_wait_timeout 50
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_mirrored_log_groups 1
innodb_max_dirty_pages_pct 90
innodb_max_purge_lag 0
innodb_table_locks ON
interactive_timeout 28800
join_buffer_size 131072
key_buffer_size 8388600
language /usr/share/mysql/english/
large_files_support ON
license GPL
local_infile ON
locked_in_memory OFF
log OFF
log_update OFF
log_bin OFF
log_slave_updates OFF
log_slow_queries 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 1048576
max_binlog_cache_size 4294967295
max_binlog_size 1073741824
max_connections 100
max_connect_errors 10
max_delayed_threads 20
max_insert_delayed_threads 20
max_heap_table_size 16777216
max_join_size 4294967295
max_relay_log_size 0
max_seeks_for_key 4294967295
max_sort_length 1024
max_user_connections 0
max_tmp_tables 32
max_write_lock_count 4294967295
myisam_max_extra_sort_file_size 268435456
myisam_max_sort_file_size 2147483647
myisam_repair_threads 1
myisam_recover_options OFF
myisam_sort_buffer_size 8388608
net_buffer_length 16384
net_read_timeout 30
net_retry_count 10
net_write_timeout 60
new OFF
open_files_limit 1024
pid_file /var/lib/mysql/10.7.232.72.reverse.layeredtech.com.pid
log_error
port 3306
protocol_version 10
query_alloc_block_size 8192
query_cache_limit 1048576
query_cache_size 0
query_cache_type ON
query_cache_wlock_invalidate OFF
query_prealloc_size 8192
range_alloc_block_size 2048
read_buffer_size 131072
read_only OFF
read_rnd_buffer_size 262144
rpl_recovery_rank 0
server_id 0
slave_net_timeout 3600
skip_external_locking ON
skip_networking OFF
skip_show_database OFF
slow_launch_time 2
socket /var/lib/mysql/mysql.sock
sort_buffer_size 2097144
sql_mode 0
table_cache 64
table_type MYISAM
thread_cache_size 0
thread_stack 126976
tx_isolation REPEATABLE-READ
timezone CST
tmp_table_size 33554432
tmpdir /tmp/
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
version 4.0.25-standard
version_comment Official MySQL RPM
version_compile_os pc-linux-gnu
wait_timeout 28800


MySQL Status

Aborted_clients 3
Aborted_connects 6
Bytes_received 702178138
Bytes_sent 3714921632
Com_admin_commands 0
Com_alter_table 54
Com_analyze 0
Com_backup_table 0
Com_begin 6
Com_change_db 117455
Com_change_master 0
Com_check 0
Com_commit 6
Com_create_db 4
Com_create_function 0
Com_create_index 73
Com_create_table 60944
Com_delete 3829
Com_delete_multi 0
Com_drop_db 0
Com_drop_function 0
Com_drop_index 0
Com_drop_table 244
Com_flush 46
Com_grant 52
Com_ha_close 0
Com_ha_open 0
Com_ha_read 0
Com_insert 773372
Com_insert_select 0
Com_kill 0
Com_load 0
Com_load_master_data 0
Com_load_master_table 0
Com_lock_tables 2946
Com_optimize 3
Com_purge 0
Com_rename_table 0
Com_repair 2
Com_replace 10436
Com_replace_select 0
Com_reset 0
Com_restore_table 0
Com_revoke 2
Com_rollback 0
Com_savepoint 0
Com_select 739898
Com_set_option 298
Com_show_binlog_events 0
Com_show_binlogs 19
Com_show_create 0
Com_show_databases 97
Com_show_fields 6
Com_show_grants 7
Com_show_keys 17
Com_show_logs 0
Com_show_master_status 0
Com_show_new_master 0
Com_show_open_tables 0
Com_show_processlist 437
Com_show_slave_hosts 0
Com_show_slave_status 0
Com_show_status 3
Com_show_innodb_status 0
Com_show_tables 508
Com_show_variables 28
Com_slave_start 0
Com_slave_stop 0
Com_truncate 901
Com_unlock_tables 2946
Com_update 71741
Com_update_multi 50
Connections 118086
Created_tmp_disk_tables 116
Created_tmp_tables 3850
Created_tmp_files 11
Delayed_insert_threads 0
Delayed_writes 0
Delayed_errors 0
Flush_commands 1
Handler_commit 0
Handler_delete 14802
Handler_read_first 112304
Handler_read_key 8646330
Handler_read_next 19954560
Handler_read_prev 322158
Handler_read_rnd 5827671
Handler_read_rnd_next 11020890
Handler_rollback 0
Handler_update 108264
Handler_write 882822
Key_blocks_used 7793
Key_read_requests 105823153
Key_reads 2454336
Key_write_requests 13202366
Key_writes 23464767
Max_used_connections 18
Not_flushed_key_blocks 0
Not_flushed_delayed_rows 0
Open_tables 64
Open_files 107
Open_streams 0
Opened_tables 6752
Questions 1904508
Qcache_queries_in_cache 0
Qcache_inserts 0
Qcache_hits 0
Qcache_lowmem_prunes 0
Qcache_not_cached 0
Qcache_free_memory 0
Qcache_free_blocks 0
Qcache_total_blocks 0
Rpl_status NULL
Select_full_join 49
Select_full_range_join 0
Select_range 235446
Select_range_check 0
Select_scan 79809
Slave_open_temp_tables 0
Slave_running OFF
Slow_launch_threads 0
Slow_queries 1
Sort_merge_passes 0
Sort_range 88757
Sort_rows 5826807
Sort_scan 20872
Table_locks_immediate 2022774
Table_locks_waited 104
Threads_cached 0
Threads_created 118085
Threads_connected 2
Threads_running 1
Uptime 130271


8.
On the user end yes. I am not 100% sure what the server managment people installed during the server hardening process.

9.
Generally speaking 300-400 online.
One 24-36 hour period per week with 1000-1300 online.
Cookie timeout is default 900 seconds.

10.
http://www.losttv-forum.com/phpinfo.php

11.
I think I found the right file located @ usr/local/apache/conf/httpd.conf
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150

12.
v3.5.1

13.
I doubt anything that big would be on a new server. Should I check anyway? I am SSH n00b. :)

Keep in mind I am know next to nothing about this deep backend stuff. I will be forwarding off your recomendations to my server managment people. Thank you.

eva2000
Wed 23rd Nov '05, 3:59am
LOST forum :cool:

okay 2 things to do

1. 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
skip-locking
safe-show-database
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 = 180
connect_timeout = 10
tmp_table_size = 64M
max_allowed_packet = 64M
max_connect_errors = 10
thread_concurrency = 4
query_cache_limit = 1M
query_cache_size = 64M
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/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


2. Install APC Cache lastest version from http://pecl.php.net/package/APC

RMS-Chef
Wed 23rd Nov '05, 9:28am
Thanks.
Just to be clear, for the my.cnf changes, am I going line by line and making any changes to the settings you stated or am I replacing the file contents completely with what you have suggested (in effect removing some settings altogether from current)?

eva2000
Wed 23rd Nov '05, 9:58am
back up your existing my.cnf and then empty it's contents and replace with what i have suggested :)

RMS-Chef
Thu 1st Dec '05, 1:49am
Back again. :)
This server works great at about 750 users then goes downhill fast. We hit about 1100 users tonight and the board was dog slow at that time. At that time the server load rarely hit 1.0 (which with the dual processor w/HT is substantially lower in reality).
Is there anything else we can do here to increase performance? I would hate to tell them that they have to move to a mutli server solution due to the additional cost when they only need it 48 hours out of every week. With the load averages in comfortable limits can we increase SQL connections or something? I have root WHM access if there is any info in there that would help.

Thanks.

eva2000
Thu 1st Dec '05, 5:00am
I see you logged a support ticket too i assigned it to myself...

really i need to know the make up of that 1,000+ vB user peaks you get to be able to tell you whether the server is enough but generally from my experience >500+ active members (not guests) posting over 900s cookie timeout is already calling for splitting to 2x dual cpu server setup

You generally get a server that is enough to handle your toughest peak times as well as maintenance tasks (which most folks overlook for larger database sized forums)

I'll ask you to provide your root access details to server via the support ticket you already opened with us and i can take a quick peek :)