Mercurial > p > roundup > code
diff .github/workflows/ci-test.yml @ 7488:76d4c3d43258
Speed up postgresql by disabiling durability settings.
Read:
https://pythonspeed.com/articles/faster-db-tests/
I'm not using docker for postgresql at this time, but this article
describes how to start a docker postgres image with disabled settings
that may be of use if I end up having to change python 2.7 testing to
use dockerized containers against dockerized database backends.
However as a result of the above article, I took another look at:
https://www.postgresql.org/docs/current/non-durability.html
and switched off a few more settings.
Also added some similar settings for mysql that was not in the
deployed workflow.
[skip travis]
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 15 Jun 2023 14:30:35 -0400 |
| parents | bdb23fef01ea |
| children | f0ff7f790c5c |
line wrap: on
line diff
--- a/.github/workflows/ci-test.yml Sun Jun 11 23:49:47 2023 -0400 +++ b/.github/workflows/ci-test.yml Thu Jun 15 14:30:35 2023 -0400 @@ -122,6 +122,18 @@ #grep max_allowed /etc/mysql/mysql.conf.d/mysqld.cnf #ls /etc/mysql/conf.d/ /etc/mysql/mysql.conf.d/ #sleep 5 + # try to improve performance speed by disabling some ACID + # settings and change some layout defaults. + + echo "innodb_flush_log_at_trx_commit = 2" >> /etc/mysql/mysql.conf.d/mysqld.cnf + echo "innodb_file_per_table = OFF" >> /etc/mysql/mysql.conf.d/mysqld.cnf + echo "innodb_doublewrite=OFF" >> /etc/mysql/mysql.conf.d/mysqld.cnf + echo "innodb_fast_shutdown=2" >> /etc/mysql/mysql.conf.d/mysqld.cnf + echo "innodb_log_file_size=1048576" >> /etc/mysql/mysql.conf.d/mysqld.cnf + echo "innodb_flush_method=O_DIRECT" >> /etc/mysql/mysql.conf.d/mysqld.cnf + echo "innodb_log_buffer_size=3M" >> /etc/mysql/mysql.conf.d/mysqld.cnf + echo "innodb_buffer_pool_size=180M" >> /etc/mysql/mysql.conf.d/mysqld.cnf + sleep 3 sudo service mysql restart #sleep 10 #ps -ef | grep mysqld @@ -131,9 +143,11 @@ - name: Install postgres run: | sudo apt-get update && sudo apt-get install postgresql - # Disable fsync for speed, don't care about data durability - # when testing + # Disable fsync, full page writes for speed, + # don't care about data durability when testing sudo sed -i -e '$a\fsync = off' /etc/postgresql/*/*/postgresql.conf + sudo sed -i -e '$a\full_page_writes = off' /etc/postgresql/*/*/postgresql.conf + sudo sed -i -e '$a\synchronous_commit = off' /etc/postgresql/*/*/postgresql.conf sudo service postgresql restart; sleep 10 # set up postgresql database sudo -u postgres psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres
