PDA

View Full Version : Need a help with server config.


Creative
Tue 12th Dec '06, 4:03pm
hi,

i need some one to help me with my server, and regard to this topic : http://www.vbulletin.com/forum/showthread.php?t=70117 here the required informations:

1- dedicated server.
2-
Processor InformationProcessor #1 Vendor: GenuineIntelProcessor #1 Name: Intel(R) Xeon(TM) CPU 2.80GHzProcessor #1 speed: 2799.959 MHzProcessor #1 cache size: 512 KBProcessor #2 Vendor: GenuineIntelProcessor #2 Name: Intel(R) Xeon(TM) CPU 2.80GHzProcessor #2 speed: 2799.959 MHzProcessor #2 cache size: 512 KBProcessor #3 Vendor: GenuineIntelProcessor #3 Name: Intel(R) Xeon(TM) CPU 2.80GHzProcessor #3 speed: 2799.959 MHzProcessor #3 cache size: 512 KBProcessor #4 Vendor: GenuineIntelProcessor #4 Name: Intel(R) Xeon(TM) CPU 2.80GHzProcessor #4 speed: 2799.959 MHzProcessor #4 cache size: 512 KB

Memory InformationMemory: 1033216k/1048064k available (1877k kernel code, 14080k reserved, 759k data, 184k init, 130496k highmem)

System InformationLinux server.XXXX.net 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 18:00:32 EDT 2006 i686 i686 i386 GNU/Linux

Physcial Diskshda: WDC WD1600JB-00GVA0, ATA DISK drivehdb: WDC WD1600JB-00GVA0, ATA DISK drivehdc: CD-224E, ATAPI CD/DVD-ROM drivehda: max request size: 1024KiBhda: 312581808 sectors (160041 MB) w/8192KiB Cache, CHS=19457/255/63, UDMA(100)hda: cache flushes supportedhdb: max request size: 1024KiBhdb: 312581808 sectors (160041 MB) w/8192KiB Cache, CHS=19457/255/63, UDMA(100)hdb: cache flushes supportedhdc: ATAPI 24X CD-ROM drive, 128kB Cache, UDMA(33)

Current Memory Usage total used free shared buffers cachedMem: 1034096 1011512 22584 0 144604 358496-/+ buffers/cache: 508412 525684Swap: 2040244 160 2040084Total: 3074340 1011672 2062668

Current Disk UsageFilesystem Size Used Avail Use% Mounted on/dev/hda3 145G 36G 103G 26% //dev/hda1 99M 16M 78M 18% /bootnone 505M 0 505M 0% /dev/shm/dev/hdb1 147G 61G 80G 44% /backup/usr/tmpDSK
485M 11M 449M 3% /tmp/tmp 485M 11M 449M 3% /var/tmp

3- mysql 4.x
4- 3 mysql installed
5- my top stats : around 100 users in the same time
6- MySQL Variables and MySQL Status ( ATTACHED)
7- i tried to get the MySql stats using the SSH but i get this error :

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
8 - the is vb forum and a site based on php and MYSQL
9- around 70 to 100 concurrent users in the vb forum, the cookie timeout is 5000
10- phpinfo, (ATTACHED)
11-
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
12- vB 3.6.4
13- nothing, just buckup files
14-
Linux server.XXXX.net 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 18:00:32 EDT 2006 i686 i686 i386 GNU/Linux

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) 16376
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 9
cpu MHz : 2799.959
cache size : 512 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 : 2
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 cid xtpr
bogomips : 5602.22
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 9
cpu MHz : 2799.959
cache size : 512 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 : 2
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 cid xtpr
bogomips : 5597.63
processor : 2
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 9
cpu MHz : 2799.959
cache size : 512 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 : 2
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 cid xtpr
bogomips : 5597.66
processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 9
cpu MHz : 2799.959
cache size : 512 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 : 2
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 cid xtpr
bogomips : 5597.67

Creative
Thu 14th Dec '06, 10:40am
Nobody !!

any help??

eva2000
Sat 16th Dec '06, 10:16am
Try the following

1. Upgrade MySQL server to 4.1.22
2. Upgrade PHP to 4.4.4 and/or recompile PHP 4.4.4 after upgrading MySQL
3. Edit /etc/my.cnf and place the following mysql server settings in /etc/my.cnf and restart mysql server afterwards


[mysqld]
skip-name-resolve
safe-show-database
back_log = 75
skip-innodb
max_connections = 650
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 = 45
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 = 2M
query_cache_size = 64M
query_cache_type = 1
query_prealloc_size = 163840
query_alloc_block_size = 32768
default-storage-engine = MyISAM

[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


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/3.6.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 values from

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0

to

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
MinSpareServers 15
MaxSpareServers 20
StartServers 15
MaxClients 180
MaxRequestsPerChild 500

restart apache

Creative
Mon 18th Dec '06, 3:41pm
i found in the /etc/my.cnf :

[mysqld]
max_allowed_packet=16MB
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
#old_passwords=1
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


Shall i delete all those lines ??

Creative
Mon 18th Dec '06, 3:46pm
2. Upgrade PHP to 4.4.4 and/or recompile PHP 4.4.4 after upgrading MySQL


what you mean by the red line??

jason|xoxide
Mon 18th Dec '06, 4:31pm
i found in the /etc/my.cnf :

[mysqld]
max_allowed_packet=16MB
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
#old_passwords=1
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


Shall i delete all those lines ??

Yes, replace all of that with what eva2000 posted.

what you mean by the red line??

If the MySQL libraries are compiled into PHP then the only way to take advantage of the client libraries afforded by a newer version of MySQL is to recompile PHP.

If you are using a version of PHP that uses external MySQL libraries (like all of the ones built by RedHat do) then you don't need to worry about that. All you would have to do is restart httpd.

If you aren't currently using PHP 4.4.4 then simply upgrade MySQL first and PHP second and one way or the other, it will be taken care of.

Creative
Tue 19th Dec '06, 10:24am
thanks aloot ^_^

just more question, shall i care about those lines:

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

in the my.cnf ??

coz maybe it will cause connection problems to the MYSQL.

REGARDS

jason|xoxide
Tue 19th Dec '06, 11:38am
thanks aloot ^_^

just more question, shall i care about those lines:

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

in the my.cnf ??

coz maybe it will cause connection problems to the MYSQL.

REGARDS

I believe that those are the default paths, so it really shouldn't matter. If you want to leave them then go ahead, it shouldn't make any difference.

Creative
Tue 19th Dec '06, 4:40pm
thats what my Service Status showing:
cpsrvdupServer Load0.09 (4 cpus)Memory Used35.7 %Swap Used0.01 %Disk hda3 (/) DMA+26 %Disk hda1 (/boot) DMA+18 %Disk hdb1 (/backup) DMA+43 %



is every thing okay?

eva2000
Wed 20th Dec '06, 6:57pm
0.09 cpu load is fine and disk usage looks okay.