Problem/Motivation
The PHP runtime may not have OPcache enabled or optimally configured, which can lead to unnecessary PHP re-compilation on every request, reduced performance, and inefficient use of server resources.
Steps to reproduce
Proposed resolution
Add a new Performace FitCheck plugin PhpOpcacheConfigurationCheck that:
- Detects whether PHP OPcache is enabled in the current runtime used by the Drupal site.
- Checks key OPcache settings (for example,
opcache.enable,opcache.memory_consumption,opcache.max_accelerated_files, andopcache.validate_timestamps) against recommended baseline values for production. - Fails with
FitWeight::Mediumwhen OPcache is disabled or clearly misconfigured, and provides a brief help message pointing to recommended production settings.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork drupalfit-3558982
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
harivansh commentedComment #5
shubham.prakash commentedComment #7
harivansh commentedComment #9
harivansh commented