Skip to content

manhdaovan/mysql_warmup

Repository files navigation

mysql_warmup

Simple mysql-wamup command tool for warming up mysql server after create/reboot
Github
RubyGems

Benchmark

From 7.562 seconds to 2.132 seconds

Background

With InnoDB storage engine, when you've just created new slave instance, first requests to DB will be hit on disk instead of buffer poll. So, the requests will be slow down. You can use this tool for warming up buffer poll before the first requests come. Detail

Usage

  1. When?
  1. How?
  • Install this tool (please see Install section below)
  • Usage as below syntax
    Usage: mysql-warmup -u username <options>

    Input options:
    -h host      : Host or ip of mysql instance
    -u username  : Username to access mysql instance
    -d database  : Database to warmup.
                   Default to all databases exclude information_schema, mysql, performance_schema, sys
    -p port      : Port to connect. Default to 3306
    --help       : Show help message
    --version    : Show mysql-warmup version

Install

  • Directly with command: $gem install mysql-warmup

  • Or with Gemfile by adding line 'gem 'mysql-warmup' to your Gemfile then $bundle install

TODO

  • RDoc

Development

  • All PR are welcome.
  • Be sure all test cases are passed by command: $rake test

Changelog

Please ref to Changelog

License

MIT

About

Simple tool for warming up mysql server after create new/reboot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages