From b3c31e0608fac660bb6f85b8b9a2cd9b9357915d Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Mon, 19 Mar 2012 22:11:57 -0500 Subject: [PATCH] Adding dbaas-mycnf to the contrib folder * Added logging configs to the guestagent --- contrib/dbaas-mycnf/builddeb.sh | 46 +++++ contrib/dbaas-mycnf/debian/changelog | 64 +++++++ contrib/dbaas-mycnf/debian/control | 15 ++ contrib/dbaas-mycnf/debian/copyright | 24 +++ .../dbaas-mycnf/debian/dbaas-mycnf.install | 1 + .../debian/dbaas-mycnf.lintian-overrides | 1 + .../dbaas-mycnf/debian/dbaas-mycnf.postinst | 37 ++++ contrib/dbaas-mycnf/debian/rules | 8 + contrib/dbaas-mycnf/etc/my.cnf.base | 177 +++++++++++++++++ contrib/dbaas-mycnf/etc/my.cnf.default | 178 ++++++++++++++++++ contrib/dbaas-mycnf/test/build_templates.sh | 19 ++ contrib/dbaas-mycnf/test/etc/my.cnf.16G | 177 +++++++++++++++++ contrib/dbaas-mycnf/test/etc/my.cnf.1G | 177 +++++++++++++++++ contrib/dbaas-mycnf/test/etc/my.cnf.2G | 177 +++++++++++++++++ contrib/dbaas-mycnf/test/etc/my.cnf.32G | 177 +++++++++++++++++ contrib/dbaas-mycnf/test/etc/my.cnf.4G | 177 +++++++++++++++++ contrib/dbaas-mycnf/test/etc/my.cnf.512M | 177 +++++++++++++++++ contrib/dbaas-mycnf/test/etc/my.cnf.8G | 177 +++++++++++++++++ etc/reddwarf/reddwarf-guestagent.conf.sample | 4 + 19 files changed, 1813 insertions(+) create mode 100755 contrib/dbaas-mycnf/builddeb.sh create mode 100644 contrib/dbaas-mycnf/debian/changelog create mode 100644 contrib/dbaas-mycnf/debian/control create mode 100644 contrib/dbaas-mycnf/debian/copyright create mode 100644 contrib/dbaas-mycnf/debian/dbaas-mycnf.install create mode 100644 contrib/dbaas-mycnf/debian/dbaas-mycnf.lintian-overrides create mode 100644 contrib/dbaas-mycnf/debian/dbaas-mycnf.postinst create mode 100755 contrib/dbaas-mycnf/debian/rules create mode 100644 contrib/dbaas-mycnf/etc/my.cnf.base create mode 100644 contrib/dbaas-mycnf/etc/my.cnf.default create mode 100755 contrib/dbaas-mycnf/test/build_templates.sh create mode 100644 contrib/dbaas-mycnf/test/etc/my.cnf.16G create mode 100644 contrib/dbaas-mycnf/test/etc/my.cnf.1G create mode 100644 contrib/dbaas-mycnf/test/etc/my.cnf.2G create mode 100644 contrib/dbaas-mycnf/test/etc/my.cnf.32G create mode 100644 contrib/dbaas-mycnf/test/etc/my.cnf.4G create mode 100644 contrib/dbaas-mycnf/test/etc/my.cnf.512M create mode 100644 contrib/dbaas-mycnf/test/etc/my.cnf.8G diff --git a/contrib/dbaas-mycnf/builddeb.sh b/contrib/dbaas-mycnf/builddeb.sh new file mode 100755 index 0000000000..e82eb994d9 --- /dev/null +++ b/contrib/dbaas-mycnf/builddeb.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# Build the debian package for my.cnf templates + +# chdir to the script dir +self="${0#./}" +base="${self%/*}" +current=`pwd` + +if [ "$base" = "$self" ] ; then + home=$current +elif [[ $base =~ ^/ ]]; then + home="$base" +else + home="$current/$base" +fi + +cd $home + +# Setup the build directory for building the package +build_dir="build" +rm -rf $build_dir +mkdir -p $build_dir +cp -R debian $build_dir +cp -R etc $build_dir + +cd $build_dir + +# Define the various templates +MEMSIZE=( "512M:1" "1024M:2" "2048M:4" "4096M:8" "8192M:16" "16384M:32" "32768M:64" ) + +# Create the individual templates from the master template +for i in "${MEMSIZE[@]}"; do + key=${i%%:*} + multiplier=${i##*:} + cat ../etc/my.cnf.base | while read line; do + if [[ `expr "$line" : ".*{.*}"` != "0" ]]; then + oldval=`echo $line | sed -e 's/.*{\(.*\)}.*/\1/'` + newval=`echo "$oldval * $multiplier" | bc` + line=`echo $line | sed -e "s/{$oldval}/$newval/"` + fi + echo $line >> etc/my.cnf.$key + done +done + +# Build the package +DEB_BUILD_OPTIONS=nocheck,nodocs dpkg-buildpackage -rfakeroot -b -uc -us -d diff --git a/contrib/dbaas-mycnf/debian/changelog b/contrib/dbaas-mycnf/debian/changelog new file mode 100644 index 0000000000..c897c2c42a --- /dev/null +++ b/contrib/dbaas-mycnf/debian/changelog @@ -0,0 +1,64 @@ +dbaas-mycnf (1.0-8) lucid; urgency=low + + [ Nirmal Ranganathan ] + * Generating all the flavor templates by default + + -- DBaaS-Dev Wed, 08 Feb 2012 17:00:27 +0600 + +dbaas-mycnf (1.0-7) lucid; urgency=low + + [ Nirmal Ranganathan ] + * Changing the error logs back to /var/log/mysql/mysqld.log + + -- DBaaS-Dev Thu, 07 Apr 2011 17:00:27 +0600 + +dbaas-mycnf (1.0-6) lucid; urgency=low + + [ Nirmal Ranganathan ] + * Changing mysql bin logs location to /var/lib/mysql, same as the mysql data + directory + * Setting query_cache_type=1 + + -- DBaaS-Dev Wed, 23 Mar 2011 10:24:27 +0600 + +dbaas-mycnf (1.0-5) lucid; urgency=low + + [ Nirmal Ranganathan ] + * Moved the replacing the templates part to a post install script + * Added the bc depends + * Added a build_templates script to build out the various flavored tempaltes + which could be used for testing purposes to verify working of post install + + -- DBaaS-Dev Mon, 21 Mar 2011 14:02:27 +0600 + +dbaas-mycnf (1.0-4) lucid; urgency=low + + [ Nirmal Ranganathan ] + * Re-tagging due to build failure and broken package if rebuilt with the + same tag + + -- DBaaS-Dev Fri, 18 Mar 2011 13:51:27 +0600 + +dbaas-mycnf (1.0-3) lucid; urgency=low + + [ Nirmal Ranganathan ] + * Created a base template which is for 512M container + * Generated my.cnf for 512M to 32G containers + + -- DBaaS-Dev Fri, 18 Mar 2011 11:51:27 +0600 + +dbaas-mycnf (1.0-2) lucid; urgency=low + + [ Nirmal Ranganathan ] + * Update my.cnf.default to ideal values, still some values are for 256M and + needs to be updated + + -- DBaaS-Dev Thu, 17 Mar 2011 16:32:03 +0600 + +dbaas-mycnf (1.0-1) lucid; urgency=low + + [ Nirmal Ranganathan ] + * Created the initial default my.cnf template + + -- DBaaS-Dev Fri, 11 Mar 2011 14:32:03 +0600 + diff --git a/contrib/dbaas-mycnf/debian/control b/contrib/dbaas-mycnf/debian/control new file mode 100644 index 0000000000..9cc63ebf93 --- /dev/null +++ b/contrib/dbaas-mycnf/debian/control @@ -0,0 +1,15 @@ +Source: dbaas-mycnf +Priority: extra +Maintainer: DBaaS-Dev +Standards-Version: 3.9.1 + + +Package: dbaas-mycnf +Architecture: all +Provides: dbaas-mycnf +Section: utils +Depends: bc +Description: my.cnf tempaltes for Database as a Service. + Contains various mysql configuration templates for use within + Database as a Service. + diff --git a/contrib/dbaas-mycnf/debian/copyright b/contrib/dbaas-mycnf/debian/copyright new file mode 100644 index 0000000000..3de65cf961 --- /dev/null +++ b/contrib/dbaas-mycnf/debian/copyright @@ -0,0 +1,24 @@ +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 +Name: dbaas-mycnf +Source: local + +Files: * +Copyright: 2010 OpenStack LLC +Copyright: Others (See individual files for more details) +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + + diff --git a/contrib/dbaas-mycnf/debian/dbaas-mycnf.install b/contrib/dbaas-mycnf/debian/dbaas-mycnf.install new file mode 100644 index 0000000000..6485817e2a --- /dev/null +++ b/contrib/dbaas-mycnf/debian/dbaas-mycnf.install @@ -0,0 +1 @@ +etc/*my.cnf* /etc/dbaas/my.cnf/ diff --git a/contrib/dbaas-mycnf/debian/dbaas-mycnf.lintian-overrides b/contrib/dbaas-mycnf/debian/dbaas-mycnf.lintian-overrides new file mode 100644 index 0000000000..7c0b0213f1 --- /dev/null +++ b/contrib/dbaas-mycnf/debian/dbaas-mycnf.lintian-overrides @@ -0,0 +1 @@ +dbaas-mycnf: no-upstream-changelog diff --git a/contrib/dbaas-mycnf/debian/dbaas-mycnf.postinst b/contrib/dbaas-mycnf/debian/dbaas-mycnf.postinst new file mode 100644 index 0000000000..6116018bac --- /dev/null +++ b/contrib/dbaas-mycnf/debian/dbaas-mycnf.postinst @@ -0,0 +1,37 @@ +#!/bin/bash -e + +# Get the multiplier based on the memvalue +mem=`cat /proc/meminfo | grep MemTotal | awk '{print $2/524288}'` +base_cutoff="0.7" + +ceil() { + awk -vnumber="$mem" ' + function ceiling(x){return (x == int(x)) ? x : int(x)+1 } + BEGIN{ print ceiling(number) }' +} + +multiplier=`ceil` + +# If the mem is less than base_cutoff which is 512MB, just use +# the default which is for anything less than 512MB +if [[ $mem < $base_cutoff ]]; then + exit 0 +fi + +MYSQL_CONF_DIR="/etc/dbaas/my.cnf" + +# Create the individual templates from the master template +if [ -e "$MYSQL_CONF_DIR/my.cnf.base" ]; then + cat $MYSQL_CONF_DIR/my.cnf.base | while read line; do + if [[ `expr "$line" : ".*{.*}"` != "0" ]]; then + oldval=`echo $line | sed -e 's/.*{\(.*\)}.*/\1/'` + newval=`echo "$oldval * $multiplier" | bc` + line=`echo $line | sed -e "s/{$oldval}/$newval/"` + fi + echo $line >> $MYSQL_CONF_DIR/my.cnf.default.tmp + done + mv $MYSQL_CONF_DIR/my.cnf.default.tmp $MYSQL_CONF_DIR/my.cnf.default +fi + + +#DEBHELPER# diff --git a/contrib/dbaas-mycnf/debian/rules b/contrib/dbaas-mycnf/debian/rules new file mode 100755 index 0000000000..72ae490952 --- /dev/null +++ b/contrib/dbaas-mycnf/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +# Verbose mode +#export DH_VERBOSE=1 + +%: + dh $@ + diff --git a/contrib/dbaas-mycnf/etc/my.cnf.base b/contrib/dbaas-mycnf/etc/my.cnf.base new file mode 100644 index 0000000000..a5e311dc60 --- /dev/null +++ b/contrib/dbaas-mycnf/etc/my.cnf.base @@ -0,0 +1,177 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# Basic Settings +# + +# +# IMPORTANT +# If you make changes to these settings and your system uses apparmor, you may +# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. +# + +user = mysql +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +####tmpdir = /tmp +tmpdir = /var/tmp +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +#bind-address = 127.0.0.1 +# +# Fine Tuning +# +####key_buffer = 16M +key_buffer_size = {50}M +####max_allowed_packet = 16M +max_allowed_packet = {1}M +thread_stack = 192K +####thread_cache_size = 8 +thread_cache_size = {4} +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# Query Cache Configuration +# + +# Q cache +query_cache_type = 1 +#query_cache_min_res_unit = 1024 +query_cache_limit = 1M +####query_cache_size = 16M +query_cache_size = {8}M +# +# Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 + +log_error = /var/log/mysql/mysqld.log + +# Innodb params +innodb_data_file_path = ibdata1:10M:autoextend +innodb_buffer_pool_size = {150}M +innodb_file_per_table = 1 +innodb_log_files_in_group = 2 +innodb_log_file_size=50M +innodb_log_buffer_size=25M + +# Timeouts +connect_timeout = 15 +wait_timeout = 120 + + +# Buffers +join_buffer_size = 1M +read_buffer_size = 512K +read_rnd_buffer_size = 512K +sort_buffer_size = 1M + + +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/lib/mysql/mysql-bin.log +#expire_logs_days = 10 +#max_binlog_size = 100M + + +# Temp table +tmp_table_size = {16}M +max_heap_table_size = {16}M + +# Table cache +table_open_cache = {256} +table_definition_cache = {256} +open_files_limit = {512} + +# Connections limit +max_connections = {100} + +# Default Storage Engine +default_storage_engine = innodb + + +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +# faster start of mysql but no tab completition +#no-auto-rehash + +[isamchk] +key_buffer = 16M + +# +# IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/contrib/dbaas-mycnf/etc/my.cnf.default b/contrib/dbaas-mycnf/etc/my.cnf.default new file mode 100644 index 0000000000..47df9d6b0c --- /dev/null +++ b/contrib/dbaas-mycnf/etc/my.cnf.default @@ -0,0 +1,178 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# * Basic Settings +# + +# +# * IMPORTANT +# If you make changes to these settings and your system uses apparmor, you may +# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. +# + +user = mysql +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +####tmpdir = /tmp +tmpdir = /var/tmp +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +#bind-address = 127.0.0.1 +# +# * Fine Tuning +# +####key_buffer = 16M +key_buffer_size = 25M +#512#key_buffer_size = 50M +####max_allowed_packet = 16M +max_allowed_packet = 1M +thread_stack = 192K +####thread_cache_size = 8 +thread_cache_size = 4 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# * Query Cache Configuration +# + +# Q cache +query_cache_type = 1 +#query_cache_min_res_unit = 1024 +query_cache_limit = 1M +####query_cache_size = 16M +query_cache_size = 8M +# +# * Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 + +log_error = /var/log/mysql/mysqld.log + +# Innodb params +innodb_data_file_path = ibdata1:10M:autoextend +innodb_buffer_pool_size = 50M +#512#innodb_buffer_pool_size = 150M +innodb_file_per_table = 1 +innodb_log_files_in_group = 2 +innodb_log_file_size=50M + +# Timeouts +connect_timeout = 15 +wait_timeout = 120 + + +# Buffers +join_buffer_size = 1M +read_buffer_size = 512K +read_rnd_buffer_size = 512K +sort_buffer_size = 1M + + +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +log_bin = /var/lib/mysql/mysql-bin.log +#### expire_logs_days = 10 +expire_logs_days = 2 +max_binlog_size = 100M + + +# Temp table +tmp_table_size = 16M +max_heap_table_size = 16M + +# Table cache +table_open_cache = 256 +table_definition_cache = 256 +open_files_limit = 512 + +# Connections limit +max_connections = 100 + +# Default Storage Engine +default_storage_engine = innodb + + +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# * InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# * Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +#no-auto-rehash # faster start of mysql but no tab completition + +[isamchk] +key_buffer = 16M + +# +# * IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/contrib/dbaas-mycnf/test/build_templates.sh b/contrib/dbaas-mycnf/test/build_templates.sh new file mode 100755 index 0000000000..a0333a92af --- /dev/null +++ b/contrib/dbaas-mycnf/test/build_templates.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# Define the various templates +MEMSIZE=( "512M:1" "1G:2" "2G:4" "4G:8" "8G:16" "16G:32" "32G:64" ) + +# Create the individual templates from the master template +for i in "${MEMSIZE[@]}"; do + key=${i%%:*} + multiplier=${i##*:} + cat ../etc/my.cnf.base | while read line; do + if [[ `expr "$line" : ".*{.*}"` != "0" ]]; then + oldval=`echo $line | sed -e 's/.*{\(.*\)}.*/\1/'` + newval=`echo "$oldval * $multiplier" | bc` + line=`echo $line | sed -e "s/{$oldval}/$newval/"` + fi + echo $line >> etc/my.cnf.$key + done +done + diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.16G b/contrib/dbaas-mycnf/test/etc/my.cnf.16G new file mode 100644 index 0000000000..965593306c --- /dev/null +++ b/contrib/dbaas-mycnf/test/etc/my.cnf.16G @@ -0,0 +1,177 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# Basic Settings +# + +# +# IMPORTANT +# If you make changes to these settings and your system uses apparmor, you may +# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. +# + +user = mysql +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +####tmpdir = /tmp +tmpdir = /var/tmp +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +#bind-address = 127.0.0.1 +# +# Fine Tuning +# +####key_buffer = 16M +key_buffer_size = 1600M +####max_allowed_packet = 16M +max_allowed_packet = 32M +thread_stack = 192K +####thread_cache_size = 8 +thread_cache_size = 128 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# Query Cache Configuration +# + +# Q cache +query_cache_type = 1 +#query_cache_min_res_unit = 1024 +query_cache_limit = 1M +####query_cache_size = 16M +query_cache_size = 256M +# +# Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 + +log_error = /var/log/mysql/mysqld.log + +# Innodb params +innodb_data_file_path = ibdata1:10M:autoextend +innodb_buffer_pool_size = 4800M +innodb_file_per_table = 1 +innodb_log_files_in_group = 2 +innodb_log_file_size=50M +innodb_log_buffer_size=25M + +# Timeouts +connect_timeout = 15 +wait_timeout = 120 + + +# Buffers +join_buffer_size = 1M +read_buffer_size = 512K +read_rnd_buffer_size = 512K +sort_buffer_size = 1M + + +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/lib/mysql/mysql-bin.log +#expire_logs_days = 10 +#max_binlog_size = 100M + + +# Temp table +tmp_table_size = 512M +max_heap_table_size = 512M + +# Table cache +table_open_cache = 8192 +table_definition_cache = 8192 +open_files_limit = 16384 + +# Connections limit +max_connections = 3200 + +# Default Storage Engine +default_storage_engine = innodb + + +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +# faster start of mysql but no tab completition +#no-auto-rehash + +[isamchk] +key_buffer = 16M + +# +# IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.1G b/contrib/dbaas-mycnf/test/etc/my.cnf.1G new file mode 100644 index 0000000000..1fd9cb6f9f --- /dev/null +++ b/contrib/dbaas-mycnf/test/etc/my.cnf.1G @@ -0,0 +1,177 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# Basic Settings +# + +# +# IMPORTANT +# If you make changes to these settings and your system uses apparmor, you may +# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. +# + +user = mysql +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +####tmpdir = /tmp +tmpdir = /var/tmp +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +#bind-address = 127.0.0.1 +# +# Fine Tuning +# +####key_buffer = 16M +key_buffer_size = 100M +####max_allowed_packet = 16M +max_allowed_packet = 2M +thread_stack = 192K +####thread_cache_size = 8 +thread_cache_size = 8 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# Query Cache Configuration +# + +# Q cache +query_cache_type = 1 +#query_cache_min_res_unit = 1024 +query_cache_limit = 1M +####query_cache_size = 16M +query_cache_size = 16M +# +# Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 + +log_error = /var/log/mysql/mysqld.log + +# Innodb params +innodb_data_file_path = ibdata1:10M:autoextend +innodb_buffer_pool_size = 300M +innodb_file_per_table = 1 +innodb_log_files_in_group = 2 +innodb_log_file_size=50M +innodb_log_buffer_size=25M + +# Timeouts +connect_timeout = 15 +wait_timeout = 120 + + +# Buffers +join_buffer_size = 1M +read_buffer_size = 512K +read_rnd_buffer_size = 512K +sort_buffer_size = 1M + + +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/lib/mysql/mysql-bin.log +#expire_logs_days = 10 +#max_binlog_size = 100M + + +# Temp table +tmp_table_size = 32M +max_heap_table_size = 32M + +# Table cache +table_open_cache = 512 +table_definition_cache = 512 +open_files_limit = 1024 + +# Connections limit +max_connections = 200 + +# Default Storage Engine +default_storage_engine = innodb + + +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +# faster start of mysql but no tab completition +#no-auto-rehash + +[isamchk] +key_buffer = 16M + +# +# IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.2G b/contrib/dbaas-mycnf/test/etc/my.cnf.2G new file mode 100644 index 0000000000..df555e2bd8 --- /dev/null +++ b/contrib/dbaas-mycnf/test/etc/my.cnf.2G @@ -0,0 +1,177 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# Basic Settings +# + +# +# IMPORTANT +# If you make changes to these settings and your system uses apparmor, you may +# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. +# + +user = mysql +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +####tmpdir = /tmp +tmpdir = /var/tmp +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +#bind-address = 127.0.0.1 +# +# Fine Tuning +# +####key_buffer = 16M +key_buffer_size = 200M +####max_allowed_packet = 16M +max_allowed_packet = 4M +thread_stack = 192K +####thread_cache_size = 8 +thread_cache_size = 16 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# Query Cache Configuration +# + +# Q cache +query_cache_type = 1 +#query_cache_min_res_unit = 1024 +query_cache_limit = 1M +####query_cache_size = 16M +query_cache_size = 32M +# +# Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 + +log_error = /var/log/mysql/mysqld.log + +# Innodb params +innodb_data_file_path = ibdata1:10M:autoextend +innodb_buffer_pool_size = 600M +innodb_file_per_table = 1 +innodb_log_files_in_group = 2 +innodb_log_file_size=50M +innodb_log_buffer_size=25M + +# Timeouts +connect_timeout = 15 +wait_timeout = 120 + + +# Buffers +join_buffer_size = 1M +read_buffer_size = 512K +read_rnd_buffer_size = 512K +sort_buffer_size = 1M + + +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/lib/mysql/mysql-bin.log +#expire_logs_days = 10 +#max_binlog_size = 100M + + +# Temp table +tmp_table_size = 64M +max_heap_table_size = 64M + +# Table cache +table_open_cache = 1024 +table_definition_cache = 1024 +open_files_limit = 2048 + +# Connections limit +max_connections = 400 + +# Default Storage Engine +default_storage_engine = innodb + + +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +# faster start of mysql but no tab completition +#no-auto-rehash + +[isamchk] +key_buffer = 16M + +# +# IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.32G b/contrib/dbaas-mycnf/test/etc/my.cnf.32G new file mode 100644 index 0000000000..95490ba3ff --- /dev/null +++ b/contrib/dbaas-mycnf/test/etc/my.cnf.32G @@ -0,0 +1,177 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# Basic Settings +# + +# +# IMPORTANT +# If you make changes to these settings and your system uses apparmor, you may +# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. +# + +user = mysql +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +####tmpdir = /tmp +tmpdir = /var/tmp +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +#bind-address = 127.0.0.1 +# +# Fine Tuning +# +####key_buffer = 16M +key_buffer_size = 3200M +####max_allowed_packet = 16M +max_allowed_packet = 64M +thread_stack = 192K +####thread_cache_size = 8 +thread_cache_size = 256 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# Query Cache Configuration +# + +# Q cache +query_cache_type = 1 +#query_cache_min_res_unit = 1024 +query_cache_limit = 1M +####query_cache_size = 16M +query_cache_size = 512M +# +# Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 + +log_error = /var/log/mysql/mysqld.log + +# Innodb params +innodb_data_file_path = ibdata1:10M:autoextend +innodb_buffer_pool_size = 9600M +innodb_file_per_table = 1 +innodb_log_files_in_group = 2 +innodb_log_file_size=50M +innodb_log_buffer_size=25M + +# Timeouts +connect_timeout = 15 +wait_timeout = 120 + + +# Buffers +join_buffer_size = 1M +read_buffer_size = 512K +read_rnd_buffer_size = 512K +sort_buffer_size = 1M + + +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/lib/mysql/mysql-bin.log +#expire_logs_days = 10 +#max_binlog_size = 100M + + +# Temp table +tmp_table_size = 1024M +max_heap_table_size = 1024M + +# Table cache +table_open_cache = 16384 +table_definition_cache = 16384 +open_files_limit = 32768 + +# Connections limit +max_connections = 6400 + +# Default Storage Engine +default_storage_engine = innodb + + +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +# faster start of mysql but no tab completition +#no-auto-rehash + +[isamchk] +key_buffer = 16M + +# +# IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.4G b/contrib/dbaas-mycnf/test/etc/my.cnf.4G new file mode 100644 index 0000000000..2f9400bf8f --- /dev/null +++ b/contrib/dbaas-mycnf/test/etc/my.cnf.4G @@ -0,0 +1,177 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# Basic Settings +# + +# +# IMPORTANT +# If you make changes to these settings and your system uses apparmor, you may +# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. +# + +user = mysql +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +####tmpdir = /tmp +tmpdir = /var/tmp +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +#bind-address = 127.0.0.1 +# +# Fine Tuning +# +####key_buffer = 16M +key_buffer_size = 400M +####max_allowed_packet = 16M +max_allowed_packet = 8M +thread_stack = 192K +####thread_cache_size = 8 +thread_cache_size = 32 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# Query Cache Configuration +# + +# Q cache +query_cache_type = 1 +#query_cache_min_res_unit = 1024 +query_cache_limit = 1M +####query_cache_size = 16M +query_cache_size = 64M +# +# Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 + +log_error = /var/log/mysql/mysqld.log + +# Innodb params +innodb_data_file_path = ibdata1:10M:autoextend +innodb_buffer_pool_size = 1200M +innodb_file_per_table = 1 +innodb_log_files_in_group = 2 +innodb_log_file_size=50M +innodb_log_buffer_size=25M + +# Timeouts +connect_timeout = 15 +wait_timeout = 120 + + +# Buffers +join_buffer_size = 1M +read_buffer_size = 512K +read_rnd_buffer_size = 512K +sort_buffer_size = 1M + + +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/lib/mysql/mysql-bin.log +#expire_logs_days = 10 +#max_binlog_size = 100M + + +# Temp table +tmp_table_size = 128M +max_heap_table_size = 128M + +# Table cache +table_open_cache = 2048 +table_definition_cache = 2048 +open_files_limit = 4096 + +# Connections limit +max_connections = 800 + +# Default Storage Engine +default_storage_engine = innodb + + +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +# faster start of mysql but no tab completition +#no-auto-rehash + +[isamchk] +key_buffer = 16M + +# +# IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.512M b/contrib/dbaas-mycnf/test/etc/my.cnf.512M new file mode 100644 index 0000000000..3f7fc3d719 --- /dev/null +++ b/contrib/dbaas-mycnf/test/etc/my.cnf.512M @@ -0,0 +1,177 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# Basic Settings +# + +# +# IMPORTANT +# If you make changes to these settings and your system uses apparmor, you may +# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. +# + +user = mysql +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +####tmpdir = /tmp +tmpdir = /var/tmp +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +#bind-address = 127.0.0.1 +# +# Fine Tuning +# +####key_buffer = 16M +key_buffer_size = 50M +####max_allowed_packet = 16M +max_allowed_packet = 1M +thread_stack = 192K +####thread_cache_size = 8 +thread_cache_size = 4 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# Query Cache Configuration +# + +# Q cache +query_cache_type = 1 +#query_cache_min_res_unit = 1024 +query_cache_limit = 1M +####query_cache_size = 16M +query_cache_size = 8M +# +# Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 + +log_error = /var/log/mysql/mysqld.log + +# Innodb params +innodb_data_file_path = ibdata1:10M:autoextend +innodb_buffer_pool_size = 150M +innodb_file_per_table = 1 +innodb_log_files_in_group = 2 +innodb_log_file_size=50M +innodb_log_buffer_size=25M + +# Timeouts +connect_timeout = 15 +wait_timeout = 120 + + +# Buffers +join_buffer_size = 1M +read_buffer_size = 512K +read_rnd_buffer_size = 512K +sort_buffer_size = 1M + + +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/lib/mysql/mysql-bin.log +#expire_logs_days = 10 +#max_binlog_size = 100M + + +# Temp table +tmp_table_size = 16M +max_heap_table_size = 16M + +# Table cache +table_open_cache = 256 +table_definition_cache = 256 +open_files_limit = 512 + +# Connections limit +max_connections = 100 + +# Default Storage Engine +default_storage_engine = innodb + + +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +# faster start of mysql but no tab completition +#no-auto-rehash + +[isamchk] +key_buffer = 16M + +# +# IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.8G b/contrib/dbaas-mycnf/test/etc/my.cnf.8G new file mode 100644 index 0000000000..cc7b69d75c --- /dev/null +++ b/contrib/dbaas-mycnf/test/etc/my.cnf.8G @@ -0,0 +1,177 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# Basic Settings +# + +# +# IMPORTANT +# If you make changes to these settings and your system uses apparmor, you may +# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. +# + +user = mysql +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +####tmpdir = /tmp +tmpdir = /var/tmp +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +#bind-address = 127.0.0.1 +# +# Fine Tuning +# +####key_buffer = 16M +key_buffer_size = 800M +####max_allowed_packet = 16M +max_allowed_packet = 16M +thread_stack = 192K +####thread_cache_size = 8 +thread_cache_size = 64 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# Query Cache Configuration +# + +# Q cache +query_cache_type = 1 +#query_cache_min_res_unit = 1024 +query_cache_limit = 1M +####query_cache_size = 16M +query_cache_size = 128M +# +# Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 + +log_error = /var/log/mysql/mysqld.log + +# Innodb params +innodb_data_file_path = ibdata1:10M:autoextend +innodb_buffer_pool_size = 2400M +innodb_file_per_table = 1 +innodb_log_files_in_group = 2 +innodb_log_file_size=50M +innodb_log_buffer_size=25M + +# Timeouts +connect_timeout = 15 +wait_timeout = 120 + + +# Buffers +join_buffer_size = 1M +read_buffer_size = 512K +read_rnd_buffer_size = 512K +sort_buffer_size = 1M + + +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/lib/mysql/mysql-bin.log +#expire_logs_days = 10 +#max_binlog_size = 100M + + +# Temp table +tmp_table_size = 256M +max_heap_table_size = 256M + +# Table cache +table_open_cache = 4096 +table_definition_cache = 4096 +open_files_limit = 8192 + +# Connections limit +max_connections = 1600 + +# Default Storage Engine +default_storage_engine = innodb + + +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +# faster start of mysql but no tab completition +#no-auto-rehash + +[isamchk] +key_buffer = 16M + +# +# IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/etc/reddwarf/reddwarf-guestagent.conf.sample b/etc/reddwarf/reddwarf-guestagent.conf.sample index 7a4a730377..682b9d4d33 100644 --- a/etc/reddwarf/reddwarf-guestagent.conf.sample +++ b/etc/reddwarf/reddwarf-guestagent.conf.sample @@ -52,6 +52,10 @@ guestagent_manager=reddwarf.guestagent.manager.GuestManager rabbit_host=10.0.0.1 +# ============ Logging information ============================= +log_dir = /tmp/ +log_file = logfile.txt + [composite:reddwarf-guestagent] use = call:reddwarf.common.wsgi:versioned_urlmap /: versions