PDA

View Full Version : New Server - Optimization request


stryka
Thu 20th Apr '06, 1:53pm
DONE

1. Dedicated. 1 main site and other friends (5 with min. usage.)

2. Server Specs

cpu speed/type single or dual cpus): DUAL Intel Xeon's 3.0Ghz HT (2mb SuperFast Cache)
RAM: 2GB
hard drive type/configuration: Dual 250 GB-SATA
linux distributor or windows version: redhat linux
apache/IIS version: 1.3.34 (Unix)
PHP version: php 4.4.1
MySQL version: mysql 4.0.25-standard

4. MySQL was preconfigured
6. 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_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
thread_concurrency=8
myisam_sort_buffer_size=64M
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

[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. MYSQL Stats


MySQL 4.0.25-standard uptime 0 0:33:16 Thu Apr 20 13:03:05 2006

__ Key __________________________________________________ _______________
Buffer usage 15.22M of 16.00M %Used: 95.13
Write ratio 0.53
Read ratio 0.00

__ Questions __________________________________________________ _________
Total 105.48k 52.84/s
QC Hits 39.86k 19.97/s %Total: 37.79
DMS 38.80k 19.44/s 36.79
Com_ 13.92k 6.98/s 13.20
COM_QUIT 13.00k 6.51/s 12.33
-Unknown 115 0.06/s 0.11
Slow 23 0.01/s 0.02 %DMS: 0.06
DMS 38.80k 19.44/s 36.79
SELECT 24.13k 12.09/s 22.88 62.19
UPDATE 8.01k 4.01/s 7.60 20.65
INSERT 5.90k 2.96/s 5.60 15.21
REPLACE 452 0.23/s 0.43 1.16
DELETE 304 0.15/s 0.29 0.78
Com_ 13.92k 6.98/s 13.20
change_db 13.40k 6.72/s 12.71
lock_tables 152 0.08/s 0.14
unlock_tabl 152 0.08/s 0.14

__ SELECT and Sort __________________________________________________ ___
Scan 3.66k 1.84/s %SELECT: 15.18
Range 5.58k 2.79/s 23.10
Full join 29 0.01/s 0.12
Range check 0 0.00/s 0.00
Full rng join 0 0.00/s 0.00
Sort scan 1.61k 0.81/s
Sort range 4.62k 2.31/s
Sort mrg pass 0 0.00/s

__ Query Cache __________________________________________________ _______
Memory usage 7.25M of 32.00M %Used: 22.66
Block Fragmnt 9.48%
Hits 39.86k 19.97/s
Inserts 23.90k 11.97/s
Prunes 1 0.00/s
Insrt:Prune 23.90k:1 11.97/s
Hit:Insert 1.67:1

__ Table Locks __________________________________________________ _______
Waited 607 0.30/s %Total: 0.82
Immediate 73.68k 36.91/s

__ Tables __________________________________________________ ____________
Open 515 of 1024 %Cache: 50.29
Opened 551 0.28/s

__ Connections __________________________________________________ _______
Max used 53 of 900 %Max: 5.89
Total 13.08k 6.55/s

__ Created Temp __________________________________________________ ______
Disk table 58 0.03/s
Table 1.39k 0.69/s
File 0 0.00/s

__ Threads __________________________________________________ ___________
Running 1 of 3
Cache 51 %Hit: 99.59
Created 54 0.03/s
Slow 0 0.00/s

__ Aborted __________________________________________________ ___________
Clients 152 0.08/s
Connects 113 0.06/s

__ Bytes __________________________________________________ _____________
Sent 1.02G 513.50/s
Received 29.59M 14.83k/s


8. No... other scripts like a gallery program and guestbook too mysql

9. Cookie Timeout: 2000
b) 400... %70 of that consists of GUESTS/SPIDERS

10. PHPINFO: http://www.islandmix.com/backchat/admincp/index.php?do=phpinfo

11.

12. Vbversion - 3.06 - upgrade planned within a month

13. NONE found

14. Linux server145.cognitivehosting.com 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux

b)
Linux server145.cognitivehosting.com 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux
root@server145 [/]#
root@server145 [/]# 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


Linux server145.cognitivehosting.com 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux
root@server145 [/]#
root@server145 [/]# 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
root@server145 [/]#
root@server145 [/]#
root@server145 [/]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 3
cpu MHz : 3001.853
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 : 5914.62

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 3
cpu MHz : 3001.853
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 : 5996.54

processor : 2
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 3
cpu MHz : 3001.853
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 : 5980.16

processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 3
cpu MHz : 3001.853
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 : 5980.16

eva2000
Fri 21st Apr '06, 10:34am
1. Upgrade MySQL server to 4.0.26
2. Upgrade PHP to 4.4.2 if you use phpadsnew make sure to update to phpadsnew 2.0.7 or higher to work with PHP 4.4.1/4.4.2
3. 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
safe-show-database
skip-innodb
max_connections = 650
key_buffer = 32M
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 = 30
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

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

[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. Upgrade to vB 3.0.13 http://www.vbulletin.com/forum/showthread.php?t=176176