MediaWiki 1.40

From Server rental store
Revision as of 19:16, 2 October 2025 by Admin (talk | contribs) (Sever rental)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Technical Documentation: MediaWiki 1.40 Production Server Configuration

Introduction

This document details the optimal hardware configuration for deploying MediaWiki version 1.40 in a high-availability, medium-to-large-scale enterprise environment. MediaWiki 1.40 introduces significant enhancements to database interaction, caching mechanisms (especially leveraging Opcode Caching and persistent object stores like Redis), and improved support for modern PHP runtimes (PHP 8.3+). Achieving peak performance requires careful balancing of CPU clock speed, high-speed persistent storage, and substantial RAM capacity for caching layers. This configuration is designed for sites expecting between 5,000 and 50,000 page views per hour (PV/h) with moderate edit concurrency.

1. Hardware Specifications

The recommended architecture follows a three-tier design: Load Balancer/Web Frontend (Nginx/Apache), Application/PHP Backend (PHP-FPM), and Database Backend (MariaDB/Percona). The specifications below focus on the primary Application/Database server cluster, assuming externalized load balancing.

1.1 Server Platform Requirements

The foundation requires enterprise-grade hardware capable of sustaining high I/O operations per second (IOPS) and low-latency memory access.

Core Server Platform Specifications
Component Minimum Specification Recommended Specification (High-Density Cluster)
Chassis Form Factor 2U Rackmount (Hot-Swap Capable) 2U or 4U (Optimized for Cooling and Expansion)
Motherboard/Chipset Dual-Socket Intel C621A or AMD SP3/SP5 Dual-Socket AMD EPYC 9004 Series or Intel Sapphire Rapids (Xeon Scalable Gen 4)
Power Supply Units (PSUs) 2x 1600W 80+ Platinum (Redundant) 2x 2000W 80+ Titanium (N+1 Redundancy)
Network Interface Cards (NICs) 2x 10GbE SFP+ (LACP bonded for management/data) 2x 25GbE SFP28 (Dedicated for internal cluster communication)
Baseboard Management Controller (BMC) IPMI 2.0 compliant with remote KVM/console access Redfish API support for modern orchestration

1.2 Central Processing Units (CPUs)

MediaWiki, especially when handling complex parser functions and template expansions, benefits significantly from high core frequency and large L3 cache sizes, particularly for the database layer.

CPU Configuration for Application/Database Roles
Metric Web/PHP-FPM Server (Frontend) Database Server (Backend)
Architecture x86-64 (Preferred: High single-thread performance) x86-64 (Preferred: High core count and large L3 cache)
Recommended Model Example 2x Intel Xeon Gold 6434 (16 Cores, 3.7GHz Base) 2x AMD EPYC 9454 (48 Cores, 2.55GHz Base)
Total Cores (Physical) 32 Cores 96 Cores
Total Threads (Logical) 64 Threads 192 Threads
L3 Cache Size (Minimum) 45 MB per CPU 128 MB per CPU (Critical for InnoDB buffer pool performance)

1.3 Memory (RAM) Specifications

RAM allocation is critical. A significant portion must be dedicated to the database buffer pool (InnoDB/Aria) and the PHP Opcode cache (`opcache`) and object caching layers (APC/Redis/Memcached).

We assume a total system RAM configuration of 1TB per primary application/database node.

Memory Allocation Strategy (1024 GB Total)
Component/Use Case Allocation (GB) Percentage Notes
Operating System & Kernel Caching 64 GB 6.25% Includes OS overhead and general filesystem caching.
Database Buffer Pool (e.g., InnoDB Buffer Pool) 640 GB 62.5% Must be large enough to hold the entire active dataset and indices. Crucial for performance.
PHP Memory Limit (Shared Pool) 128 GB 12.5% Dedicated to `opcache` storage and shared memory segments for PHP-FPM workers.
External Cache (e.g., Redis Instance) 192 GB 18.75% Used for session storage, parser cache, and object storage for MediaWiki extensions.
Total Allocated 1024 GB 100% Requires high-speed DDR5 ECC Registered Memory (e.g., 4800 MT/s or faster).

1.4 Storage Subsystem

MediaWiki requires fast read/write performance, especially during database commits and complex page loads involving template parsing. The storage architecture must be tiered.

1.4.1 Database Storage (Primary)

This volume stores the core `wiki` database (MySQL/MariaDB). Low latency is paramount.

Database Storage Configuration
Parameter Specification Rationale
Technology NVMe SSD (PCIe Gen 4 or Gen 5) Essential for high IOPS required by transaction logs and index lookups.
Capacity (Per Node) 4 TB Usable (16TB Raw) Sufficient for 5TB of highly compressed data plus overhead.
RAID Configuration RAID 10 (Software or Hardware RAID) Provides excellent read performance and redundancy against single drive failure.
Required IOPS (Sustained) > 500,000 IOPS (Random Read/Write 4K block) Necessary to handle concurrent edits and high cache misses during peak load.

1.4.2 Filesystem and Session Storage (Secondary)

This stores media uploads, configuration files, and potentially local session data if Redis is not used for sessions.

Filesystem Storage Configuration
Parameter Specification Rationale
Technology Enterprise SATA SSDs or High-Endurance NVMe Lower cost than primary NVMe, optimized for sequential reads (serving images/files).
Capacity (Per Node) 8 TB Usable Accommodates several years of high-resolution uploads.
Filesystem XFS (Recommended) or ext4 Superior large file handling and metadata performance compared to older systems.

1.4.3 Operating System and Boot Drive

A small, dedicated, high-reliability drive for the OS and critical binaries.

  • **Specification:** 2x 480GB Enterprise SATA SSDs configured in hardware RAID 1 (Mirrored).
  • **Rationale:** Ensures rapid boot times and isolation from high-load database I/O.

2. Performance Characteristics

Performance profiling for MediaWiki 1.40 emphasizes the reduction of CPU time spent in the PHP interpreter and minimizing disk access latency via aggressive caching.

2.1 Benchmarking Methodology

Benchmarks utilize the `Wikitest` suite, simulating mixed read/write loads based on established Wikipedia traffic profiles (80% Reads, 20% Writes/Edits). Measurements focus on Average Response Time (ART) and Transactions Per Second (TPS).

2.2 Key Performance Indicators (KPIs)

Target Performance Metrics (Under 15,000 PV/h Load)
Metric Target Value Threshold (Acceptable Degradation)
Average Response Time (ART) - Read (Simple page) < 150 ms < 300 ms
Average Response Time (ART) - Write (New revision save) < 800 ms < 1200 ms
Database Lock Contention Rate < 0.5% < 2.0%
Cache Hit Ratio (Object/Parser Cache) > 95% > 90%
Transactions Per Second (TPS) - Database > 5,000 > 3,500

2.3 Caching Strategy Impact

The primary performance differentiator for MediaWiki 1.40 is the efficiency of the caching stack.

  • **PHP Opcode Cache (Zend Opcache):** With PHP 8.3+, Opcache efficiency is near-perfect. We configure a minimum of 128GB shared memory specifically for this to minimize recompilation overhead across PHP-FPM processes PHP Optimization Guide.
  • **Object Caching (Redis):** Using Redis for the MediaWiki parser cache (`$wgParserCacheType = PARSERCACHE_ANY_STORE;` pointed to Redis) drastically reduces database load. A 95% hit rate here implies that 95% of complex page renders bypass SQL queries entirely, relying on in-memory key-value lookups. This configuration requires extremely fast network latency between the PHP servers and the Redis cluster (ideally < 0.5ms). Redis Cluster Deployment
  • **Database Caching:** The 640 GB InnoDB Buffer Pool (as detailed in Section 1.3) must hold the majority of the active working set (e.g., templates, site configuration tables, recent changes index). If the dataset exceeds this, performance degrades rapidly due to reliance on NVMe reads. Database Tuning Parameters

2.4 Scalability Limits

This specific configuration is rated for sustained loads up to 25,000 PV/h before requiring horizontal scaling of the web tier or introduction of read replicas for the database. Beyond this, database write saturation (due to constant updates to `recentchanges` and `page` tables) becomes the primary bottleneck. Scaling beyond this threshold necessitates implementing Database Sharding Strategies.

3. Recommended Use Cases

This configuration is optimized for environments requiring high uptime, complex content rendering, and substantial data integrity assurance.

3.1 Enterprise Knowledge Management (KM)

  • **Description:** Internal documentation portals, standard operating procedure (SOP) repositories, and technical manuals for large organizations (5,000+ active internal users).
  • **Fitness:** Excellent. The large RAM allocation ensures that common documentation pages are served directly from memory cache, providing near-instantaneous retrieval for end-users. The robust CPU core count handles the computational load generated by complex syntax like VisualEditor operations and high-level template invocations. MediaWiki Extensions for Enterprise

3.2 Specialized Public Wiki / Community Hub

  • **Description:** Medium-sized community wikis (e.g., specialized gaming wikis, open-source project documentation) that experience predictable daily traffic spikes but require high availability during off-peak hours.
  • **Fitness:** Very Good. The architecture supports rapid recovery from traffic bursts. However, public-facing wikis often require greater read-replica separation to handle massive read concurrency, which this integrated architecture does not explicitly detail (see Section 4).

