All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xuan Baldauf <xuan--reiserfs@baldauf.org>
To: Hans Reiser <reiser@namesys.com>
Cc: reiserfs-list@namesys.com
Subject: Re: Opportunistic early flushing of data
Date: Mon, 12 Aug 2002 16:21:20 +0200	[thread overview]
Message-ID: <3D57C45F.46D7011C@baldauf.org> (raw)
In-Reply-To: 3D57BDA3.2010903@namesys.com



Hans Reiser wrote:

> I just thought that discussion of this might interest the list.
>
> It is interesting to consider whether one should flush dirty nodes to
> disk with only a small delay after they are modified, or keep them in
> cache for a longer time.
>
> A small delay has an advantage for the typical small benchmark, and for
> medium length tasks.  If there is poor utilization of the write cache,
> then the sooner one gets started on flushing something to disk, the
>  more megabytes the disk can write before the benchmark ends.
>
> On the other hand, for a loaded server with a reasonably stable load
> with real users not benchmarks, the longer data stays in cache the more
> likely the write won't be needed at all.  One can argue that real users
> don't create stable loads.....
>
> Your thoughts are welcome.
>
> --
> Hans

What about opportunistic early flushing? If the disk is not accessed, we
may flush without using someone elses resources. This cannot be implemented
for all cases (because during the write, someone else may want to flush
immediately), but there may be heuristics (like "we flush opportunistically
if the disk has not been used for the last 100ms") which approximate to the
optimal case. The more the disk is busy, the more flush should be delayed.

This way, we use the advantage of early flush (early commit for database
servers, etc.) with the advantages of late flush (less IO traffic). If
there is low IO traffic, we would not need to lower it, we can do early
flush. If there is high IO traffic, early flush would even rise it but late
flush would lower it.

It is important that the heuristics really depend on usage patterns of the
disk, not only of the filesystem. There might be a system with a swap
partition and a file system partition with heavy memory load and some disk
load. The resulting heavy swap would be slowed down if the filesystem did
early flush, and the filesystem would think that it is okay to do early
flush due to the less IO throughput (which in turn is result of slowed
swap...).

Xuân.




  parent reply	other threads:[~2002-08-12 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-12 13:52 early flushing of data Hans Reiser
2002-08-12 14:05 ` Hendrik Visage
2002-08-12 14:14   ` Hans Reiser
2002-08-12 14:24     ` Hendrik Visage
2002-08-12 14:21 ` Xuan Baldauf [this message]
2002-08-12 14:32   ` Opportunistic " Hans Reiser

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=3D57C45F.46D7011C@baldauf.org \
    --to=xuan--reiserfs@baldauf.org \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.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.