genaker / module-opcache

genaker/module-opcache

PHP OPCache and Magento Performance monitoring and analytics

  • Yehor Shytikov
magento2-module Compatibility: 2.4.7-2.4.9 Code Quality: Fail Tests: N/A Security: Pass MIT

Magento 2 OPcache GUI PHP Performance Dashboard

Advanced Magento 2 Performance Monitoring & OPcache Control GUI with comprehensive benchmarking tools.

Magento 2 Opcache GUI

Magento Server Performance Toolkit New GUI

opcacheGui

Key Features

Performance Benchmarking Suite

  • CPU Performance Testing - Multi-iteration BogoMIPS measurement
  • Memory Allocation Analysis - Memory usage patterns and optimization detection
  • File Operations Testing - I/O performance measurement
  • Database Latency Testing - MySQL connection and query performance
  • Redis Latency Testing - Cache backend performance analysis
  • HTTP Performance Testing - Cached vs Uncached page load comparison
  • Random URL Testing - Real-world product and category page performance

Advanced HTTP Performance Analysis

  • Cached Performance Testing - Measures Full Page Cache (FPC) effectiveness
  • Uncached Performance Testing - Real-world logged-in user experience
  • Random Product URL Testing - Dynamic product page performance
  • Random Category URL Testing - Category browsing performance
  • Cache Performance Comparison - Side-by-side cached vs uncached analysis
  • Cache Limitations Warning - Educational information about FPC behavior

Enhanced User Interface

  • Loading Spinner with Dynamic Steps - Rotating performance test indicators
  • Console-themed Design - Professional terminal-style interface
  • Real-time Progress Tracking - Step-by-step loading feedback
  • Responsive Layout - Optimized for admin panel integration
  • Professional Error Handling - Graceful fallbacks and debugging

Configuration & Diagnostics

  • OPcache Status Analysis - Comprehensive OPcache configuration review
  • PHP Configuration Analysis - PHP settings optimization recommendations
  • Security Analysis - Security configuration assessment
  • Server Configuration Review - System-level performance insights
  • Configurable Test Parameters - Customizable iterations and timeouts via DI

Technical Architecture

  • Dependency Injection - Clean, testable architecture
  • Performance Toolkit Class - Modular performance testing functions
  • Block-based Architecture - Magento 2 best practices
  • Random URL Generation - Store-aware product and category selection
  • Error Handling & Logging - Comprehensive error management
  • Cache-busting Technology - Accurate uncached performance measurement

Where to Find in Admin Menu

System > Tools > Performance and Opcache GUI

Installation

Method 1: Manual Installation

Copy to app/code, run setup, and compile as usual.

This Extension doesn't need static content generation - it uses CDN version of React JS. Install with flag --keep-generated.

Method 2: Composer Installation

composer require genaker/module-opcache

Post-Installation

php bin/magento module:enable Genaker_Opcache
php bin/magento setup:upgrade
php bin/magento cache:flush

Magento 2 OPcache Optimal Settings

The biggest Magento 2 performance issue is incorrect (default) PHP OPcache settings.

Production Web Server Settings

opcache.enable = 1
opcache.enable_cli = 0
opcache.memory_consumption = 556
opcache.max_accelerated_files = 1000000
opcache.validate_timestamps = 0
opcache.interned_strings_buffer = 64
opcache.max_wasted_percentage = 5
opcache.save_comments = 1
opcache.fast_shutdown = 1

CLI OPcache Settings

Separate CLI config file (e.g., /etc/php/8.1/cli/conf.d/10-opcache.ini):

zend_extension=opcache.so
opcache.memory_consumption=1000M
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000000
opcache.validate_timestamps=1
opcache.enable_cli=1
opcache.file_cache=/tmp/
opcache.file_cache_only=0
opcache.file_cache_consistency_checks=1

Performance Benchmarking Features

PHP BogoMIPS Performance Measurement

Advanced PHP performance testing that measures actual Magento code execution speed.

Magento 2 is CPU-intensive due to framework design. Use the fastest CPU for optimal page rendering. If a 2GHz processor takes 3 seconds, a 3GHz processor will complete the same request in ~2 seconds.

Magento 2 PHP performance

Benchmark Reference Scores (lower is better):

  • AWS C5.large: 0.032 (PHP 7.3.23)
  • AWS R5.xlarge: 0.039 (PHP 7.2.34)
  • AWS C8.xlarge: 0.029 (PHP 8.1 web), 0.066 (CLI - OPcache limitation)

HTTP Performance Testing

  • Cached Testing: Measures Full Page Cache effectiveness
  • Uncached Testing: Real logged-in user experience with cache-busting
  • Random URL Testing: Dynamic product/category page performance
  • Performance Comparison: Side-by-side analysis with improvement percentages

Cache Limitations Analysis

