Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for free/low cost ways to make PHP running on our Unix Solaris servers (under Apache) more scalable and reliable. Do you recommend the free version of the Zend Server? Are there other solutions?

This is for a site that on occasion receives over 2 million hits per day with 10GB of data transfer in the same period. Thanks.

share|improve this question
You should quantify "reliable," and you need to figure out why it's not reliable before you start looking for something that will address that problem. – jgoldschrafe Nov 4 '10 at 14:45
up vote 2 down vote accepted

That depends on your current bottleneck and the current behaviour of the PHP.

  • If your PHP scripts are fairly small, respond fast and do not have any external dependencies (such as SQL queries, in which case the database server could easily be the real bottleneck), you generally don't need any fancy techniques. Properly tuning process limits in httpd.conf and perhaps throwing in an op-code cache such as XCache might be a good idea.

  • If your web site is heavily using database, then proper caching and memcached can be your friends. Do not just blindly install memcached, though -- it becames necessary only under huge load or if your SQL queries are taking a long time, in which case memcached can help a lot. If you have only small databases and SQL queries are always fast, memcached won't help you much, if at all. 2 million hits a day is a nice amount, but for a decent server not huge by any means, unless your site is heavy (or The Daily WTF material :-)) on the resource/code side.

  • Is the content at your site cacheable? Does it provide things like news which changes only occasionally, or is it VERY dynamic, like Facebook? If it is cacheable, consider using a front-end proxy, such as Squid, or if you can afford and your business truly needs it, some hardware solution.

share|improve this answer

If you are not already using an opcode caching system such as Zend, then that would potentially be one big win, but you need to perform some profiling to figure out where the bottleneck is for your platform, in order to choose an appropriate solution.

How much IO is being performed? How busy are the CPUs? What is your memory usage like? Is the site backed by a database? If so, is that DB on the same host? What is the DB host's utilisation like? What bandwidth is there between the web server and DB server? etc.

share|improve this answer

You can consider give APC a try. We recently installed it on a server in our company. The server serves highly loaded website and the result was very good - almost 40% improvement in the load.

About using different solutions: NGINX + PHP-FPM is considered as a good Apache alternative (We are actually using it too in our company and it works very good but I cannot make a full comparison with Apache at this time)

share|improve this answer
Thanks, XViD. What's APC? – Alex Nov 4 '10 at 14:38
It goes for "Alternative PHP Cache" Basically, it optimizes PHP intermediate code and caches data and compiled code from the PHP bytecode compiler in shared memory. Some useful links that can help you understand APC: ##### ##### – XViD Nov 4 '10 at 14:53
Thanks, XViD :) – Alex Nov 4 '10 at 15:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.