The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I couldn't get Linux downloaded, so I decided to buy it, a local software place said on their website they had it instock (SUSE) but when I went to get it, they didn't. I installed .NET Server anyway, and I didn't really agree with my system an kept on crashing so I had to reinstall XP Pro. Will prolly have to wait to test it on my machine until RC2+ of .NET Server and I get a copy of linux

As far as Harry's concern, as I've said again and again, .NET isn't "at home" on win2k either. In fact it's practically crippled as compared to .NET Server, so I don't actually feel PHP is any more out of place on win2k than .NET is. The tests will tell though as the neutral ground will set a type of baseline, even if it isn't perfect.

That is, after all, the point of the middle ground, that neither piece of software be "truly" at home on it so that we can see how much better they perform in their home environments. Does what I've proposed achieve that goal? In my opinion it does

why are you guys trying to compare speeds of PHP vs. .NET by using a DB intensive test?

retrieving rows from a database in no way stresses PHP or .NET.

Either one will fetch the rows as fast as the database can send them (unless you got a mangled network between the DB and Web servers).

This is really corroborated in the fact that the .NET guys are crying foul that "php" is faster in the above test because it uses MySQL...

why don't you work on retrieving all 1k rows by parsing straight from the XML file? that would make more sense to me.

or rather, why don't you load the rows into memory and then after you load them, start timing and perform some transformations on the data and then stop the timer?

MySQL will always be faster than any other RDBMS out there for straight selects. It however does not have the scalabilty or reliability of Oracle, the ease of use of SQL Server, etc. MySQL has no foreign key relations it has to resolve which slows down the other RDBMS systems slightly, etc etc.

Just trying to say that timing the retrieval of rows from a databases stresses the DB and not the app server/app environment.

I couldn't get Linux downloaded, so I decided to buy it, a local software place said on their website they had it instock (SUSE) but when I went to get it, they didn't. I installed .NET Server anyway, and I didn't really agree with my system an kept on crashing so I had to reinstall XP Pro. Will prolly have to wait to test it on my machine until RC2+ of .NET Server and I get a copy of linux

Sorry for two posts in a row, but I found this above quote kind of funny

I agree, which is why my proposal included other use cases, and also said we would be testing "some software" which may or may not be the silly little 20 line thing we've written already (in fact it probably shouldn't). Also, the db speed issue is assessed since we'll be using both MySQL and SQL Server for both tests. Also, PHP's speed was reduced significantly when the buffering was turned off.

Anyways, I don't want to argue about how to do the test better one way or the other, as it's come to the point where we either do it or don't. We've knocked around the pros and cons quite enough and still haven't settled on a yay/nay. So, I've written my final proposal subject to minor alterations. If something doesn't come through as a "yes we'll do this" in the next couple of days I'll need to withdraw our network and hardware, as well as monitoring tools, since they'll be required soon enough.

J

ps: All told this will likely cost my company 10K in resources used so I'd like to get on with it and actually have some semblance of something useful at the end as that's really all I want.

As far as Harry's concern, as I've said again and again, .NET isn't "at home" on win2k either. In fact it's practically crippled as compared to .NET Server, so I don't actually feel PHP is any more out of place on win2k than .NET is. The tests will tell though as the neutral ground will set a type of baseline, even if it isn't perfect.

Perhaps *you* don't consider .net 'at home' on Win2k. What does MS, the technology's author - have to say about it? The PHP group has stated repeatedly that PHP on Windows is inferior to PHP on various Unix machines.

Regardless of what *you* might think, MS thinks enough of it to have bothered to port a version to Win2k, and they do have the advantage of having multiple (dozens? hundreds?) engineers who are intimately familiar with the host system, which the PHP authors don't have.

Why not compile all the .net stuff down to CLR and run it on the BSD release of the .net stuff? Oh wait - none of the class libraries were released. (last I heard - maybe that's changed?)

Is win2k "home" for either .NET or PHP? No. Are we going to compare "home" environments for each? Yes.

I really dont' see what the problem is. Does MS consider win2k home to .NET? No, otherwise they wouldn't have released .NET Server which boasts up to an 80% increase in performance. There isn't even an 80% difference between PHP on win2k and xNix, so I'm not sure what the problem is.

.NET Server is .NET's home environment. Whatever PHP environemnt you guys choose can be PHP's home environment, for the second series of tests. We're running one on as neutral as we can find (BSD is far from being fair ground since none of us have worked with .NET no it and indeed if there is a release it's a first one).

