This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » Doctrine 65% Performance Hit
Doctrine 65% Performance Hit [message #102802] Tue, 20 July 2010 15:05 Go to next message
midfielder100  is currently offline midfielder100
Messages: 15
Registered: June 2006
Location: Santa Monica, CA USA
Junior Member
Is that possible? We have a simple feed that will get hit fairly hard and has been benchmarked at 90 (closer to 88) reqs/sec with Doctrine. That seemed very low as there are only 7-8 queries for the action so I decided to investigate. After commenting out the Doctrine portions to make sure our DB wasn't the bottle neck, I realized that it was actually Doctrine that was the bottle neck. So I went ahead and replaced the Doctrine with raw MySQL commands and the throughput nearly tripled to 240 reqs/sec. And yes, the queries remained identical and Doctrine does have query caching enabled with APC.

I know that performance overhead is part of using frameworks. It's usually worth the cost. But I can't justify a 2/3 reduction in efficiency. Btw, Symfony 1.4.6 with Doctrine 1.2.2. The only Doctrine related plugins are Guard and login history.
Re: Doctrine 65% Performance Hit [message #102825 is a reply to message #102802 ] Tue, 20 July 2010 21:04 Go to previous messageGo to next message
xplo  is currently offline xplo
Messages: 428
Registered: September 2008
Faithful Member
i believe it s possible, the ORM use a lot of cpu/mem, maybe you could read that : http://propel.posterous.com/how-fast-is-propel-15

there s some comparison and explanation why doctrine 1.2 is slow, as being bloged by propel project lead it might be a little biased thought Smile
Re: Doctrine 65% Performance Hit [message #102891 is a reply to message #102802 ] Wed, 21 July 2010 18:29 Go to previous messageGo to next message
midfielder100  is currently offline midfielder100
Messages: 15
Registered: June 2006
Location: Santa Monica, CA USA
Junior Member
No I understand that ORMs and frameworks in general involve a performance trade off. But typically that tradeoff is acceptable. There is no possible way I can serve 65% fewer requests per server just for the convenience of not having to write some low level SQL.
Re: Doctrine 65% Performance Hit [message #103106 is a reply to message #102802 ] Mon, 26 July 2010 22:37 Go to previous messageGo to next message
midfielder100  is currently offline midfielder100
Messages: 15
Registered: June 2006
Location: Santa Monica, CA USA
Junior Member
Anybody else have any info? I've seen just about every Symfony benchmark but most of them are crap (even the "real world" Symfony 2.0 benchmark has no ORM calls which looks to be killing the performance).

The thing that really concerns me is that even with the Doctrine result cache enabled, we're seeing very minimal gains.
Re: Doctrine 65% Performance Hit [message #103111 is a reply to message #103106 ] Mon, 26 July 2010 23:37 Go to previous messageGo to next message
xplo  is currently offline xplo
Messages: 428
Registered: September 2008
Faithful Member
did you try propel 1.5 ? if doctrine 1.2 is your bottleneck then switching to propel might be a solution according to the blog post.

Else you could wait for doctrine 2 as i heard is faster than doctrine 1.x but we dont really know since doctrine 2 is not quite ready yet.

I never used doctrine so i cant really help much with doctrine internal optimisation ...

good luck
Re: Doctrine 65% Performance Hit [message #103112 is a reply to message #102802 ] Tue, 27 July 2010 01:34 Go to previous messageGo to next message
midfielder100  is currently offline midfielder100
Messages: 15
Registered: June 2006
Location: Santa Monica, CA USA
Junior Member
Moving to Propel would require a rewrite (same with Doctrine 2) but I'm still curious to see some other real word benchmarks. The benchmark I ran was on a quad core 2008ish Xenon with 4GB RAM and two 15k SAS drives in RAID 1.

What traffic levels have others sustained on production hardware?
Re: Doctrine 65% Performance Hit [message #103150 is a reply to message #102802 ] Tue, 27 July 2010 19:35 Go to previous messageGo to next message
midfielder100  is currently offline midfielder100
Messages: 15
Registered: June 2006
Location: Santa Monica, CA USA
Junior Member
Hello? Does anybody benchmark their applications? I can't be the only one experiencing these effects and shock at the overhead. The very first Doctrine call alone reduces throughput by 25-30% (regardless of the actual query).

[Updated on: Tue, 27 July 2010 19:35]

Re: Doctrine 65% Performance Hit [message #103160 is a reply to message #102802 ] Wed, 28 July 2010 10:31 Go to previous message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
This question being somewhat specialised, it might be worth popping over to the Doctrine website to look at their support options? You may get some input from the Doctrine core team if you do so Very Happy


Remember Palestine
Previous Topic:How To Increase Fetch Limit For MSSQL
Next Topic:[solved] admin generator - disable creating new object
Goto Forum:
  

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