Giter VIP home page Giter VIP logo

tuning-primer.sh's Introduction

MySQL Tuning-Primer.sh

How to use

Download and run tuning-primer.sh.

If you don't like downloading anything and you do like living dangerously, you could instead run it with something like this¹:

curl -L https://raw.githubusercontent.com/BMDan/tuning-primer.sh/master/tuning-primer.sh | bash

About this repository

This is the script originally developed by Matthew Montgomery, and previously hosted at Day32.com. This version has been updated and improved for newer versions of MySQL, Percona Server, and MariaDB. This Github repository was created with Matthew's permission by Dan Reif, but Matthew has no control over it; in other words, please don't bother Matthew with questions about this repository!

This repository will be used to handle ongoing development and bugfixes for this script. Please file bug reports here. Pull requests are welcomed.

About this script

This script takes information from SHOW STATUS LIKE... and SHOW VARIABLES LIKE... to produce sane recomendations for tuning server variables.

It (attempts to be!) compatible with all versions of MySQL 3.23 and higher (including 5.x), as well as MariaDB, and Percona Server for MySQL.²

Currently it handles recomendations for the following:

  • Slow Query Log
  • Max Connections
  • Worker Threads
  • Key Buffer [MyISAM only]
  • Query Cache
  • Sort Buffer
  • Joins
  • Temp Tables
  • Table (Open & Definition) Cache
  • Table Locking
  • Table Scans (read_buffer) [MyISAM only]
  • InnoDB Status

Recent Changes

  • Updated to (at least mostly) support MySQL 5.7+ and MariaDB
  • A lot of cleanup of the underlying code
  • Better handling of terminals and redirection (got rid of the hardcoded color sequences, switched to proper terminfo)
  • Fixed the old ./tuning-primer.sh: line 402: export: `2097152': not a valid identifier bug

More, as always, in the changelog.


Legal Stuff

Use of this software is governed by its LICENSE, regardless of how it is accessed or by whom it is used. Follow the license, dammit.

Some of the terms used in this script or in the documentation surrounding it may be copyrighted, trademarked, or otherwise owned by external entities including but not limited to Oracle, Percona, MariaDB Corporation Ab, and others. These terms are used solely for identification of products, and the interoperability of this script with these or any other products, even if explicitly claimed, is nonetheless not guaranteed by any author. No affiliation with or licensing from these entities is stated nor implied. Anyone who says otherwise is itchin' for a fight.


Footnotes

¹: Running it without downloading it and reading it first is a truly awful choice, and I arguably shouldn't put this command here. Then again, if you are the sort of person who even wonders how to run a script with root access to your database by piping it into Bash, you're probably the sort of person I can't convince not to do so. At least these instructions are ever-so-slightly safer than what'll appear on some Stack Overflow if I didn't put this here.

²: ... and anything else sufficiently MySQLish to export the status variables it uses to run.

tuning-primer.sh's People

Contributors

lint-ai avatar bmdan avatar ch-danreif avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.