On Thu, Aug 18, 2016 at 07:58:53PM +0200, Jose Luis Rodriguez Garcia 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.
Short segments occur because the ratio of syncs to new blocks written is too high in practice: you have to write out before there's enough data to fill a segment. Rearranging it to assemble whole segments in nvram before writing them to disk is possible but would be a fairly big project. One could also integrate this with cleaning so you ~always write a whole segment by filling it up with data from cleaning if you don't have anything else to write, but that's a *big* project. Right now my chief concern is making it work reliably, since it currently seems not to. The first order of business seems to be to come up with a new locking model, since the existing locking is not just bodgy (like we knew) but also not self-consistent and in places glaringly incorrect. -- David A. Holland [email protected]
