Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
2c430720
Commit
2c430720
authored
Jun 14, 2017
by
Mike Hibler
Browse files
Tweak initial mysql my.cnf settings to lower memory usage in 5.7.
parent
58a03627
Changes
3
Hide whitespace changes
Inline
Side-by-side
install/installvars.pm.in
View file @
2c430720
...
...
@@ -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"
;
...
...
install/phases/boss/database
View file @
2c430720
...
...
@@ -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");
...
...
install/phases/ops/database
View file @
2c430720
...
...
@@ -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");
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment