From: Peter Rabbitson Date: Tue, 6 Oct 2015 13:54:55 +0000 (+0200) Subject: (travis) Minimize MySQL config further - even less chance of OOMs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3c26d329524f0321209e7b6736357cc041772367;p=dbsrgits%2FDBIx-Class-Historic.git (travis) Minimize MySQL config further - even less chance of OOMs Although in reality it is the preceeding commits that make the real difference --- diff --git a/maint/travis-ci_scripts/10_before_install.bash b/maint/travis-ci_scripts/10_before_install.bash index 55acf6e..774ac41 100755 --- a/maint/travis-ci_scripts/10_before_install.bash +++ b/maint/travis-ci_scripts/10_before_install.bash @@ -96,7 +96,12 @@ else export DBICTEST_MEMCACHED=127.0.0.1:11211 ### config mysql - run_or_err "Installing minimizing MySQL config" "sudo cp maint/travis-ci_scripts/configs/minimal_mysql_travis.cnf /etc/mysql/conf.d/ && sudo chmod 644 /etc/mysql/conf.d/*.cnf" + run_or_err "Installing minimizing MySQL config" "\ + sudo bash -c 'rm /var/lib/mysql/ib*' \ + && sudo cp maint/travis-ci_scripts/configs/minimal_mysql_travis.cnf /etc/mysql/conf.d/ \ + && sudo chmod 644 /etc/mysql/conf.d/*.cnf \ + " + run_or_err "Starting MySQL" "sudo /etc/init.d/mysql start" run_or_err "Creating MySQL TestDB" "mysql -e 'create database dbic_test;'" export DBICTEST_MYSQL_DSN='dbi:mysql:database=dbic_test;host=127.0.0.1' diff --git a/maint/travis-ci_scripts/configs/minimal_mysql_travis.cnf b/maint/travis-ci_scripts/configs/minimal_mysql_travis.cnf index 770effa..e7ac7a6 100644 --- a/maint/travis-ci_scripts/configs/minimal_mysql_travis.cnf +++ b/maint/travis-ci_scripts/configs/minimal_mysql_travis.cnf @@ -1,23 +1,47 @@ [mysqld] +# the DBIC test suite does hold up to 3 concurrent connections +# (t/94versioning.t), otherwise this could conceivably go lower (~50MB vsize +# per connection) +max_connections = 3 + thread_cache_size = 0 +thread_stack = 128K # mysql >= 5.5.16 #thread_pool_size = 1 -bulk_insert_buffer_size = 0 +net_buffer_length = 4K read_buffer_size = 32K join_buffer_size = 128K sort_buffer_size = 128K -table_definition_cache = 400 +bulk_insert_buffer_size = 0 +table_definition_cache = 256 performance_schema = 0 query_cache_type = 0 query_cache_size = 0 +query_cache_limit = 16K -innodb_use_sys_malloc = 1 -innodb_buffer_pool_size = 1M - +myisam_sort_buffer_size = 16K +tmp_table_size = 1M key_buffer_size = 64K -myisam_sort_buffer_size = 128K + +innodb_data_file_path = ibdata1:10M:autoextend +innodb_autoextend_increment = 1 +innodb_buffer_pool_size = 512K + +innodb_stats_on_metadata = 0 +innodb_file_per_table = 0 + +innodb_log_file_size = 1M +innodb_log_buffer_size = 512K +innodb_buffer_pool_size = 512K + +innodb_use_sys_malloc = 0 +innodb_additional_mem_pool_size = 256K +innodb_flush_method = O_DIRECT + +innodb_read_io_threads = 1 +innodb_write_io_threads = 1