mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-04 12:39:06 +02:00
[management] Keep per-table tablespaces in the MySQL test container
With innodb_file_per_table off, the packages that create hundreds of databases per run got slower, not faster, while the small ones sped up: dropped databases leave the shared system tablespace to grow and fragment, so every later CREATE and DROP pays for it. Keep the default per-table files and only skip the redo, binary log and doublewrite fsyncs. The temporary timing workflow also prints a short disk and CPU calibration so a slow runner can be told apart from a slow change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsVtbd7MxMVsS9vP1H6KPS
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
61850162ca
commit
c6e564caf0
@@ -39,11 +39,12 @@ func CreateMysqlTestContainer() (func(), string, error) {
|
||||
mysql.WithPassword("testing"),
|
||||
// Every test creates and drops a database with about 40 tables, so with
|
||||
// the server defaults the run is dominated by durability work: each
|
||||
// CREATE TABLE creates and fsyncs its own tablespace file and fsyncs the
|
||||
// redo and binary logs. None of it protects anything in a container that
|
||||
// is discarded after the run.
|
||||
// CREATE TABLE fsyncs the redo log, the binary log and the doublewrite
|
||||
// buffer. None of it protects anything in a container that is discarded
|
||||
// after the run. Tables stay in per-table files on purpose: in the shared
|
||||
// system tablespace the cost of every CREATE and DROP grew with the number
|
||||
// of databases the run had already created.
|
||||
testcontainers.WithCmd("mysqld",
|
||||
"--innodb-file-per-table=OFF",
|
||||
"--innodb-flush-log-at-trx-commit=0",
|
||||
"--innodb-doublewrite=OFF",
|
||||
"--skip-log-bin",
|
||||
|
||||
Reference in New Issue
Block a user