Thanks Tim!! I think, it's the best alternate way at this point and it works :) On 27 January 2017 at 15:50, Tim Walker <tim.t.walker@xxxxxxxxxxx> wrote: > I can't answer your question directly, but one could call fio from a BASH > script that sets environment variables appropriately. Here is an example of > dividing an ATA drive into 4 regions and setting environment variables to > the starts. You can add offset=${offset_1} to your basic fio script then run > it with these environmental variable set. My script assumes 512 byte > sectors. > > (I didn't actually try the fio part, but I did test the BASH portion, so > YMMV) > > bytes_per_sector=512 > maxlba=`hdparm -g /dev/sda | grep sectors | awk '{print $6}' | tr ',' ' '` > > quarter=$((${maxlba} / 4 * ${bytes_per_sector})) > offset_1=0 > offset_2=$(($quarter * 1)) > offset_3=$(($quarter * 2)) > offset_4=$(($quarter * 3)) > > echo $offset_1 > echo $offset_2 > echo $offset_3 > echo $offset_4 > > > > On Fri, Jan 27, 2017 at 2:58 PM, Prabhakaran <prabhugce@xxxxxxxxx> wrote: >> >> Hi, >> >> Can offset be specified in percentage rather than in capacity value >> like gb or mb? >> I have a config file which fills a drive once randomly. I got 4 jobs >> running in parallel (4*64qd=256qd) with lba space divided among them. >> I want to specify in percentage, so that all the jobs are equally >> used, rather than hard-coding the capacity. >> >> The following example configuration is designed for 450GB NVMe drive. >> >> >> ################################################# >> [global] >> ioengine=libaio >> thread >> cpus_allowed=0-7 >> cpus_allowed_policy=split >> direct=1 >> size=100g >> loops=6 >> >> [4k-4k_randwrite_0_rd_qd256_numjob1] >> bs=4k >> ba=4k >> iodepth=64 >> offset=0 >> rw=randwrite >> randrepeat=0 >> norandommap >> refill_buffers >> log_avg_msec=1000 >> unified_rw_reporting=1 >> write_bw_log=4k-4k_randwrite_0_rd_qd256_numjob1 >> write_iops_log=4k-4k_randwrite_0_rd_qd256_numjob1 >> >> [4k-4k_randwrite_0_rd_qd256_numjob2] >> bs=4k >> ba=4k >> iodepth=64 >> offset=100g >> rw=randwrite >> randrepeat=0 >> norandommap >> refill_buffers >> log_avg_msec=1000 >> unified_rw_reporting=1 >> write_bw_log=4k-4k_randwrite_0_rd_qd256_numjob2 >> write_iops_log=4k-4k_randwrite_0_rd_qd256_numjob2 >> >> [4k-4k_randwrite_0_rd_qd256_numjob3] >> bs=4k >> ba=4k >> iodepth=64 >> offset=200g >> rw=randwrite >> randrepeat=0 >> norandommap >> refill_buffers >> log_avg_msec=1000 >> unified_rw_reporting=1 >> write_bw_log=4k-4k_randwrite_0_rd_qd256_numjob3 >> write_iops_log=4k-4k_randwrite_0_rd_qd256_numjob3 >> >> [4k-4k_randwrite_0_rd_qd256_numjob4] >> bs=4k >> ba=4k >> iodepth=64 >> offset=300g >> rw=randwrite >> randrepeat=0 >> norandommap >> refill_buffers >> log_avg_msec=1000 >> unified_rw_reporting=1 >> write_bw_log=4k-4k_randwrite_0_rd_qd256_numjob4 >> write_iops_log=4k-4k_randwrite_0_rd_qd256_numjob4 >> ################################################# >> >> >> Thanks, >> Prabhu >> -- >> To unsubscribe from this list: send the line "unsubscribe fio" in >> the body of a message to majordomo@xxxxxxxxxxxxxxx >> More majordomo info at >> https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBaQ&c=IGDlg0lD0b-nebmJJ0Kp8A&r=NW1X0yRHNNEluZ8sOGXBxCbQJZPWcIkPT0Uy3ynVsFU&m=0gTEIsl_-d0HQ0ndt8ua9fiIR5Kigo0mnZKBy3FrqS0&s=NZyL5aNn-frWDTJuCfS7XH7peqTcbHBIGubxUH6A0DM&e= > > > > > -- > Tim Walker > Product Design Systems Engineering, Seagate Technology > -- Thanks, Prabhakaran -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html