PDA

View Full Version : Server Optimization Request


titodj
Mon 24th Apr '06, 8:51am
Thank you very much in advance for your help I also have the problem with "NIX Load limit" and "Simultaneous Sessions Limit" (http://www.vbulletin.com/forum/showthread.php?t=166913) I cant have either to work, I reinstalled the whole forum using this method (http://www.vbulletin.com/forum/showthread.php?t=158122), two days ago but that did not fix the problem.
Regards...

1. Is this on dedicated or shared virual server. If shared, how many sites share this server (ask web host if needed)

Its dedicated altough I have other sites there the only one that really has traffic is the one where the forum is at..
(other sites basicaly are parked domains)

2. your server specs. For example:

cpu speed/type single or dual cpus): dual Xeon 3.02 ghz
how much memory installed: 2000mb ram
hard drive type/configuration: 120GB SATA RAID
linux distributor or windows version: CentOS 4.3

apache/IIS version: apache 1.3.34
PHP version: php 4.4.2
MySQL version: mysql 4.0.25-standard


3. if you use mysql 4.x instead of mysql 3.23.x, do you have any innodb type databases/tables on your server ? Dont know

4. if possible how mysql was compiled/installed Dont know

5. your top stats



top - 20:15:50 up 1:10, 1 user, load average: 13.73, 8.23, 6.87
Tasks: 242 total, 29 running, 213 sleeping, 0 stopped, 0 zombie
Cpu(s): 93.2% us, 5.9% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.1% hi, 0.7% si
Mem: 2074928k total, 1260556k used, 814372k free, 49364k buffers
Swap: 2096472k total, 0k used, 2096472k free, 357276k cached



(329 users online)


6. your mysql configuration variables located at /etc/my.cnf or c:\my.cnf or my.ini so post the contents inside of my.cnf (minus any passwords of course).

[mysqld]
set-variable = max_connections=500
safe-show-database



7. MySQL stats from ssh telnet as root user type:

Stats attached in text file please check below


8. is your vB the only thing on the server? or other scripts & sites which utilise php and mysql?

I have some other scripts but the only one that hammers the server is PhotoPost vBGallery (http://www.photopost.com/) 1.02
Categories: 127, Images: 18,946, Total Views: 3,338,217, Total Disk Space: 1.57 GB

9. how many average and max concurrent users on your vB forum ? and what your cookie timeout is ?

I would say average 250 max 598 cookie 1800

10. create a file named phpinfo.php and place this code in it and post the url/link to it from your web site

Here (http://www.voyazteca.com/info55.php)


11. if you run Apache and you have your own dedicated server or access to your httpd.conf (apache configuration file) can you post the values you have set for the following :

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
Maxrequestsperchild value = 0

12. what version of vB are you running ?

3.5.4

13. check to see if any files i.e. apache log files are hitting 2GB or 4GB max file size limits i.e. see if you have max file size exceeded messages in apache error log

root [~]# find / -size +2000000k
/home/voyaztec/public_html/download/error_log
find: /proc/11129/task/11129/fd/4: No such file or directory

14. Post output from these 3 commands

uname -a

root@xeon [~]# uname -a
Linux xeon.miespaciovirtual.com 2.6.9-11.ELsmp #1 SMP Wed Jun 8 17:54:20 CDT 2005 i686 i686 i386 GNU/Linux

ulimit -aH

root@xeon [~]# ulimit -aH
core file size (blocks, -c) unlimited
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) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 32766
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

cat /proc/cpuinfo

root@xeon [~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 1
cpu MHz : 3001.821
cache size : 1024 KB
physical id : 0
siblings : 2
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 : 1
cpu MHz : 3001.821
cache size : 1024 KB
physical id : 0
siblings : 2
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

eva2000
Wed 26th Apr '06, 4:58am
Try removing photopost for a few days and see how the loads are - it could be that script that is causing the high cpu loads and hence would be an issue for you to take up with photopost developers etc

1. Upgrade MySQL server to 4.0.26 if possible not necessary
2. 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 = 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 = 90
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

[mysqld_safe]
nice = -5
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


3. 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

4. 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

5. Edit httpd.conf from

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
Maxrequestsperchild value = 0

to

KeepAlive On
MaxKeepAliveRequests 120
KeepAliveTimeout 6
MinSpareServers 10
MaxSpareServers 15
StartServers 10
MaxClients 180
Maxrequestsperchild value = 8000

restart apache

titodj
Wed 26th Apr '06, 5:36am
Thank you very much for your help..
I have one question ... how do I...

remove Zend Optimizer from php.ini before installing APC Cache

Thanks again for your help

Just to doublecheck....
MaxRequestsPerChild 8000 right?

eva2000
Wed 26th Apr '06, 11:18am
yeah maxrequestsperchild is correct

as to removing zend optimizer just comment out (put hash # in front of the zendoptimiser.so line in php.ini)