Page 1 of 1

PHP & MySQL - Linux or Windows.

Posted: Fri Apr 07, 2006 8:32 am
by rhunt
I am planning to deploy a PHP / MySQL solution very soon. Each product will reside on its on server (one web and one database server). I have been advised by just about every hosting company I have talked to to use Linux as the OS for both servers for performance reasons. Unfortunately, my IT staff (we and one other guy) are Windows guys without any knowledge whatsoever of Linux.

So, my selection becomes a bit of a balancing act. Aside from the inherent advantages that Linux and Windows each provide as an OS, what will be the performance implication of each?

If Linux only offers a 5% performance boost, this is hardly worth introducing an unknown into our operation. However, if we are talking about 30%, it might be worth picking up several books.

Any and all oppinions would be appreciated. Empiracle data would be great however anecdotal information would be great too.

Thanks in advance.

Ryan

Posted: Fri Apr 07, 2006 8:44 am
by feyd
In my experience the speed difference is largely configuration dependent. However, with the exact same configuration on both (as closely as possible anyways,) I believe Linux will edge out far lower CPU utilization (like 2% vs 15%) for an "average" script with a "decent" user load. Average script being, lets say 15 queries and some various other "administrative" operations and calculations; decent user load being say 50-100 users actively browsing.

Posted: Fri Apr 07, 2006 9:37 am
by rhunt
Feyd, thanks for the response. That is great info. I'm curious whether your scenerio was based on PHP and MySQL both running on the same machine or separate. I'm curious whether the CPU difference is attributed mainly to PHP, MySQL, or both.

Thanks

Ryan

Posted: Fri Apr 07, 2006 9:41 am
by feyd
the performance is mostly due to efficiencies in the OS in how it was built and how many other services are running that aren't being used, but do use resources (memory and cpu)

Posted: Fri Apr 07, 2006 9:50 am
by rhunt
Great. That's helpful. I am pretty darn good at tweaking windows and RDBMS's (I'm an MS SQL DBA). If part of the issue is the superfluous areas of Windows that eat up resources, I should be able to mitigate much of that.

Thanks. RH

Posted: Fri Apr 07, 2006 12:58 pm
by AKA Panama Jack
From my experience Windows Server should only be used for a local network is you absolutely have to use it. At our company we have used both Linux and Windows servers and have found the windows servers to be some of the worst servers around when it comes to peformance. We have been phasing them out and replacing them with Linux servers. We have been able to get far better performance per Ghz/Gbyte with the Linux servers.

The Windows server code even when you disable or restrict the services running have so much overhead tacked on that they cannot effectively compete against a Linux server. Caching and the file system in Windows is inherently slower. Using Microsofts own Web Stress Test application was showing a Linux server processing about 53-54% more requests per second on identical hardware.

If you are looking for performance you really should invest the time in a Linux server.

Re: PHP & MySQL - Linux or Windows.

Posted: Fri Apr 07, 2006 2:28 pm
by Christopher
rhunt wrote:Unfortunately, my IT staff (we and one other guy) are Windows guys without any knowledge whatsoever of Linux.
Make yourself more valuable by using this project to learn Linux. The project you describe sounds very straightforward and you would probably get the servers pre-configured anyway.

Re: PHP & MySQL - Linux or Windows.

Posted: Mon Apr 10, 2006 10:21 am
by a94060
arborint wrote:
rhunt wrote:Unfortunately, my IT staff (we and one other guy) are Windows guys without any knowledge whatsoever of Linux.
Make yourself more valuable by using this project to learn Linux. The project you describe sounds very straightforward and you would probably get the servers pre-configured anyway.
this would depend if YOU(and IT crew) are configuring the servers,or if you are going dedicated.