[PHP] PHP app Server Load
Hi, This is slightly OT... We're wrapping up a new PHP/MySQL driven web site built on the Zend Framework. We're anticipating a couple hundred thousand members with several thousand of them coming to the site at once. I'm trying to figure out how to determine how many servers we need to support the load. I've done initial testing on a Xeon 3220 server, but we're looking at an i7 cpu based server now. Anyone know a good way to estimate load based on actually numbers compared to benchmark results from intel on a faster server? -- -Dan Joseph www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month. Promo Code NEWTHINGS for 10% off initial order http://www.facebook.com/canishosting http://www.facebook.com/originalpoetry
Re: [PHP] PHP app Server Load
On Tue, Jun 8, 2010 at 12:12, Dan Joseph dmjos...@gmail.com wrote: Anyone know a good way to estimate load based on actually numbers compared to benchmark results from intel on a faster server? Run a DDoS-style (but not legitimate DDoS attack) load-balance simulator against your site and see where the bottlenecks lie. The biggest problems are general filesystem writes (including sessions) and database queries. If you have multiple servers from which you can run test scripts, do that (preferrably from various networks). If not, do what you can with what you have. Make sure your testing system simulates the traffic in the manner you expect (clicking links before the page fully loads, closing the connection and immediately refreshing it, et cetera). Tools of the trade: top/htop (for general system process watching) mtop (for MySQL) mod-top (for PHP process watching) apachetop (for Apache) And invaluable things to remember with regard to MySQL: The 'log-slow-queries' option The SQL statement: SHOW PROCESSLIST; -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ We now offer SAME-DAY SETUP on a new line of servers! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP app Server Load
On Tue, Jun 8, 2010 at 12:19 PM, Daniel Brown danbr...@php.net wrote: On Tue, Jun 8, 2010 at 12:12, Dan Joseph dmjos...@gmail.com wrote: Anyone know a good way to estimate load based on actually numbers compared to benchmark results from intel on a faster server? Run a DDoS-style (but not legitimate DDoS attack) load-balance simulator against your site and see where the bottlenecks lie. The biggest problems are general filesystem writes (including sessions) and database queries. If you have multiple servers from which you can run test scripts, do that (preferrably from various networks). If not, do what you can with what you have. Make sure your testing system simulates the traffic in the manner you expect (clicking links before the page fully loads, closing the connection and immediately refreshing it, et cetera). Tools of the trade: top/htop (for general system process watching) mtop (for MySQL) mod-top (for PHP process watching) apachetop (for Apache) And invaluable things to remember with regard to MySQL: The 'log-slow-queries' option The SQL statement: SHOW PROCESSLIST; -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ We now offer SAME-DAY SETUP on a new line of servers! Thanks, some of those I wasn't aware of. I've got them setup now and I'm going to try and test on the server I have again. As for estimating how things would run on a better server. There are benchmarks that score the CPUs. Let's say one scored 5500, and one scored 1100, is it safe to say the higher one can handle 5x the load? -- -Dan Joseph www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month. Promo Code NEWTHINGS for 10% off initial order http://www.facebook.com/canishosting http://www.facebook.com/originalpoetry
Re: [PHP] PHP app Server Load
On Tue, Jun 8, 2010 at 13:29, Dan Joseph dmjos...@gmail.com wrote: As for estimating how things would run on a better server. There are benchmarks that score the CPUs. Let's say one scored 5500, and one scored 1100, is it safe to say the higher one can handle 5x the load? Very, very loosely, yes. Keep in mind that multiple things directly affect CPU performance, including disk speed and block size, RAM availability and speed, motherboard speed, kernel tuning, operating system and environment, optimally-compiled code, et cetera. So while one may bench five times the other, a realistic expectation may be somewhere in the three to 3.5x mark. Some of the servers we've been selling a lot of lately are high-cache quad-core Xeon's with 12GB RAM. Should be sufficient to handle a decent amount of load but we used one as a demo machine last month during a conference presentation for a subject very similar to this, and showed that the larger machine with poor handling and configuration could be outdone by a dual-core Celeron with 4GB RAM with the same amount of stress. Things like poor coding, using 32-bit binaries on a 64-bit capable system, compiling generically instead of specifically for the target architecture, keeping the system updated, not compiling in unnecessary options (read: don't bloat your binaries), having sufficient scratch disk space, and so forth. It sounds daunting, but it's really not. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ We now offer SAME-DAY SETUP on a new line of servers! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php