最近要和师兄做一个关于瓦记录的项目,要用到DiskSim来模拟硬盘的读写,现在就记录下我的安装过程
首先用师兄传给我的disksim_1.0源码试了一下,安装过程如下:
[WangZhi@Panda-CentOS DiskDim]$ tar -zxf disksim1.0.tar.gz [WangZhi@Panda-CentOS DiskDim]$ cd disksim1.0 [WangZhi@Panda-CentOS disksim1.0]$ ls CVS doc README src valid [WangZhi@Panda-CentOS disksim1.0]$ cd src [WangZhi@Panda-CentOS src]$ ls COPYRIGHT disksim_cache.c disksim_disk.c disksim_global.h disksim_ioface.h disksim_logorg.c disksim_pfsim.h hplcomb.c CVS disksim_cache.h disksim_diskcache.c disksim_hptrace.h disksim_ioqueue.c disksim_logorg.h disksim_redun.c Makefile disksim_assertlib.h disksim_controller.c disksim_diskctlr.c disksim_interface.c disksim_ioqueue.h disksim_orgface.h disksim_stat.c rms.c disksim_bus.c disksim_controller.h disksim_disk.h disksim_intr.c disksim_iosim.c disksim_pfdisp.c disksim_stat.h syssim_driver.c disksim_bus.h disksim_ctlrdumb.c disksim_diskmap.c disksim_iodriver.c disksim_iosim.h disksim_pfface.h disksim_synthio.c syssim_driver.h disksim.c disksim_ctlrsmart.c disksim_diskmech.c disksim_iodriver.h disksim_iotrace.c disksim_pfsim.c disksim_synthio.h [WangZhi@Panda-CentOS src]$ make
[WangZhi@Panda-CentOS src]$ ls COPYRIGHT disksim_cache.h disksim_disk.c disksim_diskmech.o disksim_iodriver.h disksim_iotrace.c disksim_pfdisp.o disksim_stat.o syssim CVS disksim_cache.o disksim_diskcache.c disksim_disk.o disksim_iodriver.o disksim_iotrace.o disksim_pfface.h disksim_synthio.c syssim_driver.c disksim disksim_controller.c disksim_diskcache.o disksim_global.h disksim_ioface.h disksim_logorg.c disksim_pfsim.c disksim_synthio.h syssim_driver.h disksim_assertlib.h disksim_controller.h disksim_diskctlr.c disksim_hptrace.h disksim_ioqueue.c disksim_logorg.h disksim_pfsim.h disksim_synthio.o syssim_driver.o disksim_bus.c disksim_controller.o disksim_diskctlr.o disksim_interface.c disksim_ioqueue.h disksim_logorg.o disksim_pfsim.o hplcomb disksim_bus.h disksim_ctlrdumb.c disksim_disk.h disksim_interface.o disksim_ioqueue.o disksim_main.o disksim_redun.c hplcomb.c disksim_bus.o disksim_ctlrdumb.o disksim_diskmap.c disksim_intr.c disksim_iosim.c disksim.o disksim_redun.o Makefile disksim.c disksim_ctlrsmart.c disksim_diskmap.o disksim_intr.o disksim_iosim.h disksim_orgface.h disksim_stat.c rms disksim_cache.c disksim_ctlrsmart.o disksim_diskmech.c disksim_iodriver.c disksim_iosim.o disksim_pfdisp.c disksim_stat.h rms.c [WangZhi@Panda-CentOS src]$ cd .. [WangZhi@Panda-CentOS disksim1.0]$ ls CVS doc README src valid [WangZhi@Panda-CentOS disksim1.0]$ cd valid/ [WangZhi@Panda-CentOS valid]$ ls ajw.1week.srt.Z out.hplajw out.synthopen outv.hpc2247 par.ascii par.synthmixed parv.hpc2247 runvalid seekSeagate trace.decrz26 trace.seagate CVS out.synthcache out.synthraid5 outv.hpc2490 par.hplajw par.synthopen parv.hpc2490 seekDECRZ26 statdefs trace.hpc2247 diskspecs out.synthclosed out.syssim outv.hpc3323 par.synthcache par.synthraid5 parv.hpc3323 seekHPC2490 statdefs.validgrow trace.hpc2490 out.ascii out.synthmixed outv.decrz26 outv.seagate par.synthclosed parv.decrz26 parv.seagate seekHPC3323 trace.ascii.Z trace.hpc3323 [WangZhi@Panda-CentOS valid]$ ./ runvalid bash: ./: is a directory [WangZhi@Panda-CentOS valid]$ ./runvalid These results represent actual drive validation experiments HP_C2247_validate (rms should be about 0.090) rms = 0.089558 HP_C3323_validate (rms should be about 0.306) rms = 0.306185 HP_C2490_validate (rms should be about 0.254) rms = 0.253573 Seagate_ST41601N_validate (rms should be about 0.083) rms = 0.082803 DEC_RZ26_validate (rms should be about 0.438) rms = 0.438246 The remaining tests exercise other DiskSim components Open synthetic workload (avg. resp. should be about 47.3ms) IOdriver Response time average: 47.265968 Closed synthetic workload (avg. resp. should be about 87.6ms) IOdriver Response time average: 87.559662 Mixed synthetic workload (avg. resp. should be about 24.4ms) IOdriver Response time average: 24.366213 Cache at controller (avg. resp. should be about 23.0ms) IOdriver Response time average: 23.038920 RAID 5 at device driver (avg. resp. should be about 22.8ms) *** glibc detected *** ../src/disksim: free(): invalid next size (fast): 0x0000000001d4e920 *** ======= Backtrace: ========= /lib64/libc.so.6[0x3202a76166] /lib64/libc.so.6[0x3202a78ca3] ../src/disksim[0x42f03f] ../src/disksim[0x41604a] ../src/disksim[0x4024ce] ../src/disksim[0x402e8f] /lib64/libc.so.6(__libc_start_main+0xfd)[0x3202a1ed1d] ../src/disksim[0x400ce9] ======= Memory map: ======== ... ./runvalid: line 56: 6237 Aborted (core dumped) nice ../src/disksim par.synthraid5 out.synthraid5 ascii 0 1 IOdriver Response time average: 22.848468 Note: this validates HP trace input, *not* the corresponding traced disk HP srt trace input (avg. resp should be about 48.8ms) IOdriver Response time average: 48.783785 ASCII input (avg. resp should be about 13.8ms) *** glibc detected *** ../src/disksim: free(): invalid next size (fast): 0x00000000026702b0 *** ======= Backtrace: ========= /lib64/libc.so.6[0x3202a76166] /lib64/libc.so.6[0x3202a78ca3] ../src/disksim[0x42f03f] ../src/disksim[0x41604a] ../src/disksim[0x4024ce] ../src/disksim[0x402e8f] /lib64/libc.so.6(__libc_start_main+0xfd)[0x3202a1ed1d] ../src/disksim[0x400ce9] ======= Memory map: ======== ... ./runvalid: line 67: 6245 Done zcat trace.ascii.Z 6246 Aborted (core dumped) | nice ../src/disksim par.ascii out.ascii ascii stdin 0 IOdriver Response time average: 13.771355 syssim: externally-controller DiskSim (avg. resp should be about 19.6ms) response time: n=1000 average=0.019558 std. deviation=0.005156 IOdriver Response time average: 19.558014错误为:
free(): invalid next size (fast)是在内存回收时出了问题
[WangZhi@Panda-CentOS DiskDim]$ tar -zxf disksim-4.0.tar.gz [WangZhi@Panda-CentOS DiskDim]$ cd disksim-4.0 [WangZhi@Panda-CentOS disksim-4.0]$ ls COPYING diskmodel doc libddbg libparam Makefile memsmodel README src utils valid [WangZhi@Panda-CentOS disksim-4.0]$ make
disksim_iosim.c: In function ‘iosim_load_map’: disksim_iosim.c:364: warning: cast to pointer from integer of different size disksim_iosim.c: In function ‘io_initialize’: disksim_iosim.c:712: error: duplicate case value disksim_iosim.c:712: error: previously used here make[1]: *** [disksim_iosim.o] Error 1 make[1]: Leaving directory `/home/WangZhi/Desktop/DiskDim/disksim-4.0/src' make: *** [all] Error 2
703 void io_initialize (int standalone) 704 { 705 if (disksim->iosim_info == NULL) { 706 iosim_initialize_iosim_info (); 707 } 708 709 bus_set_depths(); 710 // fprintf (outputfile, "Back from bus_set_depths\n"); 711 712 StaticAssert (sizeof(ioreq_event) <= DISKSIM_EVENT_SIZE); 713 device_initialize(); 714 bus_initialize(); 715 controller_initialize(); 716 iodriver_initialize(standalone); 717 }
[WangZhi@Panda-CentOS disksim-4.0]$ cd valid/ [WangZhi@Panda-CentOS valid]$ ls 3disks2.parv atlas_III.parv cheetah4LP.trace hp_c2247a.parv hp_c3323a.parv Makefile statdefs 3disks.parv atlas_III.seek cheetah9LP.diskspecs hp_c2247a.trace hp_c3323a.seek memsdevices.specs statdefs.mems ajw.1week.srt atlas_III.trace cheetah9LP.model hp_c2247a_validate.model hp_c3323a.trace mems.g1.parv syntharrays.parv ascii.parv barracuda.diskspecs cheetah9LP.parv hp_c2249a.diskspecs hp_c3323a_validate.diskspecs mems.g2.parv synthcachedev.parv ascii.trace barracuda.model cheetah9LP.seek hp_c2249a.model hp_c3323a_validate.model mems.g3.parv synthcachemem.parv atlas10k.diskspecs barracuda.parv cheetah9LP.trace hp_c2490a.diskspecs hp_c3323a_validate.seek memsvalid synthclosed.parv atlas10k.model barracuda.seek dec_rz26.diskspecs hp_c2490a.parv hplajw.parv runvalid synthmixed.parv atlas10k.parv barracuda.trace dec_rz26.parv hp_c2490a.trace ibm18es.diskspecs st41601n.diskspecs synthopen.parv atlas10k.seek cheetah4LP.diskspecs dec_rz26.trace hp_c2490a_validate.model ibm18es.model st41601n.parv synthraid5.parv atlas10k.trace cheetah4LP.model dec_rz26_validate.model hp_c2490a_validate.seek ibm18es.parv st41601n.trace synthsimpledisk.parv atlas_III.diskspecs cheetah4LP.parv dec_rz26_validate.seek hp_c3323a.diskspecs ibm18es.seek st41601n_validate.model atlas_III.model cheetah4LP.seek hp_c2247a.diskspecs hp_c3323a.model ibm18es.trace st41601n_validate.seek [WangZhi@Panda-CentOS valid]$ ./runvalid These results represent actual drive validation experiments QUANTUM_QM39100TD-SW (rms should be about 0.378) ./runvalid: line 11: 8537 Segmentation fault (core dumped) ${PREFIX}/disksim atlas_III.parv atlas_III.outv validate atlas_III.trace 0 SEAGATE_ST32171W (rms should be about 0.349) ./runvalid: line 16: 8541 Segmentation fault (core dumped) ${PREFIX}/disksim barracuda.parv barracuda.outv validate barracuda.trace 0 SEAGATE_ST34501N (rms should be about 0.318) ./runvalid: line 21: 8543 Segmentation fault (core dumped) ${PREFIX}/disksim cheetah4LP.parv cheetah4LP.outv validate cheetah4LP.trace 0 SEAGATE_ST39102LW (rms should be about 0.107) ./runvalid: line 26: 8545 Segmentation fault (core dumped) ${PREFIX}/disksim cheetah9LP.parv cheetah9LP.outv validate cheetah9LP.trace 0 IBM_DNES-309170W (rms should be about 0.135) ./runvalid: line 31: 8547 Segmentation fault (core dumped) ${PREFIX}/disksim ibm18es.parv ibm18es.outv validate ibm18es.trace 0 QUANTUM_TORNADO (rms should be about 0.268) ./runvalid: line 36: 8549 Segmentation fault (core dumped) ${PREFIX}/disksim atlas10k.parv atlas10k.outv validate atlas10k.trace 0 HP_C2247_validate (rms should be about 0.090) ./runvalid: line 41: 8551 Segmentation fault (core dumped) ${PREFIX}/disksim hp_c2247a.parv hp_c2247a.outv validate hp_c2247a.trace 0 HP_C3323_validate (rms should be about 0.306) ./runvalid: line 46: 8553 Segmentation fault (core dumped) ${PREFIX}/disksim hp_c3323a.parv hp_c3323a.outv validate hp_c3323a.trace 0 HP_C2490_validate (rms should be about 0.254) ./runvalid: line 51: 8555 Segmentation fault (core dumped) ${PREFIX}/disksim hp_c2490a.parv hp_c2490a.outv validate hp_c2490a.trace 0 DEC_RZ26_validate (rms should be about 0.340) ./runvalid: line 56: 8557 Segmentation fault (core dumped) ${PREFIX}/disksim dec_rz26.parv dec_rz26.outv validate dec_rz26.trace 0 The remaining tests exercise other DiskSim components Open synthetic workload (avg. resp. should be about 10.9ms) ./runvalid: line 65: 8559 Segmentation fault (core dumped) ${PREFIX}/disksim synthopen.parv synthopen.outv ascii 0 1 Closed synthetic workload (avg. resp. should be about 87.6ms) ./runvalid: line 70: 8561 Segmentation fault (core dumped) ${PREFIX}/disksim synthclosed.parv synthclosed.outv ascii 0 1 Mixed synthetic workload (avg. resp. should be about 22.08ms) ./runvalid: line 75: 8563 Segmentation fault (core dumped) ${PREFIX}/disksim synthmixed.parv synthmixed.outv ascii 0 1 RAID 5 at device driver (avg. resp. should be about 22.8ms) ./runvalid: line 80: 8565 Segmentation fault (core dumped) ${PREFIX}/disksim synthraid5.parv synthraid5.outv ascii 0 1 Set of disk arrays at device driver (avg. resp. should be about 34.3ms) ./runvalid: line 85: 8567 Segmentation fault (core dumped) ${PREFIX}/disksim syntharrays.parv syntharrays.outv ascii 0 1 Memory cache at controller (avg. resp. should be about 24.6ms) ./runvalid: line 90: 8569 Segmentation fault (core dumped) ${PREFIX}/disksim synthcachemem.parv synthcachemem.outv ascii 0 1 Cache device managed at controller (avg. resp. should be about 28.9ms) ./runvalid: line 100: 8571 Segmentation fault (core dumped) ${PREFIX}/disksim synthcachedev.parv synthcachedev.outv ascii 0 1 Simpledisk instead of original model (avg. resp. should be about 13.5ms) *** error: in disksim_iodriver_stats spec -- missing required parameter Print driver queue stats *** error: in disksim_ctlr_stats spec -- missing required parameter Print controller interference stats *** error: in disksim_device_stats spec -- missing required parameter Print device size stats *** error: in disksim_ioqueue spec -- missing required parameter Sequential stream scheme *** error: in disksim_simpledisk spec -- missing required parameter Max queue length *** error: in disksim_ioqueue spec -- missing required parameter Sequential stream scheme *** error: in disksim_iodriver_stats spec -- missing required parameter Print driver queue stats *** error: in disksim_ctlr_stats spec -- missing required parameter Print controller interference stats *** error: in disksim_device_stats spec -- missing required parameter Print device size stats *** error: in disksim_logorg spec -- missing required parameter Stripe unit *** error: in disksim_synthgen spec -- missing required parameter Probability of local access *** error: in disksim_synthgen spec -- missing required parameter Probability of local access *** error: in disksim_synthgen spec -- missing required parameter Probability of local access *** error: in disksim_synthgen spec -- missing required parameter Probability of local access *** error: in disksim_synthgen spec -- missing required parameter Probability of local access ./runvalid: line 105: 8573 Segmentation fault (core dumped) ${PREFIX}/disksim synthsimpledisk.parv synthsimpledisk.outv ascii 0 1 3 different disks (avg. resps. should be about 10.937) ./runvalid: line 120: 8575 Segmentation fault (core dumped) ${PREFIX}/disksim 3disks.parv 3disks.outv ascii 0 1 3 disks on separate controllers (avg. resps. should be about 10.937) ./runvalid: line 125: 8577 Segmentation fault (core dumped) ${PREFIX}/disksim 3disks2.parv 3disks2.outv ascii 0 1 Note: this validates HP trace input, *not* the corresponding traced disk HP srt trace input (avg. resp should be about 48.8ms) ./runvalid: line 130: 8579 Segmentation fault (core dumped) ${PREFIX}/disksim hplajw.parv hplajw.outv hpl ajw.1week.srt 0 ASCII input (avg. resp should be about 13.8ms) ./runvalid: line 140: 8581 Segmentation fault (core dumped) ${PREFIX}/disksim ascii.parv ascii.outv ascii stdin 0 < ascii.trace syssim: externally-controlled DiskSim (avg. resp should be about 8.9ms) ./runvalid: line 145: 8583 Segmentation fault (core dumped) ${PREFIX}/syssim cheetah4LP.parv syssim.outv 2676846
SSD extension for DiskSim is an extensional module of DiskSim which implments SSD I/O Models. It is implemented by Microsoft Research. Compiling DiskSim and SSD extension is very simple, but when I tried, there was some problem. This article addresses those problems. DiskSim does not compile in 64bit environment. Never try it. Even if you succeded compilation, it will not run -- just produces segmentation fault. DiskSim requires bison and flex, which are parser generators for parameter file parsing codes.