Open freephile opened 6 years ago
Note: Rasmus' repo version uses jquery 1.11.0 and d3 3.0.1 Those should probably be upgraded and tested for compatibility (or it's an extra reason to hide the scripts from anyone who's not an admin on the server).
Note 2: Rasmus loads his JavaScript from cloudflare. Another reason to use or make a fork that loads them locally.
So it sounds like one thing you're recommending is simple config changes. Go ahead and PR that. Other changes may be more controversial config changes. Perhaps those should be separate PR(s).
Quality box link fails. I'm not sure how javascript and opcache are related.
I'm generating a new PR, from a different branch since this one is spelled wrong.
The javascript is used in the opcache.php script; so a different matter than straight configuration changes.
Is your Zend Opcache out of memory? Do you see "Warning Interned string buffer overflow" in Apache's error log as mentioned here? Meza should optimize/tweak the Opcache settings for better performance.
Meza installs
php56u-opcache
in/opt/meza/src/roles/apache-php/tasks/php.yml
and setsopcache.interned_strings_buffer=4
in/opt/meza/src/roles/apache-php/templates/php.ini.j2
I propose raising the setting and also optimizing the PHP opcache according to the Scaling PHP book recommendations.
Also, in order to effectively monitor your actual usage of the Opcache, I propose installing another file by Rasmus Ledorf (creator of PHP): https://github.com/rlerdorf/opcache-status.git This could go into the ServerPerformance directory, document root, or elsewhere. Opcache status does reveal document root and physical script path information so perhaps it needs to be 'private'? I've left out details on installation e.g. and Apache configuration to restrict access to opcache.php. There are a few (simple+good) pull requests that have sat idle for a long time, so it might be better to use a fork, or create a fork.
Opcache.max_accelerated_files should be larger than the number of files in your project. We have ~7455, and the next prime number is 7963. So let's set it to 7963 (currently 4,000)
One big change recommended by the book is to never re-validate file timestamps in production...it's wasting valuable time with stat calls. Instead, the book says re-validate in the dev environment, and whenver you push to production, send a
kill -SIGUSR2
to the PHP process (aka restart your webserver).TL;DR-
in php.ini
Environment
You can look at my current environment using Rasmus' opcache.php file. https://demo.qualitybox.us/ServerPerformance/opcache-status/opcache.php