3.3 Regulatory Archival System

  • **Description:** Systems where historical data integrity is paramount, often involving frequent database backups and schema migrations for compliance audits.
  • **Fitness:** Good. The use of Enterprise-grade hardware (ECC RAM, Tiered RAID) ensures data reliability. The generous NVMe storage allows for extremely fast snapshotting and restoration operations, crucial for auditing purposes Disaster Recovery Planning.

3.4 Inappropriate Use Cases

This configuration is *not* recommended for: 1. **Massive Read-Only Archives (e.g., 100M+ pages):** The database size will exceed the practical limits of a single, high-performance node, necessitating immediate read-replica deployment or sharding. 2. **High-Frequency Transactional Data:** MediaWiki is not a suitable backend for high-velocity transactional data (like e-commerce order processing) due to inherent transactional overhead associated with content revisioning. Alternative Database Systems

4. Comparison with Similar Configurations

To place this configuration (Configuration A) in context, we compare it against a standard lower-tier deployment (Configuration B) and an extremely high-scale deployment (Configuration C), often seen in major public wikis.

4.1 Configuration Definitions

  • **Configuration A (Target):** High-Density Integrated Server (As detailed in Section 1). Optimized for performance/cost balance for medium-large enterprises.
  • **Configuration B (Standard SMB):** Single 1U Server, 1x High-Clock CPU (16 Cores), 256 GB RAM, SATA SSD RAID 10.
  • **Configuration C (Hyperscale Cluster):** Distributed Architecture. 4x Web/App Servers (32 Cores each), 2x Database Masters (96 Cores each), dedicated 1TB RAM per DB node, leveraging MariaDB Galera Cluster or similar multi-master setup.

4.2 Comparative Performance Table

Configuration Comparison Summary
Feature Configuration A (Target) Configuration B (SMB) Configuration C (Hyperscale)
CPU Compute Power (Logical Cores) 192 (App/DB combined) 32 768+ (Distributed)
Total RAM (Max Cache Potential) 1 TB (Integrated) 256 GB 4 TB+ (Distributed)
Storage Latency Profile Very Low (NVMe Primary) Moderate (SATA SSD) Very Low (Dedicated NVMe per node)
Max Estimated PV/h 25,000 4,000 250,000+
Cost Profile (Relative Index) 1.0x 0.3x 5.0x+
Primary Bottleneck Database Write Throughput Disk I/O (SATA) Network Latency (Inter-node)

4.3 Analysis of Trade-offs

Configuration A achieves superior performance over B primarily by dedicating over 60% of system resources to the InnoDB buffer pool and leveraging high-throughput NVMe I/O. This moves the performance bottleneck away from storage latency and towards CPU processing of complex page requests.

Configuration C, while offering superior scalability, introduces significant operational complexity. The overhead associated with maintaining cluster synchronization (e.g., ensuring read-replica consistency or multi-master commit latency) often requires specialized DevOps expertise that Configuration A avoids by centralizing the core services onto high-spec, resilient hardware High Availability Strategies. Configuration A represents the sweet spot for organizations prioritizing stability and performance without adopting full microservices architecture.

5. Maintenance Considerations

Maintaining a high-performance MediaWiki 1.40 stack requires diligence in firmware management, patching, and monitoring of key resource utilization metrics.

5.1 Power and Cooling Requirements

The recommended hardware configuration (Dual-Socket, high-TDP CPUs, extensive NVMe arrays) results in a significant power draw.

  • **Power Consumption Estimate:** Under peak load, a single Application/Database node is estimated to pull between 1,200W and 1,800W continuously.
  • **Rack Density:** Ensure the rack unit (RU) has sufficient power distribution units (PDUs) rated for at least 3kW per rack side to accommodate redundancy and future expansion. Data Center Power Planning
  • **Thermal Management:** High-performance CPUs require excellent airflow. Ensure the chassis fans are operating in a high-performance mode (which may increase acoustic output) and that the data center cooling infrastructure can maintain ambient temperatures below 22°C (72°F) at the server inlet. Server Thermal Management

5.2 Software and Firmware Lifecycle Management

MediaWiki 1.40 is tightly integrated with modern PHP versions. Maintenance windows must account for complex dependency updates.

  • **PHP Runtime:** Updates to PHP 8.3 or later may introduce subtle performance regressions or incompatibilities with older extensions. Testing against the staging environment using PHP Benchmarking Tools is mandatory before production deployment.
  • **Firmware:** Regular updates to BIOS/UEFI and RAID controller firmware are crucial, especially for NVMe drives, to ensure optimal TRIM/UNMAP command handling, which directly impacts sustained IOPS performance. Storage Firmware Best Practices
  • **Database Patching:** Major MariaDB/Percona updates should be tested rigorously, focusing on changes to the query planner, as MediaWiki generates complex, dynamic SQL queries. Database Upgrade Procedures

