PDA

View Full Version : ASP vs PHP/Mysql ?


Sharg
Fri 23rd Jun '00, 7:28am
Hi, how does ASP forums compare to php/mysql forums in terms of speed and capacity to handle a large traffic ?

Thanks,
Benj

John
Fri 23rd Jun '00, 8:56am
I would say that PHP/MySQL will go a lot faster for a given piece of hardware. For a start they do not have to overhead of a GUI. Also, PHP and MySQL, along with Apache, are most widely used on Linux, and are reported to be much more stable than any Windows server. ASP will not manage such a high load as the PHP system, I don't think.

Perhaps this is something that wandrer can look into in his next round of testing?

John

Krucifyx
Fri 23rd Jun '00, 11:06am
Thats actually a tough question. ASP powers lies in its support for ActiveX (COM) objects. ASP has many more built in functions that PHP, but it is a resource hog and will eat away your computer.

While PHP may not be as powerful (yet), its extensible through the many API's and that's a big bonus. Plus PHP can run on non-Windows machines without the use of a 3rd party product (like Chili ASP).

I would recommend ASP for e-commerce applications and sites, and PHP for everything else. You could also use ColdFusion, but thats another discussion.

customcpu
Fri 23rd Jun '00, 11:51pm
I think it has been proven time and time again that even with HUGE budgets the windows platform has a tough time with heavy loads. Microsoft claims that win2000 will put an end to that, but only time will tell. There are only a few reasons I can think of to go with ASP/windows over the more robust and stable *nix(or BSD)/Apache/MySQL combo. Things like:
- You need SUPER fast deployment and do not have
any programmers.
- Your budget does not allow for hiring someone who
knows *NIX/PHP/SQL AND you already have a
considerable investement in Windows.
- Your boss insists that you use windows because he
heard it was the best :)

As you can see not of these are ideal situations.

Shaman
Sat 24th Jun '00, 11:54pm
WHOA!

Hold on here. ASP is a framework for OTHER programs and languages to work with web directives. PHP is a *programming language with built-in hooks for other languages*. The two are not comparable - ASP is merely the framework.

With ASP you generally have more overhead than you think, because you may be linking interpreters, canned objects, etc. into your application that you can't even see (mostly because windoze isn't capable of such fine-grained administration).

Tell you what - look around and see how many ASP-driven web sites there are. Are they fast? Don't use Microsoft's web site as an example, because they have a half a billion in hardware and development time running that thing.

[Edited by Shaman on 06-25-2000 at 10:55 AM]

Krucifyx
Sun 25th Jun '00, 12:25am
Umm, ok. To begin with, you can't really call ASP a framework because it can only interperate two languages, VB and Javascript.

Secondly, I can think of a great deal of sites that use ASP. There's cduniverse.com, carsdirect.com, bn.com, k10k.com, zumiez.com, eddiebauer.com, nordstrom.com, buy.com, fatbrain.com, varsitybooks.com, valueamerica.com, reel.com, dvdwave.com, dsports.com, mvp.com,...

The list goes on and on. And as you can notice, everyone of the above listed sites is one of the largest in its field. Like it or not, ASP is a very popular programming language for the larger firms, as it offers greater strengths in e-commerce and doing business online. And do to the fact that people who program in either VB of JS can program in ASP, grabs it twice as many people then if it was its own individual language.

Nonetheless, I'm going to stick with PHP as I'm comfortable with it. I plan on learning ASP later, because it's going to be in greater demand very soon.

customcpu
Sun 25th Jun '00, 12:34am
While it is true that ASP is more of a programming environment than a programming language, I think that it is fair (and necessary) to compare the two at times. For a new shop looking to setup a website they are basically looking at two options:
win/iis/asp vs. *NIX/apache/insert language here

My point was that I could only see a few reasons to go the windows route and NONE of them had to do with windows being better :) I have seen the following happen more than a few times. Company A wants a website or intranet. Pointy hair boss insists that only Windows be used because he heard it was better and besides only hackers use *NIX.

Krucifyx
Sun 25th Jun '00, 12:46am
If only that were true. Unless a company has an internal website development team, they'll be outsourcing the work to a firm or 3rd party developer. That means that company is going to consult with the "boss", and the boss will most likely (9 out of 10 times) go with what the company puts more backing behind.

And as you'll notice, more companies put backing behind ASP, so there must be a good reason for it.

Martin
Sun 25th Jun '00, 5:09am
I have to agree that *nix is better than NT in most regards.

Where NT gets the edge is in ease of administration and also in stability at 100% load. I have seen a LOT of *nix setups crash when they stay at 100% load for too long. I have never seen an NT server do the same.

as far as ASP, I don't know enough about it to comment, and I realy don't want to learn.

Shaman
Sun 25th Jun '00, 6:55am
*bbbzzzz*

Wrong. ASP incorporates more than just VB and COM. But COM itself incorporates so much.

PHP is one language, with two purposes in life: a) to make programming simple, powerful applications easily, using a single programming language b) provide a lightweight method of interpreting applications

ASP is a mixed dog's breakfast of APIs, versions and along with its OS, it can add up to extreme expenses. PHP+MySQL = $200 for the license, and ... uhm... nothing.

All the web sites listed above are SMALL. 1M-10M hits a day is SMALL these days. There isn't a piece of hardware sold today that won't do 5K web hits a second. Do the math.

Regarding UNIX having problems at 100% load: HOOEY. That's probably the least knowledgable post I've ever seen regarding UNIX. I administer 18 Solaris servers that are at 100% load all the time (running distributed.net), some of them with severe I/O loads. I have never had *one* of those Solaris servers crash - ever - in 8 years. I've only twice seen a Sun box "die" for any hardware reason at all, and never seen one die from an OS failure. In that time I've also sold ~80 other Sun boxen, and not ONE of them has ever died because of an OS failure, and one of the two servers I've seen die from hardware failure was a customer's - the other was mine, an old SPARC4 that was stuffed into a 90 degree room for 6 years and finally had a memory chip failure.

UNIX unreliable? Yeah, and sometimes the world stops turning, for no reason.

Lastly, the reason a lot of ISVs and consultants use Windows + IIS + ASP is that they make a load of money on licenses as well as the consulting time!

Price out a 500 consecutive connection version of IIS + ASP + various other components, versus MySQL + PHP.

Windows/MSSQL: call it $80K (I'm sure it's low, I'm no M$ guru)
Linux/PHP: $270 if you buy the media and MySQL license
Solaris/PHP: $270 " " and need only 8 processor support

It has absolutely nothing to do with whether PHP is inferior to ASP or not. Nothing at all. It's about money. BTW, 1M hits a day would require a lot more licenses than that, I think. Probably $200K in M$ software, at least.

Krucifyx
Sun 25th Jun '00, 9:41am
Umm, no. 1M - 10M hits a day is not normal. Our network is the 15th largest on the net, larger than CNET, ZDnet, and a bunch of others, and to my knowledge, we don't server that many hits a day.

As for ASP, name two languages other than VB and JS that can be used?

Shaman
Sun 25th Jun '00, 9:54am
Anything which can integrate with COM.

As for 1M hits being 15th largest network on the Internet - dream on. Who told you that? Makes me laugh to think you'd think 1M hits a day is large - our web site gets 50,000 page hits a day - forget actual files transferred - and it's TINY compared to some of the large sites out there - not 1/20th, more like 1/2000th. I mean, it's got something like 12,000 users using it compared to some of the big sites.

/me has a low tolerance for bull****

Hell, /. is getting more than 1M hits a day and it's more or less a weenie amateur board.

From Internet.Com's promotional:

"More than 2.4 million unique users generate over 130 million page views monthly. Total "views", which include Web site page views, e-mail newsletter views and e-mail discussion list views, are now well over 185 million per month. Internet.Com's global presence includes editions in Arabia, Asia, Australia, Belgium, Canada, China, Espanol, France, Germany, India, Israel, Japan, The Netherlands, South Africa, Spain, Taiwan and the United Kingdom."

Now, notice that Internet.Com hasn't worked out all that well. It's hardly a darling of the 'net at the moment, mostly because they've had a lot of trouble getting the message out that they're even there and generally their content only is of interest to industry wags (like me). So, if one of the internet's "also-rans" is getting 130M a month (that's 4M+ a day), then imagine CNN's (which runs on Netscape's Enterprise v2.01 on Solaris, BTW).

Oh BTW, Internet.Com (remember, a technical resource for the Internet industry) runs Apache on Solaris.

Oh yeah, uh...

-- snip

9:20pm up 89 day(s), 10:22, 11 users, load average: 2.21, 2.19, 2.19

-- snip

That's my web server. Lots of power left, CPU bound by a "niced" threaded process. Handles 300K mail per day, supports ETRN, has 650 people using TWIG (twig.screwdriver.net), the chat forum, radius authentication, POP3 mail, IMAP4 mail, 8 NFS mounts, backups, 12 drives, user shells, SNMP, 19GB FTP site, Roxen + Apache (PHP4 wIMAP4, GD, MySQL drivers) web servers, et al. Roughly 12,000 user accounts for mail + web. Oh yeah, runs as a primary DNS server for our network too. I think that covers it but I'm not sure :)

Check this out:

--

last pid: 15904; load averages: 2.12, 2.16, 2.18 21:25:45
126 processes: 118 sleeping, 3 zombie, 3 stopped, 2 on cpu
CPU states: 0.0% idle, 95.3% user, 4.7% kernel, 0.0% iowait, 0.0% swap
Memory: 512M real, 29M free, 206M swap in use, 1455M swap free

PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
8757 root 7 0 19 2608K 2216K cpu/1 260.1H 94.58% dnetc
15891 root 1 53 0 2544K 2008K cpu/0 0:00 0.42% top
15886 root 1 48 0 1712K 896K sleep 0:00 0.08% radiusd
15676 jmac 1 58 0 1800K 1528K sleep 0:00 0.08% popper
15804 wewillis 1 38 0 2448K 1944K sleep 0:00 0.07% imapd
15859 qmaild 1 58 0 1840K 1424K sleep 0:00 0.07% qmail-smtpd
15903 rchristi 1 58 0 1784K 1512K sleep 0:00 0.07% popper
15625 director 1 58 0 1800K 1528K sleep 0:01 0.06% popper
18361 root 1 58 0 12M 11M sleep 40:07 0.06% in.named
222 qmails 1 58 0 1024K 656K sleep 31:31 0.05% qmail-send
15904 root 1 58 0 1776K 1504K sleep 0:00 0.05% popper
15890 root 1 58 0 1784K 1512K sleep 0:00 0.04% popper
15588 nobody 3 58 0 5832K 2656K sleep 0:00 0.03% httpd
224 root 1 48 0 920K 512K sleep 3:48 0.03% qmail-lspawn
176 root 1 54 0 1960K 1336K sleep 11:17 0.03% inetd
28633 nobody 3 58 0 7320K 5584K sleep 0:00 0.02% httpd
13396 nobody 3 58 0 8392K 7152K sleep 0:02 0.02% httpd
12192 root 1 59 0 2360K 2088K sleep 0:00 0.02% sshd1
15843 khamlett 1 58 0 1784K 1512K sleep 0:00 0.01% popper
288 root 1 58 0 1936K 1272K sleep 6:43 0.01% radiusd

--

126 processes. The zombies and stopped processes are RADIUS which has strange forking sometimes. Doesn't affect the OS of course. Note that DNetC (distributed.net client) has 94.58% of the CPU at 9:25 on a Sunday night - when people are getting their mail (note the multiple "popper" POP3 processes).

This is considered one of Sun's smallest servers.

Anyway, point made.

[Edited by Shaman on 06-25-2000 at 09:50 PM]

Jake
Sun 25th Jun '00, 1:47pm
Actually, we are the 15th largest network. Check out mediametrix.com and look for eUniverse. (Currently 17 because their site isnt updated) Are you talking 1 million unique visitors a day, or page views?

As far as us having a weenie amateur board here is an example of what we have: http://www.wrestlingtalks.com 18,000 members, 3-4,000 posts a day... But if you are talking page views rather than unique visitors then it is possible.

[Edited by Jake on 06-26-2000 at 12:49 AM]

Krucifyx
Sun 25th Jun '00, 1:48pm
Please not that when I see "1M hits", that means to me 1 million unique hits, not page impressions. Be a little more specific.

MediaMetrix reports that eUniverse (http://www.euniverse.com) is the 17th (was 15th) largest internet property.

http://www.mediametrix.com/usa/data/thetop.jsp

That's over 10 million unique hits a month. That's unique hits, not page views. Big difference. Our page impressions are probably 15 times that.

And which of your sites get's over 50,000 hits a day? I assume you mean page views, and if so thats not very many.

And there is no doubting that PHP is a more server-friendly programming language, but it doesn't have the raw strength that ASP does. No one here ever disputed that, so I have no idea where you got the idea of posting some of your server logs to prove a fact that everyone already agreed upon.

And if I'm not mistaking, COM objects are created and accesed using VB & JS.

UserName
Sun 25th Jun '00, 2:00pm
I assume that eUniverse is something like Chick Click or Blah Blah or Oxygen, is that right? Is it a network of 10 zillion small sites that all show the same banner network? I went to the eUniverse page and I just can't see that site itself getting 10,000,000 unique visitors per month. I have a single site that does close to 500,000 unique visitors a month according to PCData and I'm barely in the top 1500 most visited sites. I know I'm an idiot, but somebody explain the eUniverse thing to me. Thanks!

PS: That's a TON of traffic - congrats if it's your site.

Jake
Sun 25th Jun '00, 2:04pm
Nope, the main site isnt getting that many unique visitors :) We have a HUGE network of sites. A large amount of them branch out from the main site though, from the left hand menu.

JimF
Sun 25th Jun '00, 2:18pm
For some reason I'm not impressed with these numbers. If I can pull 1,000 daily uniques I'm ecstatic. You can take 10,000,000 and shove it, well...

As for the whole ASP vs. PHP thing, I think people are more or less brain washed into thinking that it is "reliable", since it is primarily a Microsoft technology. I wouldn't want to run my Palm Pilot on Windows CE, I wouldn't run a website off of IIS, and I certainly wouldn't use ASP for 10,000,000 unique visitors, not even my 1,000.

ASP as a scripting language might be very strong, but I wouldn't sacrifice the integrity of my entire webserver in order to run it. Nor would I pay to learn and use a scripting language. And I'm not about to start using that Chili thing...

Krucifyx
Sun 25th Jun '00, 2:46pm
Most of our sites now use ColdFusion. The e-commerce sites (http://www.cduniverse.com) still employ ASP, because as I stated before its a more powerful e-commerce scripting language, and well, I doubt anyone wanted to recode everything into a different language.

A majority of those hits are amassed through several large sites. So perhaps a dozen and a half large sites create 90% of those 10M hits, while the hundred small sites create the other 10%.

Shaman
Sun 25th Jun '00, 10:35pm
You are talking about 10M unique visitors per month. That is a *whole different thing* than hits. I took a look at the page - 10M different visitors could easily be 100M page hits, and yeah that is what I'm talking about.

Now, you've paid lip service to ASP being more powerful than PHP4/Apache/CGI/SSI - now prove it. You're completely wrong, but hey, you probably believe it.

While we're at it, let's throw mod_perl, mod_tcl and Jserv into that Apache server. That would give us four internally interpreted and two invoked methods of programming.

You *do* realize that Apache is also capable of integrating any language there is for UNIX, and mixing it up in various ways with PHP, right? And you *are* aware that PHP4 is not limited to MySQL and could work with Oracle, right?

/me shakes his head

And, I included the machine stats there to show a 100% utilized UNIX server that has been running for 90 days now (last rebooted for an OS update). Reliable? Like death and taxes, folks.

[Edited by Shaman on 06-26-2000 at 09:40 AM]

UserName
Mon 26th Jun '00, 4:53am
It's been my experience that 10 million unique visitors per month could actually equal more like 300 - 500 million page views. The major ranking services, from what I understand, only count each visitor once each month. So, any return visits by the same user over a period of a month equal more page hits.

Our site gets about 500,000 unique visitors per PCData and we currently get between 25-35 million page views per month. A lot of it will depend on how many pages each visitor visits each day, of course.

Tom
Fri 30th Jun '00, 11:37am
The problem with ASP is that it simply isn't scalable. The only solution to increased traffic is throwing additional hardware at the problem. A large site with lots of traffic should be looking at a Java Servlet solution combined with EJB servers, all running on UNIX platforms.

move.com, for example, is the largest internet site for home buying and uses JSP technology.

ups.com (I think we all know what they do) uses Servlets.

Many of the newer sites, not wishing to be tied into MS technology are going to the open vendor advantages of the Java world.

Wayne Luke
Mon 28th Aug '00, 1:06pm
Just my take on the matter.

ASP is a framework for other applications to access objects installed on the System.

It can currently use vbScript, Javascript, and PERLscript as its primary scripting languages.

COM objects can be created in any programming language including Java, C++, C, Delphi, Visual Basic, Visual Fortran and ASSEMBLER. All they really are is a DLL anyway.

The entire PHP engine could probably be wrapped as a COM object in a little under an hour. This would allow ASP pages can call the PHP interpretor and use PHP code within their own code, as they can call any other CGI Resource, providing the end user with another Scripting Language to use.

Properly coded ASP pages using OLE DB instead of ODBC are perfectly scalable as long as the backend can handle the load. Of course MS-Access will buckle under pressure but hook your code up to an Oracle 8i backend and the power of its stored procedures, triggers and other stored code and you'll never run out of power.

Is ASP better than PHP? Nope, both have their purposes. Can they be used together to create great applications? You betcha.

sandmanz
Sat 10th Mar '01, 11:15am
http://www.zdnet.com/eweek/stories/general/0,11011,2646052,00.html

Go see, and judge for yourself.

gnusis
Thu 15th Mar '01, 6:18am
Bottum Line.. The large companies use ASP because they can draw support from Microsoft as well as the huge community brainwashed from Microsofts Marketing.

In other words, when something goes wrong, they know where to go. Although they Pay out the A** for it

Most large companies wont use an "open sourced" language because they have to look to the open source community for answers. Example.. Boeing is replacing their entire Network to Windows because they want to be able to look to Microsoft for Support.. (obviously clueless about the support from the open source community)

My opinion:
I wouldn't be caught dead running my entire network on Microsoft Machines! ASP and PHP will accomplish many of the same tasks so why not use php thats free and works on linux machines.

just my 2 cents

gnusis
Thu 15th Mar '01, 6:33am
I also find it funny that the above article chooses cold fusion and jsp over php:

1. even though cold fusion only executed at 29 pages/second vs php's 46-47
2. cold fusion costs Bank!

And JSP on Tomcat that spouts a whopping 13 pages/second

I guess they werent too concerned about speed :)