PDA

View Full Version : High MySQl memory usage with Linux 2.4


Cdouglas
Thu 27th Dec '01, 6:50pm
I recently upgraded my server from Redhat 7.0 with a 2.2 kernel to 7.2 with 2.4.9 kernel. At the same time, I upgraded Apache, PHP and Mysql. Apache and mysql config files stayed the same.

Since then, the VB has been running slower than it was. I did some digging today and found the Mysql is using 40MB per instance, and with 15 instances, its taking up 600MB. I only have 512MB installed, so you can guess how much its swapping now.

Has anyone else had this problem?

Here is the rundown:

Apache 1.3.22
PhP 4.1.0
Mysql 3.23.41
Dual 866/512mb

Thanks
Chris

eva2000
Fri 28th Dec '01, 1:11am
okay please provide the following

1. your server specs, such as mysql and php version
2. if possible how mysql was compiled/installed
3. your top stats
4. 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

5. 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 located at http://vbulletin.com/forum/showthread.php?threadid=3477

and post url to that here

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

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

Shaman
Fri 28th Dec '01, 11:36am
Go to Linux kernel version 2.4.17. Seriously. Lots of VM problems fixed, EXT3 support (if you're using EXT2 now) and other improvements that will make things better.

Cdouglas
Fri 28th Dec '01, 7:54pm
Ok, I upgraded to 2.4.17, installed PHP accelerator and recompiled php with mm. Still acting up.

1. Server Stats: php 4.1.0, Mysql 3.23.46, Apache 1.3.22
PHp compiled with --with-apxs --with-mysql --with-imap --with-mm
http://www.dfwstangs.net/info.php3

2. Mysql is binary version.

3. Top stats:
5:33pm up 19:50, 1 user, load average: 0.47, 0.19, 0.13
80 processes: 78 sleeping, 1 running, 1 zombie, 0 stopped
CPU0 states: 10.0% user, 5.0% system, 0.0% nice, 83.0% idle
CPU1 states: 2.0% user, 1.0% system, 0.0% nice, 95.0% idle
Mem: 513716K av, 497292K used, 16424K free, 0K shrd, 112884K buff
Swap: 265032K av, 4336K used, 260696K free 314440K cached

4. http://www.dfwstangs.net/mysqlvars.html

5. http://www.dfwstangs.net/admin/mysqlext.php

6. I host for about 12 other sites, all but one are static.
There doesnt seem to be any speed problems with the static sites. Just the VB. The other php scripts I have written dont have the speed problem I am noticing, but they are very small compared to VB.

7. Average only 75 concurrent, max around 100.

Board is at http://www.dfwstangs.net/vb220
Connected via a 768 SDSL line

Shaman
Sat 29th Dec '01, 12:43pm
Run the repair.php file that is in the extras directory of your vbulletin installation just for the heck of it. And check your MySQL settings... maybe you have a monstrous sort buffer or something like that which is using up a lot of memory.

I have about 2GB of stuff, all indexed, as well as my vB databases on a dedicated MySQL server. Memory use is around 90MB from MySQL. One table has over 7M RADIUS records in it, indexed on the "userid" field.

I dunno why you're having problems, but the kernel upgrade "definitely" helped you. Try also specifying "where" the MySQL installation is. In my case, I use --with-mysql=/usr

eva2000
Sat 29th Dec '01, 1:09pm
Originally posted by Cdouglas
Ok, I upgraded to 2.4.17, installed PHP accelerator and recompiled php with mm. Still acting up.

1. Server Stats: php 4.1.0, Mysql 3.23.46, Apache 1.3.22
PHp compiled with --with-apxs --with-mysql --with-imap --with-mm
http://www.dfwstangs.net/info.php3

2. Mysql is binary version.

3. Top stats:
5:33pm up 19:50, 1 user, load average: 0.47, 0.19, 0.13
80 processes: 78 sleeping, 1 running, 1 zombie, 0 stopped
CPU0 states: 10.0% user, 5.0% system, 0.0% nice, 83.0% idle
CPU1 states: 2.0% user, 1.0% system, 0.0% nice, 95.0% idle
Mem: 513716K av, 497292K used, 16424K free, 0K shrd, 112884K buff
Swap: 265032K av, 4336K used, 260696K free 314440K cached

4. http://www.dfwstangs.net/mysqlvars.html

5. http://www.dfwstangs.net/admin/mysqlext.php

6. I host for about 12 other sites, all but one are static.
There doesnt seem to be any speed problems with the static sites. Just the VB. The other php scripts I have written dont have the speed problem I am noticing, but they are very small compared to VB.

7. Average only 75 concurrent, max around 100.

Board is at http://www.dfwstangs.net/vb220
Connected via a 768 SDSL line http://www.dfwstangs.net/admin/mysqlext.php seems to be password protected ??

Cdouglas
Sat 29th Dec '01, 4:50pm
http://www.dfwstangs.net/mysqlext.php

eva2000
Sat 29th Dec '01, 10:51pm
everything seems fine to me..

try upgrading to php 4.1.1 and mysql 3.23.47

other than that have you checked to see if it's your own net connection ? have you asked your members if they see it slowing down ?