Skip to content

Commit

Permalink
Merge pull request #1475 from khurtado/mariadb
Browse files Browse the repository at this point in the history
Tune MariaDB settings for better performance
  • Loading branch information
amaltaro authored May 16, 2024
2 parents 598526c + d58c7a6 commit 511dd27
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
12 changes: 12 additions & 0 deletions docker/pypi/wmagent-mariadb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ local/mariadb latest 4efa646aea3e 6 minutes ago 950MB
./mariadb-docker-build.sh -t 10.6.5 -p
```

#### Building MariaDB on small nodes (e.g.: testbed)

If you test on a machine/VM with less than 10G of memory, uncomment the following lines in my.cnf configuration
(and comment the production ones for the same settings)

```
# Testbed (small nodes) with low memory
#innodb_log_file_size=512M
#innodb_log_buffer_size=8M
#innodb_buffer_pool_size=2G
```

### Running a MariaDB container

We can run from the local repository or from upstream CERN registry. The typical
Expand Down
16 changes: 13 additions & 3 deletions docker/pypi/wmagent-mariadb/my.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,19 @@ innodb_checksum_algorithm=full_crc32
# default: 1
innodb_doublewrite=0

innodb_log_file_size=512M
innodb_log_buffer_size=8M
innodb_buffer_pool_size=2G

# Production nodes
# Settings based on benchmark tests:
# https://gitlab.cern.ch/dmwm/wmcore-docs/-/blob/master/docs/databases/MariaDB-benchmark.md
innodb_log_file_size=2G
innodb_log_buffer_size=16M
innodb_buffer_pool_size=8G

# Testbed (small nodes) with low memory
#innodb_log_file_size=512M
#innodb_log_buffer_size=8M
#innodb_buffer_pool_size=2G

# default: 30
innodb_sync_spin_loops=60
# default: 0
Expand Down

0 comments on commit 511dd27

Please sign in to comment.