From: Andrew Morton <akpm@linux-foundation.org>
To: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [Bug 421482] Firefox 3 uses fsync excessively
Date: Mon, 26 May 2008 00:05:06 -0700 [thread overview]
Message-ID: <20080526000506.1d0fb047.akpm@linux-foundation.org> (raw)
In-Reply-To: <200805260513.m4Q5DAU8018498@mrapp54.mozilla.org>
This:
On Sun, 25 May 2008 22:13:10 -0700 bugzilla-daemon@mozilla.org wrote:
> Do not reply to this email. You can add comments to this bug at
> https://bugzilla.mozilla.org/show_bug.cgi?id=421482
>
>
>
>
>
> --- Comment #152 from Karl Tomlinson (:karlt) <mozbugz@karlt.net> 2008-05-25 22:12:23 PDT ---
> Created an attachment (id=322475)
> --> (https://bugzilla.mozilla.org/attachment.cgi?id=322475)
> fdatasync/sync_file_range test program
>
> fdatasync/sync_file_range test program
>
> This first creates a file of length 1 then does one fsync on the new file.
> Then the file is continually modified without changing the length and synced
> after each modification using one of three methods (somewhat randomly
> selected): fsync/fdatasync/sync_file_range.
>
> The I/O load for the test results below was produced using dd with a small
> blocksize to limit the I/O some:
>
> dd if=/dev/zero of=large bs=64 count=$((3*1024*1024*1024/64))
>
> I used ltrace instead of strace as my strace didn't find sync_file_range (and
> my glibc-2.5 libraries don't seem to have a sync_file_range function), so
> sync_file_range appears below as "syscall(277".
>
> rm -f datasync-test.tmp &&
> ltrace -t -T -e trace=,fsync,fdatasync,syscall ./a.out
>
> 16:12:59 fsync(3) = 0 <11.864858>
> 16:13:13 fdatasync(3) = 0 <14.706356>
> 16:13:30 fsync(3) = 0 <12.832373>
> 16:13:45 syscall(277, 3, 0, 1, 7) = 0 <0.343116>
> 16:13:49 fdatasync(3) = 0 <8.231468>
> 16:14:01 syscall(277, 3, 0, 1, 7) = 0 <2.347144>
> 16:14:06 fsync(3) = 0 <6.938656>
> 16:14:16 fdatasync(3) = 0 <8.359644>
> 16:14:27 fsync(3) = 0 <5.928242>
> 16:14:35 syscall(277, 3, 0, 1, 7) = 0 <0.009531>
> 16:14:39 fdatasync(3) = 0 <7.356126>
> 16:14:50 fsync(3) = 0 <6.402128>
> 16:14:59 syscall(277, 3, 0, 1, 7) = 0 <0.802706>
> 16:15:03 syscall(277, 3, 0, 1, 7) = 0 <2.985404>
> 16:15:08 fsync(3) = 0 <4.722020>
> 16:15:15 fdatasync(3) = 0 <6.532945>
> 16:15:24 fdatasync(3) = 0 <2.294488>
> 16:15:30 fsync(3) = 0 <7.986250>
> 16:15:40 syscall(277, 3, 0, 1, 7) = 0 <1.409809>
> 16:15:45 fdatasync(3) = 0 <5.404190>
>
> The results are consistent with fdatasync being implemented as fsync on ext3.
>
> They show the potential for considerable savings from growing (and shrinking)
> files in large hunks and using sync_file_range (which also should reduce the
> impact on the rest of the filesystem).
is wrong, isn't it?
It's purportedly showing that fdatasync() on ext3 is syncing the whole
world in fsync()-fashion even with an application which does not grow
the file size.
But fdatasync() shouldn't do that. Even if the inode is dirty from
atime or mtime updates, that shouldn't cause fdatasync() to run an
ext3 commit?
next parent reply other threads:[~2008-05-26 7:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-421482-310856@https.bugzilla.mozilla.org/>
[not found] ` <200805260513.m4Q5DAU8018498@mrapp54.mozilla.org>
2008-05-26 7:05 ` Andrew Morton [this message]
2008-05-26 10:07 ` [Bug 421482] Firefox 3 uses fsync excessively Theodore Tso
2008-05-26 11:10 ` Jörn Engel
2008-05-26 11:38 ` Theodore Tso
2008-05-26 12:52 ` Jörn Engel
2008-05-26 20:22 ` Jamie Lokier
2008-05-29 17:08 ` fdatasync/barriers (was : [Bug 421482] Firefox 3 uses fsync excessively) Bryan Henderson
2008-05-29 18:46 ` jim owens
2008-05-29 23:15 ` Bryan Henderson
2008-05-30 4:00 ` Timothy Shimmin
2008-05-30 14:14 ` jim owens
2008-05-30 16:25 ` Bryan Henderson
2008-05-30 18:48 ` jim owens
2008-06-02 17:31 ` Bryan Henderson
2008-05-26 18:49 ` [Bug 421482] Firefox 3 uses fsync excessively Andrew Morton
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=20080526000506.1d0fb047.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).