View Single Post
  #3  
Old 28th August 2012, 23:18
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 395
Thanks: 30
Thanked 58 Times in 50 Posts
Default

Thanks for the post, Mark.

I have not tried it with nginx, only because I have no experience with nginx, and I can't justify the time expenditure at the moment. That said, I'm rather curious how nginx would perform, comparatively.

After a more thorough analysis of the scripts in question, under various PHP modes, I am beginning to think that the issue is simply "to be expected" when using PHP in CGI mode.

While the CSS and JS wrapper scripts respond much slower under CGI than they do under ModPHP, the overall page-load times don't vary nearly as much, proportionately (due to asynchronicity).

Ultimately, I concluded that the overhead associated with operating in CGI mode is responsible for the considerable response-time difference.

Here's the short version of the page-load-time benchmarks that I performed in a relatively isolated environment:

Code:
	Mod-PHP	CGI	suPHP	Fast-CGI
	1.3	1.56	1.41	1.87
	1.26	1.36	1.72	1.82
	1.17	1.72	1.41	1.91
	1.31	1.39	1.37	1.67
	1.28	1.29	1.83	1.79
	1.31	1.48	1.25	1.85
	1.29	1.36	1.36	1.83
	1.35	1.42	1.23	1.77
	1.29	1.55	1.66	1.76
	1.31	1.37	1.68	1.69
Average	1.287	1.45	1.492	1.796
From this data, it's clear that ModPHP offers about 28% better performance than Fast-CGI for the type of application in question.

Some day, I'll update this thread with nginx benchmarks, but for now, I'm forced to change the PHP mode to ModPHP.
Reply With Quote