PDA

View Full Version : Just got a new server and desperately need help to tweak it :)


Patric
Tue 21st Jan '03, 4:59pm
Just got rid of our old Dual 800 PIII running Win2k Server in exchange for a Dual Xeon 1.8 Ghz, 1 Gb Ram running Linux but I don't know what will be the best settings for it (MySQL and Apache). It is only running a VBB with db and nothing else.

It looks like MySQL is eating memory and the load average stops around 3 or right above. The vbb usually has between 150 and 300 users online.

MySQL version: 3.23.49
Apache: Don't know which version I'm afraid.

All help is really appreciated as I'm not an expert at anything here :)


TIA

Patric

Steve Machol
Tue 21st Jan '03, 5:19pm
Let me post what eva2000 will ask for:

please provide the following

1. is this on dedicated or shared virual server
2. your server specs, such as mysql and php version
3. if possible how mysql was compiled/installed
4. your top stats (linux only)
5. your mysql configuration variables located at /etc/my.cnf or c:\my.cnf if on Windows server if
you don't have that file you need to log into telnet and as root user type

mysqladmin -u root -p variables

copy and paste output here

6. your mysql extended-status output either still telnet as root user type

mysqladmin -u root -p extended-status

copy and paste output here

or preferred is to installed extended-status output script which is either located

- in your vB 2.2.6 or higher vB version's zip file extra's folder, upload mysqlinfo.php script to
your site or if you're on an pre vB 2.2.6 install go to
- http://vbulletin.com/forum/showthread.php?threadid=3477 and install that scrip making sure to edit $mysqllogin line with your own mysqlusername and password

and post url to that here

7. oh and is your vB the only thing on the server? or other scripts? sites?

8. how many average and max concurrent users on your vB forum ?

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

<?
phpinfo();
?>

i.e. yourdomain.com/phpinfo.php

10. 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
MaxKeepAliveRequests
KeepAliveTimeout
MinSpareServers
MaxSpareServers
StartServers
MaxClients

11. what version of vB are you running ?

Patric
Tue 21st Jan '03, 6:15pm
Ok, will fix that ASAP!

Thanks Steve!



Patric

eva2000
Tue 21st Jan '03, 8:46pm
lol steve... i'm getting that predictable huh ? :)

yes Patric i'll need the info that Steve posted/requested to be able to help you :)

Steve Machol
Tue 21st Jan '03, 10:29pm
Originally posted by eva2000
lol steve... i'm getting that predictable huh ? :) Yep! I've copied this into one of my many ready-made stock answers! :D

Patric
Wed 22nd Jan '03, 9:52am
Ok, here goes!

1. Dedicated server

2. PHP Version 4.1.2, MySQL Version 3.23.49 (Dual 1.8 Ghz Xeon, 1 Gb Ram, Debian Linux)

3. Via apt-get on a Debian system

4. Top at the moment:
################
13:59:16 up 16:28, 1 user, load average: 1.55, 1.81, 1.68
119 processes: 115 sleeping, 4 running, 0 zombie, 0 stopped
CPU states: 21.7% user, 3.0% system, 0.0% nice, 75.4% idle
Mem: 971168K total, 706284K used, 264884K free, 20628K buffers
Swap: 1951888K total, 0K used, 1951888K free, 571660K cached
################

