Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Quick Test: PHP 5.6 Against Facebook's HHVM

  1. #11
    Join Date
    Jan 2014
    Posts
    196

    Default

    Quote Originally Posted by werfu View Post
    HHVM first run will always be slower than standard PHP. In real world usage I've seen HHVM trump PHP in such way that other sysadmins were totally abashed of their system performance. I myself did migrate a Magento CE ecommerce from a big 8 core 20gig of RAM machine to a smaller VPS with 2 core and 4gig of RAM using Nginx + HHVM, going from a slow, 6s+ peak load time to less than 2s peak load time.

    I really hope that PHP-ng performance will see a huge increase. You know sometime you simply can't use a cache in front of your application.
    Any idea how a C++ based server would compete against PHP? The last server backend I was working with was a Xeon X7560 with 64-bit Linux and custom socket event loops for 3 Intel server gigabit NICs. The system had in-memory transactional databases and heavy CoW caching framework + custom xml parsers adopted from rapidxml. IIRC the performance was around 10 times better than previous Tomcat server.

  2. #12

    Default

    There is more to a PHP vs HHVM test than a single cli initiated benchmark race to completion. I'm running HHVM over at stopforumspam and without it my site would be on its knees. Its runs as a single thread, uses minimal memory compared to a massive PHP fpm pool, dropped my server load from ~10 to ~4 and in my benchmarks for the next code release, completes a testbed IPv6 validity/subnet and range unit test benchmark in 2 seconds compared to 8 seconds in PHP.

    To really get the benefits of HHVM, you need to use it in the role for which it was designed, a FastCGI server, not a cli interface.
    Last edited by stopforumspam; 08-30-2014 at 04:52 AM.

  3. #13

    Default

    Quote Originally Posted by caligula View Post
    Any idea how a C++ based server would compete against PHP?
    well written and designed c++ vs java of any type - there is no comparison for performance. If every c++/ASM application could be developed with the same speed as java/net/php, then the later wouldnt have ever taken off. You trade tight code and speed for garbage collection and considerable framework. Now, I just need to rewrite my main page in c++

  4. #14
    Join Date
    Feb 2008
    Location
    Linuxland
    Posts
    5,111

    Default

    Quote Originally Posted by caligula View Post
    Any idea how a C++ based server would compete against PHP?
    The last I tested, CGI could handle 10 to 50 times the load vs PHP (also as CGI). With both using FastCGI, the difference was 10 to 150 times. Standard PHP though and over a year old bench.

  5. #15

    Default

    Quote Originally Posted by curaga View Post
    The last I tested, CGI could handle 10 to 50 times the load vs PHP (also as CGI). With both using FastCGI, the difference was 10 to 150 times. Standard PHP though and over a year old bench.
    if I had the coding skills, I would write the heaviest page on my site in c++ but in the meantime HHVM is doing a great job.

  6. #16

    Default

    Quote Originally Posted by stopforumspam View Post
    There is more to a PHP vs HHVM test than a single cli initiated benchmark race to completion. I'm running HHVM over at stopforumspam and without it my site would be on its knees. Its runs as a single thread, uses minimal memory compared to a massive PHP fpm pool, dropped my server load from ~10 to ~4 and in my benchmarks for the next code release, completes a testbed IPv6 validity/subnet and range unit test benchmark in 2 seconds compared to 8 seconds in PHP.

    To really get the benefits of HHVM, you need to use it in the role for which it was designed, a FastCGI server, not a cli interface.
    Actually in earlier HHVM releases (right after it went into JIT compiler mode) compared to around the PHP 5.4 days, the HHVM CLI performance was much faster than PHP 5.4 at the time.

  7. #17
    Join Date
    Mar 2013
    Posts
    170

    Default

    These benchmarks also show that hhvm isn't so fast as they are selling it to be :

    http://www.techempower.com/benchmarks/

    And there's a project called cpoll_cppsp that wons almost all tests but is far from feature complete to develop web applications. But the idea of it is pretty neat and makes easier writing c++ web applications by easily combining html and code.

    From a technical point of view hhvm is better but original PHP is catching up in performance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •