SSDextension for DiskSim is an extensional module of DiskSim whichimplments SSD I/O Models. It is implemented by MicrosoftResearch.转载自:http://blog.sina.com.cn/s/blog_6464a7210100ghsy.html
DiskSim is alow-level storage simulation tool, which can generatetiming-accurate simulation result. It is developed by Greg Ganger.Current version is 4.0 and it is out in June2008.
Compiling DiskSim and SSD extension is very simple, but when Itried, there was some problem.
This article addresses those problems.
DiskSim does not compile in 64bit environment. Nevertry it. Even if you succeded compilation, it will not run -- justproduces segmentation fault.
DiskSim requires bison and flex, which are parser generators forparameter file parsing codes.
Step 0. Install bison and flex, if you have not installedalready.
$ sudo apt-get install bison flex
Step 1. Download and unzip.
Sources can be downloadedfrom the links above. I downloaded DiskSim 4.0 with dixtrac.
$ tar xfz disksim-4.0-with-dixtrac.tar.gz
$ cd disksim-4.0
$ unzip ../ssd-add-on.zip
Step 2. Apply SSD add on patch.
$ patch -p1 < ssdmodel/ssd-patch
Step 3. Append SSD model library path to dixtrac.
add these lines to dixtrac/.paths
# path tossdmodelmodify dixtrac/Makefile like this :
exportSSDMODEL_PREFIX=../ssdmodel
exportSSDMODEL_INCL=$(SSDMODEL_PREFIX)/include
exportSSDMODEL_CFLAGS=-I$(SSDMODEL_INCL)
exportSSDMODEL_LDPATH=$(SSDMODEL_PREFIX)/lib
exportSSDMODEL_LDFLAGS=-L$(SSDMODEL_LDPATH)-lssdmodel
$(LIBDISKSIM_LDFLAGS) \Step 4. Compile~~~!
$(MEMSMODEL_LDFLAGS) \
$(DISKMODEL_LDFLAGS) \
$(SSDMODEL_LDFLAGS) \
$(LIBPARAM_LDFLAGS) \
$(LIBDDBG_LDFLAGS) \
$(ST_LDFLAGS)
CFLAGS = -Wall -g -MD -I. $(DEFINES) -I$(STHREADS) $(DMINCLUDES)\
$(LIBDISKSIM_CFLAGS) \
$(DISKMODEL_CFLAGS) $(LIBPARAM_CFLAGS) $(LIBDDBG_CFLAGS) \
$(SSDMODEL_CFLAGS)
$ make
Step 5. Check if it works well.
$ cd valid;./runvalid
$ chmod a+x ../ssdmodel/valid/runvalid
$ cd ../ssdmodel/valid; ./runvalid
Ok. It is all.