(travis) minimize mysqld's memory footprint
Peter Rabbitson [Mon, 29 Dec 2014 11:49:49 +0000 (12:49 +0100)]
This implements a part of "solution 2)" described in ac4e80df. Historically
the OOM issues so far have always been somehow related to mysqld

Unfortunately this alone does not seem sufficient to raise the thread count
back up, that will need more minimizations

maint/travis-ci_scripts/10_before_install.bash
maint/travis-ci_scripts/configs/minimal_mysql_travis.cnf [new file with mode: 0644]

index e2500ab..1be7e9d 100755 (executable)
@@ -68,6 +68,7 @@ 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 "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
new file mode 100644 (file)
index 0000000..770effa
--- /dev/null
@@ -0,0 +1,23 @@
+[mysqld]
+
+thread_cache_size = 0
+
+# mysql >= 5.5.16
+#thread_pool_size = 1
+
+bulk_insert_buffer_size = 0
+read_buffer_size = 32K
+join_buffer_size = 128K
+sort_buffer_size = 128K
+table_definition_cache = 400
+
+performance_schema = 0
+
+query_cache_type = 0
+query_cache_size = 0
+
+innodb_use_sys_malloc = 1
+innodb_buffer_pool_size = 1M
+
+key_buffer_size = 64K
+myisam_sort_buffer_size = 128K