This week you will learn how to evaluate performance between two journal mode (RBJ and WAL)
on SQLite database engine using TPC-C benchmark (pytpcc
).
Follow the guide below. If you have any questions, Please feel free to contact me via email (Jonghyeok Park / akindo19@skku.edu)
NOTE: This lab is based on the Linux environment. If you don't have a Linux machine, use VirturalBox. (Recommend Ubuntu 18.04)
- Skip this process if you already installed SQLite library
# go to the SQLite build directory
cd {PATH}/sqlite-src-3360000/build
make -j
sudo make install -j
# you can use SQLite database in any directroy
cd ~
sqltie --version
sudo apt-get install python
- refer to week13
# loading
python tpcc.py --warehouse=10 --config=./sqlite.config --no-execute sqlite
# change database file name
cp tpcc.db backup.db
- Prepare the database using loading command
- Change database file name as
backup.db
# prepare the database file
cp backup.db tpcc.db
# flush all cache
sudo sysctl vm.drop_caches=3
# run
python tpcc.py --warehouse=10 --config=./sqlite.config --no-load --duration=1800 --journal=wal sqlite
- For each runs, prepare the same database file (use
backup.db
database file) - To minimize the impact of the performance interference, flsuh all caches in the system using
vm.drop_caches=3
command. - Run TPC-C benchmark for 1800 sec
- Change the
journal
mode of the SQLite database engine - Compare two different journal:
delete
andwal
modes- Configure three different values for
--journal
- Configure three different values for
- Run TPC-C benchmark for two journal modes
- Change journal mode to delete and wal
- Observe how TPS (txn/s) changes
- Record and analyze the TPS for each transaction (DELIVERY, NEW_ORDER, ORDER_STATUS, PAYMENT, STOCK_LEVEL)
-
Present experimental results
-
Analyze the results
- hint. The root cause of the performance gap between
delete
mode andwal
is xxx.
Organize the results and your answer into a single report and submit it. Follow the submission guide for your report.