Skip to content

Commit c1c035c

Browse files
committed
FAST26 AE
1 parent 7a0b8bb commit c1c035c

8 files changed

Lines changed: 270 additions & 154 deletions

File tree

femu-scripts/femu-copy-scripts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
FSD="../femu-scripts"
66

7-
CPL=(pkgdep.sh femu-compile.sh run-whitebox.sh run-blackbox.sh run-blackbox-fdp.sh run-fdp-RU256.sh run-fdp-WARP4.sh run-nossd.sh run-zns.sh pin.sh ftk)
7+
CPL=(pkgdep.sh femu-compile.sh run-whitebox.sh run-blackbox.sh run-blackbox-fdp.sh run-fdp-RU256.sh run-fdp-WARP4.sh run-fdp-RU128-WARPA2.sh run-nossd.sh run-zns.sh pin.sh ftk)
88

99
echo ""
1010
echo "==> Copying following FEMU script to current directory:"
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
#!/bin/bash
2+
# Huaicheng Li <huaicheng@cs.uchicago.edu>
3+
# Run FEMU as a black-box SSD (FTL managed by the device)
4+
5+
#FDP real hw device
6+
#./vfio-bind.sh 0000:8b:00.0
7+
8+
# image directory
9+
IMGDIR=$HOME/image
10+
# Virtual machine disk image
11+
# OSIMGF=$IMGDIR/newimg2.qcow2
12+
OSIMGF=$IMGDIR/u20s.qcow2
13+
14+
15+
# Configurable SSD Controller layout parameter4s (must be power of 2)
16+
secsz=512
17+
secs_per_pg=8 #4KiB
18+
pgs_per_blk=512 #512*4K:2MB (RU : 128MiB)
19+
blks_per_pl=4086 #2MB * 8 * 8 =RU 128MiB -> 4085.76 = (448*1.14*1024)/128
20+
pls_per_lun=1 # still not support multiplanes
21+
luns_per_ch=8 # 16G 256*8
22+
nchs=8 # 128G 256*8*8
23+
ssd_size=458752 # in MegaBytes
24+
# # 128GiB ( 156GiB )
25+
# # 256GiB ( 307GiB) 26214
26+
# # 512GiB ( 614GiB) 524288
27+
number_of_ru=$((blks_per_pl * pls_per_lun))
28+
# Latency in nanoseconds
29+
#pg_rd_lat=40000 #40us
30+
#pg_wr_lat=200000 #200us
31+
#blk_er_lat=2000000 #2ms
32+
#ch_xfer_lat=0
33+
pg_rd_lat=10000 #10us
34+
#pg_wr_lat=50000 #50us
35+
#blk_er_lat=500000 #400us
36+
pg_wr_lat=5000 # 500us : 50us : 5us : 2.5us
37+
blk_er_lat=20000 # 2000us : 200us : 20us: 10us
38+
39+
40+
ch_xfer_lat=0
41+
# GC Threshold (1-100)
42+
custom_trim_all=true
43+
gc_thres_pcent=90
44+
gc_thres_pcent_high=99
45+
46+
# FDP feature
47+
fdpruhs="0;1;2;3;4;5;6;7"
48+
subsys="femu-subsys-0"
49+
#-----------------------------------------------------------------------
50+
51+
#Compose the entire FEMU BBSSD command line options
52+
FEMU_OPTIONS="-device femu"
53+
FEMU_OPTIONS=${FEMU_OPTIONS}",devsz_mb=${ssd_size}"
54+
FEMU_OPTIONS=${FEMU_OPTIONS}",namespaces=1"
55+
FEMU_OPTIONS=${FEMU_OPTIONS}",femu_mode=1"
56+
FEMU_OPTIONS=${FEMU_OPTIONS}",secsz=${secsz}"
57+
FEMU_OPTIONS=${FEMU_OPTIONS}",secs_per_pg=${secs_per_pg}"
58+
FEMU_OPTIONS=${FEMU_OPTIONS}",pgs_per_blk=${pgs_per_blk}"
59+
FEMU_OPTIONS=${FEMU_OPTIONS}",blks_per_pl=${blks_per_pl}"
60+
FEMU_OPTIONS=${FEMU_OPTIONS}",pls_per_lun=${pls_per_lun}"
61+
FEMU_OPTIONS=${FEMU_OPTIONS}",luns_per_ch=${luns_per_ch}"
62+
FEMU_OPTIONS=${FEMU_OPTIONS}",nchs=${nchs}"
63+
FEMU_OPTIONS=${FEMU_OPTIONS}",pg_rd_lat=${pg_rd_lat}"
64+
FEMU_OPTIONS=${FEMU_OPTIONS}",pg_wr_lat=${pg_wr_lat}"
65+
FEMU_OPTIONS=${FEMU_OPTIONS}",blk_er_lat=${blk_er_lat}"
66+
FEMU_OPTIONS=${FEMU_OPTIONS}",ch_xfer_lat=${ch_xfer_lat}"
67+
FEMU_OPTIONS=${FEMU_OPTIONS}",custom_trim_all=${custom_trim_all}"
68+
FEMU_OPTIONS=${FEMU_OPTIONS}",gc_thres_pcent=${gc_thres_pcent}"
69+
FEMU_OPTIONS=${FEMU_OPTIONS}",gc_thres_pcent_high=${gc_thres_pcent_high}"
70+
FEMU_OPTIONS=${FEMU_OPTIONS}",fdp.ruhs=${fdpruhs}"
71+
FEMU_OPTIONS=${FEMU_OPTIONS}",subsys=${subsys}"
72+
echo ${FEMU_OPTIONS}
73+
74+
if [[ ! -e "$OSIMGF" ]]; then
75+
echo ""
76+
echo "VM disk image couldn't be found ..."
77+
echo "Please prepare a usable VM image and placeit as $OSIMGF"
78+
echo "Once VM disk image is ready, please rerun this script again"
79+
echo ""
80+
exit
81+
fi
82+
83+
sudo x86_64-softmmu/qemu-system-x86_64 \
84+
-name "FEMU-BBSSD-VM" \
85+
-enable-kvm \
86+
-cpu host \
87+
-smp 16 \
88+
-m 16G \
89+
-device femu-subsys,id=femu-subsys-0,nqn=subsys0,fdp=on,fdp.nruh=8,fdp.nrg=1,fdp.nru=${number_of_ru} \
90+
-device virtio-scsi-pci,id=scsi0 \
91+
-device scsi-hd,drive=hd0 \
92+
-drive file=$OSIMGF,if=none,aio=native,cache=none,format=qcow2,id=hd0 \
93+
${FEMU_OPTIONS} \
94+
-net user,hostfwd=tcp::18080-:22 \
95+
-net nic,model=virtio \
96+
-nographic \
97+
-qmp unix:./qmp-sock,server,nowait 2>&1 | tee log
98+
99+
#-device vfio-pci,host=8b:00.0 \
100+
#-virtfs local,path=/data/inho,mount_tag=hds03,security_model=passthrough,id=hds03 \

