PDA

View Full Version : Optimization Request (very basic dedicated server)


TomasDR
Mon 27th Feb '06, 12:42pm
I was a member of a forum and kinda got dragged into this to make it better. I know computers but more of a network guy, never configured web servers before but will understand your instructions.

1. Dedicated Server

2. cpu speed/type single or dual cpus): single Celeron 2.4Ghz
how much memory installed: 256MB
hard drive type/configuration: 72GB EIDE non raid
linux distributor or windows version: Fedora Core 2
apache/IIS version: apache 2.0.51
PHP version: php 4.3.10
MySQL version: mysql 3.23.58

3. N/A

4. Standard FC2 install, not 100% sure that was all I was told.

5. The swap will grow to 512000k during the busiest times. I even know we could use more memory.
top - 11:06:46 up 2 days, 12:04, 1 user, load average: 0.21, 0.22, 0.46
Tasks: 93 total, 1 running, 92 sleeping, 0 stopped, 0 zombie
Cpu(s): 20.1% us, 1.3% sy, 0.0% ni, 77.2% id, 1.0% wa, 0.3% hi, 0.0% si
Mem: 247832k total, 226928k used, 20904k free, 4224k buffers
Swap: 1060280k total, 136528k used, 923752k free, 52056k cached

6.

[mysqld]
socket=/home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock
datadir=/var/lib/mysql
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[client]
socket=/home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock


7.

Use of uninitialized value in numeric ne (!=) at /usr/bin/mysqlreport line 359, <STDIN> line 1.
MySQL 3.23.58 uptime 2 12:20:30 Mon Feb 27 11:23:46 2006
__ Key __________________________________________________ _______________
Buffer usage 7.61M of 8.00M %Used: 95.13
Write ratio 0.66
Read ratio 0.00
__ Questions __________________________________________________ _________
Total 1.45M 6.66/s
DMS 1.19M 5.49/s %Total: 82.46
Com_ 128.95k 0.59/s 8.92
COM_QUIT 125.15k 0.58/s 8.66
-Unknown 430 0.00/s 0.03
Slow 248 0.00/s 0.02 %DMS: 0.02
DMS 1.19M 5.49/s 82.46
SELECT 976.66k 4.50/s 67.55 81.92
UPDATE 100.63k 0.46/s 6.96 8.44
REPLACE 74.31k 0.34/s 5.14 6.23
INSERT 32.91k 0.15/s 2.28 2.76
DELETE 7.65k 0.04/s 0.53 0.64
Com_ 128.95k 0.59/s 8.92
change_db 125.01k 0.58/s 8.65
show_tables 3.59k 0.02/s 0.25
admin_comma 296 0.00/s 0.02
__ SELECT and Sort __________________________________________________ ___
Scan 108.60k 0.50/s %SELECT: 11.12
Range 249.59k 1.15/s 25.56
Full join 1.81k 0.01/s 0.19
Range check 0 0.00/s 0.00
Full rng join 0 0.00/s 0.00
Sort scan 30.44k 0.14/s
Sort range 60.24k 0.28/s
Sort mrg pass 0 0.00/s
__ Table Locks __________________________________________________ _______
Waited 3.66k 0.02/s %Total: 0.22
Immediate 1.68M 7.72/s
__ Tables __________________________________________________ ____________
Open 64 of 64 %Cache: 100.00
Opened 18.60k 0.09/s
__ Connections __________________________________________________ _______
Max used 56 of 100 %Max: 56.00
Total 125.27k 0.58/s
__ Created Temp __________________________________________________ ______
Disk table 1.52k 0.01/s
Table 6.38k 0.03/s
File 0 0.00/s
__ Threads __________________________________________________ ___________
Running 1 of 2
Cache 0 %Hit: 0
Created 125.27k 0.58/s
Slow 4 0.00/s
__ Aborted __________________________________________________ ___________
Clients 236 0.00/s
Connects 14 0.00/s
__ Bytes __________________________________________________ _____________
Sent 333.04M 1.53k/s
Received 2.31G 10.64k/s


8. I installed vbAdvanced and a couple hacks, plus I have a basic html disclosure home page.

9. Average 50 during peak hours.
Max 79 currently.
Timeout 30 mins.

10. http://www.insearchofchicas.org/VBrequest.php

11. KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 2
<IfModule prefork.c>
StartServers 10
MinSpareServers 15
MaxSpareServers 40
MaxClients 150
MaxRequestsPerChild 20
</IfModule>

12. vBulletin 3.5.4

13. No large log files.

14.
Linux hd-t3230cl.privatedns.com 2.6.10-1.771_FC2 #1 Mon Mar 28 00:50:14 EST 2005 i686 i686 i386 GNU/Linux

core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 32
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) 3963
virtual memory (kbytes, -v) unlimited

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Celeron(R) CPU 2.66GHz
stepping : 1
cpu MHz : 2676.921
cache size : 256 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 mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl tm2 cid xtpr
bogomips : 5292.03

Again I understand I could use more memory, but any assistance with working with what I have would be greatly appreciated.

eva2000
Tue 28th Feb '06, 2:45am
256MB isn't enough ram at least 512MB would be recommended.

But before you uprgade ram try these suggestions in exact order

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


[client]
socket=/home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock

[mysqld]
socket=/home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock
datadir=/var/lib/mysql
safe-show-database
skip-innodb
max_connections = 350
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1800
thread_cache_size = 256
wait_timeout = 60
connect_timeout = 10
tmp_table_size = 32M
max_heap_table_size = 32M
max_allowed_packet = 64M
max_connect_errors = 10
thread_concurrency = 2
query_cache_limit = 1M
query_cache_size = 16M
query_cache_type = 1
query_prealloc_size = 65536
query_alloc_block_size = 32768

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

6. Edit httpd.conf from

KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 2
<IfModule prefork.c>
StartServers 10
MinSpareServers 15
MaxSpareServers 40
MaxClients 150
MaxRequestsPerChild 20
</IfModule>

to

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 6
<IfModule prefork.c>
StartServers 15
MinSpareServers 10
MaxSpareServers 15
MaxClients 150
MaxRequestsPerChild 5000
</IfModule>

restart apache

TomasDR
Tue 28th Feb '06, 9:44am
Thank you for your assistance and I will make the changes as soon as possible and report back incase someone else finds themselves with a basic server.

I recently purchased 3.5.3 about a week before 3.5.4 so I upgraded right away. I had already read performance tips and have all the display options off except for Logged in Users.

I wanted to try and squeeze everything I could out of it first. The hoster wants an extra US$30/month for 256MB more, when the base price is only $69/month.

Zachery
Tue 28th Feb '06, 10:32am
You are not getting much bang for your buck with that machine, celerons are not made for high load enviroments.

You might want to check out some other dedicated server companies.