Skip to content

Python-based script for automatically optimizing MySQL configurations.

License

Notifications You must be signed in to change notification settings

Scraps23/innodb_optimize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InnoDB Optimize

Pypi MIT licensed GitHub Release Date

innodb-optimize is a package for automatically calucalating optimized InnoDB configurations, and generating an updated my.cnf file with those values.

Installation

# PyPi Installation
pip install innodb-optimize
# GitHub Installation
pip install git+'https://github.com/Scraps23/innodb_optimize.git'

Usage

Basic Output

The following command will output the generated configuration to STDOUT. This is useful when using this tool in other scripts, such as automating system deployments.

innodb-optimize

Standard Commit Loop

The --commit flag should be included for an interactive run. The user is first asked whether the configuration should be saved; there is an option to print the generated config to console.
If the configuration is read, the user is prompted for the same question.
If the configuration is saved, the user is prompted to restart MySQL; there is an option to schedule the restart using bash's at program.

innodb-optimize --commit

Standard Loop

Available Arguments

  • file: Where the MySQL configuration file is located. Defaults to /etc/mysql/my.cnf.
  • percent: Determines what percentage of the total memory will be devoted to InnoDB engine usage. Defaults to 75%.
  • memory: Allows the user to override the total memory amount (i.e. a fixed amount is already pre-allocated which is not easily accounted for in percentages). Only allows for kilobyte unit.
  • commit: Is required to start the loop which will commit the changes. Without it, the program only outputs the config to standard out to allow for piping/redirecting the output as needed.

About

Python-based script for automatically optimizing MySQL configurations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages