Question about FastCGI and mod_perl

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about FastCGI and mod_perl

J.M.P. Alves
Hi,

I have just installed GBrowse2 on a test machine, and I was checking out
the FastCGI and mod_perl configuration. They do indeed significantly
speed up things, at least in my setup -- I have the impression FastCGI
made more of a difference than mod_perl for the simple tests I tried
(basically clicking on different parts of the overview and seeing how
fast things were loaded.

Anyway, my question is more to confirm if I did things correctly, since
I'm not a specialist in Apache configuration, to say the least.

I followed the instructions on
http://gmod.org/wiki/GBrowse_2.0_HOWTO#Running_GBrowse_under_FastCGI and
the following section on mod_perl and the http://localhost/fgb2 and
http://localhost/mgb2 worked as expected. I then wanted to use both
FastCGI and mod_perl on the regular GBrowse instance, without having to
use a special URL (fgb2 or mgb2) to access either.

What I have done was modify the file /etc/apache2/conf.d/gbrowse2.conf
removing the IfModule tests (since I know I do have FastCGI and mod_perl
installed) to look like:

==================================
Alias        "/gbrowse2/i/" "/var/tmp/gbrowse2/images/"
Alias        "/gbrowse2"    "/var/www/gbrowse2"
ScriptAlias  "/gb2"      "/usr/lib/cgi-bin/gb2"

<Directory "/var/www/gbrowse2">
   AllowOverride Options
   Options -Indexes -MultiViews +FollowSymLinks
   Order allow,deny
   Allow from all
</Directory>

<Directory "/var/tmp/gbrowse2/images/">
   Order allow,deny
   Allow from all
</Directory>

<Directory "/usr/lib/cgi-bin/gb2">

   SetEnv GBROWSE_CONF   "/etc/gbrowse2"
   SetHandler   fastcgi-script
   SetHandler perl-script
   PerlResponseHandler ModPerl::Registry
   PerlOptions +ParseHeaders
</Directory>

   FastCgiConfig  -initial-env GBROWSE_CONF=/etc/gbrowse2
==================================

Then I restarted Apache, of course (sudo apache2ctl restart).

Is that the right thing to do? It feels like GBrowse is running with the
performance improvements I saw before the modification. Is there a way
to confirm things are working as intended?

Thanks.

Cheers
J

--
-------------------------------
João Marcelo Pereira Alves (J)
Post-doctoral fellow
MCV / VCU - Richmond, VA
http://bioinfo.lpb.mic.vcu.edu
f. 1-804-828-3897


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: Question about FastCGI and mod_perl

Keiran Raine
Hi,

Just a word of caution for our experiences with a mod-perl / post-gres  
combination.

Our configuration uses a post-gres database.  We found that under mod-
perl all of the connections were slowly hovered up and lots of zombie  
processes were left on our server.  We don't see this issue with fast-
cgi.

I hope this is helpful,

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 7703
[hidden email]





On 10 Jun 2010, at 22:24, J.M.P. Alves wrote:

> Hi,
>
> I have just installed GBrowse2 on a test machine, and I was checking  
> out
> the FastCGI and mod_perl configuration. They do indeed significantly
> speed up things, at least in my setup -- I have the impression FastCGI
> made more of a difference than mod_perl for the simple tests I tried
> (basically clicking on different parts of the overview and seeing how
> fast things were loaded.
>
> Anyway, my question is more to confirm if I did things correctly,  
> since
> I'm not a specialist in Apache configuration, to say the least.
>
> I followed the instructions on
> http://gmod.org/wiki/GBrowse_2.0_HOWTO#Running_GBrowse_under_FastCGI 
> and
> the following section on mod_perl and the http://localhost/fgb2 and
> http://localhost/mgb2 worked as expected. I then wanted to use both
> FastCGI and mod_perl on the regular GBrowse instance, without having  
> to
> use a special URL (fgb2 or mgb2) to access either.
>
> What I have done was modify the file /etc/apache2/conf.d/gbrowse2.conf
> removing the IfModule tests (since I know I do have FastCGI and  
> mod_perl
> installed) to look like:
>
> ==================================
> Alias        "/gbrowse2/i/" "/var/tmp/gbrowse2/images/"
> Alias        "/gbrowse2"    "/var/www/gbrowse2"
> ScriptAlias  "/gb2"      "/usr/lib/cgi-bin/gb2"
>
> <Directory "/var/www/gbrowse2">
>   AllowOverride Options
>   Options -Indexes -MultiViews +FollowSymLinks
>   Order allow,deny
>   Allow from all
> </Directory>
>
> <Directory "/var/tmp/gbrowse2/images/">
>   Order allow,deny
>   Allow from all
> </Directory>
>
> <Directory "/usr/lib/cgi-bin/gb2">
>
>   SetEnv GBROWSE_CONF   "/etc/gbrowse2"
>   SetHandler   fastcgi-script
>   SetHandler perl-script
>   PerlResponseHandler ModPerl::Registry
>   PerlOptions +ParseHeaders
> </Directory>
>
>   FastCgiConfig  -initial-env GBROWSE_CONF=/etc/gbrowse2
> ==================================
>
> Then I restarted Apache, of course (sudo apache2ctl restart).
>
> Is that the right thing to do? It feels like GBrowse is running with  
> the
> performance improvements I saw before the modification. Is there a way
> to confirm things are working as intended?
>
> Thanks.
>
> Cheers
> J
>
> --
> -------------------------------
> João Marcelo Pereira Alves (J)
> Post-doctoral fellow
> MCV / VCU - Richmond, VA
> http://bioinfo.lpb.mic.vcu.edu
> f. 1-804-828-3897
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Gmod-gbrowse mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse



--
 The Wellcome Trust Sanger Institute is operated by Genome Research
 Limited, a charity registered in England with number 1021457 and a
 company registered in England with number 2742969, whose registered
 office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: Question about FastCGI and mod_perl

Lincoln Stein
In reply to this post by J.M.P. Alves
Hi,

I don't think you should have two SetHandlers in the same section. One or the other of them is "winning" the race, but it isn't clear which one will have control.

I personally find FastCGI to be both faster and more stable than mod_perl for this application.

Lincoln

On Thu, Jun 10, 2010 at 5:24 PM, J.M.P. Alves <[hidden email]> wrote:
Hi,

I have just installed GBrowse2 on a test machine, and I was checking out
the FastCGI and mod_perl configuration. They do indeed significantly
speed up things, at least in my setup -- I have the impression FastCGI
made more of a difference than mod_perl for the simple tests I tried
(basically clicking on different parts of the overview and seeing how
fast things were loaded.

Anyway, my question is more to confirm if I did things correctly, since
I'm not a specialist in Apache configuration, to say the least.

I followed the instructions on
http://gmod.org/wiki/GBrowse_2.0_HOWTO#Running_GBrowse_under_FastCGI and
the following section on mod_perl and the http://localhost/fgb2 and
http://localhost/mgb2 worked as expected. I then wanted to use both
FastCGI and mod_perl on the regular GBrowse instance, without having to
use a special URL (fgb2 or mgb2) to access either.

What I have done was modify the file /etc/apache2/conf.d/gbrowse2.conf
removing the IfModule tests (since I know I do have FastCGI and mod_perl
installed) to look like:

==================================
Alias        "/gbrowse2/i/" "/var/tmp/gbrowse2/images/"
Alias        "/gbrowse2"    "/var/www/gbrowse2"
ScriptAlias  "/gb2"      "/usr/lib/cgi-bin/gb2"

<Directory "/var/www/gbrowse2">
  AllowOverride Options
  Options -Indexes -MultiViews +FollowSymLinks
  Order allow,deny
  Allow from all
</Directory>

<Directory "/var/tmp/gbrowse2/images/">
  Order allow,deny
  Allow from all
</Directory>

<Directory "/usr/lib/cgi-bin/gb2">

  SetEnv GBROWSE_CONF   "/etc/gbrowse2"
  SetHandler   fastcgi-script
  SetHandler perl-script
  PerlResponseHandler ModPerl::Registry
  PerlOptions +ParseHeaders
</Directory>

  FastCgiConfig  -initial-env GBROWSE_CONF=/etc/gbrowse2
==================================

Then I restarted Apache, of course (sudo apache2ctl restart).

Is that the right thing to do? It feels like GBrowse is running with the
performance improvements I saw before the modification. Is there a way
to confirm things are working as intended?

Thanks.

Cheers
J

--
-------------------------------
João Marcelo Pereira Alves (J)
Post-doctoral fellow
MCV / VCU - Richmond, VA
http://bioinfo.lpb.mic.vcu.edu
f. 1-804-828-3897


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse