spin icon indicating copy to clipboard operation
spin copied to clipboard

OCI: improve archive layers algorithm

Open vdice opened this issue 2 years ago • 0 comments

The first fix for https://github.com/fermyon/spin/issues/1787 used the following easy-mode algorithm to bundle multiple data files into a given layer assuming the application layer count would otherwise exceed a maximum (500 at time of writing).

The algorithm simply bundles all files under each directory entry in the component's files mount list into one .tar.gz blob layer each.

This leads to much fewer and much larger-sized layers, thus much less chance for parallelization. When combined with a machine that doesn't have great upload bandwidth, this can result in very slow spin registry push (or spin deploy) times.

  • Let's look into a smarter algorithm that is less sensitive to upload conditions (i.e. break up into more, smaller-sized layers while still staying under the max).
  • Also, double-check other opportunities for efficiency: are we re-pushing layers even if they already exist on the registry?

vdice avatar Oct 26 '23 00:10 vdice