Re: [PATCH 5/5] Add option to specify ramp period by amount of IO

Jan Kara <[email protected]> Thu, 18 Dec 2025 17:31:47 +0100
Newsgroups org.kernel.vger.fio
Message-ID <he6xudnbje7lqwdd7wikgaqvfyhofl57oranzslhckhhjqihag@cbk3rfp6slwa>
On Thu 18-12-25 08:03:36, Damien Le Moal wrote:
> On 12/18/25 01:17, Jan Kara wrote:
> > In some cases the ramp up period is not easy to define by amount of
> > time. This is for example a case of buffered writes measurement where we
> > want to start measuring only once dirty throttling kicks in. The time
> > until dirty throttling kicks in depends on dirty limit (easy to figure
> > out) and speed of writes to the page cache (difficult to know in
> > advance). Add option ramp_size which determines the ramp up period by
> > the amount of IO written (either by each job or by each group when group
> > reporting is enabled).
> > 
> > Signed-off-by: Jan Kara <[email protected]>
> > ---
> >  HOWTO.rst        |  7 +++++++
> >  fio.1            |  6 ++++++
> >  options.c        | 11 +++++++++++
> >  thread_options.h |  2 ++
> >  time.c           | 50 ++++++++++++++++++++++++++++++++++++++++++++++--
> >  5 files changed, 74 insertions(+), 2 deletions(-)
> > 
> > diff --git a/HOWTO.rst b/HOWTO.rst
> > index 9f55a73bde05..49ebae6275a6 100644
> > --- a/HOWTO.rst
> > +++ b/HOWTO.rst
> > @@ -715,6 +715,13 @@ Time related parameters
> >  	:option:`runtime` is specified.  When the unit is omitted, the value is
> >  	given in seconds.
> >  
> > +.. 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.

> Other than this, this looks good to me, and indeed super useful when testing
> file systems with buffered I/Os so that the initial super fast buffering spike
> is easily not accounted for.

Thanks for review!

								Honza
-- 
Jan Kara <[email protected]>
SUSE Labs, CR