Benchmarking Zend Server CE with Joomla

In: Joomla| PHP| Zend Server

11 Jun 2010

Zend Server CE is the Community Edition of the PHP application server by Zend Technologies. It’s a free environment that can be used to run PHP applications using additional features compared to the PHP.net version. Some of these features are:

  • Zend Optimizer+, a PHP byte code accelerator;
  • Zend Data Cache, a data caching system for PHP.

Using the Zend Optimizer+ we can speed up the execution of a PHP application without any change on the code. Basically the Optimizer+ is a caching system for the bytecode generated from the PHP interpreter.
The Zend Data Cache is a caching system for PHP and can be used to cache variables, objects, etc. This means that you have to modify your code to use this cache. However, the change of the PHP code is very simple and limited. For more info about the Zend Data Cache we suggest to read the White Paper “A pratical guide to data caching with Zend Server” of Shahar Evron, Product Manager of Zend Technologies.

Basically using Zend Server CE we can speed up the execution of a PHP application but the question is how much faster? The answer depends on the PHP application and compared with what?
In this post I run a benchmark of Joomla, the famous CMS written in PHP, using Zend Server CE vs. APC and Memcached. To run this benchmark I worked together with Renato Salvatori of Cost, an IT company specialized in Joomla.

In details, we run the benchmark into two phases:

  1. using the Zend Optimizer+ of Zend Server CE vs. APC;
  2. using the caching mechanism of Joomla on the following backends: File, Memcached, APC and Zend Server CE (using File and Shared Memory).

In order to use the Joomla caching with Zend Server we used a plugin written by me and Renato Salvatori, you can download it below in the post.

Benchmark methodology

We used the default installation of Joomla 1.5.17 using the example data for the content of the site. We tested the home page of Joomla using Apache Benchmark (ab) with 100 requestes and 10 concurrency users (-n 100 -c 10). We run each experiment 6 times and we took the average of the results. We measured the time per request (mean across all the concurrent requests in ms) and the transfer rate (Kbyte/sec).

All the experiments reported in this post have been executed using a CPU Intel Core 2 at 2.10 Ghz with 2 GB of RAM running Gnu/Linux OS with kernel 2.6.28 . We used the following software configuration: Zend Server 5 CE, Apache 2.2.11, PHP 5.3.2, Joomla 1.5.17, Memcached 1.4.5, APC 3.1.3p1, MySQL 5.0.45.


APC vs Zend Optimizer+

In the first step of the experiment we run the benchmark with the caching of Joomla disabled. We tested the response time of the home page with and without the bytecode accelerator of Zend Optimizer+ and APC. We reported the results in Table 1.


time per request, mean across all concurrent requests (ms) transfer rate (Kbyte/sec)
No Cache, No Optimizer+, No APC 114,017 286,87
No Cache, APC 80,135 408,27
No Cache, Optimizer+ 71,019 460,70

Table 1: Response times of Joomla using PHP accelerators


The results show that Zend Optimizer+ is the faster one. Using Zend Server 5 CE Joomla runs 60% faster of the PHP.net (with no accelerator) and 13% faster of APC. We reported the transfer rate of the results in Figure 1 (high value means better performance).

figure1

Figure 1: Transfer rate (Kbyte/sec)

Data cache experiment

In the second step of the experiment we run the benchmark using the caching plugins of Joomla on the following caching systems: File, APC, Memcached, Zend Server CE (file), Zend Server CE (shared memory). We split the experiment into two steps: the first using the APC byte code accelerator, and the second using the Zend Optimizer+ code accelerator. Below we reported the results of this experiment (Table 2 and 3).


time per request, mean across all concurrent requests (ms) transfer rate (Kbyte/sec)
Cache: File 53,383 612,91
Cache: APC 49,275 664,23
Cache: Memcached 50,507 647,73
Cache: ZendServer file 51,541 634,51
Cache: ZendServer shm 46,527 703,50

Table 2: Results with APC enabled, and Zend Optimizer+ disabled

As you can see the best result, in term of performance, comes with the usage of Zend Server CE (with shared memory caching system, shm). Zend Server CE is 14% faster than File, 9% faster than Memcached, and 6% faster than APC.


time per request, mean across all concurrent requests (ms) transfer rate (Kbyte/sec)
Cache: File 40,716 803,54
Cache: APC 38,898 841,13
Cache: Memcached 39,058 837,90
Cache: ZendServer file 39,102 836,95
Cache: ZendServer shm 36,531 895,79

Table 3: Results with APC disabled, Zend Optimizer+ enabled

The same results comes with Zend Optimizer+ enabled and APC disabled. The faster caching system is Zend Server CE with shared memory. Zend Server CE is 11% faster than File, 7% faster than Memcached, and 6% faster than APC.

If we compare the data cache results using APC or Zend Optimizer+ we discover that the best results comes with Zend Optimizer+, the data caching system of Joomla runs faster of 35% compared with APC (Figure 2, high value means better performance).

figure2

Figure 2: Transfer rate (Kbyte/sec)

Summarizing, using the Zend Optimizer+ and the Data Cache of Zend Server CE you can speed up the execution of Joomla from 60% to 300% compared with PHP.net (with no accelerator) and from 13% to 35% compared with APC.

The Joomla caching plugin for Zend Server CE

In order to use the data caching of Zend Server CE with Joomla you have to install the plugin joomla_zendserver.zip. You can download it here.

The installation of this new plugin is very easy, you have only to unpack the zendserver.tar.gz file and copy the files zendserver_disk.php and zendserver_shm.php in the folder libraries/joomla/cache/storage/ of Joomla.

After that you can choose the cache handler Zendserver_disk and Zendserver_shm from the System tab of the Global Configuration menu of the Administration interface of Joomla. That’s it!

Conclusion

In this post we showed that Zend Server CE is the faster PHP stack to run Joomla applications. The benefits, in term of performance, are great: up to 35% faster of APC and up to 300% of PHP.net (with no accelerators).

If you are interested in other benchmarks of Zend Server CE you can read the White Paper “Optimizing Drupal Performance” by Acquia and Zend Technologies.

In the future, I would like to run more benchmarks on Zend Server CE using other PHP open source softwares. If you have any proposals please add a comment, thanks.

16 Responses to Benchmarking Zend Server CE with Joomla

Avatar

niofox

June 11th, 2010 at 3:11 pm

Good article!!!

Avatar

Wil Sinclair

June 11th, 2010 at 6:42 pm

Interesting.

To be honest, your boldfaced conclusion that Zend Server CE is up to “35% faster of APC” and up to “300% of PHP.net (with no accelerators)” sounds like Zend marketing and makes me wonder whether this article was sponsored. ;)

For example, comparing ZS with Optimizer+ and the Data Cache enabled to vanilla php.net to come up with 300% faster is misleading and irrelevant to PHPers who care about performance, none of whom would consider- or should consider!- deploying PHP apps without a byte-code cache. You might lend more credibility to your seemingly sound benchmarking if you painted a less rosy picture of Zend Server CE in your conclusion.

Also, I wonder if these performance gains will convince PHPers to use proprietary software as opposed to OSS. I know ops people who are overseeing very large PHP installations who will no longer touch anything that isn’t open source. The open-source advantage is a) more transparency and b) establishing a worst-case scenario of fixing a blocking bug yourself. With Zend Server CE, you have to rely on Zend to fix issues on their own time.

Anyways, good article. All comments are FWIW.

,Wil

Avatar

Enrico Zimuel

June 12th, 2010 at 9:19 am

Hi Wil,
thanks for your feedback.
Let me answer to your doubts about sponsorship and so on.
I work for Zend but this is my personal blog so I’m free to write here without any control following the spirit of the open source community. Let me be more clear, Zend is not paying me to write on my blog. I wrote this benchmark with the idea to help the users of Joomla to think about the PHP stack to use in their applications. Zend Server CE is a free product and I showed, from a technical point of view, that is a good environment to run Joomla application. I’m a technical engineer so if something is black for me is black and not gray.
Regarding the comparision with vanilla PHP I did this to give an idea of the huge benefit that you can have using a simple PHP accelerator (like APC, Zend Optimizer+, eAccelerator, etc). I can assure you that a lot of people use the vanilla PHP and i’m not talking about community but business environment.
Last, but not least, you didn’t mention in your feedback, that we published a plugin for Joomla to use the caching system of Zend Server CE, and this plugin is has been released as open source.
To be honest i don’t know where is the conflict with this post, it’s a technical post and not a marketing activity. It sounds strange to me that this considerations comes from an ex Zender, you was the project leader of Zend Framework… maybe your comments are in conflict of interest and not mine.

