Possible IRC tutorial nginx and FastCGI
Hi All - Friday evening here (west coast USA), Saturday evening in New Zealand. Chris Cormack was showing quite a few of the developers that hang out in the IRC #koha channel - his testing database of koha - fed through nginx and FastCGI. I was absolutely amazed at the speed that pages from the opac were being delivered and watching some of the tests with speed comparisons between apache and nginx. I want to learn more. So, I would like to propose or maybe ask chris - if he would schedule a time that he could demo or even give a tutorial on nginx and FastCGI on the IRC channel (which is a good medium because those who can't make it will be able to read the logs). I am hoping that others get encouraged and want to investigate the possibilities. So, If you're interested in this please let me/the list know and I'll bug chris to set up a time to give a tutorial. Cheers, Brendan Of course I'd like to encourage as many people to attend (it's surprising how much I've learned through osmosis) --------------------------------------------------------------------------------------------------------------- Brendan A. Gallagher ByWater Solutions CEO, Director of Innovation Support and Consulting for Open Source Software Installation, Data Migration, Training, Customization, Hosting and Complete Support Packages Headquarters: Santa Barbara, CA - Office: West Haven, CT Phone # (888) 900-8944 http://bywatersolutions.com info@bywatersolutions.com See us at ALA : BOOTH # 817 ---------------------------------------------------------------------------------------------------------------
Brendan Gallagher writes
Friday evening here (west coast USA), Saturday evening in New Zealand. Chris Cormack was showing quite a few of the developers that hang out in the IRC #koha channel - his testing database of koha - fed through nginx and FastCGI.
I could not get it to run with Apache's mod_fcgi http://lists.koha.org/pipermail/koha-devel/2010-April/011153.html
I was absolutely amazed at the speed that pages from the opac were being delivered and watching some of the tests with speed comparisons between apache and nginx. I want to learn more. So, I would like to propose or maybe ask chris - if he would schedule a time that he could demo or even give a tutorial on nginx and FastCGI on the IRC channel (which is a good medium because those who can't make it will be able to read the logs). I am hoping that others get encouraged and want to investigate the possibilities.
Does the speed increase come more from FastCGI or more from using nginx instead of Apache? I generally don't like Apache, but using a different web server means finding a box where you run just that server or convert all servers to the alternative servers. Both approaches are costly. I could give it a try to get it to run if Chris posts his nginx vhost file. Cheers, Thomas Krichel http://openlib.org/home/krichel http://authorclaim.org/profile/pkr1 skype: thomaskrichel
On Tue, May 4, 2010 at 7:07 AM, Thomas Krichel <krichel@openlib.org> wrote:
Does the speed increase come more from FastCGI or more from using nginx instead of Apache? I generally don't like Apache, but using a different web server means finding a box where you run just that server or convert all servers to the alternative servers. Both approaches are costly.
I work with Chris on the large nginx using project he referred to. One thing he maybe didn't mention is that it plays very nicely alongside and/or in front of apache. We use them both with easy requests handled by nginx. It forwards more complex ones (about 6% of requests in our case) up to apache. Our application is a very high performance news web site -- so we can tell you that it is a fast running configuration though it might not sound it. Whether a dual layer setup makes sense for production Koha -- I don't know, Chris could say. A dual layer config would be easy to set up so you could just let nginx handle certain requests - or none if it was making trouble. I can also tell you that the more I work with nginx the more I like it. Not sure why, I just do. -reed
I'm very interested interested in learning more about this, also. How well does it scale? My experience with FastCGI is that it can lend performance improvements, but it's often at considerable cost in terms of memory. Does the FCGI handle all the scripts or only key performance-sensitive ones, like opac-search.pl? Clay On Mon, May 3, 2010 at 11:53 AM, Brendan Gallagher < info@bywatersolutions.com> wrote:
Hi All -
Friday evening here (west coast USA), Saturday evening in New Zealand. Chris Cormack was showing quite a few of the developers that hang out in the IRC #koha channel - his testing database of koha - fed through nginx and FastCGI.
I was absolutely amazed at the speed that pages from the opac were being delivered and watching some of the tests with speed comparisons between apache and nginx. I want to learn more. So, I would like to propose or maybe ask chris - if he would schedule a time that he could demo or even give a tutorial on nginx and FastCGI on the IRC channel (which is a good medium because those who can't make it will be able to read the logs). I am hoping that others get encouraged and want to investigate the possibilities.
So, If you're interested in this please let me/the list know and I'll bug chris to set up a time to give a tutorial.
Cheers, Brendan
Of course I'd like to encourage as many people to attend (it's surprising how much I've learned through osmosis)
--------------------------------------------------------------------------------------------------------------- Brendan A. Gallagher ByWater Solutions CEO, Director of Innovation Support and Consulting for Open Source Software Installation, Data Migration, Training, Customization, Hosting and Complete Support Packages Headquarters: Santa Barbara, CA - Office: West Haven, CT Phone # (888) 900-8944 http://bywatersolutions.com info@bywatersolutions.com
See us at ALA : BOOTH # 817
---------------------------------------------------------------------------------------------------------------
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
Hi all Quick reply as im on the bus. Clay i stress tested with 100 concurrent requests, stepping up in 10s after, apache2 + cgi started swapping hard load got up to 124 before i killed the test. in 252 seconds got 11 200 responses. with nginx which has virtually zero memory footprint + the FCGI::Async based wrapper the same test topped at 1.2 load. I can show you the stats on irc if you like. So far i am handling all gets with it posts go to apache. I think the login page is one of the few posts so handing that to apache2-ssl is no bad thing We use nginx at work for big dynamic sites (millions of page impressions per day) Im happy to share what ive learnt. Chris On 04/05/2010, Fouts, Clay <cfouts@ptfs.com> wrote:
I'm very interested interested in learning more about this, also. How well does it scale? My experience with FastCGI is that it can lend performance improvements, but it's often at considerable cost in terms of memory. Does the FCGI handle all the scripts or only key performance-sensitive ones, like opac-search.pl?
Clay
On Mon, May 3, 2010 at 11:53 AM, Brendan Gallagher < info@bywatersolutions.com> wrote:
Hi All -
Friday evening here (west coast USA), Saturday evening in New Zealand. Chris Cormack was showing quite a few of the developers that hang out in the IRC #koha channel - his testing database of koha - fed through nginx and FastCGI.
I was absolutely amazed at the speed that pages from the opac were being delivered and watching some of the tests with speed comparisons between apache and nginx. I want to learn more. So, I would like to propose or maybe ask chris - if he would schedule a time that he could demo or even give a tutorial on nginx and FastCGI on the IRC channel (which is a good medium because those who can't make it will be able to read the logs). I am hoping that others get encouraged and want to investigate the possibilities.
So, If you're interested in this please let me/the list know and I'll bug chris to set up a time to give a tutorial.
Cheers, Brendan
Of course I'd like to encourage as many people to attend (it's surprising how much I've learned through osmosis)
--------------------------------------------------------------------------------------------------------------- Brendan A. Gallagher ByWater Solutions CEO, Director of Innovation Support and Consulting for Open Source Software Installation, Data Migration, Training, Customization, Hosting and Complete Support Packages Headquarters: Santa Barbara, CA - Office: West Haven, CT Phone # (888) 900-8944 http://bywatersolutions.com info@bywatersolutions.com
See us at ALA : BOOTH # 817
---------------------------------------------------------------------------------------------------------------
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
Thanks for the further info. Sorry for the imprecision, but here I meant "scale" in the sense of individual Koha installations per web server rather than hits per installation. My concern is the feasibility of implementing a scheme like this on a web server which is configured to service requests for over a hundred individual Koha instances. Doesn't each individual script require it's own FastCGI daemon process per instance of Koha? Of course it would be possible to implement this on a subset of those sites, but then each step of de-homogenizing adds another cost at a different level. Clay On Mon, May 3, 2010 at 1:15 PM, Chris Cormack <chris@bigballofwax.co.nz>wrote:
Hi all Quick reply as im on the bus. Clay i stress tested with 100 concurrent requests, stepping up in 10s after, apache2 + cgi started swapping hard load got up to 124 before i killed the test. in 252 seconds got 11 200 responses. with nginx which has virtually zero memory footprint + the FCGI::Async based wrapper the same test topped at 1.2 load. I can show you the stats on irc if you like. So far i am handling all gets with it posts go to apache. I think the login page is one of the few posts so handing that to apache2-ssl is no bad thing
We use nginx at work for big dynamic sites (millions of page impressions per day) Im happy to share what ive learnt.
Chris
I'm very interested interested in learning more about this, also. How well does it scale? My experience with FastCGI is that it can lend performance improvements, but it's often at considerable cost in terms of memory. Does the FCGI handle all the scripts or only key performance-sensitive ones,
On 04/05/2010, Fouts, Clay <cfouts@ptfs.com> wrote: like
opac-search.pl?
Clay
On Mon, May 3, 2010 at 11:53 AM, Brendan Gallagher < info@bywatersolutions.com> wrote:
Hi All -
Friday evening here (west coast USA), Saturday evening in New Zealand. Chris Cormack was showing quite a few of the developers that hang out in the IRC #koha channel - his testing database of koha - fed through nginx and FastCGI.
I was absolutely amazed at the speed that pages from the opac were being delivered and watching some of the tests with speed comparisons between apache and nginx. I want to learn more. So, I would like to propose or maybe ask chris - if he would schedule a time that he could demo or even give a tutorial on nginx and FastCGI on the IRC channel (which is a good medium because those who can't make it will be able to read the logs). I am hoping that others get encouraged and want to investigate the possibilities.
So, If you're interested in this please let me/the list know and I'll bug chris to set up a time to give a tutorial.
Cheers, Brendan
Of course I'd like to encourage as many people to attend (it's surprising how much I've learned through osmosis)
Brendan A. Gallagher ByWater Solutions CEO, Director of Innovation Support and Consulting for Open Source Software Installation, Data Migration, Training, Customization, Hosting and Complete Support Packages Headquarters: Santa Barbara, CA - Office: West Haven, CT Phone # (888) 900-8944 http://bywatersolutions.com info@bywatersolutions.com
See us at ALA : BOOTH # 817
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
On 4 May 2010 09:30, Fouts, Clay <cfouts@ptfs.com> wrote:
Thanks for the further info. Sorry for the imprecision, but here I meant "scale" in the sense of individual Koha installations per web server rather than hits per installation. My concern is the feasibility of implementing a scheme like this on a web server which is configured to service requests for over a hundred individual Koha instances. Doesn't each individual script require it's own FastCGI daemon process per instance of Koha? Of course it would be possible to implement this on a subset of those sites, but then each step of de-homogenizing adds another cost at a different level. Clay
No, each script doesn't need its own fastcgi daemon. You may want one daemon per site .. but even that isnt actually nessecary as you can set the env variables for KOHA_CONF and PERL5LIB in the same way as you do in apache2 (or close to it). These are passed onto the fastcgi daemon, which in turn runs the actual script and hands back the result. To the CGI scripts .. they don't even notice the difference. By using FCGI::Async you don't wait for the request to finish before starting another also. With nginx understanding multiple backends you can have a pool of the daemons running if you like. Chris
I heard that PSGI on nginx is very fast. I was impressed by a presentation on PSGI/Plack by its author, but haven't really played with it since. Has anyone any experience of it? Colin -- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 208 366 1295 (phone) +44 (0) 7759 633626 (mobile) colin.campbell@ptfs-europe.com skype: colin_campbell2 http://www.ptfs-europe.com
On 4 May 2010 19:47, Colin Campbell <colin.campbell@ptfs-europe.com> wrote:
I heard that PSGI on nginx is very fast. I was impressed by a presentation on PSGI/Plack by its author, but haven't really played with it since. Has anyone any experience of it? Colin
Hi Colin Not in any production environment I haven't. But I will certainly try it out, and run some benchmarks and see how it performs compared to FCGI::Async. Chris
On 4 May 2010 19:58, Chris Cormack <chris@bigballofwax.co.nz> wrote:
On 4 May 2010 19:47, Colin Campbell <colin.campbell@ptfs-europe.com> wrote:
I heard that PSGI on nginx is very fast. I was impressed by a presentation on PSGI/Plack by its author, but haven't really played with it since. Has anyone any experience of it? Colin
Really unscientific test, but fairly promising
running plackup -MPlack::App::CGIBin -e 'Plack::App::CGIBin->new(root => "/home/chris/git/koha.git/opac")->to_app' With nginx in front, to proxy requests and handle serving the js and css. Hitting it with curl-loader from a machine across town On 4 May 2010 19:58, Chris Cormack <chris@bigballofwax.co.nz> wrote:
On 4 May 2010 19:47, Colin Campbell <colin.campbell@ptfs-europe.com> wrote:
I heard that PSGI on nginx is very fast. I was impressed by a presentation on PSGI/Plack by its author, but haven't really played with it since. Has anyone any experience of it? Colin
Really unscientific test, but fairly promising
running plackup -MPlack::App::CGIBin -e 'Plack::App::CGIBin->new(root => "/home/chris/git/koha.git/opac")->to_app' With nginx in front, to proxy requests and handle serving the js and css. Hitting it with curl-loader from a machine across town Test total duration was 55 seconds and CAPS average 37: H/F Req:1100,1xx:0,2xx:1100,3xx:0,4xx:0,5xx:0,Err:0,T-Err:0,D:8502ms,D-2xx:8502ms,Ti:136200B/s,To:3194B/s H/F/S Req:0,1xx:0,2xx:0,3xx:0,4xx:0,5xx:0,Err:0,T-Err:0,D:0ms,D-2xx:0ms,Ti:0B/s,To:0B/s Which seems well worth investigating more. Chris
Ok my interested is peaked. Any body want to propose times dates methods? I think a discussion in IRC would be the best. So, I think the ball is in your court Chris. I'd say pick a time that is good for you and if anyone misses then they can read about it in the logs and follow up on the list with more questions. Thanks, Brendan Looking forward to this. On May 4, 2010, at 2:52 AM, Chris Cormack wrote:
On 4 May 2010 19:58, Chris Cormack <chris@bigballofwax.co.nz> wrote:
On 4 May 2010 19:47, Colin Campbell <colin.campbell@ptfs-europe.com> wrote:
I heard that PSGI on nginx is very fast. I was impressed by a presentation on PSGI/Plack by its author, but haven't really played with it since. Has anyone any experience of it? Colin
Really unscientific test, but fairly promising
running plackup -MPlack::App::CGIBin -e 'Plack::App::CGIBin->new(root => "/home/chris/git/koha.git/opac")->to_app'
With nginx in front, to proxy requests and handle serving the js and css.
Hitting it with curl-loader from a machine across town
On 4 May 2010 19:58, Chris Cormack <chris@bigballofwax.co.nz> wrote:
On 4 May 2010 19:47, Colin Campbell <colin.campbell@ptfs-europe.com> wrote:
I heard that PSGI on nginx is very fast. I was impressed by a presentation on PSGI/Plack by its author, but haven't really played with it since. Has anyone any experience of it? Colin
Really unscientific test, but fairly promising
running plackup -MPlack::App::CGIBin -e 'Plack::App::CGIBin->new(root => "/home/chris/git/koha.git/opac")->to_app'
With nginx in front, to proxy requests and handle serving the js and css.
Hitting it with curl-loader from a machine across town
Test total duration was 55 seconds and CAPS average 37: H/F Req:1100,1xx:0,2xx:1100,3xx:0,4xx:0,5xx:0,Err:0,T-Err:0,D:8502ms,D-2xx:8502ms,Ti:136200B/s,To:3194B/s H/F/S Req:0,1xx:0,2xx:0,3xx:0,4xx:0,5xx:0,Err:0,T-Err:0,D:0ms,D-2xx:0ms,Ti:0B/s,To:0B/s
Which seems well worth investigating more.
Chris _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
Le 07/05/2010 05:38, Brendan Gallagher a écrit :
Ok my interested is peaked.
Any body want to propose times dates methods? I think a discussion in IRC would be the best.
So, I think the ball is in your court Chris. I'd say pick a time that is good for you and if anyone misses then they can read about it in the logs and follow up on the list with more questions.
Thanks, Brendan
We also did some really interesting and promising tests with dancer which is an HTTP framework over Plack. We will keep you informed of all aspects improved and all that it implies. But it is really good in terms or performances and load on machines. -- Henri-Damien LAURENT BibLibre
participants (7)
-
Brendan Gallagher -
Chris Cormack -
Colin Campbell -
Fouts, Clay -
LAURENT Henri-Damien -
Reed Wade -
Thomas Krichel