symfony
symfony forum
Home » support » General discussion » Symfony - Ruby on Rails - Django performance test
Symfony - Ruby on Rails - Django performance test [message #8815] Fri, 14 July 2006 12:18 Go to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
We recently decided to switch our projects to a MVC framework and our choice of the framework came down to three final contenders:

* Symfony on PHP http://www.symfony-project.com/
* Rails on Ruby http://rubyonrails.org/
* Django on Python http://www.djangoproject.com/

To better understand the pros and cons of each, we wrote a very simple demo application in all three. The app we chose was the one built in the Ruby on Rails tutorial Rolling with Ruby on Rails http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html.

We really wanted to test the framework, not static file serving or database performance. So we didn't come up with complex queries or serve any static CSS or image files. All requests/hits/transactions are rendered pages. Also, all of the tests are GET operations (database SELECTs) for concurrent testing fairness and simplicity.

Each of the tested pages was configured to have a unique number displayed on it based on microtime (to verify the pages weren't being cached). Also, the same pages across all three apps were edited to have nearly the same number of bytes served.

DISCLAIMER: There are infinitely more test scenarios we could have performed. But we wanted something done in a finite time. We feel these results, though not the whole picture, offer hints about relative performance between the three frameworks/platforms.

Test Hardware:

* Dell 1U server (unknown model)
* Dual Xeon 3.2Ghz (6400 bogomips)
* 2 Gigs of RAM
* 2 240Gig (?) SATA drives

Test OS/Software:

* OS: SuSE 10.1
* kernel: 2.6.16.13-4-smp
* database: Mysql 5.0.18
* stress-test software: Siege 2.64 http://www.joedog.org/JoeDog/Siege
* Used stock RPM's for all software unless noted below

Symfony setup:

* Apache 2.2.0 (mod_php)
* PHP 5.1.2
* APC 3.0.10 (PHP accelerator, compiled from source)
* Symfony 0.7.1587 (not an RPM)

Django setup:

* Apache 2.2.0 (mod_python)
* Python 2.4.2
* Django 0.95-3336 (not an RPM)

Rails setup:

* Apache 2.2.0 (mod_proxy_balancer)
* Ruby 1.8.4
* Rails 1.1.4 (not an RPM)
* Mongrel and lighttpd web server (not an RPM)

Apache Prefork tuning:

StartServers 5
MinSpareServers 5
MaxSpareServers 10
ServerLimit 150
MaxClients 150
MaxRequestsPerChild 10000

Results

For each of the platforms, we experimented a bit with some options to try to get the best performance by running 3-minute tests. Then we ran an extended 30-minute test on each platform. (Before the actual tests, we pre-ran siege for a minute or two to prime whatever cache's, etc.) Here are some of the results:

For each of the platforms, we experimented a bit with some options to try to get the best performance by running 3-minute tests. Then we ran an extended 30-minute test on each platform. (Before the actual tests, we pre-ran siege for a minute or two to prime whatever cache's, etc.) Here are some of the results:

Symfony - 50 concurrent users

With PHP+APC: (30 min)
Transactions:                  85862 hits
Availability:                 100.00 %
Elapsed time:                1801.15 secs
Data transferred:             114.41 MB
Response time:                  1.04 secs
Transaction rate:              47.67 trans/sec  <---
Throughput:                     0.06 MB/sec
Concurrency:                   49.63
Successful transactions:       85862
Failed transactions:               0
Longest transaction:            4.15  <---
Shortest transaction:           0.02


Mysql: ~7% of CPU
Siege: ~5% of CPU

With APC disabled: (3 min)

Transactions:                   2256 hits
Availability:                  99.34 %
Elapsed time:                 181.76 secs
Data transferred:               3.15 MB
Response time:                  3.64 secs
Transaction rate:              12.41 trans/sec  <--- !
Throughput:                     0.02 MB/sec
Concurrency:                   45.19
Successful transactions:        2256
Failed transactions:              15  <---
Longest transaction:           30.57  <---
Shortest transaction:           0.14

NOTE: NOT having a PHP accelerator yields about 12 trans/sec! Horrible! Rumor has it that APC will be included by default in PHP6. In the above tests, we also had syck (for YAML parsing). However it didn't significantly change the results on a 3 minute test (less than 0.5 trans/sec).

Rails - 50 concurrent users

With 10 mongrels: (30 min)

Transactions:                 158747 hits
Availability:                 100.00 %
Elapsed time:                1800.82 secs
Data transferred:             211.38 MB
Response time:                  0.57 secs
Transaction rate:              88.15 trans/sec  <---
Throughput:                     0.12 MB/sec
Concurrency:                   49.89
Successful transactions:      158747
Failed transactions:               0
Longest transaction:           11.11  <---
Shortest transaction:           0.00


Mysql: ~10% of CPU
Siege: ~10% of CPU

NOTE: In the test above Rails was configured with 10 stand-alone mongrel processes (production mode) and web requests were redirected through Apache using mod_proxy_balancer. In subsequent 3 minute tests, having 20 or 30 mongrels didn't affect the transaction rate more than 0.5 trans/sec.

With lighttpd+fastcgi: (3 min)

Transactions:                  15415 hits
Availability:                 100.00 %
Elapsed time:                 180.66 secs
Data transferred:              20.53 MB
Response time:                  0.58 secs
Transaction rate:              85.33 trans/sec  <---
Throughput:                     0.11 MB/sec
Concurrency:                   49.89
Successful transactions:       15415
Failed transactions:               0
Longest transaction:            1.25  <---
Shortest transaction:           0.04


NOTE: The above test was run with the default lighttpd.conf, but on port 80 and in production mode. The number of trans/sec was about the same, but the longest transaction time was much smaller!

Django, 50 concurrent users

With mod_python: (30 min)

Transactions:                 224588 hits
Availability:                 100.00 %
Elapsed time:                1800.52 secs
Data transferred:             298.94 MB
Response time:                  0.40 secs
Transaction rate:             124.74 trans/sec  <---
Throughput:                     0.17 MB/sec
Concurrency:                   49.92
Successful transactions:      224576
Failed transactions:               0
Longest transaction:            9.31  <---
Shortest transaction:           0.00


Mysql: ~17% of CPU
Siege: ~11% of CPU

NOTE: The above test was run with PythonAutoReload? Off and PythonDebug? Off (production mode). These are by far the best performance numbers of the three frameworks!

High-load Results

I re-ran 3-minute tests on all three platforms with 150 concurrent users to check high-load results.

Symfony - PHP+APC, 150 concurrent users

Transactions:                  14363 hits  <---
Availability:                  98.68 %
Elapsed time:                 183.12 secs
Data transferred:               3.72 MB
Response time:                  1.34 secs
Transaction rate:              78.43 trans/sec
Throughput:                     0.02 MB/sec
Concurrency:                  105.06
Successful transactions:         122  <---
Failed transactions:             192  <---
Longest transaction:           30.67
Shortest transaction:           0.02


NOTE: You can see there were very few successful transactions. Most were "500 - Internal Server Errors" and 192 failed to connect altogether. It looks like the 500 errors were caused by something with Mysql, because the dev interface returned: "connect failed Native Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock"

Rails - 10 mongrels, 150 concurrent users

Transactions:                  14718 hits
Availability:                 100.00 %
Elapsed time:                 180.61 secs
Data transferred:              20.22 MB
Response time:                  1.79 secs
Transaction rate:              81.49 trans/sec  <---
Throughput:                     0.11 MB/sec
Concurrency:                  146.12
Successful transactions:       14718  <---
Failed transactions:               0  <---
Longest transaction:           18.39
Shortest transaction:           0.00


NOTE: "Transaction rate" down, and "Longest trans" time is up (from 50 concurrent users), but no failed transactions.

NOTE: Attempting this test with lighttpd+fastcgi failed. The web server returned "500 - Internal Server Error"'s and absurd siege result numbers.

Django, 150 concurrent users

Transactions:                  19903 hits
Availability:                 100.00 %
Elapsed time:                 180.78 secs
Data transferred:              26.73 MB
Response time:                  1.35 secs
Transaction rate:             110.10 trans/sec  <---
Throughput:                     0.15 MB/sec
Concurrency:                  148.32
Successful transactions:       19903
Failed transactions:               0  <---
Longest transaction:           20.03  <---
Shortest transaction:           0.01


NOTE: "Transaction rate" down, and "Longest trans" time is up (from 50 concurrent users), but no failed transactions. Still the top performer.

Summary

Rails performed much better than Symfony. And Django performed much better than Rails.

Re: Symfony - Ruby on Rails - Django performance test [message #8816 is a reply to message #8815 ] Fri, 14 July 2006 12:23 Go to previous messageGo to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
Please note, that the previous post was only refering to framework perforance, we are not saying that Symfony is the worst framework from the 3. It's simply the one with the lowest performances.

We spent a lot ot time and effort working on this report. We share it with you so the Symfony community can have a proper evaluation of their framework performance and can compare the results with the other frameworks on the market.

Matt & the rest of the team.
Re: Symfony - Ruby on Rails - Django performance test [message #8819 is a reply to message #8816 ] Fri, 14 July 2006 14:27 Go to previous messageGo to next message
vonLeeb  is currently offline vonLeeb
Messages: 74
Registered: March 2006
Member
Thanks for the report, really decent work.

I may only appeal to symfony owners to take care of performance of the whole framework.
Threre are tickets like this one: http://www.symfony-project.com/trac/ticket/716 that are left not addressed. 6.3 initialization takes min 150ms on decent hardware. For unknown reasons some operations like view setting may take absurdal time.
I'm under impressions that a lot of development steam goes to generators (whistle) whereas too litle to performance which is the basis (wheel).
BTW. Caching is not gonna solve all or even majority of performance issues. IMO it is more generic problem.

vl
Re: Symfony - Ruby on Rails - Django performance test [message #8820 is a reply to message #8815 ] Fri, 14 July 2006 14:48 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 8733
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Matt, many thanks for your report - this effort is much appreciated. We're using symphony here partly because we were impressed with the documentation, and we also wanted something in an established language. PHP fits this bill, while Ruby and Python just don't have the market command.

That all said, there is definately some improvements to be had in symfony. Of more concern that throughput is the suggestion that some transactions are not completing at high load. Worth looking into!

Thank you again Smile


Remember Gaza
Re: Symfony - Ruby on Rails - Django performance test [message #8825 is a reply to message #8815 ] Fri, 14 July 2006 15:12 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
Thanx from me too. That's really interesting.

And as Froncois mentioned here, most of the bottlenecks are out of scope of Symfony (Propel etc.).

Michael
Re: Symfony - Ruby on Rails - Django performance test [message #8827 is a reply to message #8815 ] Fri, 14 July 2006 15:20 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 8733
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Mmm, well the next version of Propel is on the cards I believe (there was recent discussion in the mailing list), and this might offer some improvement.

Still, if another DB abstraction layer offered significantly better performance, it might well be worth adding this into symfony so those people looking for efficiency could translate their model to the new system. Depends on how much re-engineering this involved, I suppose... Confused


Remember Gaza
Re: Symfony - Ruby on Rails - Django performance test [message #8839 is a reply to message #8815 ] Fri, 14 July 2006 19:35 Go to previous messageGo to next message
donut  is currently offline donut
Messages: 18
Registered: July 2006
Junior Member
Thanks for the great report! I was really looking forward to using Symfony for my next website. Now, I'm having second thoughts. The performance(storing session data per machine or on a single db prevents load-balancing) and robustness(db requests failing at high load) really worry me. I'm building a high traffic website and so these 2 areas are very important. Matt, has your team tested ASP.NET?
Re: Symfony - Ruby on Rails - Django performance test [message #8840 is a reply to message #8839 ] Fri, 14 July 2006 19:47 Go to previous messageGo to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
Hi Donut,

50 concurrent users (clicking at the exact same time) is quite a lot. But the results show that Symfony on our server wouldn't have handle a slashdot/digg effect.

We didn't try ASP.NET, we were looking for a linux based open source MVC framework.

Symfony is a really good solution, the only "downsides" we found were the language it's written in (PHP) and its performance.

Matt

p.s: one can argue about PHP being a downside, the fact is that as a language it's not as powerful as Python or Ruby.
Re: Symfony - Ruby on Rails - Django performance test [message #8841 is a reply to message #8840 ] Fri, 14 July 2006 20:01 Go to previous messageGo to next message
donut  is currently offline donut
Messages: 18
Registered: July 2006
Junior Member
Matt,

I actually first looked at Ruby On Rails and later on found out from other developers that the Ruby VM is kind of slow. The inventor of Ruby also indicated some shortfalls in Ruby(http://www.rubyist.net/~matz/slides/rc2003/) and 2.0 will have breaking changes. Does anyone know what language(s) are Digg and Slashdot written in?
Re: Symfony - Ruby on Rails - Django performance test [message #8843 is a reply to message #8841 ] Fri, 14 July 2006 20:08 Go to previous messageGo to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
From what we saw, Ruby isn't that slow (actually faster than PHP) but it doesn't internationalization and the VM could be better.

However it's a really fast language to learn, really "fun" to work with and really efficient(has the best from different other languages).

The main issue with rails (appart from internationalization) is the web serving solution. mod_ruby isn't reliable and well, fast_CGI is fast_CGI. But I have to say that we were quite surprised with the Mongrel's results though. We are still testing Rails to see if we will stick to it or not.
Re: Symfony - Ruby on Rails - Django performance test [message #8845 is a reply to message #8815 ] Fri, 14 July 2006 20:27 Go to previous messageGo to next message
donut  is currently offline donut
Messages: 18
Registered: July 2006
Junior Member
Hi Matt,

I suspect that in your tests if you set up a MySql server on standalone box(not on the same box as the webserver), the error "connect failed Native Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock" may go away since the communication will probably be done over TCP. I'm not sure if you have the time to try that but it would be something interesting to look into.

Php has a huge community. It has good support and a lot of reusable components and so I'm looking really hard at using Php for my project. The frameworks are fragmented(too many of them) but Symfony looks promising. However, the dev tools seem somewhat weak(debugging in Eclipse with DBG is painful).

RoR - may be I should give that a second look.

ASP.NET - it's proven and has great dev tools. But Windows Server isn't cheap.

I'm still doing my due-dilligence looking for the perfect combination of language + framework + database + OS. If you find anything and could share, I would really appreciate that.

Thanks.
Re: Symfony - Ruby on Rails - Django performance test [message #8846 is a reply to message #8815 ] Fri, 14 July 2006 20:31 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
So every framework has it's own pros and cons. Me, i continue learning Symfony, because of PHP and the "possibility" to "touch" the code if i need it. Performance can still be good, if you know what you are doing (keep in mind what's behind Symfony, and how easy lot of work can be done). You can also gain a lot of speed by tuning apache and PHP (i did it!). Look for tutorials, there are many of them. Default settings (of all components) are not always best for your purpose.

Maybe some day, when Ruby2 arrive and Symfony runs on PHP6, there will be another "new and best" framework out there Smile you'll see ... and we will talk about it again.
Re: Symfony - Ruby on Rails - Django performance test [message #8853 is a reply to message #8841 ] Fri, 14 July 2006 22:33 Go to previous messageGo to next message
dwhittle  is currently offline dwhittle
Messages: 175
Registered: January 2006
Location: San Francisco, California
Senior Member

digg is built with php on the wact framework...
I am not sure about slashdot, but I think it is perl.

With any framework it depends on the environment. In this case, there are three separate frameworks and three separate environments. Symfony can be speed up quite a bit if implemented correctly in an optimized environment.

Once propel 2 is released using pdo, it will speed up db access quite a bit.

Either way, excellent review. Thanks Smile
Re: Symfony - Ruby on Rails - Django performance test [message #8863 is a reply to message #8853 ] Sat, 15 July 2006 01:46 Go to previous messageGo to next message
francois  is currently offline francois
Messages: 1627
Registered: October 2005
Faithful Member
Wow, a stab in the back in the middle of the French national day!

All right guys, you know your job and when to publish a review with a negative conclusion. I must admit it.

We won't argue about performance - we use symfony every day, for high-traffic websites with AJAX requests etc., and we have no problem with it. Sometimes it takes time to configure a project and to optimize the model layer (since, as I already sais, and as your test shows, Propel is the slowest part in symfony), but we always get the best out of our servers (including resisting a Digg effect, for instance in the symfony website itself).

We won't argue about PHP vs. other languages either - most of the companies we work for don't even give us the choice. People who want to make money in this market, and use open-source tools with minimum support and documentation, have to use PHP.

What we can say is that we have a huge concern about performance, we keep improving it with every new version. We know symfony's weak points (once again, Propel) and we are already working on alternatives. But we are confident that symfony already runs quite fast.

Your study is interesting, but it leads only to one conclusion: If you really want a fast application, you have to code it by hand (in plain PHP, or, why not, assembly?). Then, you'll be in total control of its performance. But people who do web apps for a living are not that much interested in plain old performance, since:

- The time spent on creating web apps with symfony is about four times less than what it takes to do them without it.

- And the price of an additional server is really not very much as compared to the money earnt by using a framework.

Anyway, if you choose another framework, it's because it's probably the best choice for you, so good luck with Django. And thanks for your study.

One last word: We love the two frameworks you compared symfony with, and we are quite proud about being their main competitor after only ten months of existence, while they've both been existing for years...
Re: Symfony - Ruby on Rails - Django performance test [message #8866 is a reply to message #8863 ] Sat, 15 July 2006 02:03 Go to previous messageGo to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
Salut Francois,

Thanks for your reply. This isn't a stab in the back. Seriously, when we evaluated the 3 frameworks, Symfony wasn't the worst of 3.

To be honest with you, there wasn't a clear winner. Symfony is great and has all the features RoR and Django offer. It might not have the momentum of RoR or the framework speed of Django but it's a great solution we really liked. We also really liked the documentation and the community around Symfony. We hope to see some published books in the future even though your online documentation is excellent.

We came to the conclusion that there wasn't a perfect solution, all depends on your project.

For your information, we didn't give up on Symfony yet, we aren't sure what's the best choice for our project.

Also, I'm glad to see that you are working on improving the framework performance, note that if you have tricks on how to improve the perforance, we would be glad to re run the test.

Matt

Re: Symfony - Ruby on Rails - Django performance test [message #8868 is a reply to message #8815 ] Sat, 15 July 2006 03:22 Go to previous messageGo to next message
dwhittle  is currently offline dwhittle
Messages: 175
Registered: January 2006
Location: San Francisco, California
Senior Member

The best choice for your project is of course: symfony Smile

I think the review is fair (even though it was posted on RoR site).

Do you have screen installed on your server? If so, give me root and you can watch me speed up symfony two fold in three hours... Seriously.
Re: Symfony - Ruby on Rails - Django performance test [message #8870 is a reply to message #8866 ] Sat, 15 July 2006 09:31 Go to previous messageGo to next message
francois  is currently offline francois
Messages: 1627
Registered: October 2005
Faithful Member
Hi Matt,

Sorry if I misunderstood the tone of your study. The fact that I discovered it in the RoR wiki via Digg might explain why I thought it was a kind of attack.

But any remark willing to guide us in the right direction is welcome, and once again you did a great job by doing the test.

If you want us to help you improve your test app performance, feel free to publish the source somewhere and we'll take a look at it. Honestly, 12 transactions per second without an accelerator is terrible performance, and seeing how our apps run, I think there is room for improvement.
Re: Symfony - Ruby on Rails - Django performance test [message #8904 is a reply to message #8815 ] Mon, 17 July 2006 15:18 Go to previous messageGo to next message
NiKo  is currently offline NiKo
Messages: 16
Registered: July 2006
Location: Arcueil, France
Junior Member
As Linus said one day : talk is cheap ; show me the code Razz

It could be useful to access your tests source code (raw SQL ? chained methods ? I can make Ruby's ActiveRecord running veeery slow if I want to ^^)

But anyway I must agree with the fact that Propel is quite slow in my own benches, and the caching feature is a huge help facing that Confused
Re: Symfony - Ruby on Rails - Django performance test [message #8907 is a reply to message #8904 ] Mon, 17 July 2006 15:25 Go to previous messageGo to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
Niko, we'll post our test code very soon. You will see, we kept the application very simple, we tried to stay as unbiased as possible.

I just want to make sure you understand that this test (among others) was done by our team to see what framework we should use for our next project. We don't have ANY interests in rigging our tests. I posted the report here so we could discuss what seems to be a performance issue and maybe fix this challenge.

Matt

Re: Symfony - Ruby on Rails - Django performance test [message #8910 is a reply to message #8815 ] Mon, 17 July 2006 16:07 Go to previous messageGo to next message
dwhittle  is currently offline dwhittle
Messages: 175
Registered: January 2006
Location: San Francisco, California
Senior Member

We appreciate the tests and are glad there are people like you in the community benching and comparing the frameworks. It provides very valuable feedback about where we need to improve the most (propel?). Obviously, there will always be room for improvement...


Has anyone run ab tests?

[Updated on: Mon, 17 July 2006 16:08]

Re: Symfony - Ruby on Rails - Django performance test [message #8911 is a reply to message #8910 ] Mon, 17 July 2006 16:20 Go to previous messageGo to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
ok, here is the cookbook application we used to test Symfony performances.

For your information, the microtime information is displayed to check that the output isn't cached. Also the extra commented lines were added so the output of Symfony, Rails and Django would match.

Remember that we decided not to use any caching. (so don't even think about adding any Wink )

Matt

P.s: you'll find the schema.xml and the fixtures we used to test the app. (we used almost the same DB structure and exactly the same fixtures for the 3 frameworks)

  • Attachment: cookbook.zip
    (Size: 49.87KB, Downloaded 428 time(s))

Re: Symfony - Ruby on Rails - Django performance test [message #9008 is a reply to message #8911 ] Wed, 19 July 2006 12:43 Go to previous messageGo to next message
francois  is currently offline francois
Messages: 1627
Registered: October 2005
Faithful Member
Hi matt,

I didn't have much time to look at your test app, but I think that a single change could at least make you gain 20% if you made your test on the recipes/list action.

Change the line
$this->recipess = RecipesPeer::doSelect(new Criteria());

by
$this->recipess = RecipesPeer::doSelectJoinCategories(new Criteria());


I couldn't reproduce the high number of failed transactions, but our max connections and timeout configuration for MySQL might be different. I'll have a look again when I have some time.
Re: Symfony - Ruby on Rails - Django performance test [message #9013 is a reply to message #9008 ] Wed, 19 July 2006 14:55 Go to previous messageGo to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
Thanks Francois,

I'll do the test later in the day and get back to you.

Thanks

Matt
Re: Symfony - Ruby on Rails - Django performance test [message #9027 is a reply to message #9013 ] Wed, 19 July 2006 17:02 Go to previous messageGo to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
Symfony - 50 concurrent users

With PHP+APC: (30 min) previous test with posted code
Transactions:                  85862 hits
Availability:                 100.00 %
Elapsed time:                1801.15 secs
Data transferred:             114.41 MB
Response time:                  1.04 secs
Transaction rate:              47.67 trans/sec  <---
Throughput:                     0.06 MB/sec
Concurrency:                   49.63
Successful transactions:       85862
Failed transactions:               0
Longest transaction:            4.15  <---
Shortest transaction:           0.02


With PHP+APC: (30 min) and with recommended code change
Transactions:                   92301 hits
Availability:                 100.00 %
Elapsed time:                1804.17 secs
Data transferred:             122.98 MB
Response time:                  0.97 secs
Transaction rate:              51.16 trans/sec  <---
Throughput:                     0.07 MB/sec
Concurrency:                   49.68
Successful transactions:       92301
Failed transactions:               0
Longest transaction:           10.04
Shortest transaction:           0.03


As you can see, we didn't get the 20% gain you were hoping for Sad it looks like we got between 5% and 10%.

Matt
Re: Symfony - Ruby on Rails - Django performance test [message #9229 is a reply to message #9027 ] Sun, 23 July 2006 09:20 Go to previous messageGo to next message
simonbun  is currently offline simonbun
Messages: 205
Registered: October 2005
Faithful Member
I think these performance problems are somewhat php related. I remember doing a test like this with a couple of other php frameworks like cakephp and prado. Symfony performed among the best.

But i agree that the main performance problem to focus on at this time is the ORM. Decoupling propel & symfony is quite a time consuming task. I'm silently hoping for a propel 1.5 that replaces Creole with PDO. That, or symfORM ofcourse Wink
Re: Symfony - Ruby on Rails - Django performance test [message #9554 is a reply to message #8815 ] Fri, 28 July 2006 19:43 Go to previous messageGo to next message
blackbeard  is currently offline blackbeard
Messages: 1
Registered: July 2006
Junior Member
I'm interested in how the 3 different systems compare as far as amount of server resources used. Sure django was able to get more transactions in, but it looks like it used a lot more processor to get there. Is it just that it was able to get more done so it showed a higher processor utilization or was it that django and rubyy on rails are just more processor intensive.

I'm hosted on a shared server situation, so I'd like to use a framework that offeres good performance, but more that is efficient in terms of processor/memory usage.
Re: Symfony - Ruby on Rails - Django performance test [message #9559 is a reply to message #9554 ] Fri, 28 July 2006 21:14 Go to previous messageGo to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
Django and Rails got more transactions and therefore were using more resources.

Hovever if you want to use a shared hosting, you might want to make sure your hosting company supports Rails and/or Python. Usually, people developing applications with frameworks such as Django, Rails or Symfony don't use shared hosting but if you do, make sure that your hosting company will support the settings required for the framework of your choice.

Matt
Re: Symfony - Ruby on Rails - Django performance test [message #10544 is a reply to message #8815 ] Mon, 21 August 2006 13:34 Go to previous messageGo to next message
zYne  is currently offline zYne
Messages: 12
Registered: August 2006
Junior Member
As a developer who has done a lot of benchmarking I've noticed that the performance bottle-necks of a web-application are almost always database + file-system calls.

With this in mind I would love to see how symfony + Doctrine(www.phpdoctrine.com) would perform against Django & Ruby On Rails. Doctrine offers full freedom for developer when it comes to performance tuning. Doctrine offers specialized OQL as well as rawSql component for the efficient retrieval of objects.

Also the memory footprint of doctrine-based projects is much smaller than the ones in propel based projects since doctrine doesn't use code generation (= file sizes are *MUCH* smaller).
Re: Symfony - Ruby on Rails - Django performance test [message #10567 is a reply to message #10544 ] Mon, 21 August 2006 15:37 Go to previous messageGo to next message
frank
Messages: 22
Registered: August 2006
Junior Member
Assuming Doctrine is ready for prime time (which does not seem to be the case from its site), I too would love to see Doctrine as a supported alternative to Propel. I much prefer its use of PDO and Active Record, and the performance increase would be welcome. The question is would I still be able to use YML in the same way for most of my configuration? Doctrine seems to shun this. Would the use of YML slow Doctrine down significantly? Am I totally misunderstanding the use of YML? Can Doctrine support the current features of Symfony with Propel?
Re: Symfony - Ruby on Rails - Django performance test [message #10585 is a reply to message #10567 ] Mon, 21 August 2006 17:16 Go to previous messageGo to next message
zYne  is currently offline zYne
Messages: 12
Registered: August 2006
Junior Member
You can use YML for configuration (guy named amadeus is working on the integration) but instead of using XML for mappings you use ActiveRecord runtime mapping.

I'm pretty confident Doctrine has every feature Propel has (if not let me know) and also a lot more as you can see of the following feature list:

http://swik.net/Doctrine

[Updated on: Mon, 21 August 2006 17:18]

Re: Symfony - Ruby on Rails - Django performance test [message #10593 is a reply to message #10585 ] Mon, 21 August 2006 17:41 Go to previous messageGo to next message
awildeep  is currently offline awildeep
Messages: 104
Registered: May 2006
Location: Buffalo, NY
Senior Member
Doctrine certainly looks promising... Especially the lack of duplicated Model code, and it seems to have MUCH less code required when creating custom JOINs (esp many-many relationships).

Asside from automagic definition creation, and some lacking doc (Propel arguably has the same issue), does anyone see any other issues with this library?

PS: Maybe this should become it's own thread?
Re: Symfony - Ruby on Rails - Django performance test [message #10642 is a reply to message #10567 ] Tue, 22 August 2006 09:17 Go to previous messageGo to next message
brujahRg  is currently offline brujahRg
Messages: 245
Registered: December 2005
Location: Türkiye
Faithful Member
frank wrote on Mon, 21 August 2006 16:37

Assuming Doctrine is ready for prime time (which does not seem to be the case from its site), I too would love to see Doctrine as a supported alternative to Propel. I much prefer its use of PDO and Active Record, and the performance increase would be welcome. The question is would I still be able to use YML in the same way for most of my configuration? Doctrine seems to shun this. Would the use of YML slow Doctrine down significantly? Am I totally misunderstanding the use of YML? Can Doctrine support the current features of Symfony with Propel?


YML(Yaml) configuration files has nothing to do with the performance in any aspect. Yaml files are parsed once and cached immediately in php form. So unless you modify a yaml file it never gets parsed again causing performance loss. Doctrine integration and using yaml configuration files are easily possible and I don't see any possible side-effects.

Aside from these, I really would like to see Doctrine integration into symfony. But some symfony features should be revised to work with Doctrine also, which may be a tedious task. (especially the admin generator)
Re: Symfony - Ruby on Rails - Django performance test [message #10722 is a reply to message #10642 ] Tue, 22 August 2006 19:12 Go to previous messageGo to next message
frank
Messages: 22
Registered: August 2006
Junior Member
Assuming Doctrine (or something like it) does get fully integrated in the future, I wonder what a complex website that has been built with Propel will have to do to trade up to Doctrine. Ideally, it should be very little, and if so, there is far less risk in using Propel for current projects if a performance option looks promising in the future. I have a long term project(product) that I am going to be building with Symfony. I do not see it needing high performance for at least a year or more. I would sure like to know what the roadmap is, and road blocks are, for Doctrine integration. If it is just going to be an unsupported wiki option, it is clearly less applealing.
Re: Symfony - Ruby on Rails - Django performance test [message #10742 is a reply to message #10722 ] Wed, 23 August 2006 02:00 Go to previous messageGo to next message
zYne  is currently offline zYne
Messages: 12
Registered: August 2006
Junior Member
Quote:

Assuming Doctrine (or something like it) does get fully integrated in the future, I wonder what a complex website that has been built with Propel will have to do to trade up to Doctrine. Ideally, it should be very little, and if so, there is far less risk in using Propel for current projects if a performance option looks promising in the future. I have a long term project(product) that I am going to be building with Symfony. I do not see it needing high performance for at least a year or more. I would sure like to know what the roadmap is, and road blocks are, for Doctrine integration. If it is just going to be an unsupported wiki option, it is clearly less applealing.


We are currently working on Doctrine_Import which will be reverse engineering tool for an existing database schema. The Doctrine_Import is also likely to support many common xml schema formats like mdb2 schema and propel schema. This should make the migration from propel to doctrine as easy as possible.

Also I would like to state that the high performance is not the only thing that comes along with Doctrine. In many cases I found many other ORM solutions lacking in features. For example in my current commercial projects I've found the emulated enum, array and object types very useful.

Also the fact that I need to write *much* less model code (check Criteria based queries vs. DQL or even raw SQL!) makes Doctrine a more suitable option atleast for me.
Re: Symfony - Ruby on Rails - Django performance test [message #10932 is a reply to message #8815 ] Fri, 25 August 2006 17:32 Go to previous messageGo to next message
frank
Messages: 22
Registered: August 2006
Junior Member
Just a little tid bit that keeps cropping up. If RoR is so great, why is the rubyonrails.org website still running on PHP 5? Razz
Re: Symfony - Ruby on Rails - Django performance test [message #10939 is a reply to message #10932 ] Fri, 25 August 2006 18:09 Go to previous messageGo to next message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
Frank, rubyonrails.org doesn't run on PHP but on Rails.

Matt
Re: Symfony - Ruby on Rails - Django performance test [message #10940 is a reply to message #10939 ] Fri, 25 August 2006 18:16 Go to previous messageGo to next message
frank
Messages: 22
Registered: August 2006
Junior Member
OK, perhaps my bad. But why does netcraft list the site as running on PHP 5?
Quote:

Apache/2.2.2 (FreeBSD) mod_ssl/2.2.2 OpenSSL/0.9.8b DAV/2 PHP/5.1.4 SVN/1.3.2 mod_vd/2.0 mod_fastcgi/2.4.2 proxy_html/2.5


Does Netcraft not see Ruby? Is Ruby always invisible. I have not checked on Ruby sites before, so perhaps I am using the wrong tool. What should I use?
Re: Symfony - Ruby on Rails - Django performance test [message #10958 is a reply to message #8815 ] Fri, 25 August 2006 22:21 Go to previous messageGo to next message
frank
Messages: 22
Registered: August 2006
Junior Member
I am sure you are right about rubyonrails.org running on ruby. But why does the home page work with index.php? That seems odd if there is no PHP involved. Is that some sort of search engine redirect? BTW, the 37signals site also seems to work with the "odd" index.php on the home page.

http://www.rubyonrails.com/index.php
http://www.37signals.com/index.php
Re: Symfony - Ruby on Rails - Django performance test [message #10961 is a reply to message #10958 ] Fri, 25 August 2006 22:40 Go to previous messageGo to next message
awildeep  is currently offline awildeep
Messages: 104
Registered: May 2006
Location: Buffalo, NY
Senior Member
frank,
I am no expert on Rail's site. However, if I had a working website I do not think I would care what language it was running on as long as I can maintain it.

For instance, Subversion used CVS as it's version control for a long time. It worked, even after Subversion became "better" than CVS (better is of course subjective in this case). The developers made an active choice to switch their app. But my point is, in no way does it reflect oon the application itself.

Also, to use your argument against you (please don't take offence) symfony-project.com uses 3rd party non-symfony based software, both FUDforum, and Trac come to mind. Does this express lack of confidence in symfony? I would say no. It's just that Trac and FUDforum both do an excellent job, and why reinvent the wheel again? Not to mention I have not seen anyone working on a symfony code/ticket tool to replace Trac (which I would love, I hate python), nor a symfony bulliten board.

So ultimately it doesn't matter to me what the Rails community uses for rubyonrails.com. What does matter to me is that symfony does a good job for what I need, and if I used Rails, I would expect the same from it.

Boiling this down to it's point: Don't judge a book by its cover.

Smile

PS: It's also not hard to create a rewrite rule for .php file extensions. Rails does have a pretty extensive URL rules engine. Not to mention, Ruby may be running under fast_cgi, since last I heard mod_ruby was considerably slower than fast_cgi.... (just some thoughts)

[Updated on: Fri, 25 August 2006 22:50]

Re: Symfony - Ruby on Rails - Django performance test [message #10962 is a reply to message #10961 ] Fri, 25 August 2006 23:03 Go to previous messageGo to previous message
matt  is currently offline matt
Messages: 21
Registered: June 2006
Junior Member
I'm sure rubyonrails.org uses a rerouting system.

Also, rubyonrails.org uses Apache and Mongrel and not mod_ruby. The mod_ruby guys are working on getting a new version out which will handle rails.

BTW, Mongrel works fine, just look at our report results.

Matt
Previous Topic:[resolved] Helper to convert carriage returns and line feeds into <BR>
Next Topic:Problem: Layouting with YML - parameters
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software