You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by io...@comcast.net on 2003/07/30 08:06:40 UTC

[users@httpd] Apache 2.0.43 rather slow in Windows

I've found Apache 2 relatively slow in delivering static html. I have
tested it across multiple Windows 2000 machines with similar results.
I have compared it against a Windows port of thttpd, IIS 5, and IIS 6.

I am just wondering if someone can tell me, from experience, some
showstopper patch or configuration which makes Apache perform as expected.

Right now it gets a curious 161 pages per second, while IIS gets 1061 (just
add a zero somewhere) and thttpd gets 460. I am running a fairly default
httpd.conf. These numbers are from an Athlon 700 and I expect I should get
at least double the speed from Apache. At some users' suggestion I have
performed some tweaks to httpd.conf and only made performance worse, proving
the default configuration was better.

Any suggestions? I want to see Apache perform this test well, I don't want
to be told to upgrade my hardware or similar. Just my usual disclaimer.

-Tomi


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.0.43 rather slow in Windows

Posted by Timothy Stone <ci...@petmystone.com>.
Joshua touched on several points here that deserve expansion upon:

> It depends entirely on the type of dynamic file.  In general, IIS is going
> to be faster than apache since it is essentially a kernel-embedded HTTP
> server.  But for many (if not most) types of content and networks, the
> difference will be irrelevant since the limiting factors will be network
> and dynamic content generation speed.

Most dynamic developers, esp. JSP/Servlet, will tell you that Apache is 
'da bomb' for static delivery. Out of the box, Apache *will not* serve 
dynamic content, any dynamic content, relying on modules to serve PERL, 
PHP and the like. Apache must be connected to a Servlet/JSP container, 
i.e. Tomcat, for Java delivery, and the variations go on.

Additionally, as Joshua points out, your benchmarking is flawed and 
unfair. Because IIS is essentially a kernel embedded HTTP server, the 
performance marks are going to skew heavily in IIS's favor.

Steven J. Vaughan-Nichols points out in his /Shutdown/ piece for this 
month's /Linux Magazine/, "Server 2003 does, however, have two 
advantages over enterprise-quality Linux distros like RHES and 
UnitedLinux. It's much faster at both file and web page delivery. No, 
that's not FUD, those are the facts."

SJVN cites the many reasons why, but the gist is that IIS (in W2K and 
W2k3 is assisted by, or part of, the kernel. It's just going to be 
ass-faster than Apache because Apache isn't assisted by tricks in the 
kernel. SJNV points out TUX, a kernel-assisted HTTP server runs 
neck-and-neck with IIS. SJVN's article isn't going to be public for 3 
months :( /L-M/ policy to hook circulation and subscribers. But it's 
commentary not HOW-TO anyway.

Tim


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.0.43 rather slow in Windows

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 30 Jul 2003 io219@comcast.net wrote:

>
> --> Wednesday, July 30, 2003, 9:02:28 AM, you wrote:
>
> > On Wed, 30 Jul 2003 io219@comcast.net wrote:
> >> Right now it gets a curious 161 pages per second, while IIS gets 1061 (just
>
> > Second, I would not expect apache to perform as well as IIS on static
> > files, but I agree that the performance you are seeing seems low.
>
> Would you expect it to perform as well as IIS on dynamic files?

It depends entirely on the type of dynamic file.  In general, IIS is going
to be faster than apache since it is essentially a kernel-embedded HTTP
server.  But for many (if not most) types of content and networks, the
difference will be irrelevant since the limiting factors will be network
and dynamic content generation speed.

> > Some things to think about:
>
> > 1. You should be using the most recent version of apache, not a several
> > release old one.
>
> I'll try to get a more recent version when I have time to spend two days
> finding the external modules which work with that specific micro-version.
> I don't know if this is just a Windows only problem, but I hate it.

Versions greater than 2.0.41 have a compatible module API, so you should
be able to upgrade without changing modules.

> > 2. The setting of ThreadsPerChild will be very important.  It must be
> > adjusted to your load and hardware.  If you have spare processor and
> > memory, you should be raising this.
>
> I lowered it once I understood it, but it had no great effect on benchmark.
> MaxRequestsPerChild has a drastic effect, but I find the default of 0,
> unlimited, gives the same performance as setting it very large.

Did you try raising ThreadsPerChild?

> > 5. There is a bunch of performance advice at
> > http://httpd.apache.org/docs-2.0/misc/perf-tuning.html
>
> Perfect, this helped me find something truly important:
>
> AllowOverride None, I had it to All. Upon changing that line, the benchmark
> score for Apache went from 161 to 365. Still slower than the thttpd port at
> 460, and IIS at 1061, but it is much better than before.
>
> I will upgrade to the latest micro-version of Apache, but I doubt it will
> change anything. If it DOES change anything, I will report back here.
>
> Any other ideas? I think I will bechmark from Linux today on this machine.

The other obvious one would be mod_cache+mod_mem_cache.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.0.43 rather slow in Windows

Posted by io...@comcast.net.
--> Wednesday, July 30, 2003, 9:02:28 AM, you wrote:

> On Wed, 30 Jul 2003 io219@comcast.net wrote:
>> Right now it gets a curious 161 pages per second, while IIS gets 1061 (just

> Second, I would not expect apache to perform as well as IIS on static
> files, but I agree that the performance you are seeing seems low.

Would you expect it to perform as well as IIS on dynamic files?

> Some things to think about:

> 1. You should be using the most recent version of apache, not a several
> release old one.

I'll try to get a more recent version when I have time to spend two days
finding the external modules which work with that specific micro-version.
I don't know if this is just a Windows only problem, but I hate it.

> 2. The setting of ThreadsPerChild will be very important.  It must be
> adjusted to your load and hardware.  If you have spare processor and
> memory, you should be raising this.

I lowered it once I understood it, but it had no great effect on benchmark.
MaxRequestsPerChild has a drastic effect, but I find the default of 0,
unlimited, gives the same performance as setting it very large.

> 4. You can set up mod_status and look at the server-status page to see
> what the apache child threads are up to.

Awesome, I love it, surprisingly ExtendedStatus doesn't hurt performance.

> 5. There is a bunch of performance advice at
> http://httpd.apache.org/docs-2.0/misc/perf-tuning.html

Perfect, this helped me find something truly important:

AllowOverride None, I had it to All. Upon changing that line, the benchmark
score for Apache went from 161 to 365. Still slower than the thttpd port at
460, and IIS at 1061, but it is much better than before.

I will upgrade to the latest micro-version of Apache, but I doubt it will
change anything. If it DOES change anything, I will report back here.

Any other ideas? I think I will bechmark from Linux today on this machine.

-Tomi


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.0.43 rather slow in Windows

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 30 Jul 2003 io219@comcast.net wrote:
> Right now it gets a curious 161 pages per second, while IIS gets 1061 (just
> add a zero somewhere) and thttpd gets 460. I am running a fairly default
> httpd.conf. These numbers are from an Athlon 700 and I expect I should get
> at least double the speed from Apache. At some users' suggestion I have
> performed some tweaks to httpd.conf and only made performance worse, proving
> the default configuration was better.
>
> Any suggestions? I want to see Apache perform this test well, I don't want
> to be told to upgrade my hardware or similar. Just my usual disclaimer.

I'll preface this by saying that I'm not very familiar with performance
tuning on win32.

Second, I would not expect apache to perform as well as IIS on static
files, but I agree that the performance you are seeing seems low.

On the other hand, without knowing quite a bit more about your situation
and load characteristics, it is hard to tell much at all.  For example, I
hope you aren't testing over the loopback.  That is pretty much useless as
a real world measure.

Some things to think about:

1. You should be using the most recent version of apache, not a several
release old one.

2. The setting of ThreadsPerChild will be very important.  It must be
adjusted to your load and hardware.  If you have spare processor and
memory, you should be raising this.

3. Depending on how you are testing, you may get better performance
with "KeepAlive Off" or by lowering KeepAliveTimeout.

4. You can set up mod_status and look at the server-status page to see
what the apache child threads are up to.

5. There is a bunch of performance advice at
http://httpd.apache.org/docs-2.0/misc/perf-tuning.html


Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org