From 88e1bd6033ed2f7a3d6324b5beeafba6b79b9779 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Wed, 1 Jun 2022 21:44:58 +0200 Subject: [PATCH] MariaDB: Upgrade to 10.8 and increase innodb_buffer_pool_size #2390 --- docker-compose.ci.yml | 6 +++--- docker-compose.mariadb.yml | 16 ++++++++-------- docker-compose.yml | 4 ++-- docker/examples/arm64/README | 2 +- docker/examples/arm64/docker-compose.yml | 4 ++-- docker/examples/cloud/docker-compose.yml | 4 ++-- docker/examples/docker-compose.yml | 4 ++-- docker/examples/macos/docker-compose.yml | 4 ++-- docker/examples/scheduler/docker-compose.yml | 4 ++-- docker/examples/windows/docker-compose.yml | 4 ++-- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 6d041876d..09019f199 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -140,10 +140,10 @@ services: DRONE_TARGET_BRANCH: ## MariaDB Database Server - ## Docs: https://mariadb.com/docs/reference/cs10.6/ + ## Docs: https://mariadb.com/docs/reference/ mariadb: - image: mariadb:10.7 - command: mysqld --port=4001 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + image: mariadb:10.8 + command: mysqld --port=4001 --innodb-buffer-pool-size=256M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 expose: - "4001" # database port (internal) volumes: diff --git a/docker-compose.mariadb.yml b/docker-compose.mariadb.yml index 9dda48ffa..1284643d6 100644 --- a/docker-compose.mariadb.yml +++ b/docker-compose.mariadb.yml @@ -6,8 +6,8 @@ services: ## MariaDB 10.8 Database Server ## Docs: https://mariadb.com/kb/en/release-notes-mariadb-108-series/ mariadb-10-8: - image: mariadb:10.8-rc - command: mysqld --port=4001 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + image: mariadb:10.8 + command: mysqld --port=4001 --innodb-buffer-pool-size=256M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 expose: - "4001" ports: @@ -25,7 +25,7 @@ services: ## MariaDB 10.7 Database Server mariadb-10-7: image: mariadb:10.7 - command: mysqld --port=4001 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --port=4001 --innodb-buffer-pool-size=256M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 expose: - "4001" # database port (internal) volumes: @@ -43,7 +43,7 @@ services: ## see https://jira.mariadb.org/browse/MDEV-25362 mariadb-10-5-5: image: mariadb:10.5.5 - command: mysqld --port=4001 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --port=4001 --innodb-buffer-pool-size=256M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 expose: - "4001" # database port (internal) volumes: @@ -58,7 +58,7 @@ services: ## Docs: https://mariadb.com/docs/reference/cs10.3/ mariadb-10-3: image: mariadb:10.3 - command: mysqld --port=4001 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --port=4001 --innodb-buffer-pool-size=256M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 expose: - "4001" # database port (internal) volumes: @@ -73,7 +73,7 @@ services: ## Docs: https://mariadb.com/docs/reference/cs10.2/ mariadb-10-2: image: mariadb:10.2 - command: mysqld --port=4001 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --port=4001 --innodb-buffer-pool-size=256M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 expose: - "4001" # database port (internal) volumes: @@ -87,7 +87,7 @@ services: ## MariaDB 10.1 Database Server mariadb-10-1: image: mariadb:10.1 - command: mysqld --port=4001 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --port=4001 --innodb-buffer-pool-size=256M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 expose: - "4001" # database port (internal) volumes: @@ -102,7 +102,7 @@ services: ## Docs: https://dev.mysql.com/doc/refman/8.0/en/ mysql: image: mysql:8 - command: mysqld --port=4001 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --port=4001 --innodb-buffer-pool-size=256M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 expose: - "4001" # database port (internal) volumes: diff --git a/docker-compose.yml b/docker-compose.yml index 0ff9b0794..f19e3676e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -106,8 +106,8 @@ services: ## MariaDB Database Server ## Docs: https://mariadb.com/docs/reference/ mariadb: - image: mariadb:10.7 - command: mysqld --port=4001 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + image: mariadb:10.8 + command: mysqld --port=4001 --innodb-buffer-pool-size=256M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 expose: - "4001" ports: diff --git a/docker/examples/arm64/README b/docker/examples/arm64/README index c44ea8947..1cfa604ab 100644 --- a/docker/examples/arm64/README +++ b/docker/examples/arm64/README @@ -12,7 +12,7 @@ single-arch ARM64 images (updated and tested less frequently): Stable Release : photoprism/photoprism:arm64 Development Preview: photoprism/photoprism:preview-arm64 - MariaDB : arm64v8/mariadb:10.7 + MariaDB : arm64v8/mariadb:10.8 If your device meets the system requirements, mostly the same installation instructions as for regular Linux servers apply: diff --git a/docker/examples/arm64/docker-compose.yml b/docker/examples/arm64/docker-compose.yml index 9f50ed280..5ccf80a10 100644 --- a/docker/examples/arm64/docker-compose.yml +++ b/docker/examples/arm64/docker-compose.yml @@ -116,11 +116,11 @@ services: ## If MariaDB gets stuck in a restart loop, this points to a memory or filesystem issue: ## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors restart: unless-stopped - image: arm64v8/mariadb:10.7 # this mariadb image runs on ARM64-based devices only + image: arm64v8/mariadb:10.8 # ARM64 IMAGE ONLY, DOES NOT WORK ON ARMv7, AMD or Intel security_opt: - seccomp:unconfined - apparmor:unconfined - command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --innodb-buffer-pool-size=256M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 ## Never store database files on an unreliable device such as a USB flash drive, an SD card, or a shared network folder: volumes: - "./database:/var/lib/mysql" # DO NOT REMOVE diff --git a/docker/examples/cloud/docker-compose.yml b/docker/examples/cloud/docker-compose.yml index 9c91a9d6e..17acf897b 100644 --- a/docker/examples/cloud/docker-compose.yml +++ b/docker/examples/cloud/docker-compose.yml @@ -188,12 +188,12 @@ services: ## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql mariadb: restart: always - image: mariadb:10.7 + image: mariadb:10.8 container_name: mariadb security_opt: - seccomp:unconfined - apparmor:unconfined - command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --innodb-buffer-pool-size=512M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 ## Never store database files on an unreliable device such as a USB flash drive, an SD card, or a shared network folder: volumes: - "./database:/var/lib/mysql" # DO NOT REMOVE diff --git a/docker/examples/docker-compose.yml b/docker/examples/docker-compose.yml index 5f0c1ecc3..a1fd27602 100644 --- a/docker/examples/docker-compose.yml +++ b/docker/examples/docker-compose.yml @@ -116,11 +116,11 @@ services: ## If MariaDB gets stuck in a restart loop, this points to a memory or filesystem issue: ## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors restart: unless-stopped - image: mariadb:10.7 + image: mariadb:10.8 security_opt: - seccomp:unconfined - apparmor:unconfined - command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --innodb-buffer-pool-size=512M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 ## Never store database files on an unreliable device such as a USB flash drive, an SD card, or a shared network folder: volumes: - "./database:/var/lib/mysql" # DO NOT REMOVE diff --git a/docker/examples/macos/docker-compose.yml b/docker/examples/macos/docker-compose.yml index 06fbdb23f..6c739ba4c 100644 --- a/docker/examples/macos/docker-compose.yml +++ b/docker/examples/macos/docker-compose.yml @@ -90,13 +90,13 @@ services: ## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql mariadb: restart: unless-stopped - image: mariadb:10.7 + image: mariadb:10.8 security_opt: - seccomp:unconfined - apparmor:unconfined ## --lower-case-table-names=1 stores tables in lowercase and compares names in a case-insensitive manner ## see https://mariadb.com/kb/en/server-system-variables/#lower_case_table_names - command: mysqld --lower-case-table-names=1 --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --lower-case-table-names=1 --innodb-buffer-pool-size=512M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 volumes: - "database:/var/lib/mysql" # Named volume "database" is defined at the bottom (DO NOT REMOVE) environment: diff --git a/docker/examples/scheduler/docker-compose.yml b/docker/examples/scheduler/docker-compose.yml index 4ef670634..37280acdd 100644 --- a/docker/examples/scheduler/docker-compose.yml +++ b/docker/examples/scheduler/docker-compose.yml @@ -101,12 +101,12 @@ services: ## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql mariadb: restart: unless-stopped - image: mariadb:10.7 + image: mariadb:10.8 container_name: mariadb security_opt: - seccomp:unconfined - apparmor:unconfined - command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --innodb-buffer-pool-size=512M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 ## Never store database files on an unreliable device such as a USB flash drive, an SD card, or a shared network folder: volumes: - "./database:/var/lib/mysql" # DO NOT REMOVE diff --git a/docker/examples/windows/docker-compose.yml b/docker/examples/windows/docker-compose.yml index 759f10796..6d833eb1b 100644 --- a/docker/examples/windows/docker-compose.yml +++ b/docker/examples/windows/docker-compose.yml @@ -96,13 +96,13 @@ services: ## If MariaDB gets stuck in a restart loop, this points to a memory or filesystem issue: ## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors restart: unless-stopped - image: mariadb:10.7 + image: mariadb:10.8 security_opt: - seccomp:unconfined - apparmor:unconfined ## --lower-case-table-names=1 stores tables in lowercase and compares names in a case-insensitive manner ## see https://mariadb.com/kb/en/server-system-variables/#lower_case_table_names - command: mysqld --innodb-buffer-pool-size=128M --lower-case-table-names=1 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + command: mysqld --innodb-buffer-pool-size=512M --lower-case-table-names=1 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 volumes: - "database:/var/lib/mysql" # Named volume "database" is defined at the bottom (DO NOT REMOVE) environment: