December 19, 201312 yr Does anyone know if the filefrag command reports accurate (or useful) results when using reiserfs? It has always bothered me that if I FTP or rsync a large file over to a disk on unRAID then do a filefrag it reports a really high number of extents compared to if I copy the file from windows explorer. This seems to only happen with reiserfs. Perhaps I am just being OCD without really understanding how extents work but when I see 2000 or more extents with an FTP copy vs 100-300 using Windows I start to wonder if this means the file is heavily fragmented. I actually hate copying via SMB because it eats so much CPU and RAM compared to FTP but I do it just because I see a lower filefrag number.
December 19, 201312 yr Does anyone know if the filefrag command reports accurate (or useful) results when using reiserfs? It has always bothered me that if I FTP or rsync a large file over to a disk on unRAID then do a filefrag it reports a really high number of extents compared to if I copy the file from windows explorer. This seems to only happen with reiserfs. Perhaps I am just being OCD without really understanding how extents work but when I see 2000 or more extents with an FTP copy vs 100-300 using Windows I start to wonder if this means the file is heavily fragmented. I actually hate copying via SMB because it eats so much CPU and RAM compared to FTP but I do it just because I see a lower filefrag number. What happens if you do a local copy of the file from one area to another, then compare the filefrag? Copy over smb may pre-allocate all of the space required for the file, thus creating less initial extents.
December 20, 201312 yr Author local copy with cp from one disk to another seems to behave the save as FTP and rsync. It results in a really high extents count compared to copy over SMB. I tend to agree with smb pre-allocating. (I'm pretty sure this is why you frequently get file copy timeouts when your drive is around 80% or more used. The file system seems to take a while trying to pre-allocate the space and windows gives up) My assumption is by pre-allocating the space, the result is larger contiguous blocks (correct term?) being used for the file and therefore less extents. So I guess my real question is does a high extent number indicate a file is heavily fragmented and I would say that yes it does. ReiserFS seems to be more prone to this.
December 21, 201312 yr So I guess my real question is does a high extent number indicate a file is heavily fragmented and I would say that yes it does. ReiserFS seems to be more prone to this. It depends on how often you add and delete files. Growing extents are normal in any filesystem. It's the removal of files, and adding of files that causes them to be fragmented. if there is allot of ongoing activity on the same drive as you are copying/adding files, then it can get fragmented. I dont think this is nearly the same problem as it is on FAT/FAT32 systems.
January 4, 201412 yr I did already had similar questions to myself about this before... even writing a big file on an fully empty file system I do also get some "reasonable" (in the thousands for something like 10GB) number of extents. Wasn't it supposed that a non fragmented / contiguous file have just 1 extent?
Archived
This topic is now archived and is closed to further replies.