Code Monkey home page Code Monkey logo

learnedftl's Introduction

LearnedFTL

The source code of paper: "LearnedFTL: A Learning-based Page-level FTL for Reducing Double Reads in Flash-based SSDs". Published on the 30th IEEE International Symposium on High-Performance Computer Architecture (HPCA '24), Edinburgh, Scotland.

Installation

  1. Make sure you have installed necessary libraries for building QEMU. The dependencies can be installed by following instructions below:
  git clone https://github.com/ucare-uchicago/femu.git
  cd LearnedFTL
  mkdir build-femu
  # Switch to the FEMU building directory
  cd build-femu
  # Copy femu script
  cp ../femu-scripts/femu-copy-scripts.sh .
  ./femu-copy-scripts.sh .
  # only Debian/Ubuntu based distributions supported
  sudo ./pkgdep.sh
  1. Compile & Install FEMU:
  ./femu-compile.sh

FEMU binary will appear as x86_64-softmmu/qemu-system-x86_64

  1. Prepare the VM image (e.g. Ubuntu Server 20.04)

Build your own VM image by following instructions: After the guest OS is installed, make following changes to redirect VM output to the console, instead of using a separate GUI window. (Desktop version guest OS is not tested)

Note: Please ask for help from Google if any of the steps doesn't work. In general, it gives you a basic idea to build your own VM image and make it run in text console.

    # Download a Ubuntu server ISO file
    $ mkdir -p ~/images/
    $ cd ~/images
    $ wget http://releases.ubuntu.com/20.04/ubuntu-20.04.3-live-server-amd64.iso
    $ sudo apt-get install qemu-system-x86
	# Create a QCOW2 disk image
    $ qemu-img create -f qcow2 femu.qcow2 80G

    # install guest OS to femu.qcow2 (You need a GUI environment to prepare the VM image)
    $ qemu-system-x86_64 -cdrom ubuntu-20.04.3-live-server-amd64.iso -hda femu.qcow2 -boot d -net nic -net user -m 8192 -localtime -smp 8 -cpu host -enable-kvm

  • After guest OS is installed, boot it with
    $ qemu-system-x86_64 -hda femu.qcow2 -net nic -net user -m 8192 -localtime -smp 8 -cpu host -enable-kvm

If the OS is installed into femu.qcow2, you should be able to enter the guest OS. Inside the VM, edit /etc/default/grub, make sure the following options are set.

GRUB_CMDLINE_LINUX="ip=dhcp console=ttyS0,115200 console=tty console=ttyS0"
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"

Still in the VM, update the grub

$ sudo update-grub
$ sudo shutdown -h now

Now you're ready to Run FEMU. If you stick to a Desktop version guest OS, please remove "-nographics" command option from the running script before running FEMU.

Run

Minimum Requirement

  • At least 8 cores and 40GB DRAM in the physical machine to enable seamless run of the following default FEMU scripts emulating a 32GB SSD in a VM with 4 vCPUs and 4GB DRAM.

Run FEMU

Boot the VM using the following script:

./run-blackbox.sh

After startup, you can see the /dev/nvme0n1 device throughs sudo nvme list command, and you can test it accordingly.

Change FTL

If you want to try other ftl, modify bbssd/**ftl.c in hw/femu/meson.build to the required ftl.c file, and modify the referenced header file in the hw/femu/bbssd/bb.c accordingly.


This project implements DFTL, TPFTL, LeaFTL, and LearnedFTL algorithms on FEMU in black-box mode. If you use this implementation for research purposes, please cite the sources.

Bibtex

@article{LearnedFTL,
Author = {Wang, Shengzhe and Lin, Zihang},
Title = {LearnedFTL},
Url = {https://github.com/astlxmu/LearnedFTL},
Year = 2023}

learnedftl's People

Contributors

linzihang avatar

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.