linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: lilofile <lilofile@aliyun.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: question
Date: Sun, 20 Oct 2013 17:53:36 +0100	[thread overview]
Message-ID: <20131020165336.GD6598@carfax.org.uk> (raw)
In-Reply-To: <1c7f1ff8-7161-4e67-9acc-eb5d4b8b965d@aliyun.com>

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]

On Sun, Oct 20, 2013 at 11:19:26PM +0800, lilofile wrote:
> 
> when i read transaction_kthread function in disk-io.c 
> 
> delay = HZ * 30;
> 
> why commit transaction is 30 seconds,  Other values 20 seconds,10 seconds?
> what considerations about the commit transaction interval?

   It's a more or less arbitrary number. There's been a patch recently
(last couple of months) to allow modifying the value. If you make it
too large, you end up using lots of RAM for unflushed changes, you
risk losing those changes if the machine crashes. If you make it too
small, you end up writing lots more metadata, because that's always
changing as the FS is modified.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
  --- There are three things you should never see being made: laws, ---  
                        standards,  and sausages.                        

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2013-10-20 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-20 15:19 question lilofile
2013-10-20 16:53 ` Hugo Mills [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-12 20:06 Question Morey Roof
2008-08-12 20:32 ` Question Jeff Schroeder
2008-08-13 13:19   ` Question Chris Mason

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=20131020165336.GD6598@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --cc=lilofile@aliyun.com \
    --cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).