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!