Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
README.md 19.05 KiB

What's DiskSim?

DiskSim is an efficient, accurate, highly-configurable disk system simulator originally developed at the University of Michigan and enhanced at CMU to support research into various aspects of storage subsystem architecture. It is written in C and requires no special system software (just basic POSIX interfaces). DiskSim includes modules for most secondary storage components of interest, including device drivers, buses, controllers, adapters, and disk drives. DiskSim also includes support for a number of externally-provided trace formats and internally-generated synthetic workloads, and includes hooks for inclusion in a larger scale system-level simulator.

Why to use DiskSim?

Because it's unprecedented accuracy:

Results

DiskSim builder and scripts

This tool helps with building DiskSim v4.0 in these ways:

Folder scripts/ holds other useful tools including a generator of JBOD|RAID{0|1|3|4|5} parv files.

Build DiskSim

Clone this repo

$ git clone git@gitlab.fit.cvut.cz:berusjan/disksim-4.0.git
$ cd disksim-4.0

Install requirements

It requires installed C development tools, bison (YACC-compatible parser generator) and flex (fast lexical analyzer generator).

The example of installation command for Ubuntu distribution:

sudo apt-get install build-essential bison flex

Help for make

$ make help
Make patched DiskSim

Usage:
  make [target ...]

Targets:
          all ......... make compile, install and test
          compile ..... compile disksim in build/disksim-4.0/
          install ..... install binaries to bin/
          test ........ run valadation tests
          clean ....... delete bin/
          help ........ print this help screen

Build DiskSim

$ make
[DISKSIM] Compile ...
chmod +x 'build/disksim-4.0/libparam/'*.pl
make -C 'build/disksim-4.0'
make[1]: Vstupuje se do adresáře „/home/oem/BP/My_BP/patches_all/patched/build/disksim-4.0“
make -C libddbg
make[2]: Vstupuje se do adresáře „/home/oem/BP/My_BP/patches_all/patched/build/disksim-4.0/libddbg“
cc -O2 -std=gnu90  -g -I../libparam   -c -o ddbg_assert.o ddbg_assert.c
cc -O2 -std=gnu90  -g -I../libparam   -c -o ddbg_trace.o ddbg_trace.c
ar cru libddbg.a ddbg_assert.o ddbg_trace.o
ar: `u' modifier ignored since `D' is the default (see `U')
mkdir -p include/libddbg lib
cp -p libddbg.h include/libddbg
cp -p libddbg.a lib 
make[2]: Opouští se adresář „/home/oem/BP/My_BP/patches_all/patched/build/disksim-4.0/libddbg“
...

OK, installed binaries:
-rwxrwxr-x 1 jake jake 606424 pro  7 03:18 bin/disksim
-rwxrwxr-x 1 jake jake  51784 pro  7 03:18 bin/dxcachectl
-rwxrwxr-x 1 jake jake  72536 pro  7 03:18 bin/dx_layout
-rwxrwxr-x 1 jake jake 197560 pro  7 03:18 bin/dx_mech
-rwxrwxr-x 1 jake jake  55960 pro  7 03:18 bin/dxreplay
-rwxrwxr-x 1 jake jake 700120 pro  7 03:18 bin/dx_rest
-rwxrwxr-x 1 jake jake 197784 pro  7 03:18 bin/dx_seeks
-rwxrwxr-x 1 jake jake 172888 pro  7 03:18 bin/dx_skew_curve
-rwxrwxr-x 1 jake jake 168696 pro  7 03:18 bin/dx_skews_simple
-rwxrwxr-x 1 jake jake  72376 pro  7 03:18 bin/dx_stat
-rwxrwxr-x 1 jake jake  10528 pro  7 03:18 bin/hplcomb
-rwxrwxr-x 1 jake jake  22792 pro  7 03:18 bin/mems_seektest
-rwxrwxr-x 1 jake jake 610552 pro  7 03:18 bin/physim
-rwxrwxr-x 1 jake jake  10480 pro  7 03:18 bin/rms

[DISKSIM] Run validation test build/disksim-4.0/valid/runvalid ...
cd 'build/disksim-4.0/valid/' && sh 'runvalid'
These results represent actual drive validation experiments
...

Run validation tests

$ make test
[DISKSIM] Run validation test build/disksim-4.0/valid/runvalid ...
cd 'build/disksim-4.0/valid/' && sh 'runvalid'
These results represent actual drive validation experiments

QUANTUM_QM39100TD-SW (rms should be about 0.378)
rms = 0.378078

SEAGATE_ST32171W (rms should be about 0.349)
rms = 0.347863
...

Scripts

Go to script folder

$ cd script

disksim.sh

$ ./disksim.sh