Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Facebook (PHP) is not very Kopenhagen

Kensai7 (1005287) writes | more than 3 years ago

PHP 3

Kensai7 (1005287) writes "Recently, Facebook provided us some information on their server park. They use about 30000 servers, and not surprisingly, most of them are running the 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 ton. 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.

But I think it is fair to say that using PHP, especially for large deployments, is not very Kopenhagen."

Link to Original Source

cancel ×

3 comments

Sorry! There are no comments related to the filter you selected.

Major flaw (0)

Anonymous Coward | more than 3 years ago | (#30503304)

There's a major flaw in your reasoning. You are assuming that because c code potentionally runs 10 times faster than php code, you can cut down the amount of servers by 90%. You are ignoring network IO, and more: ignoring databases. As 95% of the workload will be database related, not PHP. Writing c code won't speed up your database. Actually, PHP has nice wrappers for about anything, and was written itself in c, so a lot of functionality already is able to run at high speed.
You are right that we should focus efficiency, or wonder why fb needs 30,000 servers. But it's misleading to pinpoint PHP as the sole cause.

Re:Major flaw (1)

Kensai7 (1005287) | more than 3 years ago | (#30504156)

Erm, this is not MY reasoning. It's Koen's reasoning, I just brought you the story... and I don't think we should take it TOO seriously.

But the post could possibly open a great debate about the "carbon footprint" of various computer languages. Has it ever been calculated previously? Are there scientific papers on this matter?

Re:Major flaw (1)

Vellmont (569020) | more than 3 years ago | (#30504884)


But the post could possibly open a great debate about the "carbon footprint" of various computer languages.

It might. But it would likely be a very stupid debate.

Let me put it this way. As far as performance goes, language choice is usually dwarfed by the actual programming and architectural decisions made while writing the code. Also, programming languages aren't just a commodity you throw in and replace as if they were different component like a better performing engine. So while you might get SOME meaning out of discussing carbon-footprint of language A vs language B, it would be mired in all the other complexity and different factors that effect the overall performance of what you're trying to do to make the whole discussion rather meaningless.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>