All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Grozdan <neutrino8@gmail.com>
Cc: Brian Foster <bfoster@redhat.com>, "Frank ." <frank_1005@msn.com>,
	"xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: Delaylog information enquiry
Date: Wed, 30 Jul 2014 18:18:58 +1000	[thread overview]
Message-ID: <20140730081858.GN26465@dastard> (raw)
In-Reply-To: <CAFLt3phu1kJUjFyP8-+zkRPEsiv8ue=c+W+Ym8PYS1zd3kHyzw@mail.gmail.com>

On Wed, Jul 30, 2014 at 07:42:32AM +0200, Grozdan wrote:
> On Wed, Jul 30, 2014 at 1:41 AM, Dave Chinner <david@fromorbit.com> wrote:
> > Note that this does not change file data behaviour. In this case you
> > need to add the "sync" mount option, which forces all buffered IO to
> > be synchronous and so will be *very slow*. But if you've already
> > turned off the BBWC on the RAID controller then your storage is
> > already terribly slow and so you probably won't care about making
> > performance even worse...
> 
> Dave, excuse my ignorant questions
> 
> I know the Linux kernel keeps data in cache up to 30 seconds before a
> kernel daemon flushes it to disk, unless
> the configured dirty ratio (which is 40% of RAM, iirc) is reached

10% of RAM, actually.

> before these 30 seconds so the flush is done before it
> 
> What I did is lower these 30 seconds to 5 seconds so every 5 seconds
> data is flushed to disk (I've set the dirty_expire_centisecs to 500).
> So, are there any drawbacks in doing this?

Depends on your workload. For a desktop, you probably won't notice
anything different. For a machine that creates lots of temporary
files and then removes them (e.g. build machines) then it could
crater performance completely because it causes writeback before the
files are removed...

> I mean, I don't care *that*
> much for performance but I do want my dirty data to be on
> storage in a reasonable amount of time. I looked at the various sync
> mount options but they all are synchronous so it is my
> impression they'll be slower than giving the kernel 5 seconds to keep
> data and then flush it.
> 
> From XFS perspective, I'd like to know if this is not recommended or
> if it is? I know that with setting the above to 500 centisecs
> means that there will be more writes to disk and potentially may
> result in tear & wear, thus shortening the lifetime of the
> storage
> 
> This is a regular desktop system with a single Seagate Constellation
> SATA disk so no RAID, LVM, thin provision or anything else
> 
> What do you think? :)

I don't think it really matters either way. I don't change
the writeback time on my workstations, build machines or test
machines, but I actually *increase* it on my laptops to save power
by not writing to disk as often. So if you want a little more
safety, then reducing the writeback timeout shouldn't have any
significant affect on performance or wear unless you are doing
something unusual....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2014-07-30  8:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-29  8:53 Delaylog information enquiry Frank .
2014-07-29 12:38 ` Brian Foster
2014-07-29 23:41   ` Dave Chinner
2014-07-30  5:42     ` Grozdan
2014-07-30  8:18       ` Dave Chinner [this message]
2014-07-30 11:44         ` Frank .
2014-07-30 22:53           ` Dave Chinner
2014-07-30 21:18         ` Grozdan
2014-07-30 22:57           ` Dave Chinner

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=20140730081858.GN26465@dastard \
    --to=david@fromorbit.com \
    --cc=bfoster@redhat.com \
    --cc=frank_1005@msn.com \
    --cc=neutrino8@gmail.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 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.