Hans-Kristian Bakke posted on Sun, 15 Dec 2013 15:51:37 +0100 as excerpted: > # Regarding torrents and preallocation I have actually turned > preallocation on specifically in rtorrent thinking that it did btrfs a > favour like with ext4 (system.file_allocate.set = yes). It is easy to > turn it off. > Is the "ideal" solution for btrfs and torrenting (or any other random > writes to large files) to use preallocation and NOCOW, or use no > preallocation and NOCOW? I am thinking the first, although I still do > not understand quite why preallocation is worse than no preallocation > for btrfs with COW enabled (or is both just as bad?) I'm not a dev only an admin who follows this list as I run btrfs too, and thus don't claim to be an expert on the above -- it's mostly echoing what I've seen here previously. That said, preallocation with nocow is the choice I'd make here. Meanwhile, a subpoint I didn't make explicit previously, tho it's a logical conclusion from the explanation, is that once the writing is finished and the file becomes like most media files effectively read- only, no further writes, NOCOW is no longer important. That is, you can (sequentially) copy the file somewhere else and not have to worry about it. In fact, that's a reasonably good idea, since NOCOW turns off btrfs checksumming too, and presumably you're still interested in maintaining file integrity on the thing. So what I'd do is setup a torrent download dir (or as I mentioned, a dedicated partition, since I like that sort of thing because it enforces size discipline on the stuff I've downloaded but not fully sorted thru... that's what I do with binary newsgroup downloading, which I've been doing on and off since well before bittorrent was around), set/mount it NOCOW/ nowdatacow, and use it as a temporary download "cache". Then after a file is fully downloaded to "cache", I'd copy it off to a final destination in my normal media partition, ultimately removing my NOCOW copy. -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- 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
