Optimize MySQL and PostgreSQL CI containers for test performance#9511
Open
awln-temporal wants to merge 1 commit intomainfrom
Open
Optimize MySQL and PostgreSQL CI containers for test performance#9511awln-temporal wants to merge 1 commit intomainfrom
awln-temporal wants to merge 1 commit intomainfrom
Conversation
Disable durability guarantees (fsync, doublewrite, binlog, full page writes) and mount data directories on tmpfs for the CI-only MySQL and PostgreSQL containers. These settings eliminate synchronous disk I/O on every transaction commit, which is the primary bottleneck for write-heavy functional tests on CI runners with network-attached storage. These flags only affect crash recovery (durability), not transaction isolation or consistency. Since CI containers are never restarted after a crash, the durability loss has zero practical impact. Made-with: Cursor
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
MySQL flags added
innodb-flush-log-at-trx-commit=0- don't fsync redo log on every commitinnodb-flush-method=nosync- skip fsync syscallinnodb-doublewrite=0- skip doublewrite bufferinnodb-buffer-pool-size=512M- larger in-memory cache (up from 128M default)innodb-log-buffer-size=64M- larger redo log buffersync-binlog=0/skip-log-bin- disable binary loggingtmpfsat/var/lib/mysql(2GB)PostgreSQL flags added
fsync=off- skip all fsync callssynchronous_commit=off- don't wait for WAL flush on commitfull_page_writes=off- skip full page images in WALwal_level=minimal/max_wal_senders=0- minimal WAL overheadshared_buffers=256MB- larger shared memory cachework_mem=16MB- more memory for sorts/joinstmpfsat/var/lib/postgresql/data(2GB)Test plan
Made with Cursor