top | item 3381093

HipHop for PHP in Production at Hyves

79 points| ma2rten | 14 years ago |hyvesblogonproductdevelopment.blogspot.com | reply

30 comments

order
[+] ck2|14 years ago|reply
How does hiphop performance compare to fastcgi + opcode-cache (with stat turned off)

I remember reading that on paper it seems it should be faster but in reality not so much.

Ah okay, hiphop IS faster:

http://php.webtutor.pl/en/2011/05/17/drupal-hiphop-for-php-v...

   environment [req/sec][ms/req][%]
   Regular PHP 	15.10 	66.242 	100%
   PHP + APC 	46.90 	21.321 	310%
   HipHop  	77.01 	12.985 	510%  (1.6x faster than apc)
http://huichen.org/en/2010/06/wordpress-3-benchmark/

   wp3+php+apc  30.86   32.400  
   wp3+HipHop   43.50   22.990        (1.4x faster than apc)
Maybe multicast could be used on the intranet for distribution - but 500mb monolithic binaries sounds kinda insane.
[+] patangay|14 years ago|reply
I work for facebook and I worked on the deployment of these large hiphop binaries of our code base. We considered multiple options - binary diffs, multicast, etc. The problem with multicast is that it's hard to configure and maintain in our complex cross region datacenter setup that has to travel through other peering networks.

We ended up with a torrent deployment system that scales beautifully.

[+] FooBarWidget|14 years ago|reply
For those who don't know, Hyves is the largest social networking site in the Netherlands, although in recent times they're facing fierce competition from Facebook. It's ironic that Facebook is indirectly helping them with HipHop.
[+] marquis|14 years ago|reply
That's the beauty of open source. Let the best implementation win, not the competitor with the most marketing money. I have had this conversation with older business-type people who don't quite understand why we might want to make certain aspects of our code available, they just see it as enabling competition but everytime a competitor has come along it just energizes us to innovate harder and over the years I can look back and see that some of our best work was done in the months after a new potential competitor appeared.
[+] willemst|14 years ago|reply
I work at Hyves and wrote this article. If you have any questions on our use of Hiphop, please ask here and I will try to answer any questions.
[+] toumhi|14 years ago|reply
he Willem, you still work there? First time I see Hyves on first page at HN. I didn't even know they were writing a blog on product development. How's it working? Are you writing articles alone, or are several guys writing on what they are working on? Very good idea in any case.

Anyways, good luck with the fight against Facebook ;-)

BTW, if you don't recognize me, I was the only frenchman working there at the time...

[+] patrickgzill|14 years ago|reply
I am curious if you have looked at Quercus, quercus.caucho.com as well? This is PHP compiled/interpreted to JVM.
[+] z92|14 years ago|reply
Is there a list of functions and features that doesn't work with Hiphop?
[+] jarjar500|14 years ago|reply
is it easy to add an extension to hiphop? i.e mongo.so
[+] jurre|14 years ago|reply
I'm wondering, if several engineers spent months porting their php code to hiphop, wouldn't they be better off just rewriting critical parts of their code base to c++?
[+] j_col|14 years ago|reply
If HipHop supports 99% of PHP 5.3, then it took them months to change 1% of their code. Changing any more than that would have obviously taken longer, especially to a whole other language.
[+] omouse|14 years ago|reply
Please god no! Have you seen the type of code written in PHP? Do you really want more shitty C++ code to be created???
[+] j_s|14 years ago|reply
If I were making the decision on where to move my PHP code now, would Phalanger be a better alternative than HipHop?

---

http://tirania.org/blog/archive/2011/Dec-21.html

"This year the Phalanger guys released Phalanger 3.0 which now runs on Mono (previously they required the C++/CLI compiler to run). Phalanger's performance is impressive as it is just as fast as the newly announced Facebook HipHop VM for PHP. The major difference being that Phalanger is a complete PHP implementation and the HipHopVM is still not a complete implementation." - Miguel de Icaza

Phalanger http://phalanger.codeplex.com/ http://www.php-compiler.net/

[+] omouse|14 years ago|reply
Wtf does it mean to be a complete PHP implementation? As far as I know, there's no standard specification for the whole language, there's not even an EBNF grammar. There's no ISO or ANSI effort to standardize it either.
[+] radagaisus|14 years ago|reply
They have a code base of 3.5M LOC and 10M users.
[+] ojilles|14 years ago|reply
Complexity is the root of all evil. There's been some publications [1] that compare revenue per employee which sometimes is interesting. For technologists, it might actually be interesting to see LOC per User. Hyves seems to run at 1/3rd of a line per user; is that high or low? Any published stats like that?

[1]: http://37signals.com/svn/posts/2283-ranking-tech-companies-b...

[+] joelhaasnoot|14 years ago|reply
And shrinking... (members that is)

Facebook used to be pretty unknown here in the Netherlands, but is growing in popularity, with Hyves losing. They were acquired last year by a newspaper and media conglomerate Telegraaf.

[+] iso8859-1|14 years ago|reply
They are also competing with Facebook. Ironic that they are now dependent on their competitor's technology.
[+] j_col|14 years ago|reply
Great to read about other large-scale users of HipHop, thanks for posting. The last graph on CPU usage says it all really.