public inbox for fio@vger.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Jan Kara <jack@suse.cz>
Cc: fio@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	Vincent Fu <vincentfu@gmail.com>
Subject: Re: [PATCH 5/5] Add option to specify ramp period by amount of IO
Date: Fri, 19 Dec 2025 17:12:02 +0900	[thread overview]
Message-ID: <d68515f5-4335-40fd-b9ee-c3017908d3d9@kernel.org> (raw)
In-Reply-To: <he6xudnbje7lqwdd7wikgaqvfyhofl57oranzslhckhhjqihag@cbk3rfp6slwa>

On 12/19/25 01:31, Jan Kara wrote:
>>> +.. option:: ramp_size=size
>>> +
>>> +	If set, fio will wait until the workload does given amount of IO before
>>> +	logging any performance numbers. Similar considerations apply as for
>>> +	``ramp_time`` option. When the unit is omitted, the value is given in
>>> +	megabytes.
>>
>> Hmm... It may be less confusing/easier to use the regular fio "int" parameter
>> type here, which takes all the kilo, mega etc suffixes. This means that the
>> default without any suffix would be bytes, not megabytes.
> 
> Well, this argument also takes all the kilo, mega, etc. suffixes. Just
> without any suffix it will default to MB. I've copied this behavior from
> 'size' and 'filesize' options which behave like this striving for some
> consistency. That being said I don't really care deeply about the behavior
> without units because I think sane people write the units explicitly.

Sam here: I do not really mind one way or the other. I raised this comment so
that the options stay consistent in behavior, same as you aim for.

Checking with some quick runs, if I run something like:

fio --name=write --ioengine=psync --bs=512 --rw=write --directory=/mnt \
	--filename_format='test.$jobnum.$filenum' --nrfiles=16 --openfiles=1 \
	--create_fsync=0 --filesize=1024 --create_on_open=1 \
	--allow_file_create=1 --end_fsync=1

I get files of 1024B, not 1GiB. Same with even smaller values like:
	--bs=8 --filesize=8
I get files of 8 Bytes.

So I doubt that the default is MiB when there is no unit specified.

Checking the code, the .interval field of filesize option (and all other options
in fact) seems to be unused, except by the goptions.c file, which I think is for
the fio GUI.

So the default it seems is Bytes when no unit suffix is specified. Your code is
good then, except the man page and HOWTO files where you should remove the text
"When the unit is omitted, the value is given in megabytes."

With that,

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2025-12-19  8:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-17 16:17 [PATCH 0/5] Add support for specifying ramp up period by amount of IO Jan Kara
2025-12-17 16:17 ` [PATCH 1/5] time: rename in_ramp_time() and ramp_time_over() Jan Kara
2025-12-17 22:52   ` Damien Le Moal
2025-12-19  3:53   ` fiotestbot
2025-12-17 16:17 ` [PATCH 2/5] td: Initialize ramp_period_over based on options Jan Kara
2025-12-17 22:53   ` Damien Le Moal
2025-12-17 16:17 ` [PATCH 3/5] eta: Use in_ramp_period() instead of opencoding it Jan Kara
2025-12-17 22:55   ` Damien Le Moal
2025-12-17 16:17 ` [PATCH 4/5] time: Evaluate ramp up condition once per second Jan Kara
2025-12-17 22:58   ` Damien Le Moal
2025-12-17 16:17 ` [PATCH 5/5] Add option to specify ramp period by amount of IO Jan Kara
2025-12-17 22:56   ` Jens Axboe
2025-12-18 17:18     ` Jan Kara
2025-12-17 23:03   ` Damien Le Moal
2025-12-18 16:31     ` Jan Kara
2025-12-19  8:12       ` Damien Le Moal [this message]
2025-12-19 13:10         ` Jan Kara
2025-12-18 15:19   ` Vincent Fu
2025-12-18 17:18     ` Jan Kara
2025-12-18 21:42       ` Vincent Fu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d68515f5-4335-40fd-b9ee-c3017908d3d9@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=jack@suse.cz \
    --cc=vincentfu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox