|
1 | | -# script_optfs |
2 | | -script_to_convert_to_optfs |
| 1 | +# Script_Optfs # |
| 2 | +### What is Script_Optfs? ### |
| 3 | +Script_Optfs is a conversion tool, capable of converting libraries that use `fsync` pessimistically to be compatible with the Optimistic File System ([OptFS](https://github.com/utsaslab/optfs)). |
| 4 | +OptFS is a linux-ext4 variant that implements [Optimistic Crash Consistency](http://research.cs.wisc.edu/adsl/Publications/optfs-sosp13.pdf) which essentially makes the same level of guarantee as Pessimistic Crash Consistency (`fsync()` after every write) with sometimes the same speed as Probabilistic Crash Consistency (never calling `fsync()`). |
3 | 5 |
|
4 | | -Converts libraries to be compatible with OptFS. |
5 | | -Pull requests welcome. |
| 6 | +This means that you can easily speed up the writes in your program by switching to OptFS and running Script_Optfs on the libraries that are in charge of persistence. |
| 7 | + |
| 8 | +### Getting Setup ### |
| 9 | +#### Script Dependencies #### |
| 10 | +The only dependency for this script besides `Python2.7` is `LLVM` with clang bindings. You need to make sure you have LLVM source code on your computer, and then compile it yourself. |
| 11 | +##### Installing LLVM ##### |
| 12 | +1. Run the following script after fixing the path, if necessary, to [Install Ninja](https://github.com/JDevlieghere/dotfiles/blob/master/installers/ninja.sh) |
| 13 | +1. Then, run this script to actually get the `LLVM` source code. [LLVM](https://github.com/JDevlieghere/dotfiles/blob/master/installers/llvm.sh) |
| 14 | + |
| 15 | +#### Running the Script_Optfs #### |
| 16 | +1. Go to the script source, `script.py`, and then modify the `set_library_path` variable to your path to LLVM's `/build/lib`. |
| 17 | +Once that is done, you might need to set an environmental variable, if the compiler throws you an error, otherwise, you are done and the script can be run. |
| 18 | +1. To run the script, you just type `python script.py /path/to/library` and the script should run and modify everything in a new directory `<library_name>_`. |
| 19 | +That's it! |
| 20 | + |
| 21 | +#### Run the Converted Library #### |
| 22 | +Download the` OptFS VM`: [Link to VM](http://pages.cs.wisc.edu/~vijayc/optfs-vm.tar.gz). |
| 23 | +It's already setup, so you just need to install the dependencies for the covnerted library, compile it, and then benchmark it to observe the performance difference. |
6 | 24 |
|
7 | 25 | By Subrat Mainali and Tom Gong, undergrads at UT Austin. |
8 | | -Makes use of LLVM Python bindings. |
|
0 commit comments