Re: Why btrfs inline small file by default?
From: David Sterba <hidden>
Date: 2012-10-31 00:12:08
On Wed, Oct 31, 2012 at 07:47:14AM +0800, ching wrote:
On 10/31/2012 06:19 AM, Hugo Mills wrote:quoted
On Tue, Oct 30, 2012 at 10:14:12PM +0000, Hugo Mills wrote:quoted
quoted
if i have 10G small files in total, then it will consume 20G by default.If those small files are each 128 bytes in size, then you have approximately 80 million of them, and they'd take up 80 million pages, or 320 GiB of total disk space.Sorry, to make that clear -- I meant if they were stored in Data. If they're inlined in metadata, then they'll take approximately 20 GiB as you claim, which is a lot less than the 320 GiB they'd be if they're not.is it the same for: 1. 3k per file with leaf size=4K 2. 60k per file with leaf size=64k
The inline limit is minimum of * 'max_inline' (8k by default) * PAGE_SIZE * leafsize - header so 60k files for 64k leaves will not get inlined, unless you have a system with 64k pages.