What are the complaints here, really? You feel PHP is being crippled. I'm telling you so is .NET. You feel PHP can run better on xNix. I'm telling you .NET will run better on .NET Server. You feel PHP should have a chance at running on xNix. It will.

I really don't understand where the complaints are stemming from. I'm offering up thousands of dollars of equipment here and we're still stuck on which OS to pick? Come on this is silly, what other choice is there? I mean really, what other choice is there for .NET?

Of course, some will say or think "well, it's not our fault .NET's limited" and I'd agree. Others will say/think that PHP shouldn't be so "crippled" and I'd agree, but .NET is being equally if not more crippled.

Why did MS create distros for win2k? Dunno, maybe cause that's a pretty darn smart business decision. Why did the PHP group create a PHP distro for Windows if it's so inferior? Pretty much the same reason.

If I sound irritated it's because I am. Since the beginning I've tried to do nothing but level the playing field, and just about every post from the PHP group is trying to get it off that level field into the "home" environments... We're doing that as well!

If this isn't sussed out by tomorrow we will use someone else's equipment, untests stress test and load testing tools and we'll let the PHP community run the show, since that will obviously provide more accurate results.

.NET Server is .NET's home environment. Whatever PHP environemnt you guys choose can be PHP's home environment, for the second series of tests. We're running one on as neutral as we can find (BSD is far from being fair ground since none of us have worked with .NET no it and indeed if there is a release it's a first one).

How many releases of '.net' have there been on Windows 2000?

If someone praises .net, it's fine. If not, you can hide behind the fact that it's not really 'real' yet because '.net server' isn't out. Best of both worlds, really.

I really don't understand where the complaints are stemming from. I'm offering up thousands of dollars of equipment here and we're still stuck on which OS to pick? Come on this is silly, what other choice is there? I mean really, what other choice is there for .NET?

Precisely. But when people have complained that .net will tie you to a particular platform (windows classes, etc) you have stated that .net is cross platform (just MS hasn't bothered to write it for another plaform yet - but the specs are out there).

Why did the PHP group create a PHP distro for Windows if it's so inferior?

Demand from some quarters. They still state that it's not recommended for production use.

You're trying to 'level the playing field' by putting an MS technology on an MS platform (it's at an advantage regardless of how you cut it, unless they only had unix people develop it) against a decidedly Unix-oriented technology on an MS platform as well.

What exactly are you trying to measure? You've stated you don't want a speed test and that you don't want these numbers to be reused on other boards, etc. So, if not speed, what? Coding style? Just put PHP on a moderately equipped Linux box as an Apache module, put in freetds, and have it connect on a LAN to a SQL7 or SQL2000 machine. Run the tests with each platform on what it runs best on. .net may not run BEST on W2k, but it certainly runs best on W2k *now*.

If you want help configuring the Linux box, stick it on a network where I can ssh in and I'll configure the Apache/PHP/FreeTDS stuff to talk to the SQLServer machine. Contact me at michael@logicreate.com if you want to take me up on this.

I'd caution you that you really shouldn't carry these tests out anyway - every EULA that deals with MS stuff lately *explicitly* states that you can not release performance benchmark results of .net technology without prior written consent.

"If someone praises .net, it's fine. If not, you can hide behind the fact that it's not really 'real' yet because '.net server' isn't out. Best of both worlds, really."

"Why did the PHP group create a PHP distro for Windows if it's so inferior?"

"Demand from some quarters."

... Seems like the same thing to me. .NET was released for win2k and other MS OS's because they both had demand and needed to create demand. How fast would .NET have taken off if it required .NET Server?

I'm trying to level the playing field by taking both of the languages out of their home environment into a foreign one, as it relates to performance.

Performance decrease by putting .NET on win2k instead of .NET Server: between 50-80% depending on who you talk to
Performance decrease by putting PHP on win2k instead of xNix: between 10-20% depending on who you talk to

So, it seems to me that no matter how much you cry foul, .NET is in fact at the greater disadvantage. You say it isn't since MS wrote .NET for windows 2000 as well, yet the PHP group wrote PHP for windows as well.

