So, we have a Laravel 5.1 based project we want to release soon, but we're noticing poor performance, and we're trying to optimize the server setup.
As listed in the title, we're deploying this on a CentOS 6.7 server, with Nginx 1.8.1 and PHP 7 with PHP-FPM. Since CentOS 6.7's repositories do not offer PHP 7, we're using IUS' replacement packages.
One of the things we noticed that might be causing poor performance is the fact that Zend Opcache, despite being enabled and working (we have a good hit rate), does not seem to be caching all of the files in our project. We're using opcache-gui to help visualize the contents of the cache and, while many of the project's files are there (including files from third party libraries), most are missing, including our main controller and many of the supporting classes. In fact, when we disable Opcache, the response times remain virtually the same. The opcache blacklist is currently empty, so that's not the reason why they're not being included.
We've attempted to forcefully cache the missing files using opcache_compile_file(), and while the files do get compiled and cached, they never get any hits.
It was my understanding that Opcache would cache all of the files being executed, but that doesn't seem to be what's happening here. I've looked at the opcache settings, but could not find one that would obviously influence this kind of behavior, apart from the blacklist.
Is there anything else that I'm missing? Any other criteria that PHP would rely on when deciding on what to cache or not?
Any help on the matter would be appreciated!