Announcement

Collapse
No announcement yet.

PHP 7.0 RC1 Is Running Much Faster Than PHP5, But Still Not Beating HHVM

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

  • #11
    Originally posted by Michael View Post

    No. does the repo authoritative mode even work for HHVM CLI apps?
    It should I believe. I'm giving it a shot now and I'll let you know.

    Comment


    • #12
      Originally posted by Kazanir View Post
      I'm curious (and maybe this will be in a forthcoming post) whether your testing has HHVM running in repo authoritative mode?
      HHVM repo auth mode is a complete pain in the butt - it disables a great many things (create_function, etc.) and there is no way to update individual files

      And there is no way to turn off file stat in HHVM without turning on repo mode.

      The solution in PHP with the zend opcache is much better, you can reduce or even turn off file stat but still disable individual files

      I wrote a control panel for the PHP opcache which will let you see/delete individual files as necessary:

      https://gist.github.com/ck-on/4959032 (screenshot https://ckon.wordpress.com/2013/03/2...panel-for-php/ )

      But you can just reduce file stat in PHP to once a minute via opcache.revalidate_freq in your php.ini

      Comment


      • #13
        Originally posted by Michael View Post
        No. does the repo authoritative mode even work for HHVM CLI apps?
        Wait, you are benchmarking PHP from the cli ?

        Is that even a realistic test? CLI doesn't have the opcache or the opcache optimization passes and has startup/shutdown delays.

        HHVM doesn't run the CLI like that, it is already in memory, so not a fair comparison.

        At least run PHP via php-fpm and just pass your command via cgi-fcgi

        Code:
        SCRIPT_NAME=(path+filename)  \
        SCRIPT_FILENAME=(path+filename) \
        REQUEST_METHOD=GET \
        cgi-fcgi -bind -connect /var/run/php-fpm.sock

        Comment


        • #14
          Originally posted by _ck_ View Post

          HHVM repo auth mode is a complete pain in the butt - it disables a great many things (create_function, etc.) and there is no way to update individual files

          And there is no way to turn off file stat in HHVM without turning on repo mode.
          It's still a very reasonable option for lots of production sites and is a big perf gain. The only things which are outright disabled are create_function, eval, and (ab)using Reflection to change the visibility of class properties.

          Anyway, I set this up (by passing an addition parameter to HHVM as an environment variable for the ini config) but I'm hitting out-of-memory errors. What other places in the script do I need to adjust the memory limit for these to run properly?

          Comment


          • #15
            Note:
            PHP's interpretation of "overloading" is different than most object oriented languages. Overloading traditionally provides the ability to have multiple methods with the same name but different quantities and types of arguments.

            Comment

            Working...
            X