Educational warnings about Magento FPC behavior:

  • FPC primarily benefits guest visitors only
  • Logged-in customers typically bypass FPC
  • Cache can be invalidated by content updates
  • Search requests and category filters are rarely cached
  • Focus on uncached performance for sustainable improvements

Advanced Configuration

Dependency Injection Configuration

Performance parameters can be customized via etc/di.xml:

<argument name="config" xsi:type="array">
    <item name="performance_iterations" xsi:type="number">3</item>
    <item name="http_performance_iterations" xsi:type="number">3</item>
    <item name="db_performance_iterations" xsi:type="number">3</item>
    <item name="collection_page_size" xsi:type="number">100</item>
</argument>

Performance Test Categories

  • [PERFORMANCE BENCHMARK] - CPU, Memory, File I/O tests
  • [HTTP PERFORMANCE] - Cached page performance
  • [UNCACHED HTTP PERFORMANCE] - Real-world performance
  • [CACHE PERFORMANCE COMPARISON] - Cached vs Uncached analysis
  • [OPCACHE STATUS] - OPcache configuration analysis
  • [PHP CONFIGURATION ANALYSIS] - PHP settings review
  • [SECURITY ANALYSIS] - Security configuration assessment

What is BogoMIPS for Magento Servers?

MIPS = Millions of Instructions Per Second - measures Magento server computation speed.

BogoMips are Linus Torvalds' invention, adapted for Magento servers by Yehor Shytikov. Originally used in Linux kernel 0.99.11 (July 1993) for timing loop calibration.

"Bogo" = "bogus" (fake), indicating this is a practical rather than scientific measurement.

It's the most effective way to measure and compare Magento PHP code execution performance across different servers.

Technical Implementation

Class Architecture

  • Gui Block: Main interface and URL generation
  • PerformanceToolkit: Modular performance testing functions
  • Random URL Generation: Store-aware product/category selection
  • Dependency Injection: Clean, configurable architecture

Browser Features

  • Dynamic Loading Spinner: Rotating test step indicators
  • Automatic Fallbacks: 10-second timeout protection
  • Error Handling: Comprehensive debugging and logging
  • Responsive Design: Admin panel optimized interface

Optimize your Magento 2 performance with comprehensive, real-world testing tools.

No changelog yet

The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.

Versions
Version Stability QA Status Compatibility Released
1.0.21 stable Fail Magento 2.4.7-2.4.9 Details 2025-08-15 15:04:15
1.0.20 stable Not tested Not yet tested Details 2025-08-14 18:20:57
1.0.19 stable Not tested Not yet tested Details 2025-08-14 01:12:27
1.0.18 stable Not tested Not yet tested Details 2025-08-13 08:19:12
1.0.17 stable Not tested Not yet tested Details 2025-08-12 22:52:28
1.0.16 stable Not tested Not yet tested Details 2025-08-12 21:53:40
1.0.14 stable Not tested Not yet tested Details 2025-08-12 06:13:28
1.0.13 stable Not tested Not yet tested Details 2025-08-12 01:04:34
1.0.12 stable Not tested Not yet tested Details 2025-08-11 07:35:57
1.0.11 stable Not tested Not yet tested Details 2025-08-11 06:38:25
1.0.10 stable Not tested Not yet tested Details 2025-08-11 06:34:12
1.0.9 stable Fail Magento 2.4.7-2.4.9 Details 2025-08-10 09:12:24
1.0.8 stable Not tested Not yet tested Details 2025-08-09 01:28:07
1.0.7 stable Not tested Not yet tested Details 2025-08-08 23:07:40
1.0.6 stable Not tested Not yet tested Details 2021-07-04 22:56:48
1.0.5 stable Not tested Not yet tested Details 2021-06-28 09:56:59
1.0.4 stable Not tested Not yet tested Details 2021-02-08 16:25:38
1.0.3 stable Not tested Not yet tested Details 2020-12-19 03:59:19
1.0.2 stable Not tested Not yet tested Details 2020-12-19 03:48:08
1.0.1 stable Not tested Not yet tested Details 2020-12-19 03:43:41
1.0.0 stable Not tested Not yet tested Details 2020-12-19 03:18:18

Requires 1

Package Constraint
amnuts/opcache-gui ^3.0

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass Pass

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Fail 340 20 errors, 320 warnings (ruleset: Magento2) — 61 auto-fixable with phpcbf
PHPMD Warning 59 59 rule violations (CyclomaticComplexity:12, UnusedLocalVariable:12, NPathComplexity:11, ExcessiveMethodLength:8, MissingImport:7)
Cpd Warning 1 1 duplicated chunk spanning 42 total lines (min-lines=5, min-tokens=70)
Composer validate Pass 0

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 43 43
2.4.8 41 41
2.4.9 41 41

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
MIT
Authors

More from genaker

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.