Howard (and others) I have been working with Moodle 2.6+ (Build: 20131205), PHP 5.5.6, and opcache. I have added the following lines to php.ini as you had suggested in one of your other posts. I am observing some behavior that I do not understand, so I thought that I would seek your help (or others.)
opcache.memory_consumption = 128
opcache.max_accelerated_files = 4000
opcache.revalidate_freq = 60
; Required for Moodle
opcache.use_cwd = 1
opcache.validate_timestamps = 1
opcache.save_comments = 1
opcache.enable_file_override = 0
; Experimental for Moodle 2.6 and later
;opcache.fast_shutdown = 1
;opcache.enable_cli = 1 ; Speeds up CLI cron
On the http://php.net/opcache webpage, it is suggested to add “zend_extension=/full/path/to/opcache.so” in php.ini. I found the path to opcache.so and added the following line to php.ini:
On my virtual server, and have played around adding and removing the zend directive. Here is the odd behavior:
If I have this zend directive added, when I install Moodle and get to the page where Moodle checks for all its correct extensions, the opcode message is green, okay, suggesting that everything is fine. However, after turning on “debugging|show performance information,” the page loading performance is slower with this zend directive on. If I comment out this directive (i.e., remove it), the page load performance improves, by about 25%. With the directive turned off, a new install of Moodle provides the warning about opcache.
1) Why do you think this is? What does zend do, and why is it slowing down page loads?
2) Am I missing some additional setting that needs to be turned on within Moodle?
3) Might the performance improve with zend turned on over time, or maybe with more complex moodle pages?
4) Might I be missing something else?
To add a little more to my puzzle, when I compare the Plugins|caching|test performance results, with the zend directive turned on the File cache results for 5000 requests is about 10% better than with the zend directive turned off. So maybe zend really does help with more activity.