linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Stroetmann <stroetmann@ontolinux.com>
To: Ted Ts'o <tytso@mit.edu>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Neil Brown <neilb@suse.de>,
	Olaf van der Spek <olafvdspek@gmail.com>
Subject: Re: Atomic non-durable file write API
Date: Fri, 24 Dec 2010 12:21:30 +0100	[thread overview]
Message-ID: <4D14823A.8030602@ontolinux.com> (raw)
In-Reply-To: <20101224095105.GG12763@thunk.org>

On 24.12.2010 10:51, Ted Ts'o wrote:
> On Fri, Dec 24, 2010 at 02:00:13AM +0100, Christian Stroetmann wrote:
>> I really do know what you want to say, despite that this example is
>> based on a bug in another system than the FS. But there will be
>> other examples, for sure.
> Sure, but this thread started because someone wanted an "atomic
> non-durable file write API", apparently because it was too slow to use
> fsync().  If people use databases, it's not a problem; databases use
> fsync(), but they use it properly and they provide the proper
> transactional interfaces that people want.

That's why I agreed with you on this technical operating system level 
and would like to give the additional information that the database 
management system (DBMS) handles this in the interplay with the FS and 
that a database is stored in a file often with a propritary format for 
efficiency.

> The problem comes when people try to implement their own databases
> using small files for each row and column of the database, or for each
> registry variable.  Then they complain when fsync() is to expensive,
> because they need to use fsync() for every single 3 bytes of data they
> store in their badly implemented database.

Yes, agreed (see above).

> The bottom line is that if you want atomic updates of state
> information, you need to use fsync() or fdatasync().  If this is a
> performance bottleneck, then you're doing something wrong.  Maybe you
> shouldn't be writing a third of a megabyte on every URL click, on the
> main GUI thread; maybe the user doesn't need to remember every single
> URL that was visited even if the power suddenly fails (maybe it's
> enough if you write that information to disk every 3-5 minutes, and
> less if you're running on battery).  Or maybe you shouldn't be using
> hundreds of small state files, and screw up the dirty flag handling.
> But regardless, you're doing something wrong/stupid.

Here we are on the application level. And here it starts where I say 
that to use an FS as a DBMS is not the true problem.

Potentially off-topic:
And while we are at this point, from my point of view the wrong/stupid 
acting is how an FS is used from the operating system level. That's 
because, as said above, a database is stored in a file and the only 
functionality that is missing in an FS managemant system is exactly that 
what in this case is added by the DBMS. If you programm in a clever way 
it must be faster than the standard concept, which is a file that 
represents a database is stored in an FS, because some FS functions 
don't really have to be called.
And to do such a special FS handling seen from the kernel level is not 
uncommon, because backup systems do it already and an FS that you don't 
like does it as well, and already the A of ACID. The rest can be handled 
by an appropriated FS plug-in system. So we come back to the point again 
where this functionality has to be, in the FS or the VFS. You say VFS, I 
say FS, like R4, and OntoFS #1 (R4- and ontology-based) and #2 (ext2/3-, 
sqlite- and ontology-based conversion from fuse-sqlite).

> 						- Ted

