Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Speed of the forum

Quote Reply
Speed of the forum
How do you test the speed of the forum software? Is there some debugging available in the code to check where the bottlenecks are? I would like to check if my server is the problem, because GF seems to be a little slow at my site.

Lauri
Quote Reply
Re: [lpa] Speed of the forum In reply to
Hi,

1. Make sure debug mode is off. Having debug on significantly slows the forum down.
2. Test the program from shell. Run:

time ./gforum.cgi > /dev/null

Run it at least 3 times to get an average. On ours, generating the home page takes 0.4 seconds. This is the performance you should see under CGI. If you are using mod_perl or SpeedyCGI, it will be significantly faster.

3. Check the system load with `uptime`. Make sure your system isn't already overloaded by something else.

Hope that helps,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Speed of the forum In reply to
Running time ./gforum.cgi >/dev/null gave me this:
0.94u 0.17s 0:02.68 41.4%
0.96u 0.11s 0:01.44 74.3%
0.93u 0.17s 0:01.78 61.7%
0.99u 0.15s 0:02.55 44.7%
And uptime:
9:11pm up 110 day(s), 14:11, 2 users, load average: 0.96, 0.93, 0.74

I am running under CGI and Netscape Enterprise server 2.01 with Solaris UNIX.

It seems to mee that this is too much. What should I check next?

Lauri
Quote Reply
Re: [lpa] Speed of the forum In reply to
I still have this problem with slow performance. How can I check where the bottleneck is? Might it be MySQL or Perl or what? It shouldn't be web server because these numbers are get by running the software from the command line.

Thanks,
Lauri
Quote Reply
Re: [lpa] Speed of the forum In reply to
In my experience your server load is too high. Busy, or shared server I take it?

Here's an example of a good web host that keeps all of their server loads low:

http://www.pair.com/.../status/servers.html

At the time of this post, they have 262 servers averaging 0.20 server loads.
Quote Reply
Re: [Katana Man] Speed of the forum In reply to
In Reply To:
In my experience your server load is too high. Busy, or shared server I take it?
Well that might be true, but even during night when the load is 0.17 the time of gforum shows 0.8 or 0.7.

Lauri
Quote Reply
Re: [lpa] Speed of the forum In reply to
My last tests showed this:

host: time ./gforum.cgi > /dev/null
1.09u 0.17s 0:01.91 65.9%
host: w
1:19am up 121 day(s), 17:20, 2 users, load average: 0.10, 0.10, 0.12
host: time ./gforum.cgi > /dev/null
0.88u 0.10s 0:00.98 100.0%

So the load can not be the issue. What should I look at?

Lauri
Quote Reply
Re: [lpa] Speed of the forum In reply to
Hi,

What sort of machine is this? On our p3 500 with 256 megs of ram, we get speeds of around 0.5 s. Is this with an empty database or a populated database?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Speed of the forum In reply to
In Reply To:
What sort of machine is this? On our p3 500 with 256 megs of ram, we get speeds of around 0.5 s. Is this with an empty database or a populated database?

It is a Solaris 7 Ultra Sparc 250 machine with 1 Mb of ram. There is quite many web servers running on the machine, but during the night I think they were quite idle. The database contains about 12000 users and about 18000 posts loaded from WWWThreads. The forum has no users yet. So it was idle.

Lauri
Quote Reply
Re: [lpa] Speed of the forum In reply to
>>1 Mb of ram<<

A whole megabyte? Smile
Quote Reply
Re: [Paul] Speed of the forum In reply to
In Reply To:
>>1 Mb of ram<<

A whole megabyte? Smile
OK 1 GbBlush

Still wondering what is the problem. I have still WWWThreads 5.4 and it gives me this even with such a high load:
host: time ./wwwthreads.pl >/dev/null
0.21u 0.05s 0:00.38 68.4%
host: w
12:56pm up 122 day(s), 4:57, 2 users, load average: 2.12, 2.60, 2.36

