public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
* Btrfs on bcache device: mount options?
@ 2015-10-15 13:04 Simon Herter
  2015-10-15 14:29 ` Vojtech Pavlik
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Herter @ 2015-10-15 13:04 UTC (permalink / raw)
  To: linux-bcache

Hello,

I'm using btrfs on a bcache device and I'm a bit confused about mount
options. For example, bcache may (if I understood correctly) bypass the
cache completely for sequential access. So should I use "ssd" mount
option or not? Are there any general recommendations?

Thanks
-Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Btrfs on bcache device: mount options?
  2015-10-15 13:04 Btrfs on bcache device: mount options? Simon Herter
@ 2015-10-15 14:29 ` Vojtech Pavlik
  2015-10-15 21:27   ` Simon Herter
  0 siblings, 1 reply; 4+ messages in thread
From: Vojtech Pavlik @ 2015-10-15 14:29 UTC (permalink / raw)
  To: Simon Herter; +Cc: linux-bcache

On Thu, Oct 15, 2015 at 03:04:35PM +0200, Simon Herter wrote:

> I'm using btrfs on a bcache device and I'm a bit confused about mount
> options. For example, bcache may (if I understood correctly) bypass the
> cache completely for sequential access. So should I use "ssd" mount
> option or not? Are there any general recommendations?

No, you should not. It modifies the data layout behavior to ignore seek
times. These may be present when reading from the backing media.

You likely want to enable compression and autodefragmentation, too.
-- 
Vojtech Pavlik
Director SUSE Labs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Btrfs on bcache device: mount options?
  2015-10-15 14:29 ` Vojtech Pavlik
@ 2015-10-15 21:27   ` Simon Herter
  2015-11-24  7:30     ` Kai Krakow
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Herter @ 2015-10-15 21:27 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: linux-bcache


Vojtech Pavlik writes:

> On Thu, Oct 15, 2015 at 03:04:35PM +0200, Simon Herter wrote:
>
>> I'm using btrfs on a bcache device and I'm a bit confused about mount
>> options. For example, bcache may (if I understood correctly) bypass the
>> cache completely for sequential access. So should I use "ssd" mount
>> option or not? Are there any general recommendations?
>
> No, you should not. It modifies the data layout behavior to ignore seek
> times. These may be present when reading from the backing media.

Sounds reasonable. A short note on that: _not_ specifying 'ssd' is not
enough, one has to specify 'nossd' explicitly. Btrfs enables 'ssd'
automatically by checking /sys/block/bcache0/queue/rotational to be
zero - which is true. (Though I'm not sure whether bcache got that right.
One could argue that returning the backing device's rotational value
would be better, especially to get the defaults right for btrfs.)

> You likely want to enable compression and autodefragmentation, too.

When I read 'autodefrag' I was worried about my ssd at first, but I found
some discussion about that on the btrfs mailing list, so that seems to
be fine. Thanks for the suggestions.

-Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Btrfs on bcache device: mount options?
  2015-10-15 21:27   ` Simon Herter
@ 2015-11-24  7:30     ` Kai Krakow
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Krakow @ 2015-11-24  7:30 UTC (permalink / raw)
  To: linux-bcache

Am Thu, 15 Oct 2015 23:27:32 +0200
schrieb Simon Herter <sim.herter@gmail.com>:

> 
> Vojtech Pavlik writes:
> 
> > On Thu, Oct 15, 2015 at 03:04:35PM +0200, Simon Herter wrote:
> >
> >> I'm using btrfs on a bcache device and I'm a bit confused about
> >> mount options. For example, bcache may (if I understood correctly)
> >> bypass the cache completely for sequential access. So should I use
> >> "ssd" mount option or not? Are there any general recommendations?
> >
> > No, you should not. It modifies the data layout behavior to ignore
> > seek times. These may be present when reading from the backing
> > media.
> 
> Sounds reasonable. A short note on that: _not_ specifying 'ssd' is not
> enough, one has to specify 'nossd' explicitly. Btrfs enables 'ssd'
> automatically by checking /sys/block/bcache0/queue/rotational to be
> zero - which is true. (Though I'm not sure whether bcache got that
> right. One could argue that returning the backing device's rotational
> value would be better, especially to get the defaults right for
> btrfs.)
> 
> > You likely want to enable compression and autodefragmentation, too.
> 
> When I read 'autodefrag' I was worried about my ssd at first, but I
> found some discussion about that on the btrfs mailing list, so that
> seems to be fine. Thanks for the suggestions.

I found that using autodefrag with bcache eats lifetime of your SSD a
lot. I suggest watching your SSD smart stats closely for a while before
turning it permanently on. Autodefrag constantly rewrites even big
files, this is still not optimized in btrfs.

You may better want to individually mark files nocow in btrfs which are
subject to high fragmentation and source of low performance due to
this, like sqlite files, database files, vm images, etc. Such files
usually have their own transaction safety layer anyways - so you do not
really need btrfs transactional cow protection for these.

But I'll look into the nossd option. I wondered about this myself.

Regards,
Kai

-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-24  7:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 13:04 Btrfs on bcache device: mount options? Simon Herter
2015-10-15 14:29 ` Vojtech Pavlik
2015-10-15 21:27   ` Simon Herter
2015-11-24  7:30     ` Kai Krakow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox