Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 3
[Performance] Who’s Up & Running With Zend Server? 
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

At Mage:Camp in London, a Zend ninja presented the performance difference Zend Server makes to Magento. Out of all the things presented, this one was probably the only amazing one. Caching abilities were better than anything I’ve seen and the speed increases were phenomenal. Server load should decrease drastically when you start caching everything before PHP and MySQL come into the equation.

Anyway, my question is, who here made the switch from Apache only to Apache + Zend Server and of course, how did it go?

At over a grand GBP annually, it’s yet another IT expense on top of high-end hosting already, but if it does what it did in the presentation, it must be worth it. I guess it will also make conversions increase further and maybe even help with Google rankings etc. so perhaps it’ll pay back fast.

Does anyone have hands-on experience with Zend Server for Magento yet?

Is anyone thinking of going down that route like I am? What are your thoughts?

EDIT: Stupidly, I only now realize there is a CE edition, which is free and has the same features but for the SLA:

http://devzone.zend.com/article/4295
http://www.zend.com/en/community/zend-server-ce

Free vs Paid comparison here. (not entirely clear whether the coverted page caching feature is or isn’t available in CE)

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 

I’ll give it a go in a few minutes. Looks like the converted page caching isn’t avaiable in the CE, but that’s something you could easily do yourself with PHP and Apache’s mod_rewrite.

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 

Looks slick. However, I can’t get it to interpret php_flag and php_value in .htaccess files. I’m sure that it has something to do with not using mod_php.

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

Yeah, I read the CE manual and indeed, the page caching is in the commercial version only. Bummer.

I don’t see how mod_rewrite could emulate that though, especially given the simplicity with ZS. You can do it via regexp fro example, so you can do all your .html files so you skip the cart etc. Very neat.

I’ll have a play with the CE and most likely still go commercial. The ease of PHP bug fixing etc. is great too.

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 

You would render fully static pages to disc and have a RewriteRule that checks if a cached version exists and serves it, else hands it over to Magento. And you would write your own rule processing system in PHP to cache the semi-static pages.

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

OK, I see. A lot of “you...” stuff which ZS would do seamlessly without user interference.

You’d have to write your own checking mechanisms, time constraints etc. Sounds like a headache to me, I’d rather leave it up to the people who wrote PHP and are heavily in bed with Apache and MySQL in the first place.

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 
J.T. - 18 May 2009 06:32 AM

OK, I see. A lot of “you...” stuff which ZS would do seamlessly without user interference.

You’d have to write your own checking mechanisms, time constraints etc. Sounds like a headache to me, I’d rather leave it up to the people who wrote PHP and are heavily in bed with Apache and MySQL in the first place.

It’s not so bad. Check out this: http://framework.zend.com/manual/en/zend.cache.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

Thanks, good link!

Wouldn’t that require Magento code changes though?

I just realized that if you were to page cache www.shop.tld/product.html and someone adds this to their basket, if they come back to this, or any other cached page, then of course the basket will show empty as that’s how it was cached in the first place.

Solution could be to make the basket “generic” so instead of it checking something is inside and then showing “1 x Product $25.00”, to accommodate good caching without confusing situation it should just say “Click here to view your basket.” regardless of whether there’s something in it or not.

That looses some neat features but makes caching full pages possible.

But maybe this is a non-issue if Zend Server is so clever that you can tell it to stop pulling from cache certain pages if certain session vars are triggered.

This really needs a proper test scenario. I have my 30 day trial license and hope to get some time on the weekend to test these things out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 

A block cache would be more helpful, most pages just aren’t static (and our pages include at least a mini cart in every single page).
I recall there was something like this implemented in Magento but it actually made things slower, so it got removed. Maybe someone will make a module for this, but I don’t know if it’s possible as Magento seems to have hardcoded some things. Still, I don’t give up hope. Anyway, baseline Magento is fast enough for me ATM.

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

As it’s written with ZF you’d think this caching should apply too.

I wonder whether having the mini cart in an iframe could get around this.

Speed is acceptable for me and our customers too but thinking medium to long term, I’m not sure how our server is going to hold up under higher traffic load. And where I class the e-commerce as “critical” but no massive deal if it goes offline for a few hours, I have something else lined up which will be “very critical” which I don’t want down at all. So I have to start looking at ways to ensure server stability, uptime, security etc. hence looking at Zend Server and hoping to use page cache one way or another.

I’ve got the card from the Zend guy who presented, I’ll drop him a line about all this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 
J.T. - 19 May 2009 01:16 AM

I wonder whether having the mini cart in an iframe could get around this.

That way you’d need to pull up the full Magento machine for the iframe. Don’t know if this helps much.

I hope the Zend guy can clear some things about this up.

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

D’oh, you’re right. Stupid suggestion.

We could have a controller in the cart which detects a new product being added, which then caches a static html file which the iframe can then load as the mini cart wink Now we’re talking.

Sent him an e-mail, will report back as and when.

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

Update for you Nightfly, and whoever else is reading.

Zend are going to run Magento for their own shop and putting it through the paces right now. They are actually actively bug fixing Magento, I hope in a concerted effort along with Varien. They are recoding certain bits to make cache usage more effective.

When they’re done playing themselves, “We should also have some suggestions on how to use the Page Cache even when you have dynamic elements on the page (which we’ll probably do in AJAX), but have not got round to implementing & benchmarking those yet.”

Further quote:

With that caveat your best bet at the moment is to use the internal Caching in Magento which uses the APC API’s. Zend Server has a compatibility layer which means you can take full advantage of the API’s without having to change any config. There’s plenty of documentation around if you Google, and you can find some initial pointers here: http://www.magentocommerce.com/wiki/modules_reference/english/mage_adminhtml/system_cache/index

I think it’s great the legends themselves are actively improving Magento and looking at making it work in tandem with their superior caching mechanisms. This can only be a good thing for all parties involved.

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 

Wow, now that’s a great news!

With that caveat your best bet at the moment is to use the internal Caching in Magento which uses the APC API’s.

I found APC performance very good so far and hope the caching optimizations will benefit APC users as well.

They are actually actively bug fixing Magento, I hope in a concerted effort along with Varien.

Considering Varien redid the their website, I presume this will be the case. smile Can’t wait to see what will come out of this collaboration.

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

Yeah, it sounds great indeed. Perhaps it was a deliberate great move, to use Zend Framework, to get Zend’s attention.

I also use APC but that is just opcode cache, not actual output cache, is it?

My top cached scripts in APC System Cache, after 2 days (needed a restart):

/app/design/frontend/default/mytemplate/template/catalog/product/price.phtml 1483 197491
/lib/Zend/Loader.php 627 42744
/lib/Zend/Db/Statement/Pdo.php 627 76710
/lib/Zend/Db/Statement/Interface.php 627 25239
/lib/Zend/Db/Statement.php 627 81602
/lib/Zend/Db/Select.php 627 250495
/lib/Zend/Db/Profiler.php 627 59322
/lib/Zend/Db/Expr.php 627 5932
/lib/Zend/Db/Adapter/Pdo/Mysql.php 627 38669
/lib/Zend/Db/Adapter/Pdo/Abstract.php 627 55594
/lib/Zend/Db/Adapter/Abstract.php 627 199085
etc.

It’s interesting that the price one is getting the most hits because here’s someone who enabled the Zend cache for this area and reported big gains:

http://www.magentocommerce.com/boards/viewthread/41112/

Top APC hits User Cache:

alphanumericZend_LocaleL_en_GB_symbols_ 1020 835
alphanumericZend_LocaleC_en_GB_decimalnumber_ 1020 603
alphanumericZend_LocaleC_en_GB_currencytoregion_GB 602 607
alphanumericZend_LocaleC_en_GB_month_gregorian_format_abbreviated_5 292 641
alphanumericZend_LocaleC_en_GB_nametocurrency_GBP 278 625
alphanumericZend_LocaleC_en_GB_date_medium 197 599
alphanumericZend_LocaleC_en_GB_time_medium 178 596
alphanumericZend_LocaleC_en_GB_currencysymbol_GBP 165 604
alphanumericZend_LocaleC_en_GB_currencysymbolchoice_GBP 158 611
alphanumericZend_LocaleL_en_GB_month_gregorian_format_abbreviated 129 805
alphanumericZend_LocaleL_en_GB_month_ 129 787
alphanumericZend_LocaleL_en_GB_day_ 129 742
alphanumericCONFIG_GLOBAL 129 1237177
etc.

I guess these User Cache entries are output cache instead of opcode cache, am I right?

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 

Yes, that’s the general value cache. You could store blocks output there.
BTW thanks for the link, ver y helpful. smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 3