IMHO this is fine for such large files.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
There is no "normal" amount of fragmentation on modern filesystems that do things like CoW. That's kind of the point.
If you're reading and writing large files with a consistent amount of I/O, you're going to have a higher amount of fragmentation because of the nature of CoW. This is by design. This doesn't mean anything is wrong with the filesystem, just that peak performance soon after writing is not achieved. Btrfs ~~and ZFS~~ do online defrag and deferred scheduling of tasks for it to allow for EVENTUAL consistency as far as contiguous block forms go. The more free space you have, the sooner it will become cleaner.
Do you know the implications for wear on the drive (related to TBW [total bytes written] and write amplification) on a CoW / highly fragmented drive? I figure if they are planning on writing once, then moving the whole file to an empty space, that means ~2x the writes.
I don't think it could possibly be measured because it's something like: (file size ÷ block size) * num_writes
So it entire depends on the types of files, how often you're utilizing writes to disk...etc. I just wouldn't worry about it. If you REALLY want to estimate the tax: use iostat to check the number of writes on the drive in the last 24 hours, THEN enable online defrag and check it again in 24 hours. See what the difference is.
It really doesn't matter for HDD though. Barely probably matters for SSD.
Note: BTRFS defrag will result in a different copy at the end of the day. If you're using snapshots this will lead to increased utilization.
Btrfs and ZFS do online defrag
News to me for ZFS. Are you talking about the recently implemented rewrite? Because "defrag" isnt really what that does, it simply consolidates metaslab data to (possibly) free up low-use blocks.
Using ZFS fragmentation profile import/export and/or enabling dynamic gang headers can certainly help with high fragmentation.
Oops, you're right. ZFS doesn't have that.
Btrfs ... do online defrag and deferred scheduling of tasks for it to allow for EVENTUAL consistency as far as contiguous block forms go. The more free space you have, the sooner it will become cleaner.
Based on my research, this has to be requested by the user/OS. I don't think Openmediavault (Debian derivative) enables auto defrag out of the box. If I set this up manually, I definitely didn't enable it. You can run a defrag command online (while the system is running) or set the mount to do it automatically.
It should be a default, but I can see why it would be disabled for SSDs to prevent using cycles unnecessarily. If you're using HDDs, check and see if it's enabled.
Either way, unless you're REALLY needing some minor performance improvements out of your disks, it shouldn't make a huge difference.