do you want to measure performance of disks on solaris ?. then we have excellent tool called vdbench.
Initially I used to write c++ program which read/writes chunks of data and measure the Input/Output using iostat command. then i came across called vdbench which simulates read/write on given partition of hard disk .
Initially I used to write c++ program which read/writes chunks of data and measure the Input/Output using iostat command. then i came across called vdbench which simulates read/write on given partition of hard disk .
go to http://sourceforge.net/projects/vdbench/ to download the tool and unzip it.
1) create a file of 100 MB . $mkfile 100m /benchmark/file1
2)now lets generate read/writes on this file /benchmark/file1 which is mounted on partition you want to benchmark IO.
there are example files that come with installation like example1, example2 etc. we can edit example1 file ,
*Example 1: Single run, one raw disk
*SD: Storage Definition
*WD: Workload Definition
*RD: Run Definition
*
sd=sd1,lun=/benchmark/file1
wd=wd1,sd=sd1,xfersize=4194304,rdpct=50
rd=run1,wd=wd1,iorate=100,elapsed=10,interval=1
* lun specifies the file, rawdisks etc.
*rdpct means read percentage. here i gave rdpct=50 means read % is 50, write % is 50.
*xfersize is 4194304 bytes which means vdbench generates 4 MB of load.
*elapsed is how many samples we need . we get 10 samples here
3) issue the command $ vdbench -f example1
Apr 20, 2012 interval i/o MB/sec bytes read resp resp resp cpu% cpu% rate 1024**2 i/o pct time max stddev sys+usr sys 07:25:53.061 1 92.00 1559.74 4194304 53.26 13.379 26.133 2.459 2.1 2.0 07:25:54.021 2 108.00 1831.00 4194304 50.00 12.848 16.296 1.704 2.5 2.3 07:25:55.019 3 114.00 1932.72 4194304 54.39 12.824 24.141 2.158 2.5 2.4 07:25:56.018 4 93.00 1576.69 4194304 46.24 12.893 27.468 2.312 2.1 2.0 07:25:57.017 5 103.00 1746.23 4194304 52.43 12.491 15.294 1.514 2.2 2.1 07:25:58.016 6 118.00 2000.53 4194304 43.22 13.324 30.540 2.848 2.7 2.5 07:25:59.018 7 103.00 1746.23 4194304 44.66 12.661 16.723 1.527 2.2 2.1 07:26:00.016 8 102.00 1729.27 4194304 44.12 12.657 15.030 1.419 2.2 2.1 07:26:01.016 9 116.00 1966.63 4194304 45.69 12.635 16.636 1.483 2.5 2.5 07:26:02.019 10 90.00 1525.83 4194304 47.78 12.499 14.357 1.419 1.9 1.8 07:26:02.026 avg_2-10 105.22 1783.90 4194304 47.62 12.770 30.540 1.908 2.3 2.2 07:26:02.489 Vdbench execution completed successfully
the last line avg_2-10 is avg of all samples.
for 4mb read/writes here the response time is 12 secs. cpu usage is 2.3%
No comments:
Post a Comment