PDA

View Full Version : Server Optimization Request, please.


Chris-777
Fri 23rd Jun '06, 11:47am
1. VPS. Not sure total sites, will find out.
2. - 3.6Ghz Xeon
- PHP 4.4.1
- Apache 2.0.51
- Redhat EL3
- MySQL 4.1.15
3. Not sure if I'm using any innodb type tables, there's a line in my.cnf regarding it however.
4. Compiled into the kernel
5. Top stats:

top - 10:38:38 up 10 days, 20:07, 1 user, load average: 0.47, 0.73, 0.97
Tasks: 66 total, 4 running, 62 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.2% user, 1.5% system, 0.0% nice, 93.3% idle
Mem: 6196528k total, 6183220k used, 13308k free, 1077420k buffers
Swap: 8193140k total, 4482524k used, 3710616k free, 1412020k cached
14049 qmails 9 0 444 428 368 S 0.0 0.0 0:10.85 qmail-send

6. /etc/my.cnf:

[mysqld]
safe-show-database
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

7. This is giving me login issues, my error, will update asap.
8. One large vB site, two small phpbb sites (less than 5 users at any given time), 3 static websites with minimal traffic.
9. Around 100. Cookie timeout 15 minutes.
10. http://www.sevenstring.org/chris/phpinfo.php
11.

KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 14
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 150

12. vB 3.5.3
13. No logfiles over 2Gb
14.

Linux www.(snipped).org (http://www.(snipped).org) 2.4.20-021stab028.19.777-enterprise #1 SMP Wed Oct 19
13:05:01 MSD 2005 i686 i686 i386 GNU/Linux
[xxx@xxx]# ulimit -aH
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 28416
virtual memory (kbytes, -v) unlimited

14.

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 3
cpu MHz : 3591.362
cache size : 0 KB
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 sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm lm
bogomips : 7156.53
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 3
cpu MHz : 3591.362
cache size : 0 KB
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 sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm lm
bogomips : 7156.53
processor : 2
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 3
cpu MHz : 3591.362
cache size : 0 KB
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 sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm lm
bogomips : 7156.53
processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 3
cpu MHz : 3591.362
cache size : 0 KB
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 sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm lm
bogomips : 7156.53


Thank you very much in advance. :)

eva2000
Mon 26th Jun '06, 7:55am
1. Upgrade MySQL server to 4.1.20 http://www.vbulletin.com/forum/showthread.php?t=186856
2. Upgrade PHP to 4.4.2 and Apache to 2.0.58
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
back_log = 75
skip-innodb
max_connections = 500
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 = 32M
max_heap_table_size = 32M
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 = 32M
query_cache_type = 1
query_prealloc_size = 163840
query_alloc_block_size = 32768
default-storage-engine = MyISAM

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

[mysqld_safe]
nice = -10
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.5.4 http://www.vbulletin.com/forum/showthread.php?t=176170 if you're on vB 3.5.x

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

7. Edit httpd.conf values from

KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 14
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 150

to

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
MinSpareServers 10
MaxSpareServers 15
StartServers 10
MaxClients 180

restart apache