Date: Tue, 29 Jan 2013 09:05:33 -0800 From: Freddie Cash <fjwcash@gmail.com> To: Adam Nowacki <nowakpl@platinum.linux.pl> Cc: Matthew Ahrens <mahrens@delphix.com>, fs@freebsd.org Subject: Re: RAID-Z wasted space - asize roundups to nparity +1 Message-ID: <CAOjFWZ4W6yASf-z2vZ1vGi0qKi6E2LY7GmrOJ0uaGVau00sz5w@mail.gmail.com> In-Reply-To: <5107A9B7.5030803@platinum.linux.pl> References: <5105252D.6060502@platinum.linux.pl> <CAJjvXiEQSqnKYP75crTkgVqLKSk92q9UTikFtdyPHmF6shJFbg@mail.gmail.com> <5107A9B7.5030803@platinum.linux.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 29, 2013 2:52 AM, "Adam Nowacki" <nowakpl@platinum.linux.pl> wrote: > > On 2013-01-28 22:55, Matthew Ahrens wrote: >> >> This is so that we won't end up with small, unallocatable segments. >> E.g. if you are using RAIDZ2, the smallest usable segment would be 3 >> sectors (1 sector data + 2 sectors parity). If we left a 1 or 2 sector >> free segment, it would be unusable and you'd be able to get into strange >> accounting situations where you have free space but can't write because >> you're "out of space". > > > Sounds reasonable. > > >> The amount of waste due to this can be minimized by using larger >> blocksizes (e.g. the default recordsize of 128k and files larger than >> 128k), and by using smaller sector sizes (e.g. 512b sector disks rather >> than 4k sector disks). In your case these techniques would limit the >> waste to 0.6%. > > > This brings another issue - recordsize capped at 128KiB. We are using the pool for off-line storage of large files (from 50MB to 20GB). Files are stored and read sequentially as a whole. With 12 disks in RAID-Z2, 4KiB sectors, 128KiB record size and the padding above 9.4% of disk space goes completely unused - one whole disk. > > Increasing recordsize cap seems trivial enough. On-disk structures and kernel code support it already - a single of code had to be changed (#define SPA_MAXBLOCKSHIFT - from 17 to 20) to support 1MiB recordsizes. This of course breaks compatibility with any other system without this modification. With Suns cooperation this could be handled in safe and compatible manner via pool version upgrade. Recordsize of 128KiB would remain the default but anyone could increase it with zfs set. There's work upstream (Illumos, I believe, maybe Delphix?) to add support for recordings above 128 KB. It'll be added ad a feature flag, so only compatible with open-source ZFS.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ4W6yASf-z2vZ1vGi0qKi6E2LY7GmrOJ0uaGVau00sz5w>