femu-scripts/run-fdp-RU256.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
#./vfio-bind.sh 0000:8b:00.0
77

88
# image directory
9-
IMGDIR=/data/inho/images
9+
IMGDIR=$HOME/image
1010
# Virtual machine disk image
11-
OSIMGF=/mnt/sda1/fast_ae/u20s.qcow2
11+
# OSIMGF=$IMGDIR/newimg2.qcow2
12+
OSIMGF=$IMGDIR/u20s.qcow2
13+
1214

1315
# Configurable SSD Controller layout parameter4s (must be power of 2)
1416
secsz=512
@@ -39,6 +41,8 @@ blk_er_lat=10000 # 2000us : 200us : 20us: 10us
3941

4042
ch_xfer_lat=0
4143
# GC Threshold (1-100)
44+
lazy_gc_pcent=5
45+
4246
gc_thres_pcent=90
4347
gc_thres_pcent_high=99
4448

@@ -84,10 +88,10 @@ sudo x86_64-softmmu/qemu-system-x86_64 \
8488
-cpu host \
8589
-smp 16 \
8690
-m 8G \
87-
-device femu-subsys,id=femu-subsys-0,nqn=subsys0,fdp=on,fdp.nruh=8,fdp.nrg=1,fdp.nru=${number_of_ru} \
91+
-device femu-subsys,id=femu-subsys-0,nqn=subsys0,fdp=on,fdp.nruh=8,fdp.nrg=1,fdp.nru=${number_of_ru},fdp.isolation_mode=1 \
8892
-device virtio-scsi-pci,id=scsi0 \
8993
-device scsi-hd,drive=hd0 \
90-
-drive file=$OSIMGF,if=none,aio=native,cache=none,format=qcow,id=hd0 \
94+
-drive file=$OSIMGF,if=none,aio=native,cache=none,format=qcow2,id=hd0 \
9195
${FEMU_OPTIONS} \
9296
-net user,hostfwd=tcp::18080-:22 \
9397
-net nic,model=virtio \

femu-scripts/run-fdp-WARP4.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
#./vfio-bind.sh 0000:8b:00.0
77

88
# image directory
9-
IMGDIR=/data/inho/images
9+
#IMGDIR=/data/inho/images
10+
IMGDIR=$HOME/image
1011
# Virtual machine disk image
11-
OSIMGF=/mnt/sda1/fast_ae/u20s.qcow2
12+
# OSIMGF=$IMGDIR/newimg2.qcow2
13+
OSIMGF=$IMGDIR/u20s.qcow2
1214

1315
# Configurable SSD Controller layout parameter4s (must be power of 2)
1416
# ---- page & RU ---- #
@@ -108,7 +110,7 @@ sudo x86_64-softmmu/qemu-system-x86_64 \
108110
-device femu-subsys,id=femu-subsys-0,nqn=subsys0,fdp=on,fdp.nruh=8,fdp.nrg=1,fdp.nru=${number_of_ru} \
109111
-device virtio-scsi-pci,id=scsi0 \
110112
-device scsi-hd,drive=hd0 \
111-
-drive file=$OSIMGF,if=none,aio=native,cache=none,format=qcow,id=hd0 \
113+
-drive file=$OSIMGF,if=none,aio=native,cache=none,format=qcow2,id=hd0 \
112114
${FEMU_OPTIONS} \
113115
-net user,hostfwd=tcp::18080-:22 \
114116
-net nic,model=virtio \

0 commit comments

Comments
 (0)