linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ching <[email protected]>
To: Josef Bacik <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: ssd alignment and btrfs sector size
Date: Fri, 14 Sep 2012 07:45:17 +0800	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 09/13/2012 09:00 PM, Josef Bacik wrote:
> On Thu, Sep 13, 2012 at 12:02:04AM -0600, ching lu wrote:
>> I am trying to test btrfs on my ssd, i am studying about btrfs and alignment.
>>
>> I have read this old mail:
>> http://www.mail-archive.com/[email protected]/msg16177.html
>>
>> According to the thread, 3 parameters should be tuned
>>
>> 1. leafsize
>> 2. nodesize
>> 3. sectorsize
>>
>> The first two parameters are easy to understand, but how does
>> "sectorsize" affect the alignment?
>>
>> If the erase block size of my SSD is 16k, and i set
>> leafsize=nodesize=16k, leave the sectorsize=4k (default), will it
>> causes misalignment?
> So frist leafsize/nodesize will always be the same, so if you set one to 16k
> mkfs will autmatically set the other to 16k, it's just way back when we had
> grand plans of having different sizes for both.
>
> Secondly your erase block size is 16k?  What kind of drive are you using?  But
> yeah 4k sectorsize will result in misaligned writes to the data area, but your
> metadata will be aligned.  Hopefully the raid5/6 code will be out soon and we'll
> be able to do > page size sectorsize and you'll be able to set
> leafsize==sectorsize.  Btw most normal SSDs have waaaay larger erase blocks, on
> the order of several MB, so it's not the worst thing to write to the middle of
> erase blocks, everybody does it anyway.  Thanks,
>
> Josef
>

16k is just a assumption only, thanks for your help anyway.

      reply	other threads:[~2012-09-13 23:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13  6:02 ssd alignment and btrfs sector size ching lu
2012-09-13 13:00 ` Josef Bacik
2012-09-13 23:45   ` ching [this message]

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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).