Skip to content

Commit b607b6c

Browse files
committed
Added tar workload
1 parent 91ca492 commit b607b6c

File tree

10,248 files changed

+1399381
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

10,248 files changed

+1399381
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ sqlite3-trace/.libs
1515

1616
rsync/workload/
1717
rsync/rsync
18+
tar/workload/
1819

1920
!ycsb/core
2021
!ycsb/tracerecorder

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ $ rm -rf /mnt/pmem_emul/*
8888
8. `sqlite3-trace/` contains SQLite3 source code
8989
9. `tpcc-sqlite/` contains TPCC source code
9090
10. `ycsb/` contains YCSB source code
91+
11. `tar/` contains tar source code
9192

9293
The [Experiments
9394
page](https://github.com/utsaslab/SplitFS/blob/master/experiments.md)

experiments.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ We evaluate and benchmark on SplitFS using different application benchmarks like
4444
4. SQLite: `cd scripts/tpcc; ./compile_sqlite.sh; cd ../..` -- This will compile SQLite3
4545
5. TPCC: `cd scripts/tpcc; ./compile_tpcc.sh; cd ../..` -- This will compile TPCC workload
4646
6. rsync: `cd scripts/rsync; ./compile_rsync.sh; cd ../..` -- This will compile rsync
47+
7. tar: `cd scripts/tar; ./compile_tar.sh; cd ../..` -- This will compile tar
4748

4849
Note: The <num_threads> argument in the compilation scripts performs the compilation with the number of threads given as input to the script, to improve the speed of compilation.
4950

@@ -54,6 +55,7 @@ Note: The <num_threads> argument in the compilation scripts performs the compila
5455
1. YCSB: `cd scripts/ycsb; ./gen_workloads.sh; cd ../..` -- This will generate the YCSB workload files to be run with LevelDB, because YCSB does not natively support LevelDB, and has been added to the benchmarks of LevelDB
5556
2. TPCC: `cd scripts/tpcc; ./gen_workload.sh; cd ../..` -- This will create an initial database on SQLite on which to run the TPCC workload
5657
3. rsync: `cd scripts/rsync/; sudo ./rsync_gen_workload.sh; cd ../..` -- This will create the rsync workload according to the backup data distribution as mentioned in the Paper
58+
4. tar: `cd scripts/tar/; sudo ./gen_workload.sh; cd ../..` -- This will create the tar workload as mentioned in the paper
5759

5860
---
5961

@@ -62,6 +64,7 @@ Note: The <num_threads> argument in the compilation scripts performs the compila
6264
1. YCSB: `cd scripts/ycsb; ./run_ycsb.sh; cd ../..` -- This will run all the YCSB workloads on LevelDB (Load A, Run A-F, Load E, Run E) with `ext4-DAX, NOVA strict, NOVA Relaxed, PMFS, SplitFS-strict`
6365
2. TPCC: `cd scripts/tpcc; ./run_tpcc.sh; cd ../..` -- This will run the TPCC workload on SQLite3 with `ext4-DAX, NOVA strict, NOVA Relaxed, PMFS, SplitFS-POSIX`
6466
3. rsync: `cd scripts/rsync; ./run_rsync.sh; cd ../..` -- This will run the rsync workload with `ext4-DAX, NOVA strict, NOVA Relaxed, PMFS, SplitFS-sync`
67+
4. tar: `cd scripts/tar; ./run_tar.sh; cd ../..` -- This will run the tar workload with `ext4-DAX, NOVA strict, NOVA Relaxed, PMFS, SplitFS-POSIX, SplitFS-sync, SplitFS-strict`
6568

6669
---
6770

scripts/tar/Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Run tests for splitfs
2+
3+
# The current working directory
4+
CWD=$(shell pwd)
5+
# Root of the repo
6+
ROOT=$(CWD)/../..
7+
# SplitFS path
8+
SFS_PATH=/mnt/pmem_emul/
9+
10+
all: splitfs.posix splitfs.sync splitfs.strict
11+
12+
# Compile with posix specific flags
13+
splitfs.posix_compile:
14+
export LEDGER_DATAJ=0 && \
15+
export LEDGER_POSIX=1 && \
16+
export LEDGER_TAR=1 && \
17+
$(MAKE) -C ${ROOT}/splitfs clean && \
18+
$(MAKE) -e -C ${ROOT}/splitfs
19+
20+
# Compile with sync specific flags
21+
splitfs.sync_compile:
22+
export LEDGER_DATAJ=0 && \
23+
export LEDGER_POSIX=0 && \
24+
export LEDGER_TAR=1 && \
25+
$(MAKE) -C ${ROOT}/splitfs clean && \
26+
$(MAKE) -e -C ${ROOT}/splitfs
27+
28+
# Compile with strict specific flags
29+
splitfs.strict_compile:
30+
export LEDGER_DATAJ=1 && \
31+
export LEDGER_POSIX=0 && \
32+
export LEDGER_TAR=1 && \
33+
$(MAKE) -C ${ROOT}/splitfs clean && \
34+
$(MAKE) -e -C ${ROOT}/splitfs
35+
36+
splitfs.posix: splitfs.posix_compile
37+
38+
splitfs.sync: splitfs.sync_compile
39+
40+
splitfs.strict: splitfs.strict_compile

scripts/tar/compile_tar.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -x
4+
5+
cur_dir=$(pwd)
6+
root_dir=`readlink -f ../..`
7+
tar_dir=$root_dir/tar
8+
9+
cd $tar_dir
10+
make clean
11+
./configure
12+
make
13+
14+
cd $cur_dir

scripts/tar/gen_workload.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
set -x
4+
5+
cur_dir=$(pwd)
6+
root_dir=`readlink -f ../..`
7+
pmem_dir=/mnt/pmem_emul
8+
linux_tar=linux-4.18.10.tar.gz
9+
linux_dir=linux-4.18.10
10+
11+
cd $root_dir
12+
rm $linux_tar
13+
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.18.10.tar.gz
14+
15+
mkdir -p $pmem_dir/repo
16+
cp $root_dir/$linux_tar $pmem_dir/repo
17+
cd $pmem_dir/repo
18+
19+
for i in {1..10}
20+
do
21+
mkdir folder$i
22+
done
23+
24+
tar -xf $linux_tar
25+
for i in {1..5}
26+
do
27+
cp -r $linux_dir folder$i/
28+
done
29+
30+
rm -rf $linux_dir
31+
32+
for i in {6..10}
33+
do
34+
cd folder$i
35+
dd if=/dev/urandom of=temp1.txt bs=1M count=50
36+
dd if=/dev/urandom of=temp2.txt bs=1M count=50
37+
dd if=/dev/urandom of=temp3.txt bs=1M count=50
38+
dd if=/dev/urandom of=temp4.txt bs=1M count=50
39+
dd if=/dev/urandom of=temp5.txt bs=1M count=50
40+
cd ..
41+
done
42+
43+
cd $pmem_dir
44+
tar -zcf tar_workload.tar.gz repo
45+
rm -rf repo
46+
47+
cd $cur_dir
48+
mkdir -p $root_dir/tar/workload
49+
cp -r $pmem_dir/tar_workload.tar.gz $root_dir/tar/workload/

scripts/tar/run_fs.sh

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/bin/bash
2+
3+
if [ "$#" -ne 2 ]; then
4+
echo "Usage: sudo ./run_fs.sh <fs> <run_id>"
5+
exit 1
6+
fi
7+
8+
set -x
9+
10+
workload=tar
11+
fs=$1
12+
run_id=$2
13+
current_dir=$(pwd)
14+
tar_dir=`readlink -f ../../tar`
15+
workload_dir=$tar_dir/workload
16+
pmem_dir=/mnt/pmem_emul
17+
boost_dir=`readlink -f ../../splitfs`
18+
result_dir=`readlink -f ../../results`
19+
fs_results=$result_dir/$fs/$workload
20+
21+
if [ "$fs" == "splitfs-posix" ]; then
22+
run_boost=1
23+
elif [ "$fs" == "splitfs-sync" ]; then
24+
run_boost=1
25+
elif [ "$fs" == "splitfs-strict" ]; then
26+
run_boost=1
27+
else
28+
run_boost=0
29+
fi
30+
31+
ulimit -c unlimited
32+
33+
echo Sleeping for 5 seconds ..
34+
sleep 5
35+
36+
run_workload()
37+
{
38+
39+
echo ----------------------- TAR WORKLOAD ---------------------------
40+
41+
mkdir -p $fs_results
42+
rm $fs_results/run$run_id
43+
44+
rm -rf $pmem_dir/*
45+
cp $workload_dir/tar_workload.tar.gz $pmem_dir && sync
46+
47+
cd $pmem_dir
48+
49+
sleep 5
50+
51+
date
52+
53+
if [ $run_boost -eq 1 ]; then
54+
time $boost_dir/run_boost.sh -p $boost_dir -t nvp_nvp.tree $tar_dir/src/tar -xf ./tar_workload.tar.gz 2>&1 | tee $fs_results/run$run_id
55+
else
56+
time $tar_dir/src/tar -xf $pmem_dir/tar_workload.tar.gz 2>&1 | tee $fs_results/run$run_id
57+
fi
58+
59+
date
60+
61+
cd $current_dir
62+
63+
echo Sleeping for 5 seconds . .
64+
sleep 5
65+
66+
}
67+
68+
69+
run_workload
70+
71+
cd $current_dir

scripts/tar/run_tar.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
3+
current_dir=$(pwd)
4+
setup_dir=`readlink -f ../configs`
5+
pmem_dir=/mnt/pmem_emul
6+
7+
run_tar()
8+
{
9+
fs=$1
10+
for run in 1 2 3
11+
do
12+
sudo rm -rf $pmem_dir/*
13+
sudo taskset -c 0-7 ./run_fs.sh $fs $run
14+
sleep 5
15+
done
16+
}
17+
18+
echo "-- ext4 DAX --"
19+
cd $setup_dir
20+
sudo ./nova_config.sh
21+
cd $current_dir
22+
sudo $setup_dir/dax_config.sh
23+
run_tar dax
24+
25+
echo "-- NOVA Relaxed --"
26+
cd $setup_dir
27+
sudo ./nova_relaxed_config.sh
28+
cd $current_dir
29+
run_tar relaxed_nova
30+
31+
echo "-- NOVA --"
32+
cd $setup_dir
33+
sudo ./nova_config.sh
34+
cd $current_dir
35+
run_tar nova
36+
37+
echo "-- PMFS --"
38+
cd $setup_dir
39+
sudo $setup_dir/pmfs_config.sh
40+
cd $current_dir
41+
run_tar pmfs
42+
43+
echo "-- SplitFS POSIX --"
44+
make splitfs.posix
45+
sudo $setup_dir/dax_config.sh
46+
run_tar splitfs-posix
47+
48+
echo "-- SplitFS SYNC --"
49+
make splitfs.sync
50+
sudo $setup_dir/dax_config.sh
51+
run_tar splitfs-sync
52+
53+
echo "-- SplitFS STRICT --"
54+
make splitfs.strict
55+
sudo $setup_dir/dax_config.sh
56+
run_tar splitfs-strict

splitfs/fileops_nvp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@ void nvp_free_dr_mmaps()
16431643
lfds711_queue_umm_cleanup( &qs, NULL );
16441644

16451645
#if DATA_JOURNALING_ENABLED
1646-
1646+
16471647
while( lfds711_queue_umm_dequeue(&qs_over, &qe_over) ) {
16481648
temp_free_pool_of_dr_mmaps = LFDS711_QUEUE_UMM_GET_VALUE_FROM_ELEMENT( *qe_over );
16491649
addr = temp_free_pool_of_dr_mmaps->start_addr;
@@ -1654,7 +1654,7 @@ void nvp_free_dr_mmaps()
16541654
char new_path[256];
16551655
sprintf(fd_str, "/proc/self/fd/%d", temp_free_pool_of_dr_mmaps->dr_fd);
16561656
file_name_size = readlink(fd_str, new_path, sizeof(new_path));
1657-
if (readlink(file_name_size == -1)
1657+
if (file_name_size == -1)
16581658
assert(0);
16591659
new_path[file_name_size] = '\0';
16601660

@@ -1673,7 +1673,7 @@ void nvp_free_dr_mmaps()
16731673
}
16741674

16751675
#endif // DATA_JOURNALING_ENABLED
1676-
1676+
16771677
}
16781678

16791679
void nvp_free_btree(unsigned long *root, unsigned long *merkle_root, unsigned long height, unsigned long *dirty_cache, int root_dirty_num, int total_dirty_mmaps)

0 commit comments

Comments
 (0)