public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Christoph Hellwig <hch@infradead.org>,
	Anton Altaparmakov <aia21@cam.ac.uk>,
	Bernd Eckenfels <ecki@lina.inka.de>,
	linux-kernel@vger.kernel.org
Subject: Re: Ext3 vs NTFS performance
Date: Fri, 04 May 2007 19:49:13 +0400	[thread overview]
Message-ID: <463B55F9.4070606@msgid.tls.msk.ru> (raw)
In-Reply-To: <20070504094610.GA31607@infradead.org>

Christoph Hellwig wrote:
> On Fri, May 04, 2007 at 09:12:31AM +0100, Anton Altaparmakov wrote:
>> Nothing to do with win32 functions.  Windows does NOT create sparse  
>> files therefore it never can have an issue like ext3 does in this  
>> scenario.  Windows will cause nice allocations to happen because of  
>> this and the 1-byte writes are perfectly sensible in this regard.   
>> (Although a little odd as Windows has a proper API for doing  
>> preallocation so I don't get why it is not using that instead...)
> 
> Which means the right place to fix this is samba.  Samba just need
> to intersept lseek and pread/pwrite to never allocate sparse files
> but do the right thing instead.  Now what the right thing would probably
> be a preallocate instead of writing zeroes, and we need to provide the
> infrastructure for them to do it, which is in progress currently.
> (And in fact samba already does the right thing for XFS if you use
> the prealloc samba vfs module, which AFAIK is not the default)

Hmm.

How about providing a way to stop kernel (or filesystem) to make gaps
in files instead?  Like some ioctl(fd, FS_NOGAPS, 1) -- pretty much
like 'doze has, just the opposite (on windows, this flag is "on" by
default).

Fixing this issue in samba means that samba has to keep/track more state
data than it currently does.  Detecting such seek+write has some costs.

It's even worse: imagine samba transforms this into write(zeros) (as
preallocate isn't available yet), and at the same time, another process
is writing there... Which will be perfectly valid in current case, but
will go wrong way (overwriting just-written data with zeros) in this
new scenario.

But the main point is that samba has to keep track of things which it
doesn't do now, and those things becomes.. interesting (difficult if
at all possible to track) in multi-user/concurrent-writes environment.

/mjt

  parent reply	other threads:[~2007-05-04 15:49 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-01 20:43 Ext3 vs NTFS performance Cabot, Mason B
2007-05-01 21:23 ` Andrew Morton
2007-05-02 12:21   ` Andi Kleen
2007-05-02 16:04     ` Theodore Tso
2007-05-02 18:40       ` Andi Kleen
2007-05-02 19:28         ` Theodore Tso
2007-05-02 16:16   ` Theodore Tso
2007-05-02 18:08     ` Jeremy Allison
2007-05-02 19:34       ` Theodore Tso
2007-05-02 20:38         ` Jeff Garzik
2007-05-02 22:01           ` Theodore Tso
2007-05-02  3:54 ` Gerhard Mack
2007-05-02 15:46   ` David Chinner
2007-05-02 15:44 ` David Chinner
2007-05-02 19:46   ` Chris Mason
2007-05-03  0:15     ` David Chinner
2007-05-03 12:57       ` Chris Mason
2007-05-03 21:14   ` Valerie Henson
2007-05-03 22:40     ` Bernd Eckenfels
2007-05-04  8:12       ` Anton Altaparmakov
2007-05-04  9:46         ` Christoph Hellwig
2007-05-04 14:47           ` Anton Altaparmakov
2007-05-04 15:49           ` Michael Tokarev [this message]
2007-05-04 18:41             ` Theodore Tso
2007-05-05  9:59             ` Christoph Hellwig
2007-05-06 20:59           ` Jörn Engel
2007-05-04 12:23     ` Theodore Tso
2007-05-04 19:40       ` Valerie Henson
2007-05-04 18:56 ` Phillip Susi
2007-05-04 19:52   ` Cabot, Mason B
2007-05-07 14:31     ` Phillip Susi
2007-09-12 23:47 ` Update: " Cabot, Mason B
  -- strict thread matches above, loose matches on Subject: below --
2007-05-03  3:51 Al Boldi
2007-05-05  3:13 Xu CanHao
2007-05-05 13:45 ` Theodore Tso
     [not found] <8hiYr-2fJ-1@gated-at.bofh.it>
     [not found] ` <8huGm-2W4-33@gated-at.bofh.it>
2007-05-05 22:25   ` Bodo Eggert
2007-05-06  5:04     ` Xu CanHao
2007-05-06  1:48 Albert Cahalan
     [not found] <8gShI-3hY-11@gated-at.bofh.it>
     [not found] ` <8h1bh-8sG-11@gated-at.bofh.it>
     [not found]   ` <8h2Al-280-1@gated-at.bofh.it>
     [not found]     ` <8hW9y-2Lp-3@gated-at.bofh.it>
2007-05-07 11:21       ` Bodo Eggert

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=463B55F9.4070606@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=aia21@cam.ac.uk \
    --cc=ecki@lina.inka.de \
    --cc=hch@infradead.org \
    --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