Flexible I/O Tester development
 help / color / mirror / Atom feed
* [Question] What if the parameter for --size option is smaller than the target device?
@ 2014-09-21  3:38 Akira Hayakawa
  0 siblings, 0 replies; 4+ messages in thread
From: Akira Hayakawa @ 2014-09-21  3:38 UTC (permalink / raw)
  To: fio

Hi,

I am writing a test with fio tool (2.0.8) and I am facing a problem.

I just want to submit 512B random write to a block device.
In my case, the size of the device is 2MB and the amount of writes (specified by --size option) is 32MB.

like this (A line from device-mapper-test-suite. Is my command wrong?):
      ProcessControl.run("fio --name=test --filename=#{dev.path} --rw=randwrite --ioengine=libaio --direct=1 --size=#{@param[0]}m --bs=512")

The problem is, the runtime is too short.
The block device is just a single HDD so, it will be 30sec or so. But it's actually 3sec...

My guess is that fio uses min(device size, param to --size) as the amount of writes here.
To investigate it, I increased the size of the device to x10 and saw the runtime gets x10.

My questions are:
1. Is my guess correct?
2. What shall I do to make fio work as I want it to do?

Thanks,
- Akira

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Question] What if the parameter for --size option is smaller than the target device?
@ 2014-09-21  3:57 Akira Hayakawa
  2014-09-21 10:21 ` Sitsofe Wheeler
  0 siblings, 1 reply; 4+ messages in thread
From: Akira Hayakawa @ 2014-09-21  3:57 UTC (permalink / raw)
  To: fio

I resend because the server doesn't ack.
Please ignore the previous, if you receive two. (Please remove from the server)

Hi,

I am writing a test with fio tool (2.0.8) and I am facing a problem.

I just want to submit 512B random write to a block device.
In my case, the size of the device is 2MB and the amount of writes (specified by --size option) is 32MB.

like this (A line from device-mapper-test-suite. Is my command wrong?):
      ProcessControl.run("fio --name=test --filename=#{dev.path} --rw=randwrite --ioengine=libaio --direct=1 --size=#{@param[0]}m --bs=512")

The problem is, the runtime is too short.
The block device is just a single HDD so, it will be 30sec or so. But it's actually 3sec...

My guess is that fio uses min(device size, param to --size) as the amount of writes here.
To investigate it, I increased the size of the device to x10 and saw the runtime gets x10.

My questions are:
1. Is my guess correct?
2. What shall I do to make fio work as I want it to do?

Thanks,
- Akira

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Question] What if the parameter for --size option is smaller than the target device?
  2014-09-21  3:57 Akira Hayakawa
@ 2014-09-21 10:21 ` Sitsofe Wheeler
  2014-09-22 15:20   ` Akira Hayakawa
  0 siblings, 1 reply; 4+ messages in thread
From: Sitsofe Wheeler @ 2014-09-21 10:21 UTC (permalink / raw)
  To: Akira Hayakawa; +Cc: fio@vger.kernel.org

Hi,

On 21 September 2014 04:57, Akira Hayakawa <ruby.wktk@gmail.com> wrote:
> I am writing a test with fio tool (2.0.8) and I am facing a problem.
>
> I just want to submit 512B random write to a block device.
> In my case, the size of the device is 2MB and the amount of writes (specified by --size option) is 32MB.

You probably wanted the behaviour of io_limit
(http://git.kernel.dk/?p=fio.git;a=blob;f=HOWTO;h=73e58ff695c3384df30094d6c15ebe9ed615460f;hb=HEAD#l433
) rather than size...

> like this (A line from device-mapper-test-suite. Is my command wrong?):
>       ProcessControl.run("fio --name=test --filename=#{dev.path} --rw=randwrite --ioengine=libaio --direct=1 --size=#{@param[0]}m --bs=512")
>
> The problem is, the runtime is too short.
> The block device is just a single HDD so, it will be 30sec or so. But it's actually 3sec...
>
> My guess is that fio uses min(device size, param to --size) as the amount of writes here.

That's correct in this context - size is limiting the last possible
block that can be written to (see
http://git.kernel.dk/?p=fio.git;a=blob;f=HOWTO;h=73e58ff695c3384df30094d6c15ebe9ed615460f;hb=HEAD#l421
for details).

> To investigate it, I increased the size of the device to x10 and saw the runtime gets x10.
>
> My questions are:
> 1. Is my guess correct?

Yes.

> 2. What shall I do to make fio work as I want it to do?

Use io_limit if your fio is new enough or number_ios
(http://git.kernel.dk/?p=fio.git;a=blob;f=HOWTO;h=73e58ff695c3384df30094d6c15ebe9ed615460f;hb=HEAD#l778
).

Sitsofe | http://sucs.org/~sits/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Question] What if the parameter for --size option is smaller than the target device?
  2014-09-21 10:21 ` Sitsofe Wheeler
@ 2014-09-22 15:20   ` Akira Hayakawa
  0 siblings, 0 replies; 4+ messages in thread
From: Akira Hayakawa @ 2014-09-22 15:20 UTC (permalink / raw)
  To: sitsofe; +Cc: fio

Thanks Sitsofe,
it starts to submit 32M in total.

- Akira

On 9/21/14 7:21 PM, Sitsofe Wheeler wrote:
> Hi,
> 
> On 21 September 2014 04:57, Akira Hayakawa <ruby.wktk@gmail.com> wrote:
>> I am writing a test with fio tool (2.0.8) and I am facing a problem.
>>
>> I just want to submit 512B random write to a block device.
>> In my case, the size of the device is 2MB and the amount of writes (specified by --size option) is 32MB.
> 
> You probably wanted the behaviour of io_limit
> (http://git.kernel.dk/?p=fio.git;a=blob;f=HOWTO;h=73e58ff695c3384df30094d6c15ebe9ed615460f;hb=HEAD#l433
> ) rather than size...
> 
>> like this (A line from device-mapper-test-suite. Is my command wrong?):
>>       ProcessControl.run("fio --name=test --filename=#{dev.path} --rw=randwrite --ioengine=libaio --direct=1 --size=#{@param[0]}m --bs=512")
>>
>> The problem is, the runtime is too short.
>> The block device is just a single HDD so, it will be 30sec or so. But it's actually 3sec...
>>
>> My guess is that fio uses min(device size, param to --size) as the amount of writes here.
> 
> That's correct in this context - size is limiting the last possible
> block that can be written to (see
> http://git.kernel.dk/?p=fio.git;a=blob;f=HOWTO;h=73e58ff695c3384df30094d6c15ebe9ed615460f;hb=HEAD#l421
> for details).
> 
>> To investigate it, I increased the size of the device to x10 and saw the runtime gets x10.
>>
>> My questions are:
>> 1. Is my guess correct?
> 
> Yes.
> 
>> 2. What shall I do to make fio work as I want it to do?
> 
> Use io_limit if your fio is new enough or number_ios
> (http://git.kernel.dk/?p=fio.git;a=blob;f=HOWTO;h=73e58ff695c3384df30094d6c15ebe9ed615460f;hb=HEAD#l778
> ).
> 
> Sitsofe | http://sucs.org/~sits/
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-22 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-21  3:38 [Question] What if the parameter for --size option is smaller than the target device? Akira Hayakawa
  -- strict thread matches above, loose matches on Subject: below --
2014-09-21  3:57 Akira Hayakawa
2014-09-21 10:21 ` Sitsofe Wheeler
2014-09-22 15:20   ` Akira Hayakawa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox