Hi, I''ve done some benchmarking on our new servers (being built now), AMD X2 5600, gentoo-hardened. With the same CFLAGS (safe cflags: -march=k8 -O2) I''ve tested the following configs: 1, emerge ruby rubygems, then gem install mongrel (or emerge mongrel, the performance was similar) 2, download the same ruby version, untar, ./configure, make, make install, download rubygems, install it, then gem install mongrel the test script: a simple mongrel handler which writes "hello world" in its "process" method the benchmarking suite: ab2 -n 10000 -c 10 http://localhost:800/test for the pure gentoo branch I got at max. 700 req/s for the 2nd test case it''s around 2400 req/s Having the same CFLAGS for both builds, the only thing I can think of is that some gentoo patches are responsible for this. Just for the record :) With regards, Ochronus -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071122/adaad540/attachment-0001.html
On Thu, 22 Nov 2007 11:20:37 +0100 "Csaba Okrona" <ochronus at gmail.com> wrote:> Hi, > <snip> > Having the same CFLAGS for both builds, the only thing I can think of is > that some gentoo patches > are responsible for this.Check to see if they''ve got the pthreads turned on in their build, rather than a patch. It''d be an option to ./configure that enables it, and that usually makes Ruby crawl. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/
Hey You need to set the USE flag ''threads'' to add pthread support to ruby. Ben On 2007-11-22, at 18:53, Zed A. Shaw wrote:> On Thu, 22 Nov 2007 11:20:37 +0100 > "Csaba Okrona" <ochronus at gmail.com> wrote: > >> Hi, >> <snip> >> Having the same CFLAGS for both builds, the only thing I can think >> of is >> that some gentoo patches >> are responsible for this. > > Check to see if they''ve got the pthreads turned on in their build, > rather than a patch. It''d be an option to ./configure that enables > it, and that usually makes Ruby crawl. > > > -- > Zed A. Shaw > - Hate: http://savingtheinternetwithhate.com/ > - Good: http://www.zedshaw.com/ > - Evil: http://yearofevil.com/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-usersGruss Ben --- Benjamin Krause http://www.omdb.org/ bk at benjaminkrause.com Rails-Schulung "Advancing with Rails" mit David A. Black 19.11.-22.11.2007, Berlin-Mitte Details u. Anmeldung: http://www.railsschulung.de -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071122/e0bf0d86/attachment.html
Hi~ On Nov 22, 2007, at 2:47 PM, Benjamin Krause wrote:> Hey > > You need to set the USE flag ''threads'' to add pthread support to ruby. > > Ben > > On 2007-11-22, at 18:53, Zed A. Shaw wrote: > >> On Thu, 22 Nov 2007 11:20:37 +0100 >> "Csaba Okrona" <ochronus at gmail.com> wrote: >> >>> Hi, >>> <snip> >>> Having the same CFLAGS for both builds, the only thing I can think >>> of is >>> that some gentoo patches >>> are responsible for this. >> >> Check to see if they''ve got the pthreads turned on in their build, >> rather than a patch. It''d be an option to ./configure that enables >> it, and that usually makes Ruby crawl. >Just to be clear you want pthreads turned off so USE=''-threads'' or the equivalent. I dont recall if the default ebuild uses pthreads or not but you definitely want to turn them off. Cheers- -Ezra
On Nov 22, 2007 5:00 PM, Ezra Zygmuntowicz <ezmobius at gmail.com> wrote:> but you definitely want to turn [pthreads] off.Definitely, but... you may need it on, if you use an extension that itself relies on pthreads. Which is why Redhat has Ruby compiled with pthreads. By the way, what kind of performance penalty has anyone seen from pthreads in a real app? -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com]
On Nov 22, 2007, at 4:33 PM, Alexey Verkhovsky wrote:> On Nov 22, 2007 5:00 PM, Ezra Zygmuntowicz <ezmobius at gmail.com> wrote: >> but you definitely want to turn [pthreads] off. > > Definitely, but... you may need it on, if you use an extension that > itself relies on pthreads. Which is why Redhat has Ruby compiled with > pthreads. > > By the way, what kind of performance penalty has anyone seen from > pthreads in a real app? >The only thing that ruby uses pthreads for is if you use tk afaik. I did some benchmarks on gentoo with pthreads enabled and disabled and a rails app performs a serious 25% or more faster with pthreads disabled. A very real difference. Cheers- -Ezra
On Nov 22, 2007 8:18 PM, Ezra Zygmuntowicz <ezmobius at gmail.com> wrote:> The only thing that ruby uses pthreads for is if you use tk afaik.Where I hit that particular wall was Oracle driver.> a serious 25% or more faster with pthreads disabled. A very real difference.Yeah, that''s what I get on the "petstore benchmark", too. -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com]
Hi, You were right, the "threads" USE flag was set. Thanks for the heads up! Regards, Csaba On Nov 22, 2007 6:53 PM, Zed A. Shaw <zedshaw at zedshaw.com> wrote:> On Thu, 22 Nov 2007 11:20:37 +0100 > "Csaba Okrona" <ochronus at gmail.com> wrote: > > > Hi, > > <snip> > > Having the same CFLAGS for both builds, the only thing I can think of is > > that some gentoo patches > > are responsible for this. > > Check to see if they''ve got the pthreads turned on in their build, rather > than a patch. It''d be an option to ./configure that enables it, and that > usually makes Ruby crawl. > > > -- > Zed A. Shaw > - Hate: http://savingtheinternetwithhate.com/ > - Good: http://www.zedshaw.com/ > - Evil: http://yearofevil.com/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071123/d669a0f0/attachment.html