public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Jason Rosenberg <jbr@squareup.com>
Cc: Ben Myers <bpm@sgi.com>, stan@hardwarefreak.com, xfs@oss.sgi.com
Subject: Re: understanding speculative preallocation
Date: Sat, 27 Jul 2013 11:30:24 +1000	[thread overview]
Message-ID: <20130727013024.GS13468@dastard> (raw)
In-Reply-To: <CAA+BczTt-ZN7DU8gpWAY0SdL0KWL2Z_y8qKvmxMn7b+T9frK4Q@mail.gmail.com>

On Fri, Jul 26, 2013 at 05:11:55PM -0400, Jason Rosenberg wrote:
> Is it safe to say that speculative preallocation will not be used if a file
> is opened read-only?
> 
> It turns out that the kafka server does indeed write lots of log files, and
> rotate them after they reach a max size, but never closes the files until
> the app exits, or until it deletes the files.  This is because it needs to
> make them available for reading, etc.   So, an obvious change for kafka
> might be to close each log file after rotating, and then re-open it
> read-only for consumers of the data.  Does that sound like a solution that
> would pro-actively release pre-allocated storage?

No need - the mainline code that has a periodic background scan that
stops buildup of unused prealocation. i.e. if the file is clean for
5 minutes, then the prealloc will be removed. Hence it doesn't
matter what the application does with it - if it holds it open and
doesn't write to the file, then the prealloc will get removed. More
will be added the next time the file is written, but until then it
won't use excessive space.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2013-07-27  1:30 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26  7:23 understanding speculative preallocation jbr
2013-07-26 11:50 ` Dave Chinner
2013-07-26 17:40   ` Jason Rosenberg
2013-07-26 19:27     ` Stan Hoeppner
2013-07-26 19:43       ` A short digression on FOSS (Re: understanding speculative preallocation) Jay Ashworth
2013-07-27  3:52         ` Stan Hoeppner
2013-07-27 21:00           ` Jay Ashworth
2013-07-28  1:38             ` aurfalien
2013-07-28  1:50               ` Jay Ashworth
2013-07-28  2:08                 ` aurfalien
2013-07-28  2:21                   ` Jay Ashworth
2013-07-28  5:09                     ` Purpose of the XFS list -- was: " Stan Hoeppner
2013-07-28 15:45                       ` Jay Ashworth
2013-08-14 17:01                         ` Emmanuel Florac
2013-07-28  7:18                     ` Stefan Ring
2013-07-28 15:48                       ` Jay Ashworth
2013-07-29  0:02                       ` Dave Chinner
2013-07-29  0:06                         ` Jay Ashworth
2013-07-29  2:41                           ` Dave Chinner
2013-07-29  3:12                             ` Eric Sandeen
2013-07-29  4:11                               ` Stan Hoeppner
2013-07-29 14:33                                 ` Jay Ashworth
2013-07-29 15:25                                   ` Dave Howorth
2013-07-29  3:38                             ` Keith Keller
2013-07-29  4:32                               ` Eric Sandeen
2013-07-29  4:57                                 ` Keith Keller
2013-07-29 13:38                                   ` Eric Sandeen
2013-07-29 18:15                                     ` Keith Keller
2013-07-29 14:24                             ` Jay Ashworth
2013-07-29 14:36                               ` Jay Ashworth
2013-07-29 14:57                               ` Eric Sandeen
2013-07-29 15:30                                 ` Jay Ashworth
2013-07-29 17:05                                   ` Eric Sandeen
2013-07-29  0:00                     ` Dave Chinner
2013-07-28  5:15             ` Michael L. Semon
2013-07-26 20:38       ` understanding speculative preallocation Jason Rosenberg
2013-07-26 20:50         ` Ben Myers
2013-07-26 21:04           ` Jason Rosenberg
2013-07-26 21:11             ` Jason Rosenberg
2013-07-26 21:42               ` Ben Myers
2013-07-27  1:30               ` Dave Chinner [this message]
2013-07-28  2:19                 ` Jason Rosenberg
2013-07-29  0:04                   ` Dave Chinner
2013-07-26 21:45         ` Eric Sandeen
2013-07-27  4:26       ` Keith Keller
2013-07-27  1:26     ` Dave Chinner
  -- strict thread matches above, loose matches on Subject: below --
2013-07-26  7:35 jbr

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=20130727013024.GS13468@dastard \
    --to=david@fromorbit.com \
    --cc=bpm@sgi.com \
    --cc=jbr@squareup.com \
    --cc=stan@hardwarefreak.com \
    --cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox