Skip to content

Commit

Permalink
Merge pull request #21 from initlabopen/dev
Browse files Browse the repository at this point in the history
Dev to master
  • Loading branch information
drupaladmin authored Apr 11, 2020
2 parents 5b55168 + c631921 commit 0c7c090
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.devcontainer/devcontainer.json
.devcontainer/Dockerfile
.devcontainer/*
test-project/test.sh
.DS_Store
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
MySQL Configure releases
---
Information about releases of the MySQLConfigurer script and online service.

MySQL Configurer 0.2.1, 2020-04-11
- Fixed rename file z_aiops_mysql.conf -> z_aiops_mysql.cnf. Issue #14 was closed
- Added rounding of variables. Issue #17 was closed.
- Added calculation max_connections. Issue #16 was closed.
- Added calculation thread_cache_size. Issue #15 was closed.
- Improve documentation. Issue #13 was closed.

MySQL Configurer 0.1.2, 2020-01-15
- Fixed "internal server error" in logging subsystem returned when the mysqltuner report contains empty parameter name. Issue #9 was closed.

MySQL Configurer 0.1.1, 2020-01-11
- Added check MySQLTuner exit code for prevent invalid requests to API. Issue #5 was closed
- Added -s option for the curl command to hide unnecessary output. Issue #2 was closed
- Fixed documentation and added check for JSON module. Issue #6 was closed
- Added old values to configuration file. Issue #4 was closed
- Fixed calculations of the innodb_buffer_pool_instances. Issue #1 was closed
- Improve advanced output for errors

MySQL Configurer 0.1.0, 2019-12-25
First release
45 changes: 32 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,42 @@
[![Build Status - Master](https://travis-ci.com/initlabopen/mysqlconfigurer.svg?branch=master)](https://travis-ci.com/initlabopen/mysqlconfigurer)

## Description
AIOps tool for generation performance optimized configuration of the MySQL server / Percona server / MariaDB server
based on the MySQLTuner report and online service.
**MySQL Configurer** is a script and online service to assist you prepare performance optimized configuration of your MySQL server based on the MySQLTuner report (MySQL status and system information). The service analyzes the MySQLTuner report, MySQL status and system information of your server and provides settings recommendations in the form of a MySQL configuration file.

## Features
- Fully automated MySQL performance optimized configuration creation.
- **MySQL configurer** recommended configuration deliver a [30% boost](#Tests) to MySQL performance compare to the default configuration.
- **MySQL Configurer** supports 19 parameters of MySQL/Percona/MariaDB server.
- With **MySQL Configurer** you could prepare configuration file for your MySQL server just in [60 seconds](https://youtu.be/QluJpSl6dGk).
- You could use **MySQL Configurer** for getting the recommended values for your server and insert in your configuration.

## Warning
**Always** test recommended configuration on staging environments, and **always** keep in mind that improvements in one area can **negatively** affect MySQL in other areas.

It's also important to wait at least a day of uptime to get accurate results.

## Requirements

*** MINIMAL REQUIREMENTS ***
Perl 5.6 or later (with perl-doc package)
Perl module JSON
Unix/Linux based operating system (tested on Linux, BSD variants, and Solaris variants)
Unrestricted read access to the MySQL server (OS root access recommended for MySQL < 5.1)
- Perl 5.6 or later (with perl-doc package)
- Perl module JSON
- Unix/Linux based operating system (tested on Linux, BSD variants, and Solaris variants)
- Unrestricted read access to the MySQL server (OS root access recommended for MySQL < 5.1)

## Technical details
This is simple Bash script which
1. download last version of the MySQLTuner
2. run MySQLTuner with options "--json --verbose --notbstat"
3. upload MySQLTuner report in the JSON to AIOps online service https://api.servers-support.com/v1/mysql
4. download recommended MySQL config file
**MySQL Configurer** is a Bash script which
1. downloads last version of the MySQLTuner
2. runs MySQLTuner with options "--json --verbose --notbstat"
3. uploads MySQLTuner report in the JSON to AIOps online service https://api.servers-support.com/v1/mysql
4. downloads recommended MySQL config file

## Tests
We tested the results with Sysbench on a virtual server running Debian 9 (2 CPU, 2GB Ram) the table contained 10 million entries.
Two configurations were tested, the MySQL default configuration and the configuration recommended by the **MySQLConfigurer** service. The tests were two-step: read (test1) only and read/write (test2).

Recommended configuration delivered a 30% boost to MySQL performance compared to the default configuration. Follow this link to see test results:
https://docs.google.com/spreadsheets/d/1J9FDgBGbvNA356d74WKYBaEzSwK7H-wgjHEQgYh8CMI/edit?usp=sharing


## Usage
1. Download mysqlconfigurer.sh
Expand Down Expand Up @@ -50,7 +70,7 @@ cp /tmp/.mysqlconfigurer/z_aiops_mysql.cnf /etc/mysql/conf.d/
service mysql restart
```

Example of the config file /tmp/.mysqlconfigurer/z_aiops_mysql.cnf:
Example of the recommended configuration file /tmp/.mysqlconfigurer/z_aiops_mysql.cnf:
```
[mysqld]
query_cache_type = 1 ### Previous value : OFF
Expand All @@ -74,7 +94,6 @@ innodb_flush_log_at_trx_commit = 2 ### Previous value : 1
innodb_log_file_size = 4505 ### Previous value : 50331648
```


## Contribute

You can help this project by reporting problems, suggestions or contributing to the code.
Expand Down

0 comments on commit 0c7c090

Please sign in to comment.