Server rental store

Database management

# Database Management

This article details the database management aspects of our MediaWiki 1.40 server configuration. Proper database management is crucial for performance, stability, and data integrity. This guide is aimed at newcomers responsible for server maintenance.

Database System Choice

We utilize MariaDB as our primary database system. While MySQL is also compatible, MariaDB offers performance enhancements and open-source commitment aligning with our server philosophy. The database stores all wiki content, user information, revision history, and configuration settings. Understanding its configuration is paramount. Alternatives like PostgreSQL are possible but require significant configuration changes to MediaWiki. For detailed information on supported databases, refer to the Configuration/Databases page.

Database Server Specifications

The following table outlines the specifications of our database server:

Specification Value
Server Operating System Ubuntu Server 22.04 LTS
CPU Intel Xeon Gold 6248R (24 cores)
RAM 128 GB DDR4 ECC
Storage 2 x 2 TB NVMe SSD (RAID 1)
Network Interface 10 Gbps Ethernet

This configuration supports high read/write operations and ensures data redundancy through RAID. Regular monitoring of Server statistics is crucial to identify potential bottlenecks.

MariaDB Configuration

The `my.cnf` file (typically located at `/etc/mysql/my.cnf` or `/etc/my.cnf`) governs the MariaDB server's behavior. Key configuration parameters are detailed below. Adjustments should be made cautiously and after thorough testing, referencing the MariaDB documentation.

Parameter Value Description
`innodb_buffer_pool_size` 64G Specifies the size of the buffer pool used by the InnoDB storage engine. A larger pool generally improves performance.
`innodb_log_file_size` 512M Size of each InnoDB log file. Larger values reduce checkpointing frequency, but increase recovery time.
`innodb_flush_log_at_trx_commit` 1 Controls the balance between data safety and performance. `1` (default) provides full ACID compliance, while `0` or `2` can improve performance at the risk of data loss.
`max_connections` 500 Maximum number of concurrent client connections allowed.
`query_cache_size` 0 Query cache size. Disabled due to performance issues in modern workloads.

These settings are optimized for our MediaWiki installation. Monitoring the Performance logs will help identify the need for adjustments.

Database Maintenance Tasks

Regular database maintenance is essential for optimal performance. Key tasks include:

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