Announcement

Collapse
No announcement yet.

Quick Test: PHP 5.6 Against Facebook's HHVM

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    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.

    Comment


    • #12
      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; 30 August 2014, 04:52 AM.

      Comment


      • #13
        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++

        Comment


        • #14
          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.

          Comment


          • #15
            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.

            Comment


            • #16
              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.
              Michael Larabel
              https://www.michaellarabel.com/

              Comment


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

                Performance comparison of a wide spectrum of web application frameworks and platforms using community-contributed test implementations.


                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.

                Comment

                Working...
                X