Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Performance Kinda Sluggish....

Quote Reply
Performance Kinda Sluggish....
Hi:

I have had Links SQL running (mod_perl) for a long time now, and things were rather good. I have a pretty big install... 46000 "links" (which are really cartoons). I added Forums to this, and things rally seemed to slow down.

I am not sure what the cause is. Could it be that I made an XML link from my home Links page that runs a search every time the home page is loaded? (and if so, is there a way to store that search result for the 5 most recent posts, and only update it hourly?)

Or am I just running too much on my server? I have a 566 celeron, with a Gig of memory. The MySQL database is run by my ISP.

If I were to add a new box to my system, would I just want a faster processor, and just move the sites over... run a dedicated MySQL server... move my site over to the newer machine and run a dedicated MySQL server on my present machine... or just move Forum over to it's own machine? Add more memory? Go from Ultra IDE to SCSI?

Any ideas or comments?

Oh, an note.... when tunning "top", the load averages are usually 25-35 poercent, and top out maybe 75-80 percent.
dave

Big Cartoon DataBase
Big Comic Book DataBase

Last edited by:

carfac: Feb 4, 2003, 1:24 PM
Quote Reply
Re: [carfac] Performance Kinda Sluggish.... In reply to
Hi,

Before you start looking at more hardware, I'd do a thorough investigation on what is causing the sluggish performance. A 566 is not great, but it shouldn't be too bad, especially if you are running under mod_perl.

I would first of all check that you are really running Gossamer Forum under mod_perl (sadly, it's missing the Environment link, but if you click on FileMan under tools, and then click on Preferences -> Environment, you should be able to confirm).

If it is under mod_perl, see if you can track down any slow sql queries that might be causing the problem. Try running the script from shell and see if it takes an extra long amount of time every request. If so, you might have a global that isn't indexed properly, and is too slow.

Hope that helps,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Performance Kinda Sluggish.... In reply to
Alex:

Thanks so much for your response!

In the meantime, I disabled the XML link, and that seemed to improve things a LOT. See this thread for what I did. In any case, every time my Links install main page is loaded, it runs a search query in Forum.... and that can be 1000 queries an hour.

Anyway, that did a LOT

So, I checked FileMan as instructed, and discovered: Persistant Env: mod_perl () SpeedyCGI (0)
so it is NOT under mod_perl.

Here is my startup.pl...

Code:


use lib '/path/to/links/admin';

use Links::mod_perl;

use lib '/path/to/forum/admin';

use GForum::mod_perl;

#PerlSendHeader On;

1; #return true value


what should I change to get Forum under mod_perl?

Oh, BTW, the size of each instance of apache in "top" increases with the forum lines in there.... from about 22k to about 28k, so I just assumed it was loaded.
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Performance Kinda Sluggish.... In reply to
Hi John,

That might do it. You are loading Gossamer Forum upon startup, but you need to make sure your section of Apache that handles the forum has:

SetHandler perl-script
PerlHandler Apache::Registry

otherwise it's running it as regular old cgi.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [carfac] Performance Kinda Sluggish.... In reply to
Also, I would analyze the query you are doing to get the listings on your home page, and make sure it is properly indexed (i.e. is fast).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Performance Kinda Sluggish.... In reply to
Alex:

OK, I added the

SetHandler perl-script
PerlHandler Apache::Registry

to the <Directory "/hd2/web/f/forum/public_html"> container

It all started up fine, but NO images show now, and I get "Content-type: text/html No-cache: 0" at the top of all my pages.

But it is freakin' FAST!

I tried putting the Perhandler lines and such in a <Location /> cointainer, and I got the same errors. And a TON of errors in the error log.
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Performance Kinda Sluggish.... In reply to
OK, I added the line "PerlSendHeader On" to the above, and the "Content-type: text/html No-cache: 0" dissapeared. But the images are all broken.

if /path/to/forum is where gforum.cgi is, the images are in /path/to/forum/images

The full path to the image is in the source code, like this:

http://forum.bcdb.com/images/no_replies.gif

I tried to access the image directly, and I get a server error...

from the server error log:

[Tue Feb 4 20:20:16 2003] [error] Missing right curly or square bracket at /hd2/web/f/forum/public_html/images/no_replies.gif line 1, at end of line

syntax error at /hd2/web/f/forum/public_html/images/no_replies.gif line 1, at EOF


But this image shows fine:

http://forum.bcdb.com/...sers/1-user_icon.gif

any ideas?
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Performance Kinda Sluggish.... In reply to
You need to move the images out of the mod_perl area. Move them all into /images/forum, and then update your admin path's and URL's area.

mod_perl is trying to run your images as scripts.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Performance Kinda Sluggish.... In reply to
Alex:

OH, I did not know it (tried to) do that! Thanks! Smile

You are up late!
dave

Big Cartoon DataBase
Big Comic Book DataBase