Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate cubes to make them much faster #141

Closed
4 tasks done
forman opened this issue Aug 7, 2019 · 7 comments
Closed
4 tasks done

Consolidate cubes to make them much faster #141

forman opened this issue Aug 7, 2019 · 7 comments
Assignees
Labels
enhancement New feature or request important This is very important for the project urgent High external pressure to address this ASAP xcube gen This is related to data cube generation, CLI "xcube gen" xcube serve This is related to server component, CLI "xcube serve"

Comments

@forman
Copy link
Member

forman commented Aug 7, 2019

Is your feature request related to a problem? Please describe.

Opening larger cubes from OTC Object Storage or AWS S3 takes too long. Analysis has shown that this is caused mainly by the many HTTP requests made for

  • .zarray and .zattrs metadata files, either by checking for existence or to load them;
  • time coordinate chunks if the chunking for time is one (e.g. chunks={'time': 1, 'lat': 1000, 'lon': 1000) .

Describe the solution you'd like

"Consolidate" cubes after each append, insert, and overwrite of time slices using xcube gen. That includes

  1. calling zarr's consolidate_metadata function;
  2. combine all time chunks into a single so time coordinate variable is never chunked.

TODO

  • a new CLI impl. module and public command consolidate <dataset> so we can consolidate existing cubes.
  • a new API impl. module and public function consolidate_dataset
  • call consolidate_dataset from xcube gen after creating or extending cubes
  • in xcube serve, use xarray's open_zarr function with the consolidated=True flag.

Additional context

CyanoAlert cubes in OTC OBS take up to a few minutes to open, see #131 and xcube-dev/xcube-viewer#61

@forman forman added enhancement New feature or request urgent High external pressure to address this ASAP important This is very important for the project xcube serve This is related to server component, CLI "xcube serve" xcube gen This is related to data cube generation, CLI "xcube gen" labels Aug 7, 2019
@forman forman self-assigned this Aug 7, 2019
@forman forman added the in progress The assignee is working on it label Aug 7, 2019
@forman
Copy link
Member Author

forman commented Aug 12, 2019

consolidate --> optimze

@forman
Copy link
Member Author

forman commented Aug 12, 2019

@AliceBalfanz, @dzelge: I believe we may/should now remove xcube prune and instead make pruning an option of xcube optimize. What do you think?

@dzelge
Copy link
Contributor

dzelge commented Aug 12, 2019 via email

@AliceBalfanz
Copy link
Contributor

I agree.

@forman forman removed the in progress The assignee is working on it label Aug 13, 2019
@forman
Copy link
Member Author

forman commented Aug 13, 2019

Done.

@forman forman closed this as completed Aug 13, 2019
@forman
Copy link
Member Author

forman commented Sep 26, 2019

Reopened, as xcube server does not yet support the consolidated flag.

@forman forman reopened this Sep 26, 2019
@forman forman added the in progress The assignee is working on it label Sep 26, 2019
@forman forman removed the in progress The assignee is working on it label Oct 17, 2019
@forman
Copy link
Member Author

forman commented Oct 17, 2019

Done

@forman forman closed this as completed Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request important This is very important for the project urgent High external pressure to address this ASAP xcube gen This is related to data cube generation, CLI "xcube gen" xcube serve This is related to server component, CLI "xcube serve"
Projects
None yet
Development

No branches or pull requests

3 participants