View RSS Feed

im the :amr:

php & apache: Windows Versus Ubuntu

Rate this Entry
by , 01-29-2009 at 09:00 PM (1293 Views)
its pretty clear from the title that this log is about the performance of apache on windows versus ubuntu (distribution of linux).


i was exploring the bin folder of apache the other day and i found some .exe s that i havnt used before, one of them was the "ab" ApacheBenchmark; a tool used to benchmark a certain site (localhost or www) by sending multiple requests. and as a new uuntu users i found it funny to try this today on both OSs.

The PHP Script:

the script wasnt very complicated, it just prints a table counting from zero to 200, the document size was small enough.

heres the code:



The Results:

as you expected linux won, but with huge diffrence see for yourself





the diffrence was really big, as you can see the longest request on ubuntu is far shorter than the smallest request on windows. i was so amazed from the results that i had to do the test again on windows without keeping the "explorer.exe" running in the background(which is displayed above)

*

Without PHP

as jordan suggested i benchmarked again with .html files only, i saved the same page with the same size as .html and did the ab on oth windows and ubuntu heres the results

*

on Windows





on ubuntu:



the results:

the results are really funny, not using pp would make the request time much shorter i guess windows is an exception here, the smalles request is exactly the same as before (109), the longest request decreased a little bit.

for ubuntu, the request time almost decreased to half with the shortest request of 12 ms(with php it was 23)

-this might mean that php runs faster on windows (yet apache doesnt)

thats really wierd and confusing

Submit "php & apache: Windows Versus Ubuntu" to Digg Submit "php & apache: Windows Versus Ubuntu" to del.icio.us Submit "php & apache: Windows Versus Ubuntu" to StumbleUpon Submit "php & apache: Windows Versus Ubuntu" to Google

Tags: None Add / Edit Tags
Categories
Uncategorized

Comments

  1. WingedPanther's Avatar
    Now you see why Linux is used as the webserver for so many companies :)
  2. Jordan's Avatar
    Excellent benchmark. You can really tell the difference! I wonder if the difference lies in Apache serving the PHP on Windows or if PHP is slower on Windows.
  3. amrosama's Avatar
    shall i repeat the test with only .html files?
  4. Jordan's Avatar
    I think that would be a great idea.
  5. amrosama's Avatar
    thnx for the advice, i updated it
  6. WingedPanther's Avatar
    I suspect there is something else going on with Windows. I suspect the timing may be incorrect, or there are other factors causing delays in serving the requests. I also wonder if Windows is just not allowing Apache to run as efficiently in general.