All of lore.kernel.org
 help / color / mirror / Atom feed
* Specifying block group size
@ 2018-12-22  6:18 Raymond Jennings
  2018-12-22 18:04 ` Hugo Mills
  0 siblings, 1 reply; 4+ messages in thread
From: Raymond Jennings @ 2018-12-22  6:18 UTC (permalink / raw)
  To: linux-btrfs

How do I specify the size of a block group at mkfs?

Like, for example, saying that data groups will be 1GiB, but metadata
groups will be 1MiB?

I noticed that they had different default sizes based on the profile
(dup vs single vs raid)

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

* Re: Specifying block group size
  2018-12-22  6:18 Specifying block group size Raymond Jennings
@ 2018-12-22 18:04 ` Hugo Mills
  2018-12-22 18:11   ` Raymond Jennings
  0 siblings, 1 reply; 4+ messages in thread
From: Hugo Mills @ 2018-12-22 18:04 UTC (permalink / raw)
  To: Raymond Jennings; +Cc: linux-btrfs

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

On Fri, Dec 21, 2018 at 10:18:40PM -0800, Raymond Jennings wrote:
> How do I specify the size of a block group at mkfs?

   You don't -- there's no explicit control over it. The FS will
decide based on the overall size of the filesystem in question.

   Typically, data groups are made of 1 GiB chunks, and metadata
groups are made of 256 MiB chunks (where the RAID level will determine
the number of chunks in a group and the amount of usable space of the
group).

   Hugo.

> 
> Like, for example, saying that data groups will be 1GiB, but metadata
> groups will be 1MiB?
> 
> I noticed that they had different default sizes based on the profile
> (dup vs single vs raid)

-- 
Hugo Mills             | Beware geeks bearing GIFs
hugo@... carfax.org.uk |
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

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

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

* Re: Specifying block group size
  2018-12-22 18:04 ` Hugo Mills
@ 2018-12-22 18:11   ` Raymond Jennings
  2018-12-23  0:54     ` Qu Wenruo
  0 siblings, 1 reply; 4+ messages in thread
From: Raymond Jennings @ 2018-12-22 18:11 UTC (permalink / raw)
  To: Hugo Mills, Raymond Jennings, linux-btrfs

If the filesystem is later resized, does the (default?) chunk size
adjust accordingly?

On Sat, Dec 22, 2018 at 10:04 AM Hugo Mills <hugo@carfax.org.uk> wrote:
>
> On Fri, Dec 21, 2018 at 10:18:40PM -0800, Raymond Jennings wrote:
> > How do I specify the size of a block group at mkfs?
>
>    You don't -- there's no explicit control over it. The FS will
> decide based on the overall size of the filesystem in question.
>
>    Typically, data groups are made of 1 GiB chunks, and metadata
> groups are made of 256 MiB chunks (where the RAID level will determine
> the number of chunks in a group and the amount of usable space of the
> group).
>
>    Hugo.
>
> >
> > Like, for example, saying that data groups will be 1GiB, but metadata
> > groups will be 1MiB?
> >
> > I noticed that they had different default sizes based on the profile
> > (dup vs single vs raid)
>
> --
> Hugo Mills             | Beware geeks bearing GIFs
> hugo@... carfax.org.uk |
> http://carfax.org.uk/  |
> PGP: E2AB1DE4          |

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

* Re: Specifying block group size
  2018-12-22 18:11   ` Raymond Jennings
@ 2018-12-23  0:54     ` Qu Wenruo
  0 siblings, 0 replies; 4+ messages in thread
From: Qu Wenruo @ 2018-12-23  0:54 UTC (permalink / raw)
  To: Raymond Jennings, Hugo Mills, linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 1645 bytes --]



On 2018/12/23 上午2:11, Raymond Jennings wrote:
> If the filesystem is later resized, does the (default?) chunk size
> adjust accordingly?

It depends.

Btrfs calculates chunk size based on total rw bytes (no more than 10%)
and clamp it to maximum chunk size (1G for normal data, 10G data for
large fs, 256 for metadata and 1G data for large fs).

So if you're hitting maximum chunk size already, then it will not change.
But if you're hitting 10% limit, then it will change.

Despite that, raid profile and some other factors will also affect the
chunk size.
E.g. RAID5 with 12 disks could break the 1G/10G data chunk size limit.

Thanks,
Qu

> 
> On Sat, Dec 22, 2018 at 10:04 AM Hugo Mills <hugo@carfax.org.uk> wrote:
>>
>> On Fri, Dec 21, 2018 at 10:18:40PM -0800, Raymond Jennings wrote:
>>> How do I specify the size of a block group at mkfs?
>>
>>    You don't -- there's no explicit control over it. The FS will
>> decide based on the overall size of the filesystem in question.
>>
>>    Typically, data groups are made of 1 GiB chunks, and metadata
>> groups are made of 256 MiB chunks (where the RAID level will determine
>> the number of chunks in a group and the amount of usable space of the
>> group).
>>
>>    Hugo.
>>
>>>
>>> Like, for example, saying that data groups will be 1GiB, but metadata
>>> groups will be 1MiB?
>>>
>>> I noticed that they had different default sizes based on the profile
>>> (dup vs single vs raid)
>>
>> --
>> Hugo Mills             | Beware geeks bearing GIFs
>> hugo@... carfax.org.uk |
>> http://carfax.org.uk/  |
>> PGP: E2AB1DE4          |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2018-12-23  0:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-22  6:18 Specifying block group size Raymond Jennings
2018-12-22 18:04 ` Hugo Mills
2018-12-22 18:11   ` Raymond Jennings
2018-12-23  0:54     ` Qu Wenruo

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.