tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: IIs factible to implement full writes of strips to raid using NVRAM memory in LFS?
On Thu, 18 Aug 2016, Jose Luis Rodriguez Garcia wrote:
> On Thu, Aug 18, 2016 at 7:24 PM, Eduardo Horvath <eeh%netbsd.org@localhost> wrote:
> >
> > LFS writes the metadata at the same time, in the same place as the data.
> > No synchronous writes necessary.
>
> As I understand LFS needs to do synchronous writes when there is
> metadata operations (directories)/fsync operations involved. Instead
> of writting a full segment (1 MB per default), it writes a "small
> segment". It kills performance in RAID 5/6, because the write isn't a
> full stripe: you have to read all the disks, for calculate the new
> parity 1 write on raid of x disks= x reads + 2 writes (data + parity).
>
> The NVRAM memory solves this problem as buffer/ write cache.
If the rollback code worked properly then sync writes should not be
necessary. Looks like the SEGM_SYNC flag is only set when LFS is writing
a checkpoint. But I'm not sure there's any guarantee that earlier
segments have hit the disk.
Anyway, I still think fixing LFS so synchronous writes are not needed is a
better use of time than making it use a hardware workaround.
I suppose adding code to LFS where it posts the sync write to copy
it out to NVRAM would be relatively easy. But then you still need to hack
the recovery code to look for data in the NVRAM *and* figure out how to
use it to repair the filesystem. (Which it should be able to repair just
fine without the data in the NVRAM BTW.)
Better to fix the recovery code and just turn off sync writes entirely. I
suppose other people may have different opinions on the subject.
Eduardo
Home |
Main Index |
Thread Index |
Old Index