Giter Site home page Giter Site logo

00mjk / sysbench-runner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from markstanton/sysbench-runner

0.0 0.0 0.0 98 KB

Automated MySQL benchmarking using multiple configurations and workloads

Home Page: http://mark.stanton.org.au/2012/01/sysbench-runner/

sysbench-runner's Introduction

sysbench-runner - Automated MySQL benchmarking using multiple configurations and workloads

Why:
The idea is to simplify and automate the repetitive task of benchmarking a MySQL server using a variety of configurations and workloads. sysbench-runner is a wrapper for the sysbench oltp tests (http://sysbench.sourceforge.net/docs/#database_mode). 

The general workflow for using sysbench is something like:

- Make configuration change
- Restart server
- Run sysbench tests with various numbers of worker threads
- Collate results
- Repeat

This is both frustrating and time consuming as for significant chunks of time you are left waiting for sysbench to return some data so you can tweak your config and run it again. It can also be error prone as the volume of data and number of configurations increases.

With sysbench-runner the workflow changes to be:
- Create multiple configurations, with each containing a change to be tested
- Run run-multiconfig against these configurations with a predefined list of worker thread settings to be tested
- Go do something fun and interesting for an hour or two
- Come back and review the aggregate results

This is simpler, less time consuming and less error prone.


Prerequisites:
- sysbench-0.4.12 (may work on other versions)
- A local MySQL server with a database called sbtest which has been prepared using the sysbench "prepare" command (http://sysbench.sourceforge.net/docs/#general_syntax)
- a directory containing the MySQL config files (my.cnf) that you which to test against

Usage:

WARNING: 
- Do not run this script on a working MySQL server. It will stop & start the service and put load on the server.
- The -c (clean) option deletes binary logs and InnoDB logs and may result in data loss.

There are three scripts in this package aggregate-results, run-multiconfig and run-sysbench. aggregate-results and run-sysbench can be called directly, but are more commonly called via run-multiconfig.


run-multiconfig
=-=-=-=-=-=-=-=-=-=-

Main wrapper, controls reading config files and starting and stopping mysql. 

Because run-multiconfig starts and stops the server and performs file operations it can only be run on locally via a socket.

Options:
   -i	MySQL pid file (required)
   -d	Config directory [./conf]
   -s	MySQL socket [/tmp/mysql.sock]
   -u	MySQL username [root]
   -p	MySQL password
   -w	ReadWrite mode (on/off) [on]
   -o	Timeout for each sysbench run [60]
   -r	Directory to print results to [./results]
   -t	List of thread counts to iterate [8,16,32,64,128]
   -c	Delete binlogs and ib_logfiles when complete (on/off) [off]

Minimal usage:

	./run-multiconfig -i /var/mysql/data/mysql.pid -p password

Complete usage (with default values):

	./run-multiconfig -i /var/mysql/data/mysql.pid -d ./conf -h localhost \
	-s /tmp/mysql.sock -u root -p password -w on -o 60 -r ./results \
	-t 8,16,32,64,128 -c off


run-sysbench
=-=-=-=-=-=-=-=-=-=-

Called from run-multiconfig or can be run directly. Handles calls to sysbench and storing results.

run-sysbench can be run on remote hosts. If a non-standards socket (-s) is provided the script will use the host and port values instead.

Options:
   -h	MySQL host [localhost]
   -h	MySQL port [localhost]
   -s	MySQL socket [/tmp/mysql.sock]
   -u	MySQL username [root]
   -p	MySQL password
   -w	ReadWrite mode (on/off) [on]
   -o	Timeout for each sysbench run [60]
   -r	Directory to print results to [./results]
   -t	List of thread counts to iterate [8,16,32,64,128]

Minimal usage:

	./run-sysbench -p password

Complete usage (with default values):

	./run-sysbench -s /tmp/mysql.sock -u root -p password -w on \
	-o 60 -r ./results -t 4,8,16,32,64,128,256

	./run-sysbench -h localhost -p 3306 -u root -p password -w on \
	-o 60 -r ./results -t 4,8,16,32,64,128,256
	

aggregate-results
=-=-=-=-=-=-=-=-=-=-

Called from run-multiconfig or can be run directly. Reads directory containing results created by run-sysbench and aggregates them into a CSV.
Main wrapper, controls reading config files and starting and stopping mysql.

Options:
   -r	Directory containing results [./results]

Minimal usage:

	./aggregate-results

Complete usage (with default values):

	./aggregate-results -r ./results

sysbench-runner's People

Contributors

markstanton 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.