From: Dave Chinner <david@fromorbit.com>
To: Rogier Wolff <R.E.Wolff@BitWizard.nl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Sync semantics.
Date: Mon, 15 Nov 2010 13:39:32 +1100 [thread overview]
Message-ID: <20101115023932.GD22876@dastard> (raw)
In-Reply-To: <20101111125219.GA945@bitwizard.nl>
On Thu, Nov 11, 2010 at 01:52:19PM +0100, Rogier Wolff wrote:
>
> Hi,
>
> What should I expect from a "sync" system call?
>
> The manual says:
>
> sync() first commits inodes to buffers, and then buffers to disk.
>
> and then goes on to state:
>
> ... since version 1.3.20 Linux does actually wait.
>
> [for the buffers to be handed over to the drive]
>
> So how long can I expect a "sync" call to take?
>
> I would expect that all buffers that are dirty at the time of the
> "sync" call are written by the time that sync returns. I'm currently
> bombarding my fileserver with some 40-60Mbytes per second of data to
> be written (*). The fileserver has 8G of memory. So max 8000 Mb of
> dirty buffers can be stored, right? The server writes an average of
> (at least) 40Mb/second to disk. According to my calculator, I will
> have to wait up to 200 seconds for the sync system call to return....
>
>
> # time sync
> 0.000u 0.220s 2:22:23.96 0.0% 0+0k 0+0io 2pf+0w
Depending on the kernel, sync will keep writing if you keep
dirtying. This should be mostly fixed in 2.6.36....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2010-11-15 2:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 12:52 Sync semantics Rogier Wolff
2010-11-12 7:11 ` Michal Svoboda
2010-11-15 2:39 ` Dave Chinner [this message]
2010-11-15 7:42 ` Michal Svoboda
2010-11-16 1:16 ` Dave Chinner
2010-11-16 14:31 ` Pavel Machek
2010-11-17 8:09 ` Rogier Wolff
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=20101115023932.GD22876@dastard \
--to=david@fromorbit.com \
--cc=R.E.Wolff@BitWizard.nl \
--cc=linux-kernel@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