On Thu, Mar 03, 2016 at 01:28:29PM +0100, Holger Hoffstätte wrote: > > Here's an observation that is not a bug (as in data corruption), just > somewhat odd and unnecessary behaviour. It could be considered a > performance or scalability bug. > > I've noticed that slow slow buffered writes create a huge number of > unnecessary 4k sized extents. At first I wrote it off as odd buffering > behaviour of the application (a download manager), but it can be easily > reproduced. For example:
We saw this here with slowly appending log files. The basic problem is the VM triggers dirty writeback on the tail end of the file and either starts on the last page or our clustering code pulls in the last page. It leads to latencies because we start writing the last page in the file to disk and the application has to wait for the IO to finish before it can append to the file again. I'll get our patches in for the next merge window, it's basically just: don't write the last incomplete page in the file if we're O_APPEND and it isn't a data integrity writeback. We may want to rework it to drop the O_APPEND check. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html