mekberg / boar

Automatically exported from code.google.com/p/boar
61 stars 8 forks source link

Defect: Preallocate files to prevent heavy fragmentation #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On NTFS filesystems boar creates very heavy file fragmentation when checking in 
files. Preallocating the files should significantly reduce any fragmentation 
issues (depending on the size of the repo this could have fairly noticeable 
performance benefits for checkouts and the like).

Original issue reported on code.google.com by cryptob...@gmail.com on 18 Feb 2012 at 4:01

GoogleCodeExporter commented 9 years ago
Nice catch! Honestly, I was not aware of this issue with NTFS. One 4GB file 
resulted in almost 2000 fragments in my tests (checked using Piriform 
Defraggler). A simple seek(filesize) + truncate() before writing the data 
reduced that number to 1 fragment (!). Also, the checkout is significantly 
faster and the HDD grinds less. Wonderful!

Original comment by ekb...@gmail.com on 18 Feb 2012 at 10:17

GoogleCodeExporter commented 9 years ago
This issue was closed by revision ead78471139d.

Original comment by ekb...@gmail.com on 18 Feb 2012 at 9:54

GoogleCodeExporter commented 9 years ago
Yes, I noticed the issue when I fired up defraggler while troubleshooting some 
performance issues and noticed a brand new drive that had nothing but a boar 
repo was horrendously fragmented. 

Linuxs/ext# is smart about preventing fragmentation, but NTFS needs a little 
hand holding. Thanks for fixing this so quickly. Grabbing the latest changeset 
now :)

Original comment by cryptob...@gmail.com on 19 Feb 2012 at 1:47

GoogleCodeExporter commented 9 years ago

Original comment by ekb...@gmail.com on 21 May 2012 at 10:40