Author |
|
jfha73
Joined: 18 Aug 2011 Posts: 62 Location: New York
|
Posted: Tue 10 Sep '13 20:50 Post subject: True or False? Is Apache slower than IIS on Windows |
|
|
Is Apache slower than IIS on Windows?
According to a post in PHP-WINDOWS@lists.php.net
=====
On all bench i've made so far, IIS is always faster and more stable than apache on windows. (On heavy load tests I easily crash apache where IIS is fine)
=====
In my case I have never had any problems with Apache on Windows, but I don't want to go there saying this guy is a liar.
Thanks, |
|
Back to top |
|
raleighinsider
Joined: 11 Sep 2013 Posts: 1 Location: Cary
|
Posted: Wed 11 Sep '13 13:53 Post subject: |
|
|
@jfha73, Yes, I think you're almost right at this point. Thanks. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 11 Sep '13 15:34 Post subject: |
|
|
YES AND NO
Depends what are you doing with apache or IIS. A well configured apache can be even faster than IIS. For example with a very minimal config to serv static files or as pure reverse proxy and or load balancer. There is a german saying : "Nerver trust any statistic unless you faked it yourself".
it really depends what are you doing with your apache.
Think about this page for example. Many accesses on the forum and a massive load from the downloads and the best thing it runs on windows for 10+ years. Did you notice ever a lagging? I didn't!
At the end it is more a religious war Chose the server you can configure best for your needs and so on. |
|
Back to top |
|
jfha73
Joined: 18 Aug 2011 Posts: 62 Location: New York
|
Posted: Wed 11 Sep '13 15:44 Post subject: |
|
|
All I use it for is to run an intranet CMS and a Ticket System for our IT department, all in PHP.
Do you or anybody have a apache tunning document to help me tune my apache running PHP as module (NOT CGI) to see if I can make PHP runs faster?
Thanks. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 13 Sep '13 10:49 Post subject: |
|
|
benchmark your php code. if the generation is 0.1 second or faster than for each side and you may think of the weight from your page + content.
if the generation is slower than you should buy a faster CPU or put many hours in optimizing your code. Also make sure you have a good internet connection for the server.
Even if you don't like cgi, but apache with mod_fcgid ca accelerate the speed of your page if you have 2 or more CPU cores since the than PHP can make use of several cores.
if still too slow you should think of load balancing. |
|
Back to top |
|
admin Site Admin
Joined: 15 Oct 2005 Posts: 692
|
Posted: Sun 15 Sep '13 20:09 Post subject: |
|
|
We had to restore a backup.
Reply from jfha73 and James Blond lost, trying to restore.
Sorry
Edit: James Blond posted it again, see below, thanks James
Last edited by admin on Sun 15 Sep '13 20:54; edited 1 time in total |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Sun 15 Sep '13 20:18 Post subject: |
|
|
I had it luckily in cache ;D
Quote: |
I appreciate your comments, but I just found that the issue is not Apache, but Windows, I just tried Windows Server 2012 and it works a lot faster than 2008 R2.
The benchmark script I'm using in 2008 R2 scores almost 30 seconds while fcgi scored about 4 seconds, now the same configuration (Windows Server 2012 with Apache running PHP as module) gave me about 4 seconds which is the same that fcgi was giving me in 2008 R2.
Damn M$ and their Windows.
Also, the reason why I don't like fcgi is because of this warning posted in php site:
Quote: |
A server deployed in CGI mode is open to several possible vulnerabilities. Please read our CGI security section to learn how to defend yourself from such attacks.
|
and I rather be slow and safe than fast and open to possible vulnerabilities.
|
All my servers, Windows and Linux run over fcgid and it as secure as the script that run on it. I never had an issue with it. You are welcome to ask other here in the forum whow they think about the security of running PHP over fcgid. |
|
Back to top |
|