Skip to content

Commit 76b0ee8

Browse files
authored
Update README.md
1 parent 2415506 commit 76b0ee8

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

Diff for: README.md

+55-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,55 @@
1-
# mysql-57-nvdimm-caching
1+
# NVDIMM Caching for MySQL 5.7
2+
3+
Optimize MySQL/InnoDB using NVDIMM
4+
5+
## Build and install
6+
7+
1. Clone the source code:
8+
9+
```bash
10+
$ git clone https://github.com/meeeejin/mysql-57-nvdimm-caching.git
11+
```
12+
13+
2. Change the value of `BASE_DIR` in the `build.sh` file to the desired value:
14+
15+
```bash
16+
$ vi build.sh
17+
#!/bin/bash
18+
19+
BASE_DIR=/home/xxx/mysql-57-nvdimm-caching
20+
...
21+
```
22+
23+
3. Run the script file:
24+
25+
```bash
26+
$ ./build.sh
27+
```
28+
29+
## Run
30+
31+
1. Add the following three server variables to the `my.cnf` file:
32+
33+
| System Variable | Description |
34+
| :---------------------------------- | :---------- |
35+
| innodb_use_nvdimm_buffer | Specifies whether to use NVDIMM cache. **true** or **false**. |
36+
| innodb_nvdimm_buffer_pool_size | The size in bytes of the NVDIMM cache. The default value is 2GB. |
37+
| innodb_nvdimm_buffer_pool_instances | The number of regions that the NVDIMM cache is divided into. The default value is 1. |
38+
39+
For example:
40+
41+
```bash
42+
$ vi my.cnf
43+
...
44+
innodb_use_nvdimm_buffer=true
45+
innodb_nvdimm_buffer_pool_size=2G
46+
innodb_nvdimm_buffer_pool_instances=1
47+
...
48+
```
49+
50+
2. Run the MySQL server:
51+
52+
```bash
53+
$ cd bld
54+
$ ./bin/mysqld --defaults-file=my-nvdimm.cnf
55+
```

0 commit comments

Comments
 (0)