若我們要用IOZone來測試mount在/mnt/iscsi下的iSCSI磁區benchmark, 指令可以如下:

Example 1:
$ iozone -Rab output.xls -i 0 -i 1 -i 2 -y 4K -q 2M -n 4K -g 2G -S 8M -+u -f /mnt/iscsi/iotest.file -z

Example 2:
$ iozone -Rb output.xls -r 4K -s 2G

 

 

-R
      (將報告顯示在螢幕上)

      Generate Excel report. Iozone will generate an Excel compatible report to standard out. This file may be imported with Microsoft Excel (space delimited) and used to create a graph of the filesystem performance. Note: The 3D graphs are column oriented. You will need to select this when graphing as the default in Excel is row oriented data. 

 

-a
      Used to select full automatic mode. Produces output that covers all tested file operations for record sizes of 4k to 16M for file sizes of 64k to 512M. 

 

-b filename
     (將報告輸出為Excel檔)
     Used to specify a filename that will be used for output of an Excel compatible file that contains the results.

 

-i #
      (指定要測試的模式)
      Used to specify which tests to run. (0=write/rewrite, 1=read/re-read, 2=random-read/write, 3=Read-backwards, 4=Re-write-record, 5=stride-read, 6=fwrite/re-fwrite, 7=fread/Re-fread,  8=mixed  workload,  9=pwrite/Re-pwrite,  10=pread/Re-pread, 11=pwritev/Re-pwritev, 12=preadv/Re-preadv). One will always need to specify 0 so that any of the following tests will have a file to measure. -i # -i # -i # is also supported so that one may select more than one test.

 

-y #
      (指定產生record的最小容量)
      Set minimum record size (in Kbytes) for auto mode. One may also specify -y #k (size in Kbytes) or -y #m (size in Mbytes) or -y #g (size in Gbytes). See -q for maximum record size.

 

-q #
      (指定產生record的最大容量)
      Set maximum record size (in Kbytes) for auto mode. One may also specify -q #k (size in Kbytes) or -q #m (size in Mbytes) or -q #g (size in Gbytes). See -y for minimum record size.

 

-n #
      (指定檔案所產生的最小容量)
      Set minimum file size (in Kbytes) for auto mode. One may also specify -n #k (size in Kbytes) or -n #m (size in Mbytes) or -n #g (size in Gbytes). See -g for maximum file size.

 

-g #
      (指定檔案所產生的最大容量)
      Set maximum file size (in Kbytes) for auto mode. One may also specify -g #k (size in Kbytes) or -g #m (size in Mbytes) or -g #g (size in Gbytes). See -n for minimum file size.

 

-f filename
      (指定產生檔案的位置與名稱)
      Used to specify the filename for the temporary file under test. This is useful when the unmount option is used. When testing with unmount between tests it is necessary for the temporary file under test to be in a directory that can be unmounted. It is not possible to unmount the current working directory as the process Iozone is running in this directory.

 

-z
      Used in conjunction with -a to test all possible record sizes. Normally Iozone  omits testing  of small record sizes for very large files when used in full automatic mode. This option forces Iozone to include the small record sizes in  the  automatic  tests also.

 

-S #
      (指定CPU cache的容量大小)
      Set processor cache size to value (in Kbytes). This tells Iozone the size of the processor cache. It is used internally for buffer alignment and for the purge functionality.

 

-r #
      (指定產生record的大小)
      Used to specify the record size, in Kbytes, to test. One may also specify -r #k (size in Kbytes) or -r #m (size in Mbytes) or -r #g (size in Gbytes). 

 

-s #
      (指定檔案所產生的大小)
      Used to specify the size, in Kbytes, of the file to test. One may also specify -s #k (size in Kbytes) or -s #m (size in Mbytes) or -s #g (size in Gbytes).

 

-p
      This purges the processor cache before each file operation. Iozone will allocate another internal buffer that is aligned to the same processor cache boundary and is of a size that matches the processor cache. It will zero fill this alternate buffer before beginning each test. This will purge the processor cache and allow one to see the memory subsystem without the acceleration due to the processor cache. 

 

-+u
      Used to enable CPU statistics collection.

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()