Download the PHP package amadeco/module-opcache-gui without Composer
On this page you can find all versions of the php package amadeco/module-opcache-gui. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download amadeco/module-opcache-gui
More information about amadeco/module-opcache-gui
Files in amadeco/module-opcache-gui
Package module-opcache-gui
Short Description Magento 2 OPcache Control GUI with React-based interface - Performance monitoring and optimization dashboard for PHP
License MIT
Informations about the package module-opcache-gui
OPcache GUI for Magento 2
Advanced OPcache monitoring and control GUI for Magento 2, implemented with React for a responsive and modern experience (https://github.com/amnuts/opcache-gui).
Features
- Real-time OPcache Monitoring: View memory usage, hit/miss ratio, and cached scripts
- Performance Metrics: Track OPcache efficiency and PHP performance
- Cache Control: Reset cache, invalidate files, or force file refresh
- Configuration Viewer: Examine your current OPcache configuration
- React-based Interface: Modern, responsive UI built with React
- Script Analysis: Identify which files consume the most cache memory
Installation
Option 1: Composer (Recommended)
This extension uses CDN-hosted React components and doesn't require static content generation, allowing installation with the
--keep-generatedflag.
Option 2: Manual Installation
- Download or clone the repository
- Copy the files to
app/code/Amadeco/OpcacheGui/ - Run the following commands:
Usage
Accessing the Dashboard
Navigate to System → React → PHP OpCache Dashboard in your Magento Admin Panel.
OPcache Optimization Guide
Recommended PHP OPcache Settings for Magento 2
Technical Tips
Tip 1: Calculate Your Required Cache Size
Set opcache.max_accelerated_files to this number plus a 25% margin, rounded to the nearest higher prime number for optimal hash table performance.
Tip 2: Implement Selective PHP Preloading
For Magento 2, selective preloading is vastly more efficient than preloading all files:
References:
Tip 3: Avoid JIT Compilation for Magento 2
JIT compilation causes segfaults with Magento 2 and provides minimal performance gains:
Reference: Magento 2 PHP 8.2 JIT Performance Analysis
Tip 4: Blacklist Non-Essential Files
Create an opcache.blacklist file to exclude test directories and rarely-used files:
Then reference it in your php.ini or pool configuration:
Tip 5: Separate CLI and Web Process Configurations
For optimal performance, maintain distinct OPcache configurations for CLI and web processes:
CLI Configuration (/etc/php/8.x/cli/php.ini):
Web Processes Configuration (/etc/php/8.x/fpm/php.ini):
Key Differences Explained:
| Setting | CLI | Web | Reason |
|---|---|---|---|
memory_consumption |
512MB | 1024MB | CLI needs less memory since it handles one command at a time |
interned_strings_buffer |
32MB | 256MB | Web processes handle more unique strings from templates |
validate_timestamps |
On | Off | CLI tools need to see file changes immediately |
file_cache_only |
On | Off | CLI benefits from file-based cache for persistence |
max_accelerated_files |
30000 | 120000 | CLI uses fewer files than web processes |
log_verbosity_level |
3 | 2 | More detailed logging helps with CLI debugging |
Tip 6: PHP-FPM Pool Partitioning for Frontend and Admin
Split your PHP-FPM configuration into separate pools for frontend and admin:
Then configure NGINX to route requests accordingly:
Benefits:
- Better resource allocation based on specific needs
- Isolation of admin processes from customer-facing frontend
- Prevents admin-intensive tasks from impacting storefront performance
- More efficient OPcache utilization for each context
Configuration Location Matters
OPcache memory settings must be configured in php.ini rather than in PHP-FPM pool configuration files:
-
Initialization Order: OPcache initializes early in PHP's startup process, before pool configurations are processed
-
Shared Memory Allocation: Settings like
memory_consumptiondefine system-level allocations that must be consistent across PHP-FPM pools - Global vs. Pool-specific Settings: Some directives only work when set globally in php.ini
Credits
- Based on Genaker/Magento2OPcacheGUI
- Integrates with amnuts/opcache-gui
- Enhanced by Amadeco
License
MIT License