We present a three stages process that brings up to 50% resource drop and up to 70% speed-up compared to your current Apache setup.

First Step
———-

We analyze a typical request of your site. To display your site the browser first fetches the page that is generated by your PHP application – served off Apache. This page includes many static resources: the browser fetches all of those to display the site. This step goes back to your Apache server that already served your PHP content and serves all static files the same way. This is a perfectly valid way of dealing with static files if your site has a low and continuous traffic pattern. If you deal with peak loads frequently or your average load is more than 50-70 concurrent users per server then Apache becomes a performance bottleneck.

To reduce the work Apache needs to do, we put nginx in for serving static files. Nginx only off loads the heavy lifting of the PHP work to Apache. This way we cut down the memory and CPU usage already by about 30-40% depending of your website.

Now we have to start modifying code as HipHop uses a stripped down version of PHP 5.2. The most important difference is the missing ‘eval’ function.

Second Step
———–

We look into your code base, at the structure of your site and port it to run on the HipHop engine. It is a pretty standard procedure and once done your development cycle will not change a lot. You gain a dramatic change in performance. All changes are compatible with standard PHP.

HipHop takes your PHP code and translates it into C++ which we compile down to a Linux binary. Facebook, probably the largest PHP site in the internet, reduced their computing needs to power the site by nearly 50% by moving to HipHop.

Third Step
———-

Here occurs the biggest customization work but with the biggest rewards. If you use a multi-processor architecture (which you do if you run on bare metal or high spec virtualised servers) then you can parallelise tasks in your programs to run on all the CPUs you have available in parallel.

We will present a custom HipHop version with TBB (Threading Building Blocks) functionality that enables us to run for and while loops in parallel and increase the performance that way.

Depending on the amount of for/while loops in your code and the nature of them and the work they do we can optimize them to run on many CPUs instead of sequentially on one. Your for loops will suddenly be extremely fast.

Our PHP language extensions give you certain data structures and a parallel_for function that is thread save and auto scales to the amount of CPUs in your system. This last step will give you a total of up to 50% resource drop and up to 70% speed-up compared to your Apache setup.

Contact Open Parallel for more information