From: Jens Axboe <axboe@kernel.dk>
To: Brian Fallik <bfallik@bamboom.com>
Cc: Jeff Moyer <jmoyer@redhat.com>,
"fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: fio file test patterns
Date: Thu, 01 Sep 2011 14:14:13 -0600 [thread overview]
Message-ID: <4E5FE795.6070507@kernel.dk> (raw)
In-Reply-To: <CAOYTo+1Cm4v1QpBmPSTf4pYS170soGByNKJtEvKoXAQFm9JNnw@mail.gmail.com>
On 2011-09-01 12:17, Brian Fallik wrote:
> On Thu, Sep 1, 2011 at 12:06 PM, Jens Axboe <axboe@kernel.dk> wrote:
>> On 2011-09-01 08:18, Brian Fallik wrote:
>>> Perhaps I should describe what I'm seeing. I have two terminals open.
>>> In one, I launch:
>>> $ watch "ls -l foo* | head -n 20"
>>> In the other terminal I kick off fio. fio first spits out the "Laying
>>> out" messages, one per job. Immediately the full 4MB files appear in
>>> the directory listing. *Then* fio starts writing to the files, as
>>> indicated by the fio output. The size of each file never changes
>>> during the test.
>>>
>>> I wasn't expecting the full 4Mb files to be created before the
>>> sequential writes. I expected to not see any files initially, and
>>> then a file for each job growing at a rate of 200Kbs throughout the
>>> test until reaching the 4MB limit.
>>>
>>> Perhaps I'm just configuring fio incorrectly?
>>
>> That you see them there does not mean they are actually written. Fio
>> will use truncate to setup the files, but only actually fill them with
>> data if you are going to be reading them (or requested overwrite).
>
> Digging deeper, I ran fio under strace:
> 25445 stat("foo0", 0x7ffff0a586b0) = -1 ENOENT (No such file or
> directory)
> 25445 unlink("foo0") = -1 ENOENT (No such file or
> directory)
> 25445 open("foo0", O_WRONLY|O_CREAT, 0644) = 3
> 25445 fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> 25445 fstatfs(3, {f_type=0x58465342, f_bsize=4096,
> f_blocks=4880335840, f_bfree=4880324644, f_bavail=4880324644,
> f_files=19521474432, f_ffree=19521474273, f_fsid={2065, 0},
> f_namelen=255, f_frsize=4096}) = 0
> 25445 pwrite(3, "\0", 1, 4095) = 1
> 25445 pwrite(3, "\0", 1, 8191) = 1
> ...
> 25445 pwrite(3, "\0", 1, 4194303) = 1
> 25445 fadvise64(3, 0, 4194304, POSIX_FADV_DONTNEED) = 0
> 25445 close(3)
A quick guess would be that your glibc is too old, hence it "emulates"
truncate by helpfully zero filling the file.
--
Jens Axboe
prev parent reply other threads:[~2011-09-01 20:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 17:53 fio file test patterns Brian Fallik
2011-08-31 18:30 ` Jeff Moyer
2011-08-31 19:56 ` Jens Axboe
2011-08-31 20:34 ` Brian Fallik
2011-08-31 21:21 ` Jens Axboe
2011-08-31 21:38 ` Jens Axboe
2011-09-01 14:18 ` Brian Fallik
2011-09-01 16:06 ` Jens Axboe
2011-09-01 18:17 ` Brian Fallik
2011-09-01 20:14 ` Jens Axboe [this message]
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=4E5FE795.6070507@kernel.dk \
--to=axboe@kernel.dk \
--cc=bfallik@bamboom.com \
--cc=fio@vger.kernel.org \
--cc=jmoyer@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.