public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: Btrfs SSD autodetection and mount options
Date: Thu, 11 Jun 2009 16:54:20 -0400	[thread overview]
Message-ID: <20090611205420.GB3834@think> (raw)

Hello everyone,

A quick update on the btrfs SSD modes.  The pull request I just to Linus
includes autodetection of ssd devices based on the queue rotating flag.
You can see this for your devices in /sys/block/xxx/queue/rotating

If all the devices in your FS have a 0 in the rotating flag, btrfs
automatically enables ssd mode.  You can turn this off with
mount -o nossd.

The default ssd flag tries to find rough groupings of blocks to allocate
on, and will try to pack blocks into the free space available.  So,
if you have something like this (pretending a bitmap of free blocks)

free | free | used | free | used | free | free | used

Btrfs SSD mode will collect a large region of mostly free blocks and
allocate from that.  This works well on newer and high end ssds that
prefer us to reuse blocks instead of spreading IO across the hole
device.

But, low end devices may have to do a read/modify/write cycle when we
actually do IO in this case.  I've added a new mount option for those
devices:

mount -o ssd_spread.  This is not autodetected, you still need to pass
it on the mount command line or in /etc/fstab.  In ssd_spread mode,
btrfs will try much harder to find a contiguous chunk of free blocks and
hand those out.

-chris


                 reply	other threads:[~2009-06-11 20:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090611205420.GB3834@think \
    --to=chris.mason@oracle.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