Skip to content

Commit 8aa8a0f

Browse files
committed
Fix mysql db speedup
Use sudo and sed to append config files lines. [skip travis]
1 parent f115e3d commit 8aa8a0f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/ci-test.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,14 @@ jobs:
124124
#sleep 5
125125
# try to improve performance speed by disabling some ACID
126126
# settings and change some layout defaults.
127-
128-
echo "innodb_flush_log_at_trx_commit = 2" >> /etc/mysql/mysql.conf.d/mysqld.cnf
129-
echo "innodb_file_per_table = OFF" >> /etc/mysql/mysql.conf.d/mysqld.cnf
130-
echo "innodb_doublewrite=OFF" >> /etc/mysql/mysql.conf.d/mysqld.cnf
131-
echo "innodb_fast_shutdown=2" >> /etc/mysql/mysql.conf.d/mysqld.cnf
132-
echo "innodb_log_file_size=1048576" >> /etc/mysql/mysql.conf.d/mysqld.cnf
133-
echo "innodb_flush_method=O_DIRECT" >> /etc/mysql/mysql.conf.d/mysqld.cnf
134-
echo "innodb_log_buffer_size=3M" >> /etc/mysql/mysql.conf.d/mysqld.cnf
135-
echo "innodb_buffer_pool_size=180M" >> /etc/mysql/mysql.conf.d/mysqld.cnf
127+
sudo sed -i -e '$a\innodb_flush_log_at_trx_commit = 2' /etc/mysql/mysql.conf.d/mysqld.cnf
128+
sudo sed -i -e '$a\innodb_file_per_table = OFF' /etc/mysql/mysql.conf.d/mysqld.cnf
129+
sudo sed -i -e '$a\innodb_doublewrite=OFF' /etc/mysql/mysql.conf.d/mysqld.cnf
130+
sudo sed -i -e '$a\innodb_fast_shutdown=2' /etc/mysql/mysql.conf.d/mysqld.cnf
131+
sudo sed -i -e '$a\innodb_log_file_size=1048576' /etc/mysql/mysql.conf.d/mysqld.cnf
132+
sudo sed -i -e '$a\innodb_flush_method=O_DIRECT' /etc/mysql/mysql.conf.d/mysqld.cnf
133+
sudo sed -i -e '$a\innodb_log_buffer_size=3M' /etc/mysql/mysql.conf.d/mysqld.cnf
134+
sudo sed -i -e '$a\innodb_buffer_pool_size=180M' /etc/mysql/mysql.conf.d/mysqld.cnf
136135
sleep 3
137136
sudo service mysql restart
138137
#sleep 10

0 commit comments

Comments
 (0)