On Sep 19, 2014, at 11:26 AM, TR Reardon <thomas_reardon@xxxxxxxxxxx> wrote: >> Date: Fri, 19 Sep 2014 12:36:49 -0400 >> From: tytso@xxxxxxx >> To: thomas_reardon@xxxxxxxxxxx >> CC: linux-ext4@xxxxxxxxxxxxxxx >> Subject: Re: Reserved GDT inode: blocks vs extents >> >> On Fri, Sep 19, 2014 at 11:54:39AM -0400, TR Reardon wrote: >>> Hello all: there's probably a good reason for this, but I'm wondering why inode#7 (reserved GDT blocks) is always created with a block map rather than extent? >>> >>> [see ext2fs_create_resize_inode()] >> >> But that may be moot, since one of the things that I've been >> considering is to stop pinning the block group descriptors in memory, >> and just start reading in memory as they are needed. The rationale is >> that for a 4TB disk, we're burning 8 MB of memory. And if you have >> two dozen disks attached to your system, then you're burning 192 >> megabytes of memory, which starts to fairly significant amounts of >> memory, especially for bookcase NAS servers. > > But I'd argue that in many use cases, in particular bookcase NAS servers, > ext4+vfs should optimize for avoiding spinups rather than reducing RAM usage. > Would this change increase spinups when scanning for changes, say via rsync? I think not pinning the group descriptors would be a bad thing. If we consider that reading block allocation bitmaps to be slow, then it would be twice as slow having to read the group descriptor from disk before even knowing which groups have free space for allocation. I think this kind of change only makes sense if there is some other in-memory structure (e.g. rbtree) to describe the free space in the filesystem. That would be a net win, since we wouldn't have to scan potentially thousands of groups to find free space. Cheers, Andreas
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail