Slashdot Mirror


The Environmental Impact of PHP Compared To C++ On Facebook

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."

14 of 752 comments (clear)

  1. Assumes PHP Dev Effort = C++ Dev Effort by VampireByte · · 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.

    --

    Run and catch, run and catch, the lamb is caught in the blackberry patch.

    1. Re:Assumes PHP Dev Effort = C++ Dev Effort by sznupi · · Score: 3, Funny

      Have no fear, turning devs into disposable resources will ensure bright future to efficiency being judged only in hardware terms.

      --
      One that hath name thou can not otter
  2. Re:Ridiculous by Sygnus · · 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.

    --
    First posting isn't trolling. It's...first posting. :) -- Illiad
  3. The REAL solution by DoofusOfDeath · · Score: 5, Funny

    Just serve up plain text files. Anything else is pure decadence!

  4. Re:Languages not for everyone by Anonymous Coward · · 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!

  5. Re:php is bad for the environment by Barnett · · 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.

  6. Re:Languages not for everyone by Anonymous Coward · · 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.

  7. Re:F1 car in normal street. by oddaddresstrap · · Score: 4, 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.

  8. Re:php is bad for the environment by Bruha · · 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.

  9. Re:c++ is 'write-only' code by hedwards · · Score: 3, Funny

    Isn't that how things work in the real world? Your faucet is broken so you burn down the house. Seems like the logical way of dealing with it to me.

  10. Re:Languages not for everyone by orlanz · · 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.

  11. Re:php is bad for the environment by RichardJenkins · · Score: 4, Funny

    Don't forget to take account of the energy required to heat the water for the extra coffee it would take to build it in c++. People always forget about the coffee:production ratio.

  12. Time for Congress to legislate language efficiency by dirkdodgers · · Score: 3, 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!

  13. Plus, C++ is an environment-hostile choice by Jesus_666 · · Score: 3, Funny

    C++ is much too slow and carries too much of an overhead. And it usually requires an operating system on a general-purpose processor. You could go to hand-optimized binary code written directly for the processor but that still leaves us with inefficiencies.

    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.

    --
    USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)