Git Product home page Git Product logo

flashsql / mysql-57-nvdimm-caching Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jonghyeokpark/mysql-57-nvdimm-caching

18.0 1.0 7.0 56.78 MB

NVDIMM Caching for MySQL 5.7

License: GNU General Public License v2.0

Shell 0.35% CMake 0.78% C++ 63.20% C 25.01% Perl 1.23% Roff 0.09% Makefile 0.05% M4 0.01% Vim Script 0.01% Emacs Lisp 0.01% Java 3.56% Python 0.25% CSS 2.10% HTML 0.65% Batchfile 0.01% Objective-C 0.97% Pascal 0.14% NASL 0.44% PHP 0.75% Assembly 0.42%
mysql nvdimm caching flash buffer-management nvram pmem

mysql-57-nvdimm-caching's Introduction

NVDIMM Caching for MySQL 5.7

Optimize MySQL/InnoDB using NVDIMM

Build and install

  1. Clone the source code:
$ git clone https://github.com/meeeejin/mysql-57-nvdimm-caching.git
  1. Modify the PASSWD value in the build script:
$ vi build.sh

#!/bin/bash

BASE_DIR=`pwd -P`
BUILD_DIR=$BASE_DIR/bld
PASSWD="sudo-passwd"
...
  1. Run the script file:
$ ./build.sh

The above command will compile and build the source code with the default option (i.e., caching new-orders and order-line pages). The available options are:

Option Description
--origin No caching (Vanilla version)
--origin-monitor No caching but monitoring the flush status
--nc Caching New-Orders and Order-Line pages (default)
--nc-st Caching New-Orders, Order-Line and Stock pages
--nc-st-od Caching New-Orders, Order-Line, Stock and Orders pages
--mtr Caching New-Orders, Order-Line, Stock and Orders pages with mtr logging enabled

If you want the vanilla version, you can run the script as follows:

$ ./build.sh --origin

Run

  1. Add the following three server variables to the my.cnf file:
System Variable Description
innodb_use_nvdimm_buffer Specifies whether to use NVDIMM cache. true or false.
innodb_nvdimm_buffer_pool_size The size in bytes of the NVDIMM cache. The default value is 2GB.
innodb_nvdimm_buffer_pool_instances The number of regions that the NVDIMM cache is divided into. The default value is 1.
innodb_nvdimm_pc_threshold_pct Wakeup the NVDIMM page cleaner when this % of free pages remaining. The default value is 5.
innodb_nvdimm_home_dir NVDIMM-aware files resident directory

For example:

$ vi my.cnf
...
innodb_use_nvdimm_buffer=true
innodb_nvdimm_buffer_pool_size=2G
innodb_nvdimm_buffer_pool_instances=1
innodb_nvdimm_pc_threshold_pct=5
innodb_nvdimm_home_dir=/mnt/pmem
...
  1. Run the MySQL server:
$ ./bld/bin/mysqld --defaults-file=my.cnf

mysql-57-nvdimm-caching's People

Contributors

jonghyeokpark avatar meeeejin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.