From: ching <lsching17@gmail.com>
To: Josef Bacik <jbacik@fusionio.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: ssd alignment and btrfs sector size
Date: Fri, 14 Sep 2012 07:45:17 +0800 [thread overview]
Message-ID: <5052700D.4020003@gmail.com> (raw)
In-Reply-To: <20120913130011.GE12994@localhost.localdomain>
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/linux-btrfs@vger.kernel.org/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.
prev parent 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 \
--in-reply-to=5052700D.4020003@gmail.com \
--to=lsching17@gmail.com \
--cc=jbacik@fusionio.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 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.