Enhance Performance of unix_block_build; investigate porting to the windows version as well. #37

Closed
opened 2022-11-11 03:31:42 +00:00 by ZAdamMac · 2 comments
ZAdamMac commented 2022-11-11 03:31:42 +00:00 (Migrated from github.com)

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:

  • They are permitted by the end user, and;
  • They are even factors of the block size limit.

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.

**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: - They are permitted by the end user, and; - They are even factors of the block size limit. 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.
ZAdamMac commented 2022-12-27 00:17:05 +00:00 (Migrated from github.com)

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.

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.
ZAdamMac commented 2023-06-02 16:28:20 +00:00 (Migrated from github.com)

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.

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.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zadammac/Tapestry#37
No description provided.