sgkit icon indicating copy to clipboard operation
sgkit copied to clipboard

Parts of work redone when a dask worker dies

Open benjeffery opened this issue 2 years ago • 2 comments

This arose in the context of https://github.com/pystatgen/sgkit-publication/issues/35#issuecomment-1840492652 where dask workers being rotated due to slow memory leaks caused work to be redone and the VCF parse to never complete. This likely also happens with other format parsers.

Upon investigation, it was found that dask requires the result of each parse task to be in cluster memory, despite this just being a None. Possible ways to fix this:

1: Make a note on disk that a chunk has completed being parsed as make the second parse task a no-op. Downside of this is lots of files on disk. 2: Cancel the dask future after completion. Downside of this is a confusing dask progress bar that slowly gets less work to be done without any looking completed. 3: Some tweak to the dask memory manager to replicate parse task results

2 seems to be the best option.

benjeffery avatar Dec 05 '23 12:12 benjeffery

Related:

  • #1138
  • #1129
  • #1132

Upstream dask issue: https://github.com/dask/dask/issues/10654

jeromekelleher avatar Dec 05 '23 12:12 jeromekelleher

Linking https://github.com/pystatgen/sgkit/issues/1152 to be sure we get these fixes for PLINK data too!

hammer avatar Dec 05 '23 19:12 hammer