PHP – Faster And Cheaper. Scale Vertically with IBM Power Systems

September 2, 2009


Get your PHP project done faster and save money by scaling it vertically with IBM Power Systems.

h1. Everyone Knows That…

In the LAMP world you are always told “the only cost effective way to scale is horizontally.” The best article I have ever read about horizontally scaling with MySQL and PHP was from Netlog1. In the article Netlog described a very effective solution they have implemented that allows them to truly horizontally scale. The solution is completely custom written and very complex, with many servers required to support the design. At the time I was very excited about the article as it positively validated a lot of my thoughts on horizontal scaling. Needless to say, getting your application to successful scale horizontally is very complex and a very hotly debated topic.

h1. Enter The 800 Pound Gorilla

Recently I have the opportunity to learn about the IBM Power Systems (i5) line of servers from Mike Pavlak. Mike is one of the main people responsible for bringing PHP to the i5. After that very interesting day with Mike I realized my assumptions about vertical scaling were all wrong. I realized that vertical scaling with the i5 is a great choice and a true alternative to tradition LAMP horizontal scaling.

h1. Simplifying Development

If you’re from the LAMP world, the concept of vertically scaling with a system like the i5 will be a complete revelation. If you follow the vertical scaling methodology, when it comes time to design how your application will scale, there is nothing for you to do.

A company is no longer even required to have expertise needed to know how to scale applications up. This is because with an i5 all your computing power is consolidated into one machine. This includes your entire web server, database and any file system related requirements. Now this doesn’t mean they don’t need to know how to make the application perform well, but some time with a profiler is all that is now needed.

Reduced complexity from the environment gives you simplicity in the application. This reduction in requirements will result in shorter development times and applications of higher quality. This is all because your developers will no longer be handcuffed by the complexities entailed in scaling horizontally.

The following is a quote referring to Google:

bq. An underappreciated advantage of a platform approach is junior developers can quickly and confidently create robust applications on top of the platform. If every project needs to create the same distributed infrastructure wheel you’ll run into difficulty because the people who know how to do this are relatively rare.2

h1. Simplifying Deployment

When working on a timeline for a horizontal scaling design, deployment timelines can become very tricky. The workload of the IT department must be taken into close consideration and can be a very real problem, even a show stopper. They will need time to procure, to setup and to install into the data center the hardware for at least the production environment but likely many other deployment environments like QA and staging. The availability of your IT department could mean your developers ability to be agile and to quickly get new applications into production can be completely undermined.

The i5 tackles these problems by having all these environments on the same machine using virtual machines (VM). Virtualization is a core feature of the i5 architecture and is built right in to the OS. Its menu driven wizards allow you to quickly and easily manage many virtual machines on your i5 without worry of them affecting the performance of your production environments.

h2. “Basically A Huge DB2 Machine”

Something that may not be immediately obvious to you, if you’re not familiar with IBM products, is that in effect, as my college Jess Portnoy has told me, the “i5 is basically a huge DB2 machine”. The DB2 database server is literally embedded in to the i5’s “IBM i” operating system (i5/OS). Now things got even more interesting when in 2007 MySQL said they would be supporting the i5/OS. Not to settle with just running MySQL on the i5, there is also now a DB2 storage engine for MySQL on the i5. With this storage engine, once you’ve created your database in MySQL you will be able to read and write to the data from both MySQL and DB2. What you get in essence is an almost seamless bridge between the two database servers.

h1. Operational Savings

Staffing is one of, if not the biggest cost to any company. With this in mind, consider that Linux is very much a manage-everything-yourself style of system. The i5 on the other hand is the complete opposite. It’s a self-managing, self-healing system with an emphasis on requiring as little attention from your IT department as possible. To illustrate this point, some shops don’t even have a fulltime i5 system administrator and are just using an offsite contractor as needed. The traditional selling point of the i5 which still stands today is that after the initial investment you will quick reap rewards in operational savings.

h1. Conclusion

So when considering the hardware and architecture of your next project, don’t sell yourself short and dismiss vertical scaling. You can have an i5 for under $15,000 that allows you a seamless upgrade path which currently goes up to a 64-way, 2 TB of memory and 381 TB of capacity system.

Vertical scaling may allow you to get your project done quicker and give you operational costs saving that should not be ignored.

1 Database Sharding at Netlog, with MySQL and PHP, Jurriaan Persyn, 02/12/2009 –

2Google Architecture | High Scalability, 11/23/2008, Todd Hoff –


8 Responses to “PHP – Faster And Cheaper. Scale Vertically with IBM Power Systems”

  1. sunichoudhury Says:

    i5 looks like so powerful..thanks a lot for information.

  2. eliwhite Says:

    Drslump and Sam, you are both making some very good points. There is definitely room for both types of scaling, and each has their drawbacks and benefits.

    I don’t want to take sides, but having had some experience with this (with horizontal scaling at Digg, and vertical scaling at Hubble), I think I can point out a few things.

    First of all, they are not mutually exclusive, and benefits can be gained from combining them. So in the case that Drslump mentions of needing multiple data centers for ‘local’ copies. That’s still easy to do with vertical scaling, it’s just putting a separate ‘big server’ in each location, instead of needing to setup a complete farm at each location. For in the end, the problems you will encounter and need to fix with the ‘multiple data center’ setup, are different actually from the ‘horizontal scaling’ solutions. Since your typical 95% of websites out there horizontal scaling, still makes assumptions about having local databases, not needing to deal with minutes-worth of lag, etc.

    Oh, I also wanted to point out, that actually the ‘rollout’ solution can be very simple with vertical scaling (be it IBM or Sun). As Drslump points out, the idea of rolling to ‘some’ of your servers in a progressive way is possible, and a nice way to handle it; however, it IS a very complicated thing to do and do correctly without causing interruption. It’s why many websites still go ahead and do a down page for 30 minutes while they handle it instead.

    This can be made rather easy using virtualization on the big machines. As you can create another virtual machine, and roll your new code into it, and start testing it, make sure that it is 100% solid and ready to go. And then, at the flick of a switch, start using the new virtual machine instead of the original one, and suddenly the new website is instantly available with zero downtime.

    I admit I don’t know the specific details on doing this on IBM, but I’ve seen it done on Sun hardware w/ virtualization, and it’s rather spiffy.

    Again, not saying one is better than the other. I give a regular talk on horizontal scaling and am a great proponent in it for the fact that you can start with a $1k machine, and keep growing. But I do see where some benefits could be gained from doing the vertical scaling. And having done it at Hubble, it was nice to have a single (or couple, as the case was) machines to admin, versus hundreds/thousands.

  3. drslump Says:

    I agree in that having a hardware as powerful as the IBM power models has its advantages. What I disagree is with what you describe as "vertical scaling", it’s beyond the hardware, an application which is designed to scale "horizontally" can solve some common web problems more easily.

    Even if IBM’s power servers have redundancy built at the hardware level they are still vulnerable to external disruptions (electricity break for example). Also, being a single machine it’s not possible to distribute serves geographically for better response times.

    Another common problem with web sites/applications is new releases. It’s not about having an staging environment for QA testing. At some point you need to roll out the new release live, having several servers allows to do this operation progressively without interrupting your visitors (although this is a complex operation).

    So, what I’m trying to say is that even if you deploy on a single monstrous server (like IBM’s) to "save" operating costs, the application should be designed to scale horizontally.

    I do see the value of these servers however for applications at intranets or extranets, where the number of users can be much more easily calculated and known in advance. Even for some public web site applications, like banking sites, they offer a good solution since their user base is not going to explode from one day to the next.

  4. samhennessy Says:

    Hi bmharris,
    You totally right, in theoretical terms one server will always only get you so far. A good way to think about this is to look at Twitter. Twitter didn’t have a good plan on how they would scale to the size it is today. The didn’t know if anyone would even use it, they cared more about getting it out there and see what people thought.

    It’s possible to think that, let’s say they had originally deployed onto a low end IBM Power system. They stared to realize they how big they were going to be. They call up IBM say "ship me a big one please". They would copy the system over to the new hardware without touching a single setting or line of code. Now they have a ton more capacity, this would have brought them a lot of time to get a new system together with and I’m sure many less fail wales.

    So it’s not really about technical superiority just business choices.

  5. samhennessy Says:

    Hi drslump,
    Thanks for taking the time to comment.

    Before I respond to your questions, I just want to say that when you say horizontal scaling, "for web projects, it’s the best fit", your talking about a general rule of thumb. What I’m trying to get at is, while it may be the best fit most of the time, vertical scaling may be a better fit some of the time.

    Really what I hope to accomplish by this article is just to show people that vertical scaling is even an option in the first place. Not that vertical scaling is better than horizontal scaling.

    "What happens when you reach the limit of the server?"
    So we’re talking about the situation where you have more traffic than a single IBM i5 can handle. Dose this mean you need to switch to a commodity-server horizontal scaling model? Maybe, maybe not, every situation is different. As sites get bigger and bigger you often have to change the design, that’s true no matter what scaling model you choose. It could be said that a handful of IBM servers is still easier to manage than thousands of commodity servers.

    "What happens when your servers breaks for whatever reason?"
    We’re talking about IBM systems here, so it’s different to what you are used to thinking about. The hardware it’s self is designed to be internally redundant. They are trying to create systems that never go down. Which by the way is better than what you get in horizontal scaling where your application has to have tolerance for the expected case when a system does and will often go down.

    Here is a cool video that goes into some of the technical details around how the IBM Power hardware works:

    "What happens when you have to roll a new release?"
    So the IBM systems are designed with virtualization in mind. They want you to be able to replace a whole bunch of servers with just one IBM system. So you will be able to create individual and separate spaces for you dev, QA, stage and production environments all on one server.

    As a final note, I’m not trying to sell you on IBM. I just want you to have an extra hammer in the toolbox for when those awkward projects come up. Also it’s key to note that vertical scaling with an IBM system is not like vertical scaling with just any system, it’s a very interesting product they have and well worth your time investigating.

  6. bmharris Says:

    Sounds interesting, but not really revolutionary. Maybe I’m missing something, but sooner or later you’re always going to hit the limits of your CPU, memory, file system, OS, etc. At that point I don’t see how vertical scaling actually "scales".

  7. drslump Says:

    What happens when you reach the limit of the server?
    What happens when your servers breaks for whatever reason?
    What happens when you have to roll a new release?

    An "horizontal" design not only helps scaling but also solve some common problems like the ones above. It may require a little more thought at the design phase but in my opinion, and for web projects, it’s the best fit.

  8. anumanbalam Says:

    This sounds incredibly powerful.