5. From my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[safe_mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
log = /var/log/mysql.log
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-locking

skip-networking
set-variable = max_connections=500
set-variable = key_buffer=16M
set-variable = myisam_sort_buffer_size=64M
set-variable = join_buffer=1M
set-variable = record_buffer=1M
set-variable = sort_buffer=2M
set-variable = table_cache=1024
set-variable = thread_cache_size=256
set-variable = wait_timeout=7200
set-variable = connect_timeout=10
set-variable = max_allowed_packet=16M
set-variable = thread_stack=128K
skip-innodb

[mysqldump]
quick
set-variable = max_allowed_packet=16M
[isamchk]
set-variable = key_buffer=16M

[myisamchk]
set-variable = key_buffer=128M
set-variable = sort_buffer=128M
set-variable = read_buffer=16M
set-variable = write_buffer=16M

6. http://www.europa-universalis.com/forum/admin/mysqlinfo.php

7. Yes

8. Average: 200+ Max: 350 (383)

9. http://www.europa-universalis.com/forum/admin/phpinfo.php

10. Apache
KeepAlive = On
MaxKeepAliveRequests = 100
KeepAliveTimeout = 15
MinSpareServers = 15
MaxSpareServers = 25
StartServers = 15
MaxClients = 150

11. 2.2.9



/ Patric

eva2000
Thu 23rd Jan '03, 3:36am
my.cnf looks okay but i'd upgrade to mysql 3.23.54a and also if you can try the latest stable 2.4.x linux kernel

Patric
Fri 24th Jan '03, 8:08pm
Originally posted by eva2000
my.cnf looks okay but i'd upgrade to mysql 3.23.54a and also if you can try the latest stable 2.4.x linux kernel

I have the latest stable Debian version and I guess I have to try to install the later MySQL...

Current TOP

00:58:33 up 1 day, 1:36, 1 user, load average: 12.21, 12.20, 10.24
234 processes: 213 sleeping, 21 running, 0 zombie, 0 stopped
CPU states: 85.6% user, 14.4% system, 0.0% nice, 0.0% idle
Mem: 971168K total, 886512K used, 84656K free, 21696K buffers
Swap: 1951888K total, 692K used, 1951196K free, 639252K cached

It behaves like syrup and mysqld take all ram in the box :(

I wish there was something that could be done to the cnf to fix this.


Patric

eva2000
Fri 24th Jan '03, 8:12pm
submit a support ticket at http://www.vbulletin.com/members/support_form.php along with your server root password, mysql root password and ssh/telnet login details and i can take alook for you to see what's up...

also mention according to your server time, what time of day is the busiest or when you get high loads

Patric
Mon 27th Jan '03, 7:32am
Originally posted by eva2000
submit a support ticket at http://www.vbulletin.com/members/support_form.php along with your server root password, mysql root password and ssh/telnet login details and i can take alook for you to see what's up...

also mention according to your server time, what time of day is the busiest or when you get high loads

Ok, will do but I have to adjust some firewall settings first. Is it possible to get the IP range that you will logon from?

Thanks

Patric

email: pb@paradoxplaza.com

[EDIT: Support ticket sent!]

Patric
Wed 12th Feb '03, 7:33am
Just wanted to say thanks for all the help! I followed most of your instructions and now the server is blazingly fast... I think what helped most was to upgrade to Kernel 2.4.20 :)

Server Load Averages 0.35, 0.45, 0.55 239 users online (132 members & 107 guests).


Thanks!

Patric

eva2000
Wed 12th Feb '03, 7:44am
Originally posted by Patric
Just wanted to say thanks for all the help! I followed most of your instructions and now the server is blazingly fast... I think what helped most was to upgrade to Kernel 2.4.20 :)

Server Load Averages 0.35, 0.45, 0.55 239 users online (132 members & 107 guests).


Thanks!

Patric good to hear my advice helped :D

Raz Meister
Wed 12th Feb '03, 2:10pm
Wow, upgrading kernels can make THAT much of a difference? :eek:

eva2000
Wed 12th Feb '03, 2:16pm
Wow, upgrading kernels can make THAT much of a difference? :eek:
yup

difference between 2.2.x and 2.4.x kernel is very dramatic particularly for mysql applications

Raz Meister
Sat 15th Feb '03, 8:15am
Is it possible to upgrade the kernel via ssh? Or does it have to be via a console?

Swamper
Mon 17th Feb '03, 7:32pm
Wow... are those SCSI drives you're using? I just looked at your mysql stats and this freaked me out:

Created_tmp_disk_tables | 531
Created_tmp_tables | 943073

that is great.. it is rarely ever caching to disk! I'm jealous..