I've tried recently to run some benchmarks and I wanted to check something on Windows and I had discovered huge performance differences between basic HTTP web servers on same machine with Linux and Windows.

I've tested several web servers IIS, Apache2, Lighttpd with different clients Apache's ab and my own client and the result was the same (requests per second) id displaying a simple HTML web page (default web server page) of a several hundred bytes size:

           IIS 7.5   Apache 2.2  Lighttpd
Windows    750         800        -
Linux      -         9,300        22,000

I've tried to disable Anti-Virus on Windows but the result hadn't changed.

I don't understand one thing, how on same hardware (i5 2.4GHz 4G) a web server in the most trivial task can't handle same loads.

Even thou I'm "pro-Linux" I still can't get how can it be so different, Both 64 bit latest operating systems (Linux 2.6.35 and Windows 7) but yet the difference of an order of magnitude.


  • OS Windows 7 64 bit pro. Linux Ubuntu 2.6.35
  • HW i5 2.4 GHz, 4GB memory
  • IIS 7.5, Apache 2.2
  • Client ab:
  • Called as ab -c 5 -n 10000


  • What can I miss so I get to huge differences?

Before You Vote To Close:

Note it is a real question as I'm looking for possible factors that can affect such huge (order of magnitude) performance differences as I can't believe that Windows can behave so badly.


migrated from stackoverflow.com Sep 30 '11 at 11:29

This question came from our site for professional and enthusiast programmers.

  • Did you disable all useless services/functions in Windows (not sure that all of them can be stopped) ? – Amine Sep 29 '11 at 20:26
  • That does seem like a too big difference. I wonder if something different is happening at the network level, eg the Windows ab disconnecting and starting a new HTTP connection for each request? – bobince Sep 29 '11 at 20:29
  • fwiw, someone found similar results in an article I read a year or two ago. With a lot of fiddling, they were able to reduce the difference, but not as much as one would be happy with. – Rob Sep 29 '11 at 20:36
  • 4GB of memory seems "low" for a server with Windows7. – Luc M Sep 29 '11 at 20:43
  • 1
    Wouldn't the fact that IIS is on a client OS also influence the results? I don't imagine the default OS networks settings (for example) being set for being a server when running the desktop version. – Rangoric Sep 29 '11 at 21:29

For all responders who suggested to use Windows Server 2008...

It was AniVirus. It was not disabled properly.

Once it was disables the performance improved from 600 req/s to 5000 req/s - not as good as Linux but at least reasonable.


I'd be more interested to see a Comparison with Server R2. Windows 7 shouldn't be running web servers, though I agree the difference in results seems extreme.

  • Not necesarily. Ignore IIS - the TCP stack in 7.0 is having mechanicms to slow down the creation of new TCP connections. – TomTom Oct 1 '11 at 17:17
  • @TomTom I still maintain that it's a pretty irrelevant comparison. Microsoft produce two (essentially) operating systems - one for home use, one for server use. They may be based on the same foundations but they're fundamentally very different operating systems. Ubuntu has completely different design principles which really means you have to compare server functions to Server 2008 R2 and client OS functions to Windows 7. Anything else just doesn't produce any conclusive results in my opinion. – Dan Oct 2 '11 at 14:46

A test you could do to see if it has to do with OS layer or lower would be to re-run the linux test while in a VM sitting on windows 7. If you experience numbers similar, but slightly less, then the original linux it proves Windows 7 is responsible. If you experience numbers similar to Windows 7 you may have a problem with the way windows 7 uses your hardware, potentially a driver issue or similar low level problem.

  • I'm not using VM. This is dual-boot setup – Artyom Sep 30 '11 at 8:53

Tetsting a static page with little to no content while using a limited number of connections is a bad test.

What you want to do is simulate 30+ users accessing pages that are both hitting PHP and MySQL with multiple assets.

In which case you'll see a well configured WAMP (like WampDeveloper, which is what I use) match or outperform a similar LAMP setup.

Under Windows, threads are the prefered mechanism (vs the process based models on Linux).

Make sure you are using PHP as a thread-based module (not FCGI process, though that would work too).

Edit your Apache KeepAlive and MPM settings...


KeepAlive On
KeepAliveTimeout 1


ThreadsPerChild 64
ThreadLimit 64

This will set up about 64 threads, each keeping to the same client for about 1 second.

ab -c 32 -n 10000

  • Have I talked about PHP? Have I been talking about Sql? I've been talking about something very basic - at OS level HTTP client server that worked badly on Windows 7. – Artyom Oct 20 '11 at 19:29
  • @Artyom, my fault for mis-understanding the premises of your question. – rightstuff Oct 20 '11 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.