public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@phunq.net>
To: Pavel Machek <pavel@ucw.cz>
Cc: david@lang.hm, David Newall <davidn@davidnewall.com>,
	Chris Friesen <cfriesen@nortel.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: [ANNOUNCE] Ramback: faster than a speeding bullet
Date: Sat, 15 Mar 2008 12:51:39 -0800	[thread overview]
Message-ID: <200803151351.40467.phillips@phunq.net> (raw)
In-Reply-To: <20080315201815.GB4193@ucw.cz>

Hi Pavel,

On Saturday 15 March 2008 13:18, Pavel Machek wrote:
> Hmm, what happens if applications keep dirtying so much data you miss
> your 17minute deadline?

Ramback is supposed to prevent that by allowing only a limited amount
of application IO during flush mode.  Currently this is accomplished
by making each application write wait synchronously on the one before
it, until flushing completes.  This allows only a small amount of
application traffic, something like 5% bandwidth.  This solution is
admittedly crude, and over time it will be improved to look more like
a realtime scheduler, because this is in fact a realtime scheduling
problem.

Once flushing completes, application writes are still serialized and
thus slow, which is a stronger condition than necessary to maintain
transactional integrity for the filesystem.  Eventually this will be
optimized.

For now, the maximum flush is only a few hundred MB on my workstation,
which leaves a huge safety margin even with my $100 UPS.  And the risk,
however small, of having to run a lossy e2fsck because the battery got
old and the power did run out, is mitigated by the fact that ramback
runs on my kernel hacking partition, and everything unique there just
gets uploaded to the internet regularly anyway.  This serves as my
replication algorithm.  Note: I strongly recommend that any critical
data entrusted to ramback be replicated to mitigate the risk of system
failure, however small.

> Anyway...
>  ext2
>  + lots of memory
>  + tweaked settings of kflushd (only write data older than 10 years)
>  + just not using sync/fsync except during shutdown
>  + find / | xargs cat 
>  
> ...is ramback, right? Should have same performance, and you can still
> read/write during that 17+17 minutes.

No, you are missing some essential pieces.  Ramback has two operating
modes:

  1) writeback (when ups-backed line power is available)
  2) writethrough (when running on ups power)

Plus, it has the daemon driven flushing for ups mode, and daemon driven
one-pass populating for startup mode.  That is all ramback is, but you
do not quite get there with your solution above.

Also, ramback works with generic block devices, opening up a wide range
of applications that your proposal does not.

> Ok, find | xargs might be slower... but we probably want to fix that
> anyway....

We sure do.  Readahead sucks enormously in Linux.

> It has big advantage: if you only tell kflushd to hold up writes for
> an hour, you loose a little in performance and gain a lot in
> reliability...
> 
> (If ext2+tweaks is slower than ramback, we have a bug to fix, I'm
> afraid).

I hope that my work inspires other people like you to go in and work
on some of the VM/VFS/BIO brokenness that helps make ramback such a
big win.  In the meantime, it is useful to be clear on just what we
have here, and why some people care about it a lot.

Daniel

  reply	other threads:[~2008-03-15 20:52 UTC|newest]

Thread overview: 153+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-10  6:46 [ANNOUNCE] Ramback: faster than a speeding bullet Daniel Phillips
2008-03-10  7:51 ` Grzegorz Kulewski
2008-03-10  8:23   ` Daniel Phillips
2008-03-10  9:37     ` Alan Cox
2008-03-10 21:03       ` Lars Marowsky-Bree
2008-03-11 11:14         ` Daniel Phillips
2008-03-11 11:23           ` Lars Marowsky-Bree
2008-03-11 11:50             ` Daniel Phillips
2008-03-11 17:26               ` Chris Friesen
2008-03-11 19:56                 ` Daniel Phillips
2008-03-11 20:53                   ` Willy Tarreau
2008-03-12  8:17                     ` Daniel Phillips
2008-03-12 14:41                       ` Mike Snitzer
2008-03-13 20:34                       ` Rik van Riel
2008-03-14  2:20                         ` Daniel Phillips
2008-03-11 21:56               ` Lars Marowsky-Bree
2008-03-11 23:02                 ` Daniel Phillips
2008-03-12 13:25                   ` Benny Amorsen
2008-03-12 13:30                     ` Alan Cox
2008-03-13 15:29                       ` Benny Amorsen
2008-03-14  9:30                       ` Pavel Machek
2008-03-14 11:07                         ` Ric Wheeler
2008-03-14 11:41                           ` Benny Amorsen
2008-03-14 12:12                             ` Ric Wheeler
2008-03-14 12:56                             ` Theodore Tso
2008-03-14 15:47                               ` Ric Wheeler
2008-03-14 16:49                                 ` Theodore Tso
2008-03-14 17:04                                   ` Ric Wheeler
2008-03-14 18:03                                   ` david
2008-03-14 19:03                                 ` writeback cache dangers " Pavel Machek
2008-03-14 19:29                                   ` Theodore Tso
2008-03-13  9:15                   ` Matthias Schniedermeyer
2008-03-11 23:30                 ` Daniel Phillips
2008-03-13 13:27                 ` Ric Wheeler
2008-03-13 19:02                   ` Daniel Phillips
2008-03-13 19:12                     ` Ric Wheeler
2008-03-13 19:38                       ` Daniel Phillips
2008-03-11  4:23       ` Daniel Phillips
2008-03-10  9:22 ` Alan Cox
2008-03-10 19:01   ` Rik van Riel
2008-03-11  4:28     ` Daniel Phillips
2008-03-11  3:50   ` Daniel Phillips
2008-03-11 13:32     ` Artur Skawina
2008-03-11 14:31       ` Artur Skawina
2008-03-12 13:11     ` Alan Cox
2008-03-12 17:29       ` Daniel Phillips
2008-03-12 18:11         ` Chris Friesen
2008-03-12 22:56           ` Daniel Phillips
2008-03-13  5:45             ` David Newall
2008-03-13  6:17               ` Daniel Phillips
2008-03-13  6:30                 ` David Newall
2008-03-13  6:50                   ` Daniel Phillips
2008-03-13  7:05                     ` David Newall
2008-03-13  7:13                       ` Daniel Phillips
2008-03-15 13:32                     ` Pavel Machek
2008-03-15 20:22                       ` Daniel Phillips
2008-03-15 21:33                         ` Pavel Machek
2008-03-15 21:47                           ` Daniel Phillips
2008-03-13  6:32                 ` david
2008-03-13  7:12                   ` Daniel Phillips
2008-03-13  7:55                     ` david
2008-03-13  8:06                       ` Daniel Phillips
2008-03-13  8:39                         ` david
2008-03-13  9:16                           ` Daniel Phillips
2008-03-13 16:25                             ` david
2008-03-13 19:32                               ` Daniel Phillips
2008-03-13 19:50                                 ` David Newall
2008-03-13 20:03                                   ` Daniel Phillips
2008-03-14 17:53                                     ` Jeff Moyer
2008-03-15 20:26                                     ` Pavel Machek
2008-03-15 20:40                                       ` Mike Snitzer
2008-03-15 21:05                                       ` Daniel Phillips
2008-03-15 20:18                             ` Pavel Machek
2008-03-15 20:51                               ` Daniel Phillips [this message]
2008-03-13  9:49                       ` Daniel Phillips
2008-03-13  5:39         ` David Newall
2008-03-13  6:14           ` Daniel Phillips
2008-03-13 13:22             ` Alan Cox
2008-03-13 19:14               ` Daniel Phillips
2008-03-13 20:27                 ` Rik van Riel
2008-03-14  2:23                   ` Daniel Phillips
2008-03-14  5:22                     ` David Newall
2008-03-14  5:42                       ` Daniel Phillips
2008-03-14 14:00                     ` John Stoffel
2008-03-15 20:59                 ` Willy Tarreau
2008-03-15 20:56                   ` Alan Cox
2008-03-15 21:25                     ` Daniel Phillips
2008-03-15 21:08                       ` Alan Cox
2008-03-15 21:51                         ` Daniel Phillips
2008-03-15 21:17                   ` Daniel Phillips
2008-03-15 21:03                     ` Alan Cox
2008-03-15 22:00                       ` Daniel Phillips
2008-03-15 23:05                         ` Alan Cox
2008-03-16 21:57                           ` Daniel Phillips
2008-03-16 21:55                             ` Alan Cox
2008-03-16 22:36                               ` Daniel Phillips
2008-03-16 22:46                                 ` Alan Cox
2008-03-16 23:39                                   ` Daniel Phillips
2008-03-17 11:53                                     ` Alan Cox
2008-03-17  1:31                             ` David Newall
2008-03-17  2:42                               ` Daniel Phillips
2008-03-17  3:59                                 ` david
2008-03-17  5:52                                   ` Daniel Phillips
2008-03-17  6:49                                     ` david
2008-03-17  8:16                                       ` Daniel Phillips
2008-03-17 10:39                                         ` Alan Cox
2008-03-17 13:52                                         ` Ric Wheeler
2008-03-17 14:42                                         ` david
2008-03-17 17:23                                           ` david
2008-03-17 17:30                                             ` Willy Tarreau
     [not found]                                             ` <200803180233.10156.phillips@phunq.net>
2008-03-18 13:03                                               ` David Newall
2008-03-18 16:36                                                 ` david
2008-03-31 11:40                                                   ` Daniel Phillips
2008-04-01  0:28                                                     ` david
2008-04-01  4:07                                                       ` Daniel Phillips
2008-04-01  4:23                                                         ` david
2008-04-01  6:08                                                           ` Daniel Phillips
2008-03-18 13:57                                               ` Alan Cox
2008-03-31 11:39                                                 ` Daniel Phillips
2008-03-17  7:14                                     ` David Newall
2008-03-17  8:25                                       ` Daniel Phillips
2008-03-17 18:56                                         ` David Newall
2008-03-23  9:33                                         ` Pavel Machek
2008-03-23 20:44                                           ` Daniel Phillips
2008-03-15 21:54                     ` Willy Tarreau
2008-03-15 22:33                       ` Daniel Phillips
2008-03-15 23:22                         ` david
2008-03-15 23:57                           ` Krzysztof Halasa
2008-03-15 23:22                         ` Willy Tarreau
2008-03-16  3:33                           ` Daniel Phillips
2008-03-16  5:24                             ` David Newall
2008-03-16 12:49                               ` Ingo Oeser
2008-03-16  6:56                             ` Willy Tarreau
2008-03-16 22:12                               ` Krzysztof Halasa
2008-03-16 13:14                             ` Alan Cox
2008-03-16 19:04                               ` Theodore Tso
2008-03-16 22:02                             ` Krzysztof Halasa
2008-03-15 23:18                     ` Bernd Eckenfels
2008-03-16  5:42                     ` David Newall
2008-03-16 20:48                       ` Daniel Phillips
2008-03-16 22:15                       ` Krzysztof Halasa
2008-03-16 22:38                         ` Daniel Phillips
2008-03-16 23:08                           ` Krzysztof Halasa
2008-03-16 23:43                             ` Daniel Phillips
2008-03-10 14:51 ` Artur Skawina
2008-03-10 18:49 ` Chris Snook
2008-03-11  5:06 ` Greg KH
2008-03-11  5:22   ` Daniel Phillips
2008-03-11  5:48     ` david
2008-03-11  6:27     ` Greg KH
2008-03-12 12:01 ` tvrtko.ursulin
2008-03-12 17:27   ` Daniel Phillips
     [not found] <OFA00954A4.45F32CA2-ON8025740B.005D7B40-8025740B.005EECA6@sophos.com>
2008-03-13 19:34 ` Daniel Phillips

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=200803151351.40467.phillips@phunq.net \
    --to=phillips@phunq.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=cfriesen@nortel.com \
    --cc=david@lang.hm \
    --cc=davidn@davidnewall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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