0

Can someone provide references / guidelines on how much server (memory/CPU) an installation of vanilla PHP would require for a given workload ?

I've been looking at the Amazon EC2 instance sizes http://aws.amazon.com/ec2/#instance and it made me realise that I don't really know how much hardware you need to serve X pages/hour using PHP.

I realise of course this is heavily dependent upon what the page is doing but I'd be interested to see any numbers which give some guidance on how much you can expect from a given machine setup (and maybe some of those smaller setups wouldn't even allow PHP to start ?)

My assumptions would be - only PHP+nginx on machine (no database) until the workload reaches a point where some caching in front of PHP would actually allow for a smaller machine for a given workload than would otherwise be the case.

glaucon
  • 243
  • 1
  • 6
  • 16

2 Answers2

1

As you say yourself, it is extremely tricky to give reliable advice for this sort of thing. I have worked in the past for an e-commerce company where the site served 500k+ pages per day, and it ran off 2 x web server, with single core CPU and 1GB of RAM each. Some of these pages did do quite heavy processing, as you can imagine for an e-commerce site.

I would start out with the smallest of the standard instances and then put some monitoring in place to see how the instance is holding up to pressure, e.g. mrtg or nagios for generic performance data and awstats or similar to analyze the traffic.

wolfgangsz
  • 8,767
  • 3
  • 29
  • 34
  • thanks for your comments and sharing your experience. I'll do as you say about trying out. Out of interest did you have a solid reason for saying 'smallest of the standard instances' rather than consider the Micro instance ? I mean I apprecate the Micros are pretty small - just interested to know what you're thinking was there. – glaucon May 27 '11 at 00:46
  • The micro instances will run nginx and php just fine, especially if you don't run a gui (and this is a remotely controlled web server, so you don't need one). Your post sounded like this was for a commercial app and in that case the micro instance would probably run out of steam quite soon. – wolfgangsz May 27 '11 at 08:34
  • Thanks again for your comment. You're quite right it is (eventually) for commercial use but I was just curious to hear your thinking on the micro instances. Regards. – glaucon May 28 '11 at 09:01
0

This isn't truly an answer to my question but I think it's sufficiently useful that it should be included in this thread for others to see in the future. It's a guide to using nginx and apache in combination to squeeze the most out of a small machine and I hope it will be useful to somebody.

http://markmaunder.com/2009/how-to-handle-1000s-of-concurrent-users-on-a-360mb-vps/

glaucon
  • 243
  • 1
  • 6
  • 16