The Environmental Impact of PHP Compared To C++ On Facebook 752
Kensai7 writes "Recently, Facebook provided us with some information on their server park. They use about 30,000 servers, and not surprisingly, most of them are running PHP code to generate pages full of social info for their users. As they only say that 'the bulk' is running PHP, let's assume this to be 25,000 of the 30,000. If C++ would have been used instead of PHP, then 22,500 servers could be powered down (assuming a conservative ratio of 10 for the efficiency of C++ versus PHP code), or a reduction of 49,000 tons of CO2 per year. Of course, it is a bit unfair to isolate Facebook here. Their servers are only a tiny fraction of computers deployed world-wide that are interpreting PHP code."
Assumes PHP Dev Effort = C++ Dev Effort (Score:5, Funny)
What about all the cycles compiling and debugging C++ code? Or all the trees torn down for C++ books? Or the environmental impact of C++ developers? I mean, have you ever had to share a cube with one of them? Pheewww.
Re:Ridiculous (Score:5, Funny)
What about the impact of whole classes of C++ bugs that don't exist in C++
I've spent many a sleepless night worrying about C++ bugs that don't exist in C++. I'm glad I'm not alone.
The REAL solution (Score:5, Funny)
Just serve up plain text files. Anything else is pure decadence!
Re:Languages not for everyone (Score:4, Funny)
A PHP programmer who turns out good PHP code
The Easter Bunny, Santa Claus, a PHP programmer who turns out good PHP code, and Steve Balmer are in the four corners of a room. In the center of the room is a chair. Who throws the chair first?
Steve Balmer, because the other three don't fucking exist!
Just think how much greener they could be... (Score:2, Funny)
...were they to rewrite it all in assembly language!
Re:php is bad for the environment (Score:3, Funny)
Seriously, is somebody taking seriously the 1 to 10 ratio of the story?
Only 1 to10 ?!? I would have thought 1 to 100.
Re:Assumes PHP Dev Effort = C++ Dev Effort (Score:4, Funny)
Have no fear, turning devs into disposable resources will ensure bright future to efficiency being judged only in hardware terms.
Re:The REAL solution (Score:1, Funny)
I agree. We can receive said text files via hand signals from the tree tops, to which we will have climbed back up after eschewing all technology to minimize our collective carbon footprints.
Take it further (Score:1, Funny)
Code it in Asm, and you can get 100:1, so you can power down 29,700 machines...
Better yet, make ppl. post all their wall posts directly in binary code. That way, you can destroy the code necessary to translate UTF-8 back-and-forth, the HTTP/MIME wrappers, and the SQL. Imagine the amount of electricity saved! You can market it as a brain-booster too, since now you have to think before you post on Facebook.
Re:Languages not for everyone (Score:3, Funny)
A PHP programmer who turns out good PHP code
Ontological argument: A good PHP programmer is better than a PHP programmer that doesn't exist. Therefore a good PHP programmer must exist.
Re:F1 car in normal street. (Score:5, Funny)
You can go to work in a F1 car, or your normal car.
I wish. My F1 always gets stuck in the gutter at the end of the driveway.
Re:php is bad for the environment (Score:5, Funny)
"even arp drags a server down when you have 20K+ connects"
Are you perhaps a server admin in my company? I swear this is the best excuse for poor performance I've ever heard.
Re:c++ is 'write-only' code (Score:4, Funny)
Re:Languages not for everyone (Score:5, Funny)
A self proclaimed good PHP programmer... yeah there are about a 100 of those to every 1 that doesn't do that.
Re:A trolling weak argument (Score:2, Funny)
Any point or argument based on assumptions is very weak.
-Foredecker
Assuming unreasonable assumptions of course.
Re:php is bad for the environment (Score:5, Funny)
Time for Congress to legislate language efficiency (Score:4, Funny)
This is brilliant! I think it's clear now the direction we must go. Overuse of energy-guzzling languages like PHP have put us on an unsustainable trajectory fueling out of control global warming.
Congress must act to regulate the use of these energy-guzzling languages. No longer will programmers and corporations be permitted to turn out inefficient code with impunity.
PHP, Perl, Ruby, Bash, your days are numbered!
Just wait until we can get UN involved. Python, you and your CO2 spewing simplicity are next!
Re:c++ is 'write-only' code (Score:3, Funny)
"Faced with this piece of information, someone thought the logical thing to do was to, er, write an entirely new language?"
by my understanding, the whole new language slant is because of the nightmare of c++ code out there to reuse, with unintended consequences. php is very web centric and java the last attempt at a 'universal' coding setup. python is an example of new language and how more complicated new language implementation is.
Are you suggesting that they wrote PHP to avoid code reuse, that there hasn't been an attempt at a cross-platform language since Java, and that Python is complicated, all in the same paragraph?
Plus, C++ is an environment-hostile choice (Score:4, Funny)
Imagine if every website was implemented as an ASIC. Then we could talk about efficient datacenters. Maybe, if you're relly strapped for cash, you could implement each website in an FPGA. But that should only be a stopgap measure until you can afford a proper implementation.
Re:people use PHP? (Score:3, Funny)
I came here for an argument!
Re:How about this comparison (Score:3, Funny)
Alright wise guy. Explain twitter.