Anyways, this is really a moot point. If win2k isn't to be used I have no servers to offer. What other common ground is there?

I'd like to point out that your "Precisely. But when people have complained that .net will tie you to a particular platform (windows classes, etc) you have stated that .net is cross platform " comment is quite easily countered by asking how truly cross platform PHP is, if not a single of it's proponents will now stand behind it on windows.

I mean, you'll get to see it shine on xNix in the second series of tests, just as we'll get to see .NET shine. You seem to think that just cause MS programmed .NET they have access to some kind of "MS Magic" or something, which simply isn't true. The framework sits on top of Windows, just like PHP does really.

A question - must we really bring in databases into the equation? What does that really prove? We all know mySQL will beat MSSQL on pure select queries (albeit I admit it would be interesting to see by how much) and that MSSQL will most likely win at very complex queries and full-text searches.

I suggest that we test scripts both with and without SQL connectivity.

I first posed a reply to Harrys post in the hosting requests thread, but realized that was a bad place to post it, so I split my post from that thread, and placed it in the purgatory meanwhile. Then, I merged it with this thread, resulting in that this one got moved to the purgatory. I didn't notice that at first, because I was forwarded to "The merged thread" which was still in the PHP Programming forum. Ho hum...

I first posed a reply to Harrys post in the hosting requests thread, but realized that was a bad place to post it, so I split my post from that thread, and placed it in the purgatory meanwhile. Then, I merged it with this thread, resulting in that this one got moved to the purgatory. I didn't notice that at first, because I was forwarded to "The merged thread" which was still in the PHP Programming forum. Ho hum...

Originally posted by Jeremy W.
I'd like to point out that your "Precisely. But when people have complained that .net will tie you to a particular platform (windows classes, etc) you have stated that .net is cross platform " comment is quite easily countered by asking how truly cross platform PHP is, if not a single of it's proponents will now stand behind it on windows.

It's functionally cross platform. If the purpose of the tests is to point out what platforms it can run on, that's fine. It was my understanding that the tests would be related to performance. Most cross platform languages have a 'preferred' home (CF on Windows, Perl on Unix, etc). This is no different.

I didn't really read all 5 pages, so maybe i missed it, but could someone tell me why not just perform the tests on one Linux Box and one Windows box?

I mean afterall, if you want to make benchmarks which are close to real world situations, than using a Linux Box for PHP and a Windows Box for ASP seems to be the correct choice.

Why? I don't know of many hosts that have PHP installed on a Windows Box. (not that i would mind, im having no problems whatsoever with PHP on Win2k, i even develop on a Windows box, as a matter of fact, it is the first time i heard (after more then a year with PHP) that PHP is supposed to be faster on Linux than on Windows [how can it be even more faster :P]).

What im trying to say is that if you really want to make some usefull benchmarks you should do it under the circumstances like average joe webhost will have. And from what i know most hosts who offer PHP are running a Linux Server. I suppose this is the same for ASP (are there any hosts who have a .NET Server? ). Maybe someone from the .NET guru's has a .NET Server running.

Of course, all of this is only true if PHP is really faster than on Win2k, which i can hardly believe, considering PHP is already really fast. But that i don't know, maybe someone can tell me?

Originally posted by datune I didn't really read all 5 pages, so maybe i missed it, but could someone tell me why not just perform the tests on one Linux Box and one Windows box?

What im trying to say is that if you really want to make some usefull benchmarks you should do it under the circumstances like average joe webhost will have. And from what i know most hosts who offer PHP are running a Linux Server. I suppose this is the same for ASP (are there any hosts who have a .NET Server? ). Maybe someone from the .NET guru's has a .NET Server running.

.NET is a fantastic technology which makes everything easier. It trounces everything out there. However, it doesn't actually exist yet. It exists enough such that proponents can claim it's fabulous. But Microsoft's .NET technology is really hamstrung running on Microsoft's Windows 2000 server equipped with the Microsoft .NET runtime engine. It's at as much a performance disadvantage as PHP running under Windows, despite that fact that Microsoft engineers (doubtless able to understand much of the underlying source code to Windows itself) wrote the .NET runtime engine for Windows 2000.

So, because Microsoft .NET technology is at an undoubted performance disadvantage running under Microsoft Windows 2000 server, it's only fair that PHP also have to suffer the same disadvantage and also have tests run there. Microsoft .NET technology will only truly shine when run on Microsoft .NET server (undoubtedly 100% radically different from current existing Windows technology), which doesn't exist yet. Again, it exists enough in beta, but not in production.

Your question "why do it wrong" is easily summed up: how do we do it right?

All testing requires a baseline, a starting point. Doing the first series on win2k provides that (truly) rough baseline. It puts both languages at a disadvantage so that we can see how they perform outside their chosen environments.

Then, you get to see them in their chosen environments. I really don't see where the confusion is. After 2 pages of me practically copyying/pasting responses everyone is still saying "yeah, but PHP isn't as good on windows 2000". This I know. I also know that .NET isn't as good on windows 2000.

So, to answer the "why not just run one linux and one windwos box": We are! I've said this at least a dozen times that we are running 2 series of tests. One will put stuff on the neutral environment. One will put it in the favourite environment.

The PHP guys keep saying how unfair this is and maybe it is, but we simply don't know. It's a massive assumption that simply because MS wrote .NET for win2k as well, it'll be perfect (rather a big assumption coming from the PHP people ). If we just run the tests in chosen environments the tests will truly be useless. What is the point of having a different OS and webserver, as well as different db's?

That's like having a car race between ford and mercedes and using different engine types, frames, weights and allowing NOS for one. It makes no sense.

I know I'm repeating myself, and I'm sorry, but is there something wrong with the idea of a neutral testing ground first? If there is, illuminate me. If you feel win2k isn't actually neutral, illuminate me. But simply repeating again and again that PHP should run on Linux is getting tiring, since it's GOING to be run on Linux as well.

The first series of tests isn't to show which is faster and won't be given a score, so what's the big deal? The second series is where everything will really happen and we'll see both languages shine.

I too agree that the whole "pure select" thing isn't all that useful. I'd love to do a writeup of some massive application. We can probably come up with some outside-of-the-db tests as well to truly stress the languages out (processing of binary data, ordering of XML, web service operations, dunno really).

Jeremy, I think what people are getting at, is that a neutral environment can't be one that is written by the same company that deploys the technology. And I agree.

It kind of stuffs .NET though, as it's not cross-platform.

I think you might have more mileage if you said:

We'll test php against .NET with php on LAMP and .NET on .NET server.

As an aside, we'll also see how they both perform on Win2K

Personally I am astounded that Microsoft have managed to make such a monumental ****-up of .NET (if it really is 20% as fast on 2k as .NET, then that is a MASSIVE flaw, and one that again puts up the cost of .NET).

I think that the database issues should be pretty much removed (left in as another aside perhaps, unless you want to run Oracle on each platform). The data fetching routines should be limited to flat file reads from the filesystem if they are to be timed.

As far as MS flipping up, not really. On win2k it's an extra layer. In .NET Server it's an integral part. On win2k you can easily uninstall .NET, no biggie. On .NET Server you can't.

So part of getting a technology this huge accepted was rolling it out on win2k and other OS's as well. Thing is, it runs amazingly well on win2k. We now have about 80% (and growing) of our apps rewritten in .NET. Some of the smaller apps that originally took 2-3 weeks to write were written in a matter of days in .NET, such was the speed improvement for development time (always the biggest cost in a project). We may not even get .NET Server because it performs so well on win2k.

So, I don't think it's a mess up so much as an added value advantage if you are running enough .NET Apps that having .NET Server makes it worthwhile. It's not like you'd have several copies, anymore than you'd have a whole farm of Exchange Servers in most companies. It's a tool for where the performance of .NET is an issue. I haven't seen such a scenario yet, but I'm sure it is out there, where taht 80% (for most projects it's lower, normally around 50%) improvement is truly vital. For us it isn't, yet at least.

The PHP guys keep saying how unfair this is and maybe it is, but we simply don't know. It's a massive assumption that simply because MS wrote .NET for win2k as well, it'll be perfect (rather a big assumption coming from the PHP people ). If we just run the tests in chosen environments the tests will truly be useless. What is the point of having a different OS and webserver, as well as different db's?

Personnaly I do not see the point of this now. In the "real world" your not going to use php as a production server on windows, even though this is from a "PHP" point of view. As well as the same will go for ".NET" and win2k. Lets actually test this as a "real world" example.