Commit 2c430720 authored by Mike Hibler's avatar Mike Hibler
Browse files

Tweak initial mysql my.cnf settings to lower memory usage in 5.7.

parent 58a03627
......@@ -328,6 +328,7 @@ $MYSQLDUMP = "/usr/local/bin/mysqldump";
$MYSQLINSTALL = "/usr/local/bin/mysql_install_db";
$MYSQLDBDIR = "/var/db/mysql";
$MYSQL_LOGDIR = "$LOGDIR/mysql";
$MYSQL_CNF = "/usr/local/etc/mysql/my.cnf";
$PROTOUSER = "elabman";
$CHECKUPUSER = "elabckup";
......
......@@ -31,6 +31,28 @@ sub Install($$$)
}
}
};
#
# Keep the memory usage down:
#
# innodb_buffer_pool_size: 1G -> 128M
# innodb_data_file_path: 128M -> 16M
# innodb_temp_data_file_path: 128M -> 48M
# performance_schema: ON -> OFF
#
# XXX will need to revisit this when we start using innodb tables.
#
Phase "config", "Tweak my.cnf", sub {
PhaseSkip("unneeded")
if (!$newmysql);
DoneIfDoesntExist($MYSQL_CNF);
AppendToFileFatal($MYSQL_CNF,
"[mysqld]",
"innodb_buffer_pool_size = 128M",
"innodb_data_file_path = ibdata1:16M:autoextend",
"innodb_temp_data_file_path = ibtmp1:48M:autoextend",
"performance_schema = OFF"
);
};
Phase "initialize", "Initializing mysql", sub {
PhaseSkip("mysqld already initialzed")
if (-d "$MYSQLDBDIR/mysql");
......
......@@ -35,6 +35,29 @@ sub Install($$$)
}
};
#
# Keep the memory usage down:
#
# innodb_buffer_pool_size: 1G -> 128M
# innodb_data_file_path: 128M -> 16M
# innodb_temp_data_file_path: 128M -> 48M
# performance_schema: ON -> OFF
#
# XXX will need to revisit this when we start using innodb tables.
#
Phase "config", "Tweak my.cnf", sub {
PhaseSkip("unneeded")
if (!$newmysql);
DoneIfDoesntExist($MYSQL_CNF);
AppendToFileFatal($MYSQL_CNF,
"[mysqld]",
"innodb_buffer_pool_size = 128M",
"innodb_data_file_path = ibdata1:16M:autoextend",
"innodb_temp_data_file_path = ibtmp1:48M:autoextend",
"performance_schema = OFF"
);
};
# Get a password for the the DB.
Phase "password", "Asking for mysqld root password", sub {
DoneIfExists("$ETCDIR/mysqld.pwd");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment