Enhance Performance of unix_block_build; investigate porting to the windows version as well. #37
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
zadammac/Tapestry#37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
When packaging a large number of files (~58965), the block build face is unacceptably under-performant if the block size is also sufficiently large; eg. in the instance above only 6 blocks were created. This is likely due to the delay in acquiring the lock as the parallelism on the unix block build is limited by the number of block output files being created.
The specific example cited above took roughly 12 hours, if not a bit more than that, to complete just the building portion. The attendant level-2 compression took ~8 minutes.
Describe the solution you'd like
Time to handle should be reduced signifcantly if at all possible.
Describe alternatives you've considered
Backgrounding the process would reduce the annoyance to the user, but also decrease the accuracy of the snapshot, since files could be written/modified during the build process if it takes a considerably long time.
Since the limitations here are disk i/o, which we can do nothing about, and the block writes, which we can also do nothing about, we should explore the idea of an optional flag that would allow Tapestry to break a file up into smaller chunks provided those chunks satisfy the following properties:
Alternatively, perhaps many smaller blocks could be briefly created to reduce the packaging load, then composited into right-size blocks?
We also need to investigate what is causing the actual delay here. If it really is locking we can solve it, but if it's just constrained by disk i/o there is nothing to be done.
Additional context
This is likely not a light lift as was the case for #34, #35, and #36; a fix is not required as a bug fix and may be considerably more involved.
These performance issues persist even if other hash methods are used during the block build, including in one test case where we actually commented out hashing entirely and had the program simply set a default value in place of a computed hash for each file.
This could be entirely an artefact of shamefully low disk IO on the primary test system used with Tapestry but if that's the case then this program is entirely unfit for purpose.
After having solved issue #40 this has been shown to largely have come from issues related to that issue, as well as poor drive health.