Performance metrics
- Performance Metrics
This article details the key performance metrics to monitor when running a MediaWiki 1.40 installation. Understanding these metrics is crucial for maintaining a responsive and stable wiki, especially as user base and content volume grow. We will cover metrics related to the web server, database server, and MediaWiki itself. This guide is aimed at system administrators and those responsible for maintaining the wiki's infrastructure.
Web Server Metrics
The web server (typically Apache or Nginx) handles incoming requests and serves the wiki's content. Monitoring its performance is the first step in identifying bottlenecks. Key metrics include:
- Requests per second (RPS): The number of HTTP requests the server processes each second. A higher RPS indicates a busier server.
- Average response time: The average time taken to serve a request. High response times indicate potential issues.
- CPU utilization: The percentage of CPU resources being used by the web server. Sustained high CPU utilization can indicate overload.
- Memory usage: The amount of RAM being used by the web server. Excessive memory usage can lead to performance degradation.
- Concurrent connections: The number of active connections to the web server at any given time.
Here's a table summarizing typical acceptable values (these will vary significantly based on hardware and configuration):
Metric | Acceptable Range | Warning Level | Critical Level |
---|---|---|---|
Requests per second (RPS) | < 50 | 50-100 | > 100 |
Average response time (seconds) | < 0.2 | 0.2 - 0.5 | > 0.5 |
CPU utilization (%) | < 50 | 50-80 | > 80 |
Memory usage (GB) | < 4 | 4-8 | > 8 |
Concurrent connections | < 200 | 200-500 | > 500 |
Tools like `top`, `htop`, `apachetop`, or Nginx's status module can be used to monitor these metrics. Consider using a dedicated Monitoring System for long-term tracking and alerting. See also Web server configuration for details on optimizing the web server.
Database Server Metrics
The database server (typically MySQL/MariaDB or PostgreSQL) stores all the wiki's content. Database performance is often the biggest bottleneck in a MediaWiki installation. Important metrics include:
- Query execution time: The time taken to execute individual SQL queries. Slow queries are a primary cause of performance issues.
- Slow query count: The number of queries that exceed a defined execution time threshold.
- Database connections: The number of active connections to the database. Exceeding the maximum connection limit will cause errors.
- Key buffer hit ratio (MySQL/MariaDB): The percentage of times data is found in the key buffer (cache) rather than having to be read from disk. A higher ratio is better.
- Disk I/O: The rate at which data is being read from and written to disk. High disk I/O can indicate slow storage.
Here's a table outlining acceptable values for MySQL/MariaDB:
Metric | Acceptable Range | Warning Level | Critical Level |
---|---|---|---|
Query execution time (seconds) | < 0.1 | 0.1 - 0.5 | > 0.5 |
Slow query count (per hour) | < 10 | 10-50 | > 50 |
Database connections | < 50 | 50-100 | > 100 |
Key buffer hit ratio (%) | > 95 | 90-95 | < 90 |
Disk I/O (MB/s) | < 20 | 20-50 | > 50 |
Use tools like `mysqladmin processlist`, `SHOW GLOBAL STATUS` (MySQL/MariaDB), or `pg_stat_activity` (PostgreSQL) to monitor these metrics. Proper Database schema optimization and Caching strategies are essential. Refer to Database server configuration for detailed setup instructions.
MediaWiki Specific Metrics
Beyond the web and database servers, specific metrics within MediaWiki itself are vital:
- Page rendering time: The time taken to generate a wiki page, including fetching data from the database and applying templates.
- Parser cache hit ratio: The percentage of times a parsed page is retrieved from the parser cache rather than being re-parsed.
- Object cache hit ratio: The percentage of times data is retrieved from the object cache (typically Memcached or Redis) rather than the database.
- Job queue length: The number of jobs waiting to be processed by the MediaWiki maintenance scripts. A long queue can indicate a backlog.
The following table provides guidance on MediaWiki specific performance:
Metric | Acceptable Range | Warning Level | Critical Level |
---|---|---|---|
Page rendering time (seconds) | < 0.5 | 0.5 - 1.0 | > 1.0 |
Parser cache hit ratio (%) | > 90 | 80-90 | < 80 |
Object cache hit ratio (%) | > 95 | 90-95 | < 90 |
Job queue length | < 10 | 10-50 | > 50 |
MediaWiki provides several Special pages for monitoring, such as Special:Statistics and the debugging tools available via the `$wgShowDebug` configuration variable. See Performance tuning for advanced optimization techniques, including Caching configuration and Extension performance. Regularly review Maintenance tasks such as `update.php` and `rebuildindex.php` to ensure optimal performance. Consider using a robust Logging system to identify and diagnose performance issues. Understanding your Site statistics is also crucial.
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?
- Telegram: @powervps Servers at a discounted price
⚠️ *Note: All benchmark scores are approximate and may vary based on configuration. Server availability subject to stock.* ⚠️