Lauri
Quote Reply
Re: [lpa] Speed of the forum In reply to
Sorry to ask once again, but how can I find what is taking so much time at my installation? It might be the old messages not having been properly imported from wwwthreads or maybe I should upgrade my mySQL version, but how to find out?

Lauri
Quote Reply
Re: [lpa] Speed of the forum In reply to
Hi,

Can you send me ssh access and I can do some debugging to see what's taking so long.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Speed of the forum In reply to
 My forum is too slow, especially the category pages. I have 1,500 categories, and each of them has usually one forum. So far few users, posts and traffic. Linksql is OK, even in dynamic mode, although it has more categories (5,000 total) than the forum.

I am switching to mod_perl. I have installed it on the server, and I have changed the httpd.conf file. There was no perl startup file, so I created one with this in it:

# NEXT FOUR LINES ADDED FOR MOD PERL

use lib '/usr/local/etc/httpd/cgi-bin/links/admin';

use Links::mod_perl;

use lib '/usr/local/etc/httpd/cgi-bin/gforum/admin';

use GForum::mod_perl;



I included reference to it in the httpd.conf file, just after the line about mod_perl

PerlRequire /usr/local/etc/httpd/conf/startup.pl I got this error, so I have commented out that line: Server Configuration Error

Syntax error on line 37 of /usr/local/etc/httpd/conf/httpd.conf: Can't locate Apache/DBI.pm in @INC (@INC contains: /usr/local/etc/httpd/cgi-bin/links/admin /usr/local/lib/perl5/5.6.1/i386-freebsd /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.00503/i386-freebsd /usr/local/lib/perl5/5.00503 /usr/local/lib/site_perl . /usr/local/etc/httpd/ /usr/local/etc/httpd/lib/perl) at /usr/local/etc/httpd/cgi-bin/links/admin/Links/mod_perl.pm line 21. BEGIN failed--compilation aborted at /usr/local/etc/httpd/cgi-bin/links/admin/Links/mod_perl.pm line 21. Compilation failed in require at /usr/local/etc/httpd/conf/startup.pl line 4. BEGIN failed--compilation aborted at /usr/local/etc/httpd/conf/startup.pl line 4. Compilation failed in require at (eval 2) line 1.

Any ideas how I can get mod_perl working properly?

Also, I have been trying to figure out other ways as well to speed things up.

The pid file of mysql contains the following:

Warning: setrlimit couldn't increase number of open files to more than 150

Warning: Changed limits: max_connections: 100 table_cache: 64

Warning: One can only use the --user switch if running as root

Error in accept: Too many open files

Anything I should do about the configuration of mysql? I only use it for Gossamer's forum and linksql.

time virtual /usr/local/etc/httpd/cgi-bin/gforum/gforum.cgi > /dev/null

9.679u 0.196s 0:39.64 24.8% 855+10461k 1+0io 0pf+0w

9.736u 0.192s 0:44.22 22.4% 876+10781k 0+0io 0pf+0w

9.753u 0.248s 0:54.30 18.3% 864+10565k 0+0io 0pf+0w



time virtual /usr/local/etc/httpd/cgi-bin/links/page.cgi > /dev/ null

0.825u 0.089s 0:01.44 62.5% 903+4203k 21+0io 0pf+0w

0.797u 0.045s 0:01.66 50.0% 885+3876k 0+0io 0pf+0w



uptime gives:

10:00AM up 15 days, 1:30, 2 users, load averages: 0.05, 0.21, 0.22



with a top command, and nothing happening on the site, I have the following.



last pid: 6724; load averages: 0.07, 0.17, 0.21 up 15+01:33:10 10:03:07

15 processes: 1 running, 14 sleeping

CPU states: 29.7% user, 0.0% nice, 7.3% system, 0.4% interrupt, 62.5% idle

Mem: 329M Active, 501M Inact, 140M Wired, 33M Cache, 112M Buf, 2032K Free

Swap: 1024M Total, 61M Used, 963M Free, 5% Inuse



PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND

6724 cyber 28 0 1404K 972K RUN 0:01 1.24% 0.83% top

78341 cyber 2 0 11328K 2744K poll 0:14 0.00% 0.00% mysqld

98055 cyber 18 0 5344K 860K lockf 0:01 0.00% 0.00% httpsd

73699 cyber 18 0 5260K 428K pause 0:00 0.00% 0.00% httpsd

46387 cyber 2 0 5344K 876K select 0:00 0.00% 0.00% httpsd

79908 cyber 18 0 5332K 840K lockf 0:00 0.00% 0.00% httpsd

25675 cyber 18 0 5332K 888K lockf 0:00 0.00% 0.00% httpsd

89784 cyber 18 0 5332K 844K lockf 0:00 0.00% 0.00% httpsd

73955 cyber 18 0 5344K 840K lockf 0:00 0.00% 0.00% httpsd

699 cyber 18 0 1324K 832K pause 0:00 0.00% 0.00% tcsh

80773 cyber 18 0 5332K 836K lockf 0:00 0.00% 0.00% httpsd

90010 cyber 18 0 5344K 840K lockf 0:00 0.00% 0.00% httpsd

90009 cyber 18 0 5332K 832K lockf 0:00 0.00% 0.00% httpsd

87868 cyber 3 0 1320K 828K ttyin 0:00 0.00% 0.00% tcsh

78311 cyber 10 0 640K 244K wait 0:00 0.00% 0.00% sh

===========================================================

at the beginning of the loading of the main category page:



last pid: 6724; load averages: 0.10, 0.15, 0.19 up 15+01:34:28 10:04:25

16 processes: 2 running, 14 sleeping

CPU states: 80.2% user, 0.0% nice, 17.9% system, 1.9% interrupt, 0.0% idle

Mem: 346M Active, 468M Inact, 140M Wired, 48M Cache, 112M Buf, 1724K Free

Swap: 1024M Total, 61M Used, 963M Free, 5% Inuse, 24K Out



PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND

7141 cyber 2 0 6004K 5556K sbwait 0:01 8.42% 2.49% perl5

6724 cyber 29 0 1404K 952K RUN 0:03 1.82% 1.81% top

78341 cyber 28 0 11328K 2744K RUN 0:14 0.00% 0.00% mysqld

98055 cyber 18 0 5344K 860K lockf 0:01 0.00% 0.00% httpsd

73699 cyber 18 0 5260K 428K pause 0:00 0.00% 0.00% httpsd

46387 cyber -6 0 5344K 876K piperd 0:00 0.00% 0.00% httpsd

79908 cyber 2 0 5332K 840K select 0:00 0.00% 0.00% httpsd

25675 cyber 18 0 5332K 888K lockf 0:00 0.00% 0.00% httpsd

89784 cyber 18 0 5332K 844K lockf 0:00 0.00% 0.00% httpsd

73955 cyber 18 0 5344K 840K lockf 0:00 0.00% 0.00% httpsd

699 cyber 18 0 1324K 832K pause 0:00 0.00% 0.00% tcsh

80773 cyber 18 0 5332K 836K lockf 0:00 0.00% 0.00% httpsd

90010 cyber 18 0 5344K 840K lockf 0:00 0.00% 0.00% httpsd

90009 cyber 18 0 5332K 832K lockf 0:00 0.00% 0.00% httpsd

87868 cyber 3 0 1320K 828K ttyin 0:00 0.00% 0.00% tcsh

78311 cyber 10 0 640K 244K wait 0:00 0.00% 0.00% sh



=================================================

toward the end of the loading of the main category page:



last pid: 6724; load averages: 0.76, 0.35, 0.26 up 15+01:35:56 10:05:53

16 processes: 2 running, 14 sleeping

CPU states: 86.4% user, 0.0% nice, 10.5% system, 2.3% interrupt, 0.8% idle

