Repository navigation
feat(roles): run the database dumps with low CPU and IO priority - #447
Merged
Merged
Conversation
Nice, IOSchedulingClass/Priority, CPUWeight and IOWeight keep the daily dump from slowing down the database. IOWeight only takes effect with the BFQ scheduler. Not 'idle' for MongoDB and MariaDB, as the dump holds a lock (fsyncLock, LOCK TABLES) that would starve other clients.
Nice, IOSchedulingClass/Priority, CPUWeight and IOWeight keep the daily dump from slowing down the database. IOWeight only takes effect with the BFQ scheduler. Not 'idle' for MongoDB and MariaDB, as the dump holds a lock (fsyncLock, LOCK TABLES) that would starve other clients.
Nice, IOSchedulingClass/Priority, CPUWeight and IOWeight keep the daily dump from slowing down the database. IOWeight only takes effect with the BFQ scheduler. Not 'idle' for MongoDB and MariaDB, as the dump holds a lock (fsyncLock, LOCK TABLES) that would starve other clients.
Nice, IOSchedulingClass/Priority, CPUWeight and IOWeight keep the daily dump from slowing down the database. IOWeight only takes effect with the BFQ scheduler. Not 'idle' for MongoDB and MariaDB, as the dump holds a lock (fsyncLock, LOCK TABLES) that would starve other clients.
Nice, IOSchedulingClass/Priority, CPUWeight and IOWeight keep the daily dump from slowing down the database. IOWeight only takes effect with the BFQ scheduler. Not 'idle' for MongoDB and MariaDB, as the dump holds a lock (fsyncLock, LOCK TABLES) that would starve other clients.
…ed version knows Compare the mydumper version: --dirty from 0.15.2-8, --trx-tables=0 from 0.20.1-1, and use the number of CPUs instead of --threads=0 before 0.15.3-1, which hangs. Verified with mydumper 0.10.0 (Debian 12, Ubuntu 22.04, 24.04, 26.04) and 1.0.11 (Rocky 9).
NavidSassan
force-pushed
the
feat/dump-low-priority
branch
from
October 15, 2026 10:00
ee15b0c to
1b49710
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gitlab_ce,influxdb,mariadb_server,mongodbandpostgresql_serverrun withNice=19,IOSchedulingClass=best-effort,IOSchedulingPriority=7,CPUWeight=20andIOWeight=20, so the dump no longer slows down the database.IOWeightonly takes effect with the BFQ I/O scheduler. The READMEs got a section "How the Role Behaves".idleclasses: the MongoDB dump holdsfsyncLock, and mydumper holdsLOCK TABLES ... READ LOCALon non-InnoDB tables until each table is dumped.mariadb-dumponly passes the mydumper options the installed version knows (--dirty,--trx-tables=0,--threads=0), so the dump works with mydumper 0.10.x and 1.0.x.daemon-reloadhandlers already onmaincover the changed unit files, so the tasks stay untouched.Test plan
Before rebasing onto
main(the task files were identical apart from adaemon_reloadthat the handlers now replace): mariadb, mongodb and influxdb on Rocky 8/9/10, Debian 12/13 and Ubuntu 22.04/24.04/26.04, PostgreSQL on RHEL 9/10, Debian 12/13 and Ubuntu 22.04/24.04/26.04. Where the role ran, the units carried the new values, the dumpResult=successand the second runchanged=0.CPUWeightis mapped tocpu.shareson Rocky 8 (cgroup v1).Not testable:
gitlab_ce(onlysystemd-analyze verify), MongoDB on Debian 13, Ubuntu 26.04 (no upstream packages), PostgreSQL on Rocky 8 (PGDG key), MariaDB dump on Debian 13 (no mydumper, see the mydumper repository PR).