SitePoint Sponsor |
|
User Tag List
Results 76 to 100 of 133
Thread: PHP and .NET > Speed?
-
Nov 21, 2002, 07:30 #76
- Join Date
- Jul 2000
- Location
- Perth Australia
- Posts
- 1,717
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
just a note...
Apache2 is supposed to be more stable on win32 NOT faster, and I find it is exactly that ,not faster though it is supposed to do better under load than apache1.* which is not even recommended for win32 + of course PHP4/Apache2 is still experimental and as such quirky.
PHP can run as an ISAPI module on IIS , not sure for sure about the speed difference, MS admit that any server module would probably be faster than say vanilla ASP but of course .NET is a different cookie altogether from that.
But whilst I would love to see a speed fest between the 2 I dont think its realistic to really compare PHP (or PERL/Python/whatever for that matter) on IIS, whatever the result there will always be the 'ah but try it on *NIX factor' possibly from the likes of meeven in a `win` situation.
Different databases is as much the key as anything, MySQL excels (as already noted) on straight selects and therefore would be expected to win vs SQL server on the simple stuff , but since MySQL is x-platform you could use that for both? , or Oracle if anyone has a spare liscence (or home edition [haha])
-
Nov 21, 2002, 07:31 #77
- Join Date
- Jul 2001
- Location
- Scotland
- Posts
- 4,836
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
.NET Server for designed for .NET
AND the version of .NET Server is RC1, which will also present a slight disadvantage.
-
Nov 21, 2002, 07:31 #78
- Join Date
- Jun 2001
- Location
- In your basement
- Posts
- 1,268
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I don't know if you guys found a server to test on, but I can do it if you like
My Setup:
XP Pro
1gb RAM
AMD 1.3ghz
IIS / .NET
APACHE / PHP
And MySQL
I'll be willing to run the tests if you like ( don't have time to read all 4 pages )Eric Coleman
We're consentratin' on fallin' apart
We were contenders, now throwin' the fight
I just wanna believe, I just wanna believe in us
-
Nov 21, 2002, 07:34 #79
- Join Date
- Jul 2001
- Location
- Scotland
- Posts
- 4,836
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
We're going to be running them on mine
p4 2.53ghz
windows .NET Server
256meg(ram)
I will be reinstalling the while system to dual boot between .net server and linux
-
Nov 21, 2002, 07:40 #80
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Firepages, exactly, so if we ran one set of tests on the "neutral" environment (win2k) and another set of tests on the "home" environment (.NET Server and xNix) wouldn't that satisfy? It would give us a reasonable baseline so long as the neutral ground tests:
1. Use the same hardware (they will, they'll be on the same machine)
2. Use the same OS (win2k in my opinion)
3. Use the same webserver (ISAPI is extremely fast on IIS5)
4. Use the same database (SQL Server is what we've chosen for the "neutral" tests, right?)
So, we can run the neutral tests on our one unused server here at work Dell PowerEdge 1650 with 1GB of RAM, RAID, Windows 2K Advanced Server, dual processors, etc, and the "home" tests on D's machine.
-
Nov 21, 2002, 13:59 #81
- Join Date
- Jun 2001
- Location
- In your basement
- Posts
- 1,268
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by dhtmlgod
We're going to be running them on mine
p4 2.53ghz
windows .NET Server
256meg(ram)
I will be reinstalling the while system to dual boot between .net server and linux
Eric Coleman
We're consentratin' on fallin' apart
We were contenders, now throwin' the fight
I just wanna believe, I just wanna believe in us
-
Nov 21, 2002, 15:00 #82
- Join Date
- Mar 2001
- Location
- London | UK
- Posts
- 1,140
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Jeremy W.
Firepages, exactly, so if we ran one set of tests on the "neutral" environment (win2k) and another set of tests on the "home" environment (.NET Server and xNix) wouldn't that satisfy? It would give us a reasonable baseline so long as the neutral ground tests:
-
Nov 21, 2002, 17:22 #83
- Join Date
- Nov 2002
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by HarryF
[B]I'm done. 1232 records from MySQL (you're XML file) in under 0.01 seconds (usually around 0.005 seconds). Page rending (interestingly) takes longer (or at least so say the figures - you tell me which page takes longer to get...
This: http://www.oreosnbeer.com/sitepoint/sp1t.aspx
or this;
http://www.pinkgoblin.com/test/speedtest.php
-
Nov 21, 2002, 17:40 #84
- Join Date
- Jan 2002
- Location
- London
- Posts
- 3,509
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I feel I should reiterate that pure speed does not necessarily translate into a better implementation of a web app - scalability (i.e. performance under load) is what counts....! (which rather unfortunately further complicates the test procedures! sorry!)
Last edited by M@rco; Nov 21, 2002 at 17:51.
MarcusJT
- former ASP web developer / former SPF "ASP Guru"
- *very* old blog with some useful ASP code
- Please think, Google, and search these forums before posting!
-
Nov 21, 2002, 20:35 #85
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
I included performance under load (curve graphs) we just need to agree on how we're going to do the tests
-
Nov 22, 2002, 02:15 #86
- Join Date
- Sep 2000
- Location
- Halmstad, Sweden
- Posts
- 7,400
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Solarex
wow....the PHP page was obviously much fasterMattias Johansson
Short, Swedish, Web Developer
Buttons and Dog Tags with your custom design:
FatStatement.com
-
Nov 22, 2002, 11:23 #87
numbers
FWIW, I have run some numbers on Apache/PHP on Win32 (module, not CGI) with MSSQL drivers.
This was taking the crux of HarryF's code, and importing the result sets of the examples so far (1200+ records)
Using pconnect, so once it's run a few times there's no connection overhead.
Setup -
800 Mhz Athlon
256 megs
W2k
SQL Server 2000
Apache 1.3.x (12?)
PHP 4.2.3 (running as module)
MSSQL drivers
A couple runs
--------------
Query Start: 0.0029261112213135
Query End: 0.077633023262024
Loop start: 0.078207015991211
Page Took: 0.13429009914398
--------------
Query Start: 0.0035619735717773
Query End: 0.079300999641418
Loop start: 0.07974898815155
Page Took: 0.15987396240234
--------------
As you can see, running the query itself
is usually the biggest hit. The 'looping' thru
is between 45ms and 80ms (on average).
This seems to be in line with the ASP.net numbers -
roughly. The fastest I saw for the full page was 80ms -
I'm assuming there is a better driver set for MSSQL direct than the one I'm using (bad assumption?). Perhaps the DAO
was caching the resultset in memory?
I may try this with ODBC and/or MySQL later too...
What hardware are the other two examples running on?
Michael Kimsal
http://www.logicreate.com
734-480-9961
-
Nov 22, 2002, 12:37 #88
Its nice to see the two sides co-operating in a proper competition rather than a slanging match for a change.
I believe Microsoft have a free web application stress-testing tool available for download somewhere. If thats of any use....THE INSTRUCTIONS BELOW ARE OLD AND MAY BE INACCURATE.
THIS INSTALL METHOD IS NOT RECOMMENDED, IT MAY RUN
OVER YOUR DOG. <-- MediaWiki installation guide
-
Nov 22, 2002, 12:38 #89
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
yeah, we'll be using that, and I'll have my tools open to test SQL Server and the Server loads. Dunno what we'll do for Apache loads though...
-
Nov 22, 2002, 14:11 #90
Apache Bench - depending on the platform
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Nov 22, 2002, 14:20 #91
- Join Date
- Jul 2001
- Location
- Italy
- Posts
- 4,514
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sean,
I'm interested doing some Apache perfomance tests...Apache Bench...who is it ?
A link will be of some help for me!
Platforms:
win2000pro / FreeBSD
Ei fu!
-
Nov 22, 2002, 14:39 #92
http://httpd.apache.org/docs/programs/ab.html
freddydoesphp was a fan of it if you do some searching here
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Nov 22, 2002, 14:47 #93
- Join Date
- Jul 2001
- Location
- Italy
- Posts
- 4,514
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'll search, thanks!
-
Nov 22, 2002, 20:39 #94
- Join Date
- Jul 2000
- Location
- Perth Australia
- Posts
- 1,717
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ab.exe should already be sitting in your /apache/bin folder (on win32)simple use eg...
ab.exe -n 20 -c 20 http://localhost:80/phpinfo.php
calls phpinfo.php 20 times with 20 concurent requests , haha best not run any tests on my machine
-
Nov 23, 2002, 12:19 #95
Does the Windows version come with Apache 2*?
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Nov 23, 2002, 13:41 #96
- Join Date
- Jul 2001
- Location
- Italy
- Posts
- 4,514
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
firepages, thanks!
>>Does the Windows version come with Apache 2*?
Yup!
pippo
-
Nov 23, 2002, 18:36 #97
Thank you Mr Pip!
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Nov 25, 2002, 07:57 #98
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
I'm writing up a synopsis now of where we're at
-
Nov 25, 2002, 07:57 #99
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Well, this seems to have died this weekend, so I'll go over where I think we're at, and anyone can post disagreements (though I'll try to address points as I go through). If there are none we'll just start on it this week
Purpose of the tests
The purpose of the testing is not to prove which language is faster, as many would love to do, but to see how they perform in comparable situations so that we can all make more informed decisions whenever we have a project where either could be used. Knowledge is power, and if we are to take over the world we have to have more knowledge
Tests to be performed
The tests will be performed twice through. One set of tests will be run on as neutral environment as we can find, Windows 2000, and then a second time in as highly optimized an environment as possible for each language. Windows 2000 is being chosen as the neutral environment since PHP is cross-platform, and .NET wasn't designed for Windows 2000, though it should run sufficiently well while still having a significant handicap over it's native environment. The tests to be performed are:
MySQL-based test series
SQL Server "pure" test series
SQL Server w/ stored proc test series
Connections limits
Connections vs speed tests (curve)
Server load vs connections (curve)
All of these will be done on a test-bed app (either what we currently have or a new one) and may include independent Use Cases afterwards.
At this point I should note Harry's "strong disagreement" as he feels that MS will "pull a fast one", "as they did with J2EE". I'm rather offended by that statement, since all code will be open to close inspection by both communities so I'm rather unsure how any "fast one" could be pulled. .NET was written for .NET Server in the same way that PHP was written for LAMP. The usefulness of any tests in a "favourite environment" must always include a baseline, and the closest we can come to a neutral environment is Windows 2000 in which PHP is supposed to perform quite well (especially considering the hardware I'm throwing at this, more to come on that though) and in which .NET performs "okay" (at about 20% of the performance of .NET Server). Without a baseline, or as close as we can come to it, the "favourite environment" tests will be unacceptable to both communities, no matter who wins, and we won't gain any knowledge out of this, which is the actual point of the tests.
Testing Environment
The tests will be run on a cleanly installed Dell PowerEdge 2650 with the following specs:
2 x Xeon T 2.0GHz
1GB DDR RAM @ 200MHz, 2 x 512 DIMMS
Windows 2000 Advanced Server (includes benchmarking tools we'll need for processor usage)
RAID 5 array of 3 x 36GB, 15K RPM, 1" Ultra 3 (Ultra 160) SCSI's
I hope this is satisfactory, and should eliminate any concerns that the issue is in the hardware. It will be performed over a network (10GB/sec or whatever, I can get the network specs if needed) so we can measure that load as well (though I need to find some software for this), and the database server will be a Dell PowerEdge 1650 with the following specs:
P3 T @ 1.4GHz w/ 512K Cache
1GB SDRAM @ 133MHz (4 x 128MB DIMMS)
Windows 2000 Advanced Server
RAID 5 array of 3 x 36GB, 15K RPM, 1" Ultra 3 (Ultra 160) SCSI's
Some may feel this isn't as powerful as the webservers, but there isn't any need to. The load we'll be placing on the websites will have more than 80% of the power @ the webserver and since I know this server can handle a lot more than we'll be throwing at it I'm not too worried about it being a bottleneck either.
The network will be configured as a private network so that no unauthorized access, DoS's or whatever will affect it as otherwise might be possible (though our firewall hasn't let anything through in over a year).
The end result
At the end of the tests, the results will be published as part of the .NET Theme Week coming up soon, and both communities will write an opinion column on it. I'll probably head up the .NET one and Harry'll probably do the PHP community's editorial and both should be subject to peer approval on both sides to maintain a level of professionalism which keeps the editorials focused on our goal: knowledge, instead of bashing one language or another as this test isn't to prove which language is better or worse.
Comments welcome
-
Nov 25, 2002, 08:16 #100
- Join Date
- Aug 2001
- Location
- London
- Posts
- 2,475
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I just received windows .net server so I will be giving that a test soon, just wondering how dhtmlgod is getting on with it and linux
, anyone else tested .net server yet?
Anyway...
Originally posted by Jeremy W.
At this point I should note Harry's "strong disagreement" as he feels that MS will "pull a fast one", "as they did with J2EE". I'm rather offended by that statement, since all code will be open to close inspection by both communities so I'm rather unsure how any "fast one" could be pulled. .NET was written for .NET Server in the same way that PHP was written for LAMP. The usefulness of any tests in a "favourite environment" must always include a baseline, and the closest we can come to a neutral environment is Windows 2000 in which PHP is supposed to perform quite well (especially considering the hardware I'm throwing at this, more to come on that though) and in which .NET performs "okay" (at about 20% of the performance of .NET Server). Without a baseline, or as close as we can come to it, the "favourite environment" tests will be unacceptable to both communities, no matter who wins, and we won't gain any knowledge out of this, which is the actual point of the tests.
Comments welcome
Each of these end up as a trade off, especially where security is concerned. Besides this it should be fun to see who comes out ontop
ps what firewall you using Jeremy.
Bookmarks