Skip to content

Commit c51139e

Browse files
christophdbclaude
andcommitted
add MariaDB performance tuning guide
Document key MariaDB settings (innodb_buffer_pool_size, innodb_log_file_size, max_connections) with sizing examples and step-by-step instructions for applying custom configuration via Docker Compose. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4151be9 commit c51139e

2 files changed

Lines changed: 72 additions & 0 deletions

File tree

docs/maintenance/mariadb-tuning.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
description: Optimize MariaDB performance for SeaTable Server with custom configuration settings.
3+
---
4+
5+
# MariaDB Performance Tuning
6+
7+
SeaTable's default MariaDB configuration works well for small installations. For larger deployments or when you notice slow database queries, tuning MariaDB can significantly improve performance.
8+
9+
!!! tip "Automated tuning with Releem"
10+
11+
If you prefer automated optimization, consider using [Releem](../installation/components/releem.md). It monitors your database workload and recommends optimized settings.
12+
13+
## Key settings
14+
15+
The most impactful setting is `innodb_buffer_pool_size` — the memory area where InnoDB caches table data and indexes. As a rule of thumb, set it to **50–70% of your server's available RAM** after accounting for SeaTable and other services.
16+
17+
| Setting | Default | Recommendation | Purpose |
18+
|---|---|---|---|
19+
| `innodb_buffer_pool_size` | 128M | 50–70% of available RAM | Cache for table data and indexes |
20+
| `innodb_log_file_size` | 48M | 256M | Redo log size, improves write performance |
21+
| `max_connections` | 151 | 200–300 | Max concurrent database connections |
22+
23+
## Apply custom settings
24+
25+
### 1. Create a configuration file
26+
27+
Create `/opt/seatable-compose/99-mariadb-custom.cnf` with your tuned values. Adjust `innodb_buffer_pool_size` to match your server's RAM:
28+
29+
```ini
30+
[mariadb]
31+
innodb_buffer_pool_size = 2G
32+
innodb_log_file_size = 256M
33+
max_connections = 200
34+
```
35+
36+
### 2. Mount the configuration file
37+
38+
Create a `custom-mariadb.yml` in `/opt/seatable-compose/`:
39+
40+
```yaml
41+
---
42+
services:
43+
mariadb:
44+
volumes:
45+
- "./99-mariadb-custom.cnf:/etc/mysql/conf.d/99-mariadb-custom.cnf"
46+
```
47+
48+
Add `custom-mariadb.yml` to the `COMPOSE_FILE` variable in your `.env` file.
49+
50+
### 3. Restart MariaDB
51+
52+
```bash
53+
cd /opt/seatable-compose
54+
docker compose up -d mariadb
55+
```
56+
57+
### 4. Verify the settings
58+
59+
Confirm that your settings were applied:
60+
61+
```bash
62+
docker exec -it mariadb mariadb -uroot -p${MARIADB_PASSWORD} -e "SHOW VARIABLES LIKE 'innodb_buffer_pool_size';"
63+
```
64+
65+
## Sizing examples
66+
67+
| Server RAM | Other services | Recommended `innodb_buffer_pool_size` |
68+
|---|---|---|
69+
| 8 GB | SeaTable only | 2–4G |
70+
| 16 GB | SeaTable + Python Pipeline | 6–8G |
71+
| 32 GB | SeaTable + multiple components | 12–16G |

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,4 +292,5 @@ nav:
292292
- Logging: maintenance/logs.md
293293
- Add custom error messages: maintenance/debugging.md
294294
- Secrets Management: maintenance/secrets.md
295+
- MariaDB Tuning: maintenance/mariadb-tuning.md
295296
- Helper Scripts: maintenance/helper-scripts.md

0 commit comments

Comments
 (0)