Mem: 341M Active, 481M Inact, 134M Wired, 46M Cache, 112M Buf, 3032K Free

Swap: 1024M Total, 61M Used, 963M Free, 5% Inuse



PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND

7455 cyber 41 0 10612K 10148K RUN 0:08 38.96% 25.34% perl5

78341 cyber 2 0 11328K 2744K poll 0:15 0.68% 0.68% mysqld

6724 cyber 28 0 1404K 952K RUN 0:03 0.29% 0.29% top

98055 cyber 18 0 5344K 860K lockf 0:01 0.00% 0.00% httpsd

46387 cyber -6 0 5344K 876K piperd 0:00 0.00% 0.00% httpsd

73699 cyber 18 0 5260K 428K pause 0:00 0.00% 0.00% httpsd

79908 cyber 2 0 5332K 840K sbwait 0:00 0.00% 0.00% httpsd

25675 cyber 18 0 5332K 888K lockf 0:00 0.00% 0.00% httpsd

89784 cyber 2 0 5332K 844K select 0:00 0.00% 0.00% httpsd

73955 cyber 18 0 5344K 840K lockf 0:00 0.00% 0.00% httpsd

699 cyber 18 0 1324K 832K pause 0:00 0.00% 0.00% tcsh

80773 cyber 18 0 5332K 836K lockf 0:00 0.00% 0.00% httpsd

90010 cyber 18 0 5344K 840K lockf 0:00 0.00% 0.00% httpsd

90009 cyber 18 0 5332K 832K lockf 0:00 0.00% 0.00% httpsd

87868 cyber 3 0 1320K 828K ttyin 0:00 0.00% 0.00% tcsh

78311 cyber 10 0 640K 244K wait 0:00 0.00% 0.00% sh



last pid: 9163; load averages: 0.33, 0.21, 0.20 up 15+01:42:48 10:12:45

16 processes: 1 running, 15 sleeping

CPU states: 46.4% user, 0.0% nice, 8.4% system, 1.5% interrupt, 43.7% idle

Mem: 333M Active, 471M Inact, 140M Wired, 38M Cache, 112M Buf, 23M Free

Swap: 1024M Total, 61M Used, 963M Free, 5% Inuse



============================================

linksql is so fast it it hard to capture on top! this is a dynamic linksql page



PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND

9445 cyber -2 0 5528K 5064K getblk 0:01 17.86% 2.49% perl5

6724 cyber 28 0 1404K 944K RUN 0:13 1.66% 1.66% top

78341 cyber 2 0 11328K 2744K poll 0:15 0.00% 0.00% mysqld

98055 cyber 18 0 5344K 860K lockf 0:01 0.00% 0.00% httpsd

46387 cyber 18 0 5344K 876K lockf 0:00 0.00% 0.00% httpsd

73699 cyber 18 0 5260K 428K pause 0:00 0.00% 0.00% httpsd

79908 cyber 18 0 5332K 840K lockf 0:00 0.00% 0.00% httpsd

25675 cyber 18 0 5332K 888K lockf 0:00 0.00% 0.00% httpsd

89784 cyber 2 0 5332K 844K sbwait 0:00 0.00% 0.00% httpsd

73955 cyber -6 0 5344K 840K piperd 0:00 0.00% 0.00% httpsd

80773 cyber 2 0 5332K 836K select 0:00 0.00% 0.00% httpsd

699 cyber 18 0 1324K 832K pause 0:00 0.00% 0.00% tcsh

90010 cyber 18 0 5344K 840K lockf 0:00 0.00% 0.00% httpsd

90009 cyber 18 0 5332K 832K lockf 0:00 0.00% 0.00% httpsd

87868 cyber 3 0 1320K 828K ttyin 0:00 0.00% 0.00% tcsh

78311 cyber 10 0 640K 244K wait 0:00 0.00% 0.00% sh

Thank you so very much!