Performance comparision CakePHP and symfony

By Yusuke Ando (yandod)
We can see some benchmark. But that's only "hello world" or something simple codes.
I compared CakePHP and symfony in real application. that's well known symfony sample "askeet!!".

comparision target

  • "askeet!!" is a sample application for symfony1.0
  • the frontpage ported to CakePHP and share the database
  • the data was registered in symfony application.

test environment

  • AMD Opteron1210(1800x2)
  • memory 4GB
  • FreeBSD7.0-STABLE
  • apache 2.2.9
  • PHP 5.2.6
  • MySQL 5.0.67

result

  • CakePHP1.1
  • 3.27 request per second.
  • CakePHP1.2final
  • 2.26 request per second.
  • symfony
  • 2.11 request per second.
  • CakePHP1.2RC2
  • 1.92 request per second.

more detail and codes

 

Comments 907

CakePHP Team Comments Author Comments
 

Comment

1 some thoughts

I hope I looked at the right app that you were testing...

- Did you test with debug set to 2?
- You really should not load models in the App Controller
- Seems like some unnecessary custom SQL in your Models
- No caching
- Some queries are not optimized
- Using Containable or Linkable might speed things up for you, and reducing recursion levels as well where applicable.
Posted Jan 13, 2009 by teknoid
 

Comment

2 some answers

thanks for your comment.

first debug level set to 0 on testing.
I thoughts cake was quite fast, so I didn't tune as fast as possible.
and the query cost are only couple of mile seconds.
this experiment has done as similar symfony styles, so these codes are not best style for cake.

my biggest question is the difference between Cake1.1 and 1.2.
the aplication codes are almost same, but the results are different.
Posted Jan 14, 2009 by Yusuke Ando
 

Comment

3 title - valid not empty

Cake 1.1 works faster with eAccellerator comparing to APC.

I hope someday new cake releases will be faster then previous.
If not, after few releases more, cake will have 0.02 req/s,
but we shall claim victory! because symphony had 0.01 !
:)

Posted Jan 15, 2009 by Majna
 

Comment

4 Where is the problem?

I read your html presantation and I have a few issues with it:

1. You say: "Framework cost x10 by HTML. More 40% - 150% than Wiki"
Is ok, a framework is suppose to do more than you can do with pure html or wiki.
Ofcourse, if you use it only to do what single html or wiki can do, you have a performance issue.

2. How can you explain that if cake 1.2 has 300% more steps by xDebug than symfony, the difference of performance is only 10% without APC and almost 50% with APC?

Posted Jan 19, 2009 by Alin
 

Comment

5 :---)

I hope someday new cake releases will be faster then previous.

There are some faster frameworks than cake.
But cake is quite fast, and I believe cake will be faster more !
Posted Jan 21, 2009 by Yusuke Ando
 

Comment

6 my answer.

Thanks for to read my slides!

Ofcourse, if you use it only to do what single html or wiki can do, you have a performance issue.

If we use some caching and optimizing codes, we get more better result.
But in this case, I don't use any output cacheing.
Because I didn't see output caching in the askeet, And I would know the result of usual codes.

2. How can you explain that if cake 1.2 has 300% more steps by xDebug than symfony, the difference of performance is only 10% without APC and almost 50% with APC?

I have the result of xDebug and I can publish these too.
I'm not sure about this deference, I guess the 1 step is not even each function calls.
And APC is more effective for symfony, because it has so many huge files.
Posted Jan 21, 2009 by Yusuke Ando
 

Comment

7 framework benchmark competition

I think we need a better benchmark criteria set.
It would be nice that someone start a multi-framework benchmark project.

We should define a set of basic/complex operation that a framework should do with different datatype and relations.

After that, ask the creators of each framework to provide the best implementation for that cases.
Would be nice and very useful to see a competition in this area.
Posted Jan 25, 2009 by Alin
 

Comment

8 the cause is..?


I have the result of xDebug and I can publish these too.
I'm not sure about this deference, I guess the 1 step is not even each function calls.
And APC is more effective for symfony, because it has so many huge files.

Would be nice to locate the cause of performance issue, even only for the test case that you presented (askeet).

10% (no APC) is not much but 50% (with APC) it is.
Posted Jan 25, 2009 by Alin
 

Comment

9 try Jobeet!

Symfony 1.0 is almost outdated, maybe it would be good to see some comparisons with Symfony 1.2 and Jobeet.
Posted Jan 29, 2009 by Ivan