Skip to content

Commit 2fdb858

Browse files
authored
Merge pull request #5 from meeeejin/develop
2 parents c078ccd + 4645ae7 commit 2fdb858

File tree

18 files changed

+638
-258
lines changed

18 files changed

+638
-258
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ The above command will compile and build the source code with the default option
2121
| Option | Description |
2222
| :--------- | :---------- |
2323
| --origin | No caching (Vanilla version) |
24-
| --nc-ol | Caching New-Orders and Order-Line pages (`default`) |
25-
| --nc-st | Caching New-Orders and Stock pages |
26-
| --nc-ol-st | Caching New-Orders, Order-Line and Stock pages |
27-
| --mtr | Caching New-Orders, Order-Line and Stock pages with mtr logging enabled |
24+
| --nc | Caching New-Orders and Order-Line pages (`default`) |
25+
| --nc-st | Caching New-Orders, Order-Line and Stock pages |
26+
| --nc-st-od | Caching New-Orders, Order-Line, Stock and Orders pages |
27+
| --mtr | Caching New-Orders, Order-Line, Stock and Orders pages with mtr logging enabled |
2828

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

build.sh

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,39 @@ if [ ! -d "$BUILD_DIR" ]; then
99
mkdir bld
1010
fi
1111

12-
#cd $BASE_DIR
1312
cd $BUILD_DIR
13+
1414
rm -rf CMakeCache.txt
1515
sudo rm -rf CMakeFiles/*
1616

1717
# Build and install the source code
1818
if [ "$1" = "--origin" ]; then
1919
# No caching
2020
BUILD_FLAGS=""
21-
elif [ "$1" = "--nc-ol" ]; then
21+
elif [ "$1" = "--nc" ]; then
2222
# Cache New-Orders and Order-Line pages
23-
BUILD_FLAGS="-DUNIV_NVDIMM_CACHE -DUNIV_NVDIMM_CACHE_NO -DUNIV_NVDIMM_CACHE_OL"
23+
BUILD_FLAGS="-DUNIV_NVDIMM_CACHE"
2424
elif [ "$1" = "--nc-st" ]; then
25-
# Cache New-Orders and Stock pages
26-
BUILD_FLAGS="-DUNIV_NVDIMM_CACHE -DUNIV_NVDIMM_CACHE_NO -DUNIV_NVDIMM_CACHE_ST"
27-
elif [ "$1" = "--nc-ol-st" ]; then
2825
# Cache New-Orders, Order-Line and Stock pages
29-
BUILD_FLAGS="-DUNIV_NVDIMM_CACHE -DUNIV_NVDIMM_CACHE_NO -DUNIV_NVDIMM_CACHE_OL -DUNIV_NVDIMM_CACHE_ST"
26+
BUILD_FLAGS="-DUNIV_NVDIMM_CACHE -DUNIV_NVDIMM_CACHE_ST"
27+
elif [ "$1" = "--nc-st-od" ]; then
28+
# Cache New-Orders, Order-Line, Stock and Orders pages
29+
BUILD_FLAGS="-DUNIV_NVDIMM_CACHE -DUNIV_NVDIMM_CACHE_ST -DUNIV_NVDIMM_CACHE_OD"
3030
elif [ "$1" = "--mtr" ]; then
31-
# Cache New-Orders, Order-Line with mtr-logging enabled
32-
BUILD_FLAGS="-DUNIV_NVDIMM_CACHE -DUNIV_NVDIMM_CACHE_NO -DUNIV_NVDIMM_CACHE_OL -DUNIV_LOG_HEADER"
31+
# Cache New-Orders, Order-Line, Stock and Orders pages with mtr-logging enabled
32+
BUILD_FLAGS="-DUNIV_NVDIMM_CACHE -DUNIV_NVDIMM_CACHE_ST -DUNIV_NVDIMM_CACHE_OD -DUNIV_LOG_HEADER"
3333
else
3434
# Cache New-Orders and Order-Line pages (default)
35-
BUILD_FLAGS="-DUNIV_NVDIMM_CACHE -DUNIV_NVDIMM_CACHE_NO -DUNIV_NVDIMM_CACHE_OL"
35+
BUILD_FLAGS="-DUNIV_NVDIMM_CACHE"
3636
fi
3737

3838
echo "Start build using $BUILD_FLAGS"
3939

40-
cmake .. -DWITH_DEBUG=0 -DCMAKE_C_FLAGS="$BUILD_FLAGS" -DCMAKE_CXX_FLAGS="$BUILD_FLAGS" \
41-
-DDOWNLOAD_BOOST=ON -DWITH_BOOST=$BASE_DIR/boost -DENABLED_LOCAL_INFILE=1 -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \
42-
-DWITH_RAPID=OFF
43-
#-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1
40+
cd $BASE_DIR
41+
42+
cmake -DWITH_DEBUG=0 -DCMAKE_C_FLAGS="$BUILD_FLAGS" -DCMAKE_CXX_FLAGS="$BUILD_FLAGS" \
43+
-DDOWNLOAD_BOOST=ON -DWITH_BOOST=$BASE_DIR/boost -DENABLED_LOCAL_INFILE=1 \
44+
-DCMAKE_INSTALL_PREFIX=$BUILD_DIR
4445

4546
make -j8
4647
sudo make install

my-origin.cnf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ innodb_page_size=4KB
4646
innodb_file_per_table=1
4747

4848
#buffer settings
49-
innodb_buffer_pool_size=5000M
49+
innodb_buffer_pool_size=6G
5050
innodb_buffer_pool_instances=8
5151
innodb_max_dirty_pages_pct_lwm=0
5252

@@ -64,7 +64,7 @@ innodb_log_buffer_size=32M
6464
innodb_flush_neighbors=0
6565

6666
#doublewrite and flush method
67-
innodb_doublewrite=OFF
67+
innodb_doublewrite=ON
6868
innodb_flush_method=O_DIRECT
6969

7070
#AIO control

my.cnf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ innodb_page_size=4KB
4646
innodb_file_per_table=1
4747

4848
#buffer settings
49-
innodb_buffer_pool_size=5G
49+
innodb_buffer_pool_size=4G
5050
innodb_buffer_pool_instances=8
5151
innodb_max_dirty_pages_pct_lwm=0
5252

@@ -56,9 +56,10 @@ innodb_page_cleaners=8
5656

5757
#nvdimm settings
5858
innodb_use_nvdimm_buffer=true
59-
innodb_nvdimm_buffer_pool_size=1G
60-
innodb_nvdimm_buffer_pool_instances=1
61-
innodb_nvdimm_pc_threshold_pct=5
59+
innodb_nvdimm_buffer_pool_size=2G
60+
innodb_nvdimm_buffer_pool_instances=2
61+
innodb_nvdimm_pc_threshold_pct=15
62+
innodb_nvdimm_home_dir=/mnt/pmem
6263

6364
#transaction log settings
6465
innodb_log_file_size=2G
@@ -70,7 +71,7 @@ innodb_log_buffer_size=32M
7071
innodb_flush_neighbors=0
7172

7273
#doublewrite and flush method
73-
innodb_doublewrite=OFF
74+
innodb_doublewrite=ON
7475
innodb_flush_method=O_DIRECT
7576

7677
#AIO control

0 commit comments

Comments
 (0)