5.3 Monitoring and Alerting

Proactive monitoring is essential to prevent performance degradation before it impacts users. Key metrics to monitor via tools like Prometheus/Grafana include:

1. **InnoDB Buffer Pool Hit Rate:** Should consistently exceed 99%. A drop indicates the working set is too large for allocated RAM or that caching layers are failing. Database Monitoring Metrics 2. **PHP-FPM Worker Saturation:** High utilization suggests CPU or memory starvation, requiring scaling out the web tier or increasing PHP worker limits. PHP-FPM Configuration Tuning 3. **NVMe Queue Depth:** Consistently high queue depths (> 32) indicate the storage subsystem cannot keep up with the workload, pointing to an I/O bottleneck, likely caused by insufficient memory leading to excessive disk reads. NVMe Performance Analysis 4. **Redis Latency:** High latency (over 5ms) for object/parser cache lookups forces the application back to the slower database, negating the caching benefits. Distributed Cache Monitoring

5.4 Backup and Recovery

Given the integrated nature of the application and database on the primary node, recovery procedures must be robust.

  • **Database Backups:** Utilize filesystem-level snapshots of the NVMe array combined with logical backups (e.g., `mysqldump` or `mariabackup`) taken during low-activity periods. Ensure backups are immutable and stored offsite. Database Backup Strategy
  • **Media Synchronization:** Media files (stored on the secondary SSD array) must be synchronized in near real-time using a tool like rsync or distributed filesystem replication (if using a clustered storage solution) to maintain consistency with the database state. File System Synchronization Techniques
  • **Configuration Management:** All configuration files (`LocalSettings.php`, Nginx/Apache configs) must be managed via version control (Git) and deployed via configuration management tools (Ansible/SaltStack) to ensure rapid redeployment capability. Configuration Management for Wiki Farms

This detailed hardware specification ensures that MediaWiki 1.40 can operate reliably, delivering high performance tailored to the demands of modern enterprise content management systems, leveraging the latest advancements in CPU architecture and high-speed persistent memory. MediaWiki Performance Tuning Server Hardware Best Practices Enterprise Application Deployment High-Speed Interconnects Data Integrity Checks System Logging Best Practices Application Health Checks


Intel-Based Server Configurations

Configuration Specifications Benchmark
Core i7-6700K/7700 Server 64 GB DDR4, NVMe SSD 2 x 512 GB CPU Benchmark: 8046
Core i7-8700 Server 64 GB DDR4, NVMe SSD 2x1 TB CPU Benchmark: 13124
Core i9-9900K Server 128 GB DDR4, NVMe SSD 2 x 1 TB CPU Benchmark: 49969
Core i9-13900 Server (64GB) 64 GB RAM, 2x2 TB NVMe SSD
Core i9-13900 Server (128GB) 128 GB RAM, 2x2 TB NVMe SSD
Core i5-13500 Server (64GB) 64 GB RAM, 2x500 GB NVMe SSD
Core i5-13500 Server (128GB) 128 GB RAM, 2x500 GB NVMe SSD
Core i5-13500 Workstation 64 GB DDR5 RAM, 2 NVMe SSD, NVIDIA RTX 4000

AMD-Based Server Configurations

Configuration Specifications Benchmark
Ryzen 5 3600 Server 64 GB RAM, 2x480 GB NVMe CPU Benchmark: 17849
Ryzen 7 7700 Server 64 GB DDR5 RAM, 2x1 TB NVMe CPU Benchmark: 35224
Ryzen 9 5950X Server 128 GB RAM, 2x4 TB NVMe CPU Benchmark: 46045
Ryzen 9 7950X Server 128 GB DDR5 ECC, 2x2 TB NVMe CPU Benchmark: 63561
EPYC 7502P Server (128GB/1TB) 128 GB RAM, 1 TB NVMe CPU Benchmark: 48021
EPYC 7502P Server (128GB/2TB) 128 GB RAM, 2 TB NVMe CPU Benchmark: 48021
EPYC 7502P Server (128GB/4TB) 128 GB RAM, 2x2 TB NVMe CPU Benchmark: 48021
EPYC 7502P Server (256GB/1TB) 256 GB RAM, 1 TB NVMe CPU Benchmark: 48021
EPYC 7502P Server (256GB/4TB) 256 GB RAM, 2x2 TB NVMe CPU Benchmark: 48021
EPYC 9454P Server 256 GB RAM, 2x2 TB NVMe

Order Your Dedicated Server

Configure and order your ideal server configuration

Need Assistance?

⚠️ *Note: All benchmark scores are approximate and may vary based on configuration. Server availability subject to stock.* ⚠️