forked from trdtnguyen/mysql-pmem
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild_mysql.sh
executable file
·70 lines (52 loc) · 4.1 KB
/
build_mysql.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
MYSQL_HOME=/home/vldb/mysql-pmem
#debug mode
IS_DEBUG=0
#IS_DEBUG=1
##The original InnoDB
#BUILD_NAME="-DUNIV_TRACE_FLUSH_TIME"
#BUILD_NAME="-DUNIV_PMEMOBJ_DBW -DUNIV_TRACE_FLUSH_TIME"
#BUILD_NAME="-DUNIV_PMEMOBJ_WAL -DUNIV_TRACE_FLUSH_TIME"
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME"
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME"
#BUILD_NAME="-DUNIV_PMEMOBJ_NO_PERSIST -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME"
#Simulate DRAM latency
#BUILD_NAME="-DUNIV_PMEM_SIM_LATENCY -DUNIV_PMEMOBJ_DBW -DUNIV_TRACE_FLUSH_TIME"
BUILD_NAME="-DUNIV_PMEM_SIM_LATENCY -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME"
#LSB
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_LSB -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_TRACE_FLUSH_TIME"
#BUILD_NAME="-DUNIV_PMEMOBJ_WAL -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME"
#for LSB implementation
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_LSB -DUNIV_PMEMOBJ_LSB_DEBUG -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_TRACE_FLUSH_TIME"
#BUILD_NAME=-DUNIV_NVM_LOG
#BUILD_NAME=-DUNIV_PMEMOBJ_LOG
#BUILD_NAME="-DUNIV_NVM_LOG -DUNIV_PMEMOBJ_LOG"
## WAL is the new log optimization that integrate log buffer and log file into one place in NVM
#BUILD_NAME="-DUNIV_PMEMOBJ_DBW -DUNIV_TRACE_FLUSH_TIME"
#BUILD_NAME="-DUNIV_PMEMOBJ_WAL -DUNIV_TRACE_FLUSH_TIME"
##the stable version: use free pool, no flusher
#BUILD_NAME=-DUNIV_PMEMOBJ_BUF
##UNIV_PMEMOBJ_BUF_STAT collect statistics information, can be used as additional with other PMEMOBJ_BUF_***
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_STAT"
##The UNIV_PMEMOBJ_BUF_V2 reused the UNIV_PMEMOBJ_BUF, just overwrite the pm_buf_write and pm_buf_handle_finished that does not use the free_pool
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_V2"
##PMEMOBJ_BUF_FLUSHER use pmem_n_flush_threads to handle aio_batch sothat the cleaner thread can return immediately
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER"
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_APPEND"
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_PARTITION"
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_PARTITION_STAT"
## For EVEN
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY"
##Use this for statistic information, n_writes, n_overwrites, n_reads, n_reads_hit, n_reads_flushing, ...
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME"
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME -DUNIV_PMEMOBJ_BUF_RECOVERY_DEBUG"
## For SINGLE and LESS
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME"
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME -DUNIV_PMEMOBJ_BUF_RECOVERY_DEBUG"
##combine all
#BUILD_NAME="-DUNIV_NVM_LOG -DUNIV_PMEMOBJ_LOG -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER"
#BUILD_NAME="-DUNIV_PMEMOBJ_WAL -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME"
echo "BUILD MODE: $BUILD_NAME with debug=$IS_DEBUG"
cd $MYSQL_HOME/bld
cmake .. -DWITH_DEBUG=$IS_DEBUG -DCMAKE_C_FLAGS="$BUILD_NAME -DUNIV_AIO_IMPROVE" -DCMAKE_CXX_FLAGS="$BUILD_NAME -DUNIV_AIO_IMPROVE" -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/root/boost
make install -j48