PHPackages                             amadeco/module-opcache-gui - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. amadeco/module-opcache-gui

ActiveMagento2-module[Logging &amp; Monitoring](/categories/logging)

amadeco/module-opcache-gui
==========================

Magento 2 OPcache Control GUI with React-based interface - Performance monitoring and optimization dashboard for PHP

v2.0.2(9mo ago)3155↑12.5%1MITJavaScript

Since May 17Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/iparmentier/magento2-opcache-gui)[ Packagist](https://packagist.org/packages/amadeco/module-opcache-gui)[ RSS](/packages/amadeco-module-opcache-gui/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

OPcache GUI for Magento 2
=========================

[](#opcache-gui-for-magento-2)

[![Latest Stable Version](https://camo.githubusercontent.com/0416cee6775270bf56f37a328e81ad3852ff792bc813f509e2ea661a6988f46d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d322e302e312d627269676874677265656e2e737667)](https://github.com/amadeco/module-opcache-gui)[![Magento 2](https://camo.githubusercontent.com/360e2de1fd9c704bed173bb02c7cd39ec1713f893d985460f9493be3e29b4e0f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6167656e746f2d322e342e782d6f72616e67652e737667)](https://magento.com)[![PHP](https://camo.githubusercontent.com/45d36955804bf3f4f17097b05a7f41a28e578dc24e0d3ad0d21ae9d9762f44c6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312b2d626c75652e737667)](https://www.php.net)[![License](https://camo.githubusercontent.com/188113d3cd57fe0befefccf2a1835938c1810a7994fbe0e869a59dcb0a0b12e2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d79656c6c6f77677265656e2e737667)](https://opensource.org/licenses/MIT)

> Advanced OPcache monitoring and control GUI for Magento 2, implemented with React for a responsive and modern experience ().

[![Capture d’écran 2025-08-19 à 20 51 57](https://private-user-images.githubusercontent.com/2975845/479689146-df8ff91d-d4af-462e-85bd-ee851a1a57cb.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQ4OTY2NDQsIm5iZiI6MTc3NDg5NjM0NCwicGF0aCI6Ii8yOTc1ODQ1LzQ3OTY4OTE0Ni1kZjhmZjkxZC1kNGFmLTQ2MmUtODViZC1lZTg1MWExYTU3Y2IucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDMzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAzMzBUMTg0NTQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Mjc2OWNjZjhiZWQyMjI4MjkzMjZjYjE5YmE1MjY3ZTE2MmYwNDg4ODA3YmJkYTdkYjFjZTQ5YzVmN2IzNWI1ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.9T39XqDTaYl5XSbefBdqMShi1djhueXIHrVhto3nEho)](https://private-user-images.githubusercontent.com/2975845/479689146-df8ff91d-d4af-462e-85bd-ee851a1a57cb.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQ4OTY2NDQsIm5iZiI6MTc3NDg5NjM0NCwicGF0aCI6Ii8yOTc1ODQ1LzQ3OTY4OTE0Ni1kZjhmZjkxZC1kNGFmLTQ2MmUtODViZC1lZTg1MWExYTU3Y2IucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDMzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAzMzBUMTg0NTQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Mjc2OWNjZjhiZWQyMjI4MjkzMjZjYjE5YmE1MjY3ZTE2MmYwNDg4ODA3YmJkYTdkYjFjZTQ5YzVmN2IzNWI1ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.9T39XqDTaYl5XSbefBdqMShi1djhueXIHrVhto3nEho)Features
--------

[](#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
------------

[](#installation)

### Option 1: Composer (Recommended)

[](#option-1-composer-recommended)

```
composer require amadeco/module-opcache-gui
bin/magento module:enable Amadeco_OpcacheGui
bin/magento setup:upgrade --keep-generated
bin/magento cache:clean
```

> This extension uses CDN-hosted React components and doesn't require static content generation, allowing installation with the `--keep-generated` flag.

### Option 2: Manual Installation

[](#option-2-manual-installation)

1. Download or clone the repository
2. Copy the files to `app/code/Amadeco/OpcacheGui/`
3. Run the following commands:

```
bin/magento module:enable Amadeco_OpcacheGui
bin/magento setup:upgrade --keep-generated
bin/magento cache:clean
```

Usage
-----

[](#usage)

### Accessing the Dashboard

[](#accessing-the-dashboard)

Navigate to **System → React → PHP OpCache Dashboard** in your Magento Admin Panel.

OPcache Optimization Guide
--------------------------

[](#opcache-optimization-guide)

### Recommended PHP OPcache Settings for Magento 2

[](#recommended-php-opcache-settings-for-magento-2)

```
opcache.enable = 1
opcache.enable_cli = 0
opcache.memory_consumption = 1024
opcache.interned_strings_buffer = 128
opcache.max_accelerated_files = 60000
;
; Production Mode
;
opcache.validate_timestamps = 0
;
; Development Mode
;
;opcache.validate_timestamps = 1
;opcache.revalidate_freq = 10
;
opcache.save_comments = 1
opcache.enable_file_override = 0
```

### Technical Tips

[](#technical-tips)

#### Tip 1: Calculate Your Required Cache Size

[](#tip-1-calculate-your-required-cache-size)

```
# Calculate the exact number of PHP files in your Magento codebase
find . -type f -print | grep php | wc -l
```

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

[](#tip-2-implement-selective-php-preloading)

For Magento 2, selective preloading is vastly more efficient than preloading all files:

```
// Example preload.php for Magento 2
function preload($path) {
    static $loaded = 0;
    if ($loaded >= 500) return;

    if (is_file($path) && preg_match("/\.php$/", $path)) {
        opcache_compile_file($path);
        $loaded++;
    }
}

// Only preload essential core files
preload(__DIR__ . '/vendor/magento/framework/App/Bootstrap.php');
preload(__DIR__ . '/vendor/magento/framework/App/Http.php');
// Additional critical files...
```

References:

- [Magento Community Issue #98](https://github.com/magento/community-features/issues/98#issuecomment-481635316)
- [Example Implementation](https://github.com/MonogoPolska/monogo-m2-preload)

#### Tip 3: Avoid JIT Compilation for Magento 2

[](#tip-3-avoid-jit-compilation-for-magento-2)

JIT compilation causes segfaults with Magento 2 and provides minimal performance gains:

```
; Disable JIT for Magento 2
opcache.jit_buffer_size = 0
opcache.jit = off
```

Reference: [Magento 2 PHP 8.2 JIT Performance Analysis](https://yegorshytikov.medium.com/magento-2-adobe-commerce-php-8-2-jit-performance-how-faster-is-magento-2-with-jit-876bdb8641a1)

#### Tip 4: Blacklist Non-Essential Files

[](#tip-4-blacklist-non-essential-files)

Create an `opcache.blacklist` file to exclude test directories and rarely-used files:

```
/home/USER/public_html/vendor/*/Test/*
/home/USER/public_html/vendor/*/tests/*
/home/USER/public_html/dev/*
/home/USER/public_html/setup/*

```

Then reference it in your php.ini or pool configuration:

```
opcache.blacklist_filename = /path/to/opcache.blacklist
```

#### Tip 5: Separate CLI and Web Process Configurations

[](#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`):

```
;
; OpCache Config
;
opcache.enable = 1
opcache.enable_cli = 1
opcache.memory_consumption = 512
opcache.interned_strings_buffer = 32
opcache.max_accelerated_files = 30000
opcache.max_wasted_percentage = 5
opcache.use_cwd = 1
;
; Magento mode Production
;
;opcache.validate_timestamps = 0
;
; Magento mode Developpement
;
opcache.validate_timestamps = 1
;opcache.revalidate_freq = 10
opcache.file_update_protection = 0
opcache.revalidate_path = 0
opcache.save_comments = 1
opcache.load_comments = 1
opcache.enable_file_override = 0
opcache.optimization_level = 0xffffffff
opcache.blacklist_filename = "/home/**USER**/opcache.blacklist"
opcache.max_file_size = 0
opcache.consistency_checks = 0
opcache.force_restart_timeout = 60
opcache.error_log = "/var/log/php-fpm/opcache.log"
;opcache.log_verbosity_level = 1
opcache.log_verbosity_level = 3
opcache.preferred_memory_model = ""
opcache.protect_memory = 0
;
;
;
opcache.file_cache = "/tmp/"
opcache.file_cache_only = 1
opcache.file_cache_consistency_checks = 1
opcache.huge_code_pages = 1
;
; Support for PHP >7.4 Preload Feature #98
;
; Issue : https://github.com/magento/community-features/issues/98#issuecomment-481635316
; Magento 2 simple preload : https://github.com/MonogoPolska/monogo-m2-preload
;
; Doesn't work in CLI with config opcache.file_cache_only = 1
;
;opcache.preload = "/home/**USER**/public_html/preload.php"
;opcache.preload_user = **PHP-USER**
;
; JIT Just In Time Compilation
;
;opcache.jit = 1235
;opcache.jit_buffer_size = 536870912
opcache.jit = off
opcache.jit_buffer_size = 0
```

**Web Processes Configuration** (`/etc/php/8.x/fpm/php.ini`):

```
;
; OpCache Config
;
opcache.enable = 1
opcache.enable_cli = 0
opcache.use_cwd = 1
opcache.validate_root = 1
opcache.revalidate_path = 0
;
; Magento mode Production
;
opcache.validate_timestamps = 0
;
; Magento mode Developpement
;
;opcache.validate_timestamps = 1
;opcache.revalidate_freq = 10
opcache.save_comments = 1
opcache.enable_file_override = 0
opcache.consistency_checks = 0
opcache.protect_memory = 0
opcache.memory_consumption = 1024
opcache.interned_strings_buffer = 256
;
; Quickly calculate the number of files in our codebase.
; find . -type f -print | grep php | wc -l
;
opcache.max_accelerated_files = 120000
opcache.max_wasted_percentage = 15
opcache.file_update_protection = 2
opcache.optimization_level = 0xffffffff
;opcache.blacklist_filename = "/home/**USER**/opcache.blacklist"
opcache.max_file_size = 0
opcache.force_restart_timeout = 60
opcache.error_log = "/home/**USER**/public_html/var/log/opcache.log"
opcache.log_verbosity_level = 2
opcache.preferred_memory_model = ""
opcache.huge_code_pages = 1
```

**Key Differences Explained**:

SettingCLIWebReason`memory_consumption`512MB1024MBCLI needs less memory since it handles one command at a time`interned_strings_buffer`32MB256MBWeb processes handle more unique strings from templates`validate_timestamps`OnOffCLI tools need to see file changes immediately`file_cache_only`OnOffCLI benefits from file-based cache for persistence`max_accelerated_files`30000120000CLI uses fewer files than web processes`log_verbosity_level`32More detailed logging helps with CLI debugging#### Tip 6: PHP-FPM Pool Partitioning for Frontend and Admin

[](#tip-6-php-fpm-pool-partitioning-for-frontend-and-admin)

Split your PHP-FPM configuration into separate pools for frontend and admin:

```
# /etc/php/8.1/fpm/pool.d/magento-frontend.conf
[magento-frontend]
user = www-data
listen = /var/run/php-fpm-magento-frontend.sock
pm = dynamic
pm.max_children = 120
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 35

# /etc/php/8.1/fpm/pool.d/magento-admin.conf
[magento-admin]
user = www-data
listen = /var/run/php-fpm-magento-admin.sock
pm = dynamic
pm.max_children = 20
pm.start_servers = 5
pm.min_spare_servers = 3
pm.max_spare_servers = 10
```

Then configure NGINX to route requests accordingly:

```
# Frontend requests
location ~ ^/(pub|static|media)/.*\.php$ {
    fastcgi_pass unix:/var/run/php-fpm-magento-frontend.sock;
    # Additional FastCGI settings...
}

# Admin requests
location ~ ^/admin {
    fastcgi_pass unix:/var/run/php-fpm-magento-admin.sock;
    # Additional FastCGI settings...
}
```

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
------------------------------

[](#configuration-location-matters)

OPcache memory settings must be configured in php.ini rather than in PHP-FPM pool configuration files:

1. **Initialization Order**: OPcache initializes early in PHP's startup process, before pool configurations are processed
2. **Shared Memory Allocation**: Settings like `memory_consumption` define system-level allocations that must be consistent across PHP-FPM pools
3. **Global vs. Pool-specific Settings**: Some directives only work when set globally in php.ini

Credits
-------

[](#credits)

- Based on [Genaker/Magento2OPcacheGUI](https://github.com/Genaker/Magento2OPcacheGUI)
- Integrates with [amnuts/opcache-gui](https://github.com/amnuts/opcache-gui)
- Enhanced by [Amadeco](https://www.amadeco.fr)

License
-------

[](#license)

[MIT License](LICENSE.md)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance58

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~47 days

Total

3

Last Release

272d ago

Major Versions

1.0.0 → v2.0.12025-08-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/b211427be009c505885db00496fe829753399414856083648cec5c7af5003fcd?d=identicon)[IlanAmadeco](/maintainers/IlanAmadeco)

---

Top Contributors

[![Amadeco](https://avatars.githubusercontent.com/u/2975845?v=4)](https://github.com/Amadeco "Amadeco (76 commits)")[![Genaker](https://avatars.githubusercontent.com/u/9213670?v=4)](https://github.com/Genaker "Genaker (57 commits)")[![ejaz-alam](https://avatars.githubusercontent.com/u/22393364?v=4)](https://github.com/ejaz-alam "ejaz-alam (1 commits)")

---

Tags

magento-2magento2magento2-extensionmagento2-moduleopcacheopcache-backendopcache-dashboardopcache-gui

### Embed Badge

![Health badge](/badges/amadeco-module-opcache-gui/health.svg)

```
[![Health](https://phpackages.com/badges/amadeco-module-opcache-gui/health.svg)](https://phpackages.com/packages/amadeco-module-opcache-gui)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[ekino/newrelic-bundle

Integrate New Relic into Symfony2

28111.2M8](/packages/ekino-newrelic-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
