An Example of How Node.js is Faster Than PHP – Part 2

In my previous post I installed and configured Ghost (a node.js based blogging platform) and WordPress (a PHP based blogging platform and CMS). The purpose of that blog post was to test relative performance of the 2 platforms to see which one could handle more load. The test doesn’t compare like code between node.js and PHP, but instead was designed to understand what platform was faster from a basic blog functionality standpoint.

The result of the first set of tests was that Ghost was 678% faster than WordPress in their “out of the box” configurations. The test and results spurred a lot of interesting dialogue with many people requesting another test where an opcode cache was in place for WordPress. So that is exactly what this next blog post is about.

The Setup

I fired up the exact servers that I had used in my last round of testing so I have the same configuration as in my original blog post. For this set of tests I stuck with Apache as the web server for both Ghost and WordPress. I also added APC opcode cache by following the instructions in this blog post. It was pretty easy and painless getting APC installed and functional and it definitely made a nice difference in the performance of WordPress.

The Results

As before, I used Siege to apply load to the platforms. As a reminder of our WordPress baseline I ran a load test on Apache + WordPress first without the APC opcode cache. Those results are shown below.


Apache+Wordpress under heavy load.


CPU utilization during Apache + WordPress load test.

This load test resulted in 100% CPU utilization just as we had seen in my last blog post. I load tested Apache + Ghost again so that we could compare the base configurations and those results are shown below.


Apache + Ghost heavy load test results.


CPU utilization during Apache + Ghost heavy load test.

As expected Ghost had a much higher transactional throughput ~654% more than WordPress. So now came the real fun. Configure PHP to use APC, restart Apache, and restart the load test. Those results are shown below.


Apache + WordPress + APC heavy load test results.

Much better results for WordPress this time with ~159% improvement in throughput over WordPress without an opcode cache. Transaction response times were also much better showing with ~70% reduction in shortest response time and ~63 percent reduction in longest response time. That’s a nice performance gain for a small bit of work installing and configuring APC. I have included a couple of screenshots for those who are curious about key cache metrics (notice the high cache hit rate)…

APC Cache Info

APC Cache Hit Rate

While the improvement to WordPress was admirable the fact still remains that Ghost handled the load way better than WordPress. The results of this test show Ghost with a ~190% lead over WordPress when it comes to total throughput, ~51% faster for shortest response time, and ~80% faster for the longest response time.

It’s worth mentioning that the CPU load did not decrease while using the opcode cache during this test. Utilization stayed pegged at 100% for the duration of the test even though throughput and responsiveness improved.

What about lighter loading?

It’s also interesting to understand the difference in platform response time under light loading conditions. The following screen shots all show loads of 10 concurrent users in batches that are spaced 5 seconds apart. The combination of Apache and Ghost is just flat out fast and sets the bar for transaction response time with .01 seconds for the fastest transaction and .07 seconds for the slowest transaction.


Apache + Ghost light load test results.

Apache and WordPress without any opcode cache (shown below) is respectably fast coming in at .20 seconds for the fastest transaction and .66 seconds for the slowest. That is 1900% and 842% worse than Ghost respectively. The percentages are high but the reality is that the page loads are still fast.


Apache + WordPress light load test results.

Adding the APC opcode cache to the Apache and WordPress combination clearly makes pages load faster even under light load. You can see below that the fastest transaction took .07 seconds and the slowest took .25 seconds. That’s a very nice improvement in speed. It’s still considerably slower than Ghost response times but at these speeds nobody will notice the difference.


Apache + WordPress + APC light load test results.


One of the major difference between these two platforms is that Ghost was designed to be just a blogging platform so it is not bloated like WordPress is these days. I love the functionality that WordPress offers but as far as plain old blogging platforms go I think Ghost is going to be pretty tough to beat if you need a high throughput platform.

No matter what programming language is used on a project there will always be good code and bad code. By that I mean code that is efficient and effective (good) versus code that is resource heavy and potentially buggy (bad). If your application isn’t performing the way you want it or the way the business needs it to, then you should try installing AppDynamics for free and figure out what the problems are.

You’re costing your company millions with all of your hard work.

Failure to take action is costing your company millions in lost revenue and is hurting your personal life. Sometimes we are so busy putting out application fires and just keeping the lights on that we don’t think we have the time to tackle “yet another project”. Even when we know for sure that this new project will save us tons of time in the future we still have other high priority items to work on.

Testing new enterprise software tools used to be really difficult. Dedicating the time and resources to running a proper proof of concept (POC) or proof of value (POV) as we like to call it, was making a huge commitment (potentially months). Times have changed and AppDynamics is re-defining the enterprise software market.

App Fires To DoWhen you want to trial consumer grade software like Adobe Photoshop, or the latest greatest anti-virus software, or maybe even tax software all you need to do is download, install, and take a short tutorial on the important features. Well that’s the way AppDynamics works too. Wait, what? Enterprise software that is easy to install, easy to use, and just works is going to save you time and money? I’m serious and I’ll prove it to you.

The Cost of the Status Quo

Before we jump into the details of exactly how easy AppDynamics is to set up and use let’s take a look at what it really costs you to not invest a small amount of time and effort into changing things for the better. If you’re reading this you probably have issues with applications that consume a lot of work and home time.

I know when I was in production support I was always getting roped into conference calls because some application was broken or slow. I would get paged in the middle of the night for the exact same types of issues regardless of whether or not the problem was within my sphere of influence. The simple fact was that my work time and home time were being consumed by application problems that had nothing to do with me but since nobody knew where the problem was it was “all hands on deck”.

Skip ahead a few years and I was almost never getting brought onto conference calls that had nothing to do with my application components because we invested our time in finding a solution that would isolate the problematic component so that the proper people could fix it right away. I had my work time back to do my real job and I had my personal time back to do whatever I wanted.

I think Chris Tiwald from Conductor said it best when talking about how AppDynamics has impacted his organization… “The time that AppDynamics saves us gives us back development time, makes us more agile, and lets us better serve our customers. One of our biggest differentiators from our competitors is our rate of innovation, and AppDynamics has allowed us to accelerate that even more.”

Let’s take a look at a real example from AppDynamics customer The image below is the ROI study that Edmunds performed after seeing the benefits of using AppDynamics. As you can see, the time spent fixing application problems was a major issue for Edmunds before they brought in AppDynamics. Conservative observations of problem and defect resolution using AppDynamics proved to be at least 45% and 35% faster respectively. This cost benefit alone is staggering but the time saving is invaluable when you have your actual job to still keep up with.

Edmunds ROI

Click image to see the entire case study.

It’s way easier than you think.

Did you know that when most companies take a free trial of AppDynamics software they are up and running that same day? Typically it takes less than 3 hours to see the value that AppDynamics provides.

If one day of testing out a new Application Performance Monitoring tool could lead you to reducing your mean time to repair by 45% like it did for, do you think it would be time well spent?

Ryan Jairam from Fox News went from constantly fighting fires to having some weeks with NO trouble tickets: “We used to have six or seven support tickets a day about our applications. Now we only have one or two per week, if any, and 99% of those are user error. We’ve had weeks where we don’t have any.”

Jairam also summed up the whole point of this blog post in one statement: “It’s been a complete night-and-day difference here with AppDynamics. Now we have time to focus on new things and not just fight fires all day.”

Hard work should be rewarded. Why not take a little time to reward yourself by testing the latest monitoring technology and seeing how much better it can make your work life. You’ll probably even get back a bunch of time for your personal life, and who doesn’t need more of that?

Click here to get started with your free trial of AppDynamics today.