PDA

View Full Version : Help... my vB is running very slow all of a sudden


WebmasterAJ
Tue 26th Aug '03, 9:15pm
I don't understand what could possibly cause this problem, so any help is VERY appreciated. For some reason, in the past week my visitors and I have noticed that vB has been lagging quite a bit. The problem doesn't seem to be on the non-vB pages though, so that totally lost me. I recently upgraded ALL of my server software and Kernel, so everything is up to date. Here are all the stats that Steve has requested that I post when asking for help :cool: :

I am currently on a dedicated server.

cpu speed/type single or dual cpus): P3 1.2Ghz
how much memory installed: 1GB
hard drive type/configuration: 60GB IDE non raid
linux distributor or windows version: redhat linux 7.3
apache/IIS version: apache 1.3.28
PHP version: php 4.3.2
MySQL version: mysql 4.0.14-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 ?
No...

4. if possible how mysql was compiled/installed
Um... I really don't know. FastServers installed it, I assume they did it right originally. I've updated it since, and that was through Web Hosting Manager. (cPanel software)

5. your top stats
http://www.finheaven.com/vbtech/topstats.jpg (http://www.finheaven.com/vbtech/topstats.jpg)

6. 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
[mysqld]
set-variable = max_connections=500

7. your mysql extended-status output either still telnet as root user type
For some reason can't access this file as root. If it is really needed, I can ask tech support.

http://www.finheaven.com/boardvb2/mysqlinfo.php (http://www.finheaven.com/boardvb2/mysqlinfo.php)

8. oh and is your vB the only thing on the server? or other scripts? sites?
On my server, I am the largest website on it. There are a couple of smaller websites, but they aren't dynamic (no MySQL, PHP, etc). There are other databases on my website though, which are frequently accessed. That script was hand coded by a friend.

9. how many average and max concurrent users on your vB forum ?
On average, about 70. It peaks to about 175-200 on Sundays. Maximum is just 226.

10. create a file named phpinfo.php and place this code in it and post the url/link to it from your web site
http://www.finheaven.com/phpinfo.php (http://www.finheaven.com/phpinfo.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: 160

12. what version of vB are you running ?
2.2.8

Anyways, I believe that's it. If you need anything else, please let me know.

I appreciate your help. Thank you.

Sincerely,
Andrew Tatum

WebmasterAJ
Tue 26th Aug '03, 9:16pm
By the way, prior to last night, the server has been running for about 6 months. I did a reboot last night, as I asked for FastServers to update the Kernel.

Scott MacVicar
Tue 26th Aug '03, 9:19pm
i know that kernel upgrades have caused problems with the network cards only switching to half duplex causing a much slower connection.

I'd ask your host to look at the box.

adrianchew
Tue 26th Aug '03, 10:18pm
Your my.cnf file needs tuning - you have hardly any settings.

Here's what I'm using, I'm sure Eva can provide you with something, you might want to omit my directory settings, and add the rest to your my.cnf and restart mysql.


[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
set-variable = max_connections=300
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=14400
set-variable = connect_timeout=10
set-variable = max_allowed_packet=16M
set-variable = max_connect_errors=10

[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
open_files_limit=8192
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

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

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

WebmasterAJ
Tue 26th Aug '03, 10:21pm
I've requested that they do that, will let you know their response.

I've noticed that a lot of people are still using MySQL 3... would a problem lie in the newer version of MySQL?

adrianchew
Tue 26th Aug '03, 10:25pm
I've read of the table corruption issues plaguing mysql4 - that's why I kept from upgrading to it for now. The latest version seems to resolve some but not all of those issues. You might want to check your database for problems as well following the guidelines Eva posted...

http://www.vbulletin.com/forum/showthread.php?t=69803

From what I read, 4.0.14 still has some problems but isn't as bad.

eva2000
Wed 27th Aug '03, 1:13am
WebmasterAJ, did you have a custom set /etc/my.cnf prior to your mass upgrades ?

i'd try this my.cnf below and restart mysql


[mysqld]
max_connections = 400
key_buffer = 32M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 64
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
skip-innodb

[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


also if you have access to WHM panel, i'd go to service manager and disable java/chat apps and interchange, melange stuff

WebmasterAJ
Wed 27th Aug '03, 8:22am
Great, I appreciate all your help. Just a coupld of questions, should I go with what adrianchew or eva2000? You both showed me what I should make my "my.cnf" be. However, they are both customized differently.

Also, if I do this, would it be advised that I shut down the message boards?

Thank you once again for your help...

Sincerely,
Andrew Tatum

eva2000
Wed 27th Aug '03, 10:05am
Great, I appreciate all your help. Just a coupld of questions, should I go with what adrianchew or eva2000? You both showed me what I should make my "my.cnf" be. However, they are both customized differently.

Also, if I do this, would it be advised that I shut down the message boards?

Thank you once again for your help...

Sincerely,
Andrew Tatum
of course my recommendation.. i work for vBulletin.com and do this stuff daily :D

plus adrianchew's my.cnf is more for mysql 3.23.x although 4.0.x can work with it..

but my my.cnf is for 4.0.x and enables query caching function which helps ALOT and is the version of mysql you use ;)

adrianchew
Wed 27th Aug '03, 11:20am
but my my.cnf is for 4.0.x and enables query caching function which helps ALOT and is the version of mysql you use ;)
And someday when I decide to upgrade to 4.0.x is ok, I'll be looking for your input. ;)

WebmasterAJ
Thu 28th Aug '03, 10:21am
eva2000, thank you very much for that configuration. vBulletin is running much faster now, and everyone including myself is very happy.

Just an off question, do you recommend PHP Accelorator or any other program similiar? Please let me know, because I'm trying to greatly increase the speed of my site.

Thank you once again...

Sincerely,
Andrew Tatum

eva2000
Thu 28th Aug '03, 12:45pm
try turck mmcache http://www.vbulletin.com/forum/showthread.php?t=75878 :)

Shining Arcanine
Fri 29th Aug '03, 8:26pm
You can also enable gzip via php.ini. That should speed things up for low bandwidth viewers. Not to mention it should lower concurrent connections thus lowering CPU Usage.