Avatar

Wil Sinclair

June 14th, 2010 at 7:09 pm

Thanks, Enrico, for both greenlighting my post and responding.

My concern is simple. You didn’t mention that you work for Zend in the body of a post that offers a very rosy picture of Zend Server. It’s not that ZS isn’t a good option for Joomla users, or that your benchmarks aren’t sound. And I don’t see any inherent conflict of interests here; I’d encourage anyone to talk about anything they can shed more light on. It’s that you compromise your voice when you say this much about a product without mentioning that you work for the company that produces it.

Have you considered updating the post with a disclaimer in the vein of “Disclaimer: I work for Zend, but this post is not part of my work?” That’s what I do on my blog in these circumstance, and that’s what I always did as the leader of the Zend Framework project. This is a matter of opinion, but I think a disclaimer that catches the reader’s attention and also gets syndicated in your feed is in order.

Zend should also consider mentioning this in any post or tweet that points people to your blog. But that’s their call.

In any case, it’s a great post with only a few issues IMO that I listed above. I’d like to see it convincing as many people as possible that Zend Server CE is a good option for Joomla- and any other PHP app, for that matter. When you put your relevant affiliations front and center, you only increase the efficacy of your voice.

HTH in some way.
,Wil

Avatar

Enrico Zimuel

June 15th, 2010 at 10:08 am

Hi Wil,
as you can see in the “About box” at the right-top of each page of my blog it’s written that I work for Zend: “I work as Senior Consultant & Architect at Zend Technologies.” so i don’t see any conflict with my post. Btw, if you wrote a technical article saying that a software runs faster using a technology and you have doubt with the conclusion why don’t try to ask questions from a technical point of view? If you have any dubt about the results of this benchmark I’m more than happy to share with you the details (btw, I already insert in the post).
Anyway, thanks for your comments.

Avatar

Raoul

July 5th, 2010 at 1:56 pm

I have also posted to the Joomla forum at http://forum.joomla.org/viewtopic.php?f=433&t=524555&p=2177109#p2177109.

I have tried installing this Zend Cache extension to Joomla as described in the above post. I had the Host install Zend Server CE.

However no Zend Cache option is present in the Joomla admin. are there any other steps that I am missing?

Thanks
Raoul

Avatar

Lucas Holt

July 7th, 2010 at 10:26 pm

I find this post interesting as I have 77 Joomla installs to manage on a LAMP stack. I was wondering if you would consider including eaccelerator benchmarks in future benchmarks. We’re currently using it and it would be interesting to see comparisons between it and zend optimizer.

As for the comments Wil made, I agree with them. Since the blog post is quite favorable to zend, it might be nice you work for them but this isn’t a work activity.

Avatar

Marco

July 8th, 2010 at 3:48 am

I personally really enjoyed the article and appreciated receiving this information. The plugin also seemed very generous for those users that are familiar with php, use OSS, and understand the need to optimize these application for their customers.

Thanks and keep them coming. The above comments make it all the more interesting !!

Avatar

Enrico Zimuel

July 8th, 2010 at 7:34 am

Hi Raoul,
are you sure that your Joomla installation is running on Zend Server CE?
To check this you can view your phpinfo() and search for the Zend components (Zend Optimizer+, Zend Data Cache, etc).
You have also to check if the Data Cache component is on (go to admin interface of Zend Server and click on Server Setup menu).

Avatar

Enrico Zimuel

July 8th, 2010 at 7:54 am

Hi Lucas,
i will update the benchmark using also eAccelerator.
Regarding Wil and your suggestion I will insert, in a more explicit way, this info in my future posts about Zend products.
Right now the information on my job are in every page in the “About this blog” box (top of each page) but this seems to be not enough.
Thanks for your feedback.

Avatar

jeewan samant

July 8th, 2010 at 6:13 pm

hi,
thanks for this info, i would also like to know the benchmark with eAccelerator, because i am using all my stuff with this.

thanx

Avatar

Max

July 9th, 2010 at 10:18 am

I am also interested in knowing about eAccelerator, as we have eAccelerator on our servers, it would be good to know about how to speedup Joomla with eAccelerator settings.

Thank you
Max

Avatar

Sandro

July 10th, 2010 at 11:06 am

So Zend is a good choice, but the Framework-guy is affraid they molest his baby?! Well, I only a beginner, and am looking for an environment to start building/ developing PHP in. I WILL try ZendSrvr-CE if it’s free. I’m poor, and they tell me Zend teaches PHP the best way. Will take a look at Vanilla first, but I need both an DevEnvironment AND a steady community to help me through the hard times.

Can I work with this Vanilla/ ZS-CE while continuing to work from KDEWebDev 3.5.10???

Thanx for staying professional and true,
Sandro

Avatar

Enrico Zimuel

July 15th, 2010 at 10:59 am

Hi Sandro,
Zend Server Community Edition (ZS-CE) is an application server to run PHP applications.
You can use KDEWebDev to develop your PHP application and ZS-CE to run it (for free).
In this way you will take the benefits coming from ZS-CE, including the PHP accelerator code.
For the other feautures of ZS-CE I suggest to take a look at this page: http://www.zend.com/en/products/server-ce/index

Avatar

Raoul

July 16th, 2010 at 6:58 am

What exactly do you mean by “running on Zend Server”?
Zend server is installed and I can access the admin for it. Does Joomla have to be installed differently or again to take advantage of Zend?

I have this in Joomla PHPinfo page.
“This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with eAccelerator v0.9.6, Copyright (c) 2004-2010 eAccelerator, by eAccelerator with the ionCube PHP Loader v3.3.14, Copyright (c) 2002-2010, by ionCube Ltd., and with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH”

and

“Zend Optimizer
Optimization Pass 1 enabled
Optimization Pass 2 enabled
Optimization Pass 3 enabled
Optimization Pass 4 enabled
Optimization Pass 9 enabled
Zend Loader enabled
License Path no value
Obfuscation level 3″

I do not see any reference to Zend Data Cache or Zend Optimizer+.

In the Zend Server PHPinfo Page I can see references to both Zend Data Cache and Zend Optimizer+

On the face of it it appears that Joomla is not running on/ in the Zend framework. How do we get that happening. Is it a completely different apache instance?

Thanks
Raoul

Avatar

Enrico Zimuel

July 24th, 2010 at 3:33 pm

Hi Raoul,
your Joomla is not running with Zend Server, it’s running with your previous installation of the PHP engine using eAccelerator.
If you are using Linux, Zend Server CE (ZS-CE) runs by default on the 10088 port. This means you have to configure the Apache running to point to your Joomla installation using the port 10088. In this way you can compare the performance of Joomla using your previous PHP environment (for instance, http://localhost/joomla) and the onw with ZS-CE (for instance, http://localhost:10088/joomla).

Comment Form

About this blog

This is my personal blog about computer programming in PHP for business and passion. I'm Enrico Zimuel a Software Engineer since 1996. I work as Senior Consultant & Architect at Zend Technologies. For more info about me visit my web site.

PHP 5 Zend Certified Engineer Zend Framework Certified Enginner

My next conferences


PHP Barcelona Conference 2010

WebTech Conference 2010
  • Enrico Zimuel: Hi David, unfortunately the i5_spool can manage only strings, no images. If you need to convert comp [...]
  • David Porter: Zimuel, Thanks for the Spool Class and information on using the i5 Toolkit for strong i5/OS inter [...]
  • ninon: Hi!! thanks for your article, it's been so useful to me. I'm novice in zend and I've a doubt. I ha [...]
  • snow boots: Using the Google Maps API you can easly compare the data stored into your database with the google d [...]
  • Enrico Zimuel: To use the ZendAPI_Queue you have to run your PHP application using Zend Platform (http://www.zend.c [...]
follow me on twitter