On 23.12.2017 13:19, James Courtier-Dutton wrote: > Hi, > > During a btrfs balance, the process hogs all CPU. > Or, to be exact, any other program that wishes to use the SSD during a > btrfs balance is blocked for long periods. Long periods being more > than 5 seconds. > Is there any way to multiplex SSD access while btrfs balance is > operating, so that other applications can still access the SSD with > relatively low latency? > > My guess is that btrfs is doing a transaction with a large number of > SSD blocks at a time, and thus blocking other applications. > > This makes for atrocious user interactivity as well as applications > failing because they cannot access the disk in a relatively low latent > manner. > For, example, this is causing a High Definition network CCTV > application to fail. > > What I would really like, is for some way to limit SSD bandwidths to > applications. > For example the CCTV app always gets the bandwidth it needs, and all > other applications can still access the SSD, but are rate limited. > This would fix my particular problem. > We have rate limiting for network applications, why not disk access also? So how are you running btrfs balance? Are you using any filters whatsoever? The documentation [https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-balance] has the following warning: Warning: running balance without filters will take a lot of time as it basically rewrites the entire filesystem and needs to update all block pointers. > > Kind Regards > > James > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