Have fun
Christian Stroetmann

  parent reply	other threads:[~2010-12-24 11:21 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTing7+SK+pavFehR4AGDbRRfFwvvzNxgWQ3zRp+O@mail.gmail.com>
2010-12-09 12:03 ` Atomic non-durable file write API Olaf van der Spek
2010-12-16 12:22   ` Olaf van der Spek
2010-12-16 20:11     ` Ric Wheeler
2010-12-18 22:15       ` Calvin Walton
2010-12-19 16:39         ` Olaf van der Spek
2010-12-23 15:49           ` Olaf van der Spek
2010-12-23 21:51             ` Neil Brown
2010-12-23 22:22               ` Ted Ts'o
2010-12-24  0:30                 ` Christian Stroetmann
2010-12-24  0:48                   ` Ted Ts'o
2010-12-24  1:00                     ` Christian Stroetmann
2010-12-24  9:51                       ` Ted Ts'o
2010-12-24 11:14                         ` Olaf van der Spek
2010-12-24 11:25                           ` Christian Stroetmann
2010-12-25  3:15                           ` Ted Ts'o
2010-12-25 10:41                             ` Olaf van der Spek
2010-12-25 11:33                               ` Nick Piggin
2010-12-25 15:24                                 ` Olaf van der Spek
2010-12-25 17:25                                   ` Nick Piggin
2010-12-26 15:08                                     ` Olaf van der Spek
2010-12-26 15:55                                       ` Boaz Harrosh
2010-12-26 16:02                                         ` Olaf van der Spek
2010-12-26 16:27                                           ` Boaz Harrosh
2010-12-26 18:26                                             ` Olaf van der Spek
2010-12-26 16:43                                       ` Nick Piggin
2010-12-26 18:51                                         ` Olaf van der Spek
2010-12-26 22:10                                           ` Ted Ts'o
2010-12-27  0:30                                             ` Christian Stroetmann
2010-12-27  1:04                                               ` Ted Ts'o
2010-12-27  1:30                                                 ` Christian Stroetmann
2010-12-27  2:53                                                   ` Ted Ts'o
2010-12-27 10:21                                             ` Olaf van der Spek
2010-12-27 11:07                                               ` Marco Stornelli
2010-12-27 15:30                                               ` Christian Stroetmann
2010-12-27 19:07                                                 ` Olaf van der Spek
2010-12-27 19:30                                                   ` Christian Stroetmann
2010-12-28 17:22                                                     ` Olaf van der Spek
2010-12-28 20:59                                                       ` Neil Brown
2010-12-28 22:00                                                         ` Greg Freemyer
2010-12-28 22:06                                                           ` Olaf van der Spek
2010-12-28 22:15                                                             ` Greg Freemyer
2010-12-28 22:28                                                               ` Olaf van der Spek
2010-12-28 22:35                                                               ` Neil Brown
2010-12-29 11:05                                                           ` Dave Chinner
2010-12-28 22:10                                                         ` Olaf van der Spek
2010-12-28 22:31                                                           ` Neil Brown
2010-12-28 22:54                                                             ` Olaf van der Spek
2010-12-28 23:42                                                               ` Ted Ts'o
2010-12-29  9:09                                                                 ` Olaf van der Spek
2010-12-29 15:30                                                               ` Christian Stroetmann
2010-12-29 15:41                                                                 ` Olaf van der Spek
2010-12-29 16:30                                                                   ` Christian Stroetmann
2010-12-29 17:14                                                                     ` Olaf van der Spek
2010-12-30  0:50                                                                       ` Neil Brown
2011-01-07 14:23                                                                         ` Olaf van der Spek
2010-12-27  4:12                                           ` Nick Piggin
2010-12-27 11:48                                             ` Olaf van der Spek
2010-12-27 12:43                                               ` Olaf van der Spek
2010-12-28  0:45                                               ` Ted Ts'o
2010-12-24 11:21                         ` Christian Stroetmann [this message]
2010-12-24 11:17               ` Olaf van der Spek
2010-12-24 11:29                 ` Christian Stroetmann
2010-12-24 11:30                   ` Olaf van der Spek
2010-12-25 21:40                 ` Neil Brown
2010-12-23 22:43             ` Dave Chinner
2010-12-23 22:47               ` Ted Ts'o
2010-12-26  9:59                 ` Amir Goldstein
2010-12-26 15:23                   ` Olaf van der Spek
2010-12-26 16:52                     ` Nick Piggin

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=4D14823A.8030602@ontolinux.com \
    --to=stroetmann@ontolinux.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=olafvdspek@gmail.com \
    --cc=tytso@mit.edu \
    /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).