Git Product home page Git Product logo

flashalloc-cosmos's Introduction

FlashAlloc: Dedicating Flash Blocks By Objects

FlashAlloc is a novel interfacee for flash storage, which is used to the logical address ranges of objects to the underlying flash device and thus to enlighten the device to stream writes by objects. See deatil in our paper

[1] Jonghyeok Park, Soyee Choi, Gihwan Oh, Soojun Im, Moon-Wook Oh, Sang-Won Lee, "FlashAlloc: Dedicating Flash Blocks By Objects". VLDB 2023

Prerequisite

First, you will need the Cosmos+ Board with hynix NAND firmware version. You can get more accurate information at CRZ Technology

Cosmos+Board

FPGA: Xilinx XC7Z045-3FFG900 Zynq-7000
- Dual ARM Cortex-A9 1GHz Core
- NEON DSP co-processor for each core
- 350K LCs

1GB DDR3 NAND Modules
1 SD CARD Slot
Dual PCIe Gen2 x8 End-Points (Cabled PCIe Interface)
1 Gigabit Ethernet Interface
1 USB 2.0 (configurable to Host or Device)
JTAG and Debug Interface         

Second, You need the software tools and files

Project Structure

  • Flashalloc is Cosmos+ OpenSSD firmware source code which implements the Flashalloc interface for flash storages
  • Multistream is multi-stream prototype for Cosmos+ OpenSSD supporting eight stream-ids
  • host incorporates the implementation of both RocksDB and MySQL, utilized for evaluation in our paper. It also includes a simple host application example to test the flashalloc command.
  • More details are illustrated in our paper.

Build

Please refer to Cosmos+ OpenSSD build guide document

TL;DR

  1. Prepare Cosmos+ Open SSD, Window and Linux PC
  2. Connect the Cosmos+ OpenSSD to Window PC (JTAG dilegent module and USB cable for UART) and install the PCIe to connect btw Cosmos+ OpenSSD and Linux PC
  3. Open the FlashAlloc projecct in Xilinx SDK
  4. Right click on project, and Run As > 1. Launch on Hardware (GDB)
  5. Click the firmware to execute, and click OK > wait UART message
  6. Press X to make bad block table (you should do this for the first time)
  7. Wait and Turn-on (or reboot) the Linux PC
  8. You can check the Cosmos+ OpenSSD using nvme-cli or lspci command (check the nvme0nXXXXX in the device list)
  9. Bon appétit! :)

How to use FlashAlloc command

cd host
make -j

sudo ./playground /dev/nvmeXXX 0 32
  • playground host application name
  • /dev/nvmeXXX Comsmos+ OpenSSD device path
  • 0 start LBA (4KiB-based offset)
  • 32 LBA length

Running the Experiments

RocksDB

  1. Build
  • Build the RocksDB database engine for both flashalloc or multi-streame ssd version
  • You can also build the vanilla version of Rocksdb using bash ./scripts/build.sh command

cd host/RocksDB/rocksdb-{flashalloc | msssd}
bash ./scripts/build.sh cosmos

  1. Configure File system
  • You can mount either EXT4 or F2FS filesystem with TRIM support on top of Cosmos+ OpenSSD
# EXT4 Filesystem
bash ./scripts/setup-ext4-trim.sh

# F2FS Filesystem
bash ./scripts/setup-f2fs-trim.sh
  1. Run db_bench wiht 4 tenants
# FlashAlloc version
bash ./scripts/run_flashalloc.sh

# Vanilla version
bash ./scripts/run_vanilla.sh

# Multi-stream SSD version
bash ./scripts/run_msssd.sh
  1. Run db_bench wiht single tenants
# FlashAlloc version
bash ./scripts/falloc-single.sh

# Multi-stream SSD version
bash ./scripts/msssd-single.sh

MySQL

  1. Build
cd hsot/MySQL
bash ./build.sh
  1. Initialize data directory
bash init.sh
  1. Run MySQL server
bash ./run.sh
  1. Run TPC-C Benchmark
  • You can also modify the configuration for TPC-C Benchmark (e.g., # of clients, wrapup time, duration, and etc)
  • To run the either vanilla or multi-stream ssd version, you can execute run.sh script.
cd host/tpcc-mysql
bash ./run-flashalloc.sh

Multi-tenant

  • In this experiment, you can evaluate the multi-tenant configuration.
# configure the filesystem and data directory for TPC-C and db_bench
bash ./setup-multi.sh

# run multi-tenant experiments
bash run-multi.sh

Refercnes

All guide document for Cosmos+ OpenSSD is provided by Cosmos Open SSD Project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.