160,000 pages 99% static, only minor stuff done in rail (search, contact us, etc.) windows server 2003 Ror 1.0 Currently 30K Hits /day on IIS. Apache or Lighttp? Fast_CGI seems kinda slow with a 2003/Apache configuration. The only thing I''ll get rid of for sure is IIS. -Cedric -- Posted via http://www.ruby-forum.com/.
Cedric Vicenti wrote:> 160,000 pages > 99% static, only minor stuff done in rail (search, contact us, etc.) > windows server 2003 > Ror 1.0 > Currently 30K Hits /day on IIS. > > Apache or Lighttp? Fast_CGI seems kinda slow with a 2003/Apache > configuration. > > The only thing I''ll get rid of for sure is IIS. > > -Cedric > >Hi Cedric, May I ask sir, how did you get ror working on IIS? if you can give me some info on how to set it up please let me know. I''m kinda having problems setting up ror in IIS and I''ve tried to set it up several times but have no luck in making it work. Any help would be appreciated. thanks. Erwin Quita
Cedric, Can you give some better stats for your activity? 30k/day comes out to less than 1/second if you divide it out, but I''m betting you have a peak time. Once you know the peak time, you just need to figure out which server can handle it. I''m actually thinking if your peak isn''t all that high (30k couldn''t peak too high) you could get away with just Mongrel (http://mongrel.rubyforge.org) and be done with it all. Zed A. Shaw http://www.zedshaw.com/ On 3/8/06 8:43 PM, "Cedric Vicenti" <ced_dude@hotmail.com> wrote:> 160,000 pages > 99% static, only minor stuff done in rail (search, contact us, etc.) > windows server 2003 > Ror 1.0 > Currently 30K Hits /day on IIS. > > Apache or Lighttp? Fast_CGI seems kinda slow with a 2003/Apache > configuration. > > The only thing I''ll get rid of for sure is IIS. > > -Cedric
Last time I looked, Lighttpd only ran on windows under cygwin... and you *DO NOT* want to run under cygwin. If I''m wrong and there is a native Windows version available now, please let me know. Curt On 3/8/06, Cedric Vicenti <ced_dude@hotmail.com> wrote:> 160,000 pages > 99% static, only minor stuff done in rail (search, contact us, etc.) > windows server 2003 > Ror 1.0 > Currently 30K Hits /day on IIS. > > Apache or Lighttp? Fast_CGI seems kinda slow with a 2003/Apache > configuration. > > The only thing I''ll get rid of for sure is IIS. > > -Cedric > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Kevin maintains a windows version here: http://www.kevinworthington.com:8181/?cat=20 On 3/9/06, Curt Hibbs <ml.chibbs@gmail.com> wrote:> > Last time I looked, Lighttpd only ran on windows under cygwin... and > you *DO NOT* want to run under cygwin. If I''m wrong and there is a > native Windows version available now, please let me know. > > Curt > > On 3/8/06, Cedric Vicenti <ced_dude@hotmail.com> wrote: > > 160,000 pages > > 99% static, only minor stuff done in rail (search, contact us, etc.) > > windows server 2003 > > Ror 1.0 > > Currently 30K Hits /day on IIS. > > > > Apache or Lighttp? Fast_CGI seems kinda slow with a 2003/Apache > > configuration. > > > > The only thing I''ll get rid of for sure is IIS. > > > > -Cedric > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060309/fff484c4/attachment.html
I''m interested to see what people can say about this too with because I''m currently doing the same kind of choice. I''ve setup Lighttpd 1.4.10a from Kevin''s site and I''ve tested it with Mongrel and SCGI rails runner (both from Zed) Lighttpd does the static side of the site (i.e. anything that start with images, stylesheets, etc..) and Mongrel or SCGI does the Rails part. I''ve tested with Jmeter and I get the same result with both setup, however I dont understand why Jmeters tells me it needs in average 5 seconds to reach my page (with 20 threads running) while the rails logs tells me it render pages in 0.25 seconds to 0.5 seconds at worse... I''m about to test with apache to see if I see a difference Gael On 09/03/06, Larry Kelly <ldk2005@gmail.com> wrote:> Kevin maintains a windows version here: > > http://www.kevinworthington.com:8181/?cat=20 > > > On 3/9/06, Curt Hibbs <ml.chibbs@gmail.com> wrote: > > Last time I looked, Lighttpd only ran on windows under cygwin... and > > you *DO NOT* want to run under cygwin. If I''m wrong and there is a > > native Windows version available now, please let me know. > > > > Curt > > > > On 3/8/06, Cedric Vicenti < ced_dude@hotmail.com> wrote: > > > 160,000 pages > > > 99% static, only minor stuff done in rail (search, contact us, etc.) > > > windows server 2003 > > > Ror 1.0 > > > Currently 30K Hits /day on IIS. > > > > > > Apache or Lighttp? Fast_CGI seems kinda slow with a 2003/Apache > > > configuration. > > > > > > The only thing I''ll get rid of for sure is IIS. > > > > > > -Cedric > > > > > > -- > > > Posted via http://www.ruby-forum.com/. > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Best Regards, > -Larry > "Work, work, work...there is no satisfactory alternative." > --- E.Taft Benson > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
You can use Lighttpd on Windows with SCGI but not FCGI (as far as I know). In our tests, Apache+FCGI is comparable to Lighttpd + SCGI or Mongrel. Bottom line.... Windows performance isn''t great but it''s faster than PHP through IIS with CGI and close to PHP+FastCGI on IIS. (Make sure your dispacher shebang line points to rubyw.exe!) If you can, I''d recommend trying for Lighttpd on Linux. I get about 4 times faster performance there with the same application. We''re going to attempt to use Linux even though we''re a Windows shop, beecause of the performance boost as well as the ability to do some nice stuff with Switchtower (by which I mean Capistrano.) That and I''m tired of broken rake tasks and other odd issues. You''ll want to run your own tests though to see how it will perform for you. -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Cedric Vicenti Sent: Wednesday, March 08, 2006 7:43 PM To: rails@lists.rubyonrails.org Subject: [Rails] Apache or lighttp for Ror/2003server? 160,000 pages 99% static, only minor stuff done in rail (search, contact us, etc.) windows server 2003 Ror 1.0 Currently 30K Hits /day on IIS. Apache or Lighttp? Fast_CGI seems kinda slow with a 2003/Apache configuration. The only thing I''ll get rid of for sure is IIS. -Cedric -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails
So far I''ve tested (on windows 2003 server) Lighttpd + SCGI, Lighttpd + Mongrel and Apache + SCGI and they all match in terms of performance. I was using JMeter with 50 threads. However I found that Lighttpd tend to crash under heavy load ( > 30 threads = 35% crash), no matter if I used Mongrel or SCGI, it''s not exactly a crash actually but more like an infinite loop somehow, the application just get stuck at 100% of the CPU, still respond to request but naturally it''s slow as ever. In all 3 setup I use Mongrel/SCGI only to serve Rails contents, all images,javascripts, stylesheets are server statically by Apache or Lighttpd. I also dont use caching because my app cannot benefit from it due to it''s functionality (it''s editing a live database and users need to have access to the latest data all the time). One thing that I don''t understand though, when I do a test, the Rails log tells me it renders the pages in 0.3 to 0.8 seconds, however the test system gives me response time in excess of 5 seconds sometimes under heavy load. How come there is such a massive difference between what Rails says it took to render the page and the time it actually takes to get the page from a test command? I''m gonna try to run on Linux and see if it helps, however I need to connect to a SQL Server DB so this is going to be fun too. I might loose my head on this one. Question for Zed: Given that Mongrel and SCGI give me similar result from my test, which one is best to use for production? I sense that SCGI seems more mature/stable but since you putting all your effort in Mongrel now it may not be long before I''m wrong. What would you recommend for the time being? Gael On 09/03/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote:> You can use Lighttpd on Windows with SCGI but not FCGI (as far as I > know). > > In our tests, Apache+FCGI is comparable to Lighttpd + SCGI or Mongrel. > Bottom line.... Windows performance isn''t great but it''s faster than PHP > through IIS with CGI and close to PHP+FastCGI on IIS. (Make sure your > dispacher shebang line points to rubyw.exe!) > > If you can, I''d recommend trying for Lighttpd on Linux. I get about 4 > times faster performance there with the same application. We''re going > to attempt to use Linux even though we''re a Windows shop, beecause of > the performance boost as well as the ability to do some nice stuff with > Switchtower (by which I mean Capistrano.) That and I''m tired of broken > rake tasks and other odd issues. > > You''ll want to run your own tests though to see how it will perform for > you. > > > -----Original Message----- > From: rails-bounces@lists.rubyonrails.org > [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Cedric Vicenti > Sent: Wednesday, March 08, 2006 7:43 PM > To: rails@lists.rubyonrails.org > Subject: [Rails] Apache or lighttp for Ror/2003server? > > > 160,000 pages > 99% static, only minor stuff done in rail (search, contact us, etc.) > windows server 2003 Ror 1.0 Currently 30K Hits /day on IIS. > > Apache or Lighttp? Fast_CGI seems kinda slow with a 2003/Apache > configuration. > > The only thing I''ll get rid of for sure is IIS. > > -Cedric > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Gael Pourriel wrote:> I''m interested to see what people can say about this too with because > I''m currently doing the same kind of choice. > > I''ve setup Lighttpd 1.4.10a from Kevin''s site and I''ve tested it with > Mongrel and SCGI rails runner (both from Zed) Lighttpd does the static > side of the site (i.e. anything that start with images, stylesheets, > etc..) and Mongrel or SCGI does the Rails part. > > I''ve tested with Jmeter and I get the same result with both setup, > however I dont understand why Jmeters tells me it needs in average 5 > seconds to reach my page (with 20 threads running) while the rails > logs tells me it render pages in 0.25 seconds to 0.5 seconds at > worse...Jmeter is measuring from the client''s perspective, whereas Rails can only start and stop its clock when you are actually inside the Rails code. To give an extreme example, if you were running Rails under CGI, Rails couldn''t include the time taken to start the CGI process, load Ruby, and load Rails. It might or might not include the time to load the application - would have to look at the code to see.> > I''m about to test with apache to see if I see a differenceCould you include WEBrick as well? Then post the numbers? TIA Justin
Justin Forder wrote:> Gael Pourriel wrote: > >> I''ve tested with Jmeter and I get the same result with both setup, >> however I dont understand why Jmeters tells me it needs in average 5 >> seconds to reach my page (with 20 threads running) while the rails >> logs tells me it render pages in 0.25 seconds to 0.5 seconds at >> worse... > > Jmeter is measuring from the client''s perspective, whereas Rails can > only start and stop its clock when you are actually inside the Rails > code. To give an extreme example, if you were running Rails under CGI, > Rails couldn''t include the time taken to start the CGI process, load > Ruby, and load Rails. It might or might not include the time to load the > application - would have to look at the code to see.To give a more relevant example, if you have one FCGI or SCGI process and the web server receives two concurrent requests, one of the requests will have to wait until the other has completed. The client will see the wait time, but Rails won''t be able to measure it. Justin
OK I understand better now...So I guess bringing a new instance of SCGI process can help getting the pages faster, but it may not. I''m not sure if it''s quicker to have one SCGI process waiting for the previous to finish running at full CPU speed than 2 SCGI process running at the same time but at half of the speed, I''lll investigate this path too. Gael PS: I''m gonna do a complete benchmark of RoR on windows 2003 comparing different options and posting the result shortly. On 10/03/06, Justin Forder <justin@justinforder.me.uk> wrote:> Justin Forder wrote: > > Gael Pourriel wrote: > > > >> I''ve tested with Jmeter and I get the same result with both setup, > >> however I dont understand why Jmeters tells me it needs in average 5 > >> seconds to reach my page (with 20 threads running) while the rails > >> logs tells me it render pages in 0.25 seconds to 0.5 seconds at > >> worse... > > > > Jmeter is measuring from the client''s perspective, whereas Rails can > > only start and stop its clock when you are actually inside the Rails > > code. To give an extreme example, if you were running Rails under CGI, > > Rails couldn''t include the time taken to start the CGI process, load > > Ruby, and load Rails. It might or might not include the time to load the > > application - would have to look at the code to see. > > To give a more relevant example, if you have one FCGI or SCGI process > and the web server receives two concurrent requests, one of the requests > will have to wait until the other has completed. The client will see the > wait time, but Rails won''t be able to measure it. > > Justin > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Here are my results from my test on our server (win2003) (FastCGI) Apache Win32) 1 dispatcher 6.73 req/s Apache Win32) 2 dispatchers 12.9 req/s Apache Win32) 4 dispatchers 19.85 req/s (Other) Mongrel: 5.73 req/s Lighttpd+SCGI (Win32) WEBrick: Under load: 5.1 req/s WEBrick: No load (single user) 7.6 req/s Comparison to Lighttpd on Linux (Debian 3.1) Lighttpd (Linux) 1 dispatcher : 22.5 req/s Lighttpd (Linux) 2 dispatchers: 22.68 req/s Lighttpd (Linux) 4 dispatchers: 24.25 req/s Test done with MS Web App Stress Tool, WAST3.0, httperf, and ab 20 users at a time, 5 iterations. (really light load.) Based on that, Apache+FCGI is the best way to go if you have to use Windows. (This test was against a simple list action... No pagination. Displaying the results of a single select statement. App uses file store for sessions. Each request was a separate session. MySQL 4.1 on Windows for the database No special mysql.so usage due to problems with compatibility. Ruby 1.8.4 Rails 1.0 3 to 5 seconds TTLB (time to last byte) If anyone has an idea as to why this is so slow on Windows, I''d love to hear it. My theory is that Ruby itself is just slow on Windows. It takes at least 10 times longer to open ''irb'' on my windows box as it does on my Linux box. -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Gael Pourriel Sent: Friday, March 10, 2006 4:00 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Apache or lighttp for Ror/2003server? OK I understand better now...So I guess bringing a new instance of SCGI process can help getting the pages faster, but it may not. I''m not sure if it''s quicker to have one SCGI process waiting for the previous to finish running at full CPU speed than 2 SCGI process running at the same time but at half of the speed, I''lll investigate this path too. Gael PS: I''m gonna do a complete benchmark of RoR on windows 2003 comparing different options and posting the result shortly. On 10/03/06, Justin Forder <justin@justinforder.me.uk> wrote:> Justin Forder wrote: > > Gael Pourriel wrote: > > > >> I''ve tested with Jmeter and I get the same result with both setup, > >> however I dont understand why Jmeters tells me it needs in average > >> 5 seconds to reach my page (with 20 threads running) while the > >> rails logs tells me it render pages in 0.25 seconds to 0.5 seconds > >> at worse... > > > > Jmeter is measuring from the client''s perspective, whereas Rails can> > only start and stop its clock when you are actually inside the Rails> > code. To give an extreme example, if you were running Rails under > > CGI, Rails couldn''t include the time taken to start the CGI process,> > load Ruby, and load Rails. It might or might not include the time to> > load the application - would have to look at the code to see. > > To give a more relevant example, if you have one FCGI or SCGI process > and the web server receives two concurrent requests, one of the > requests will have to wait until the other has completed. The client > will see the wait time, but Rails won''t be able to measure it. > > Justin > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails
Gael Pourriel wrote:> OK I understand better now...So I guess bringing a new instance of > SCGI process can help getting the pages faster, but it may not. > > I''m not sure if it''s quicker to have one SCGI process waiting for the > previous to finish running at full CPU speed than 2 SCGI process > running at the same time but at half of the speed, I''lll investigate > this path too.If the SCGI process only uses CPU, then two processes wouldn''t speed things up - but if it spends some time waiting for I/O, another process could be using the CPU at that point.> PS: I''m gonna do a complete benchmark of RoR on windows 2003 comparing > different options and posting the result shortly.Excellent! - thanks Justin