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

Add compression level namelist parameter #33

Closed
aekiss opened this issue May 17, 2019 · 4 comments
Closed

Add compression level namelist parameter #33

aekiss opened this issue May 17, 2019 · 4 comments
Assignees

Comments

@aekiss
Copy link
Contributor

aekiss commented May 17, 2019

Netcdf compression level affects cice runtime, e.g. in 3mo runs with daily output (/g/data3/hh5/tmp/cosima/access-om2-01/01deg_jra55v13_ryf8485_spinup7_newexe):

level                          Timer  12: ReadWrite   file size
0 (no compression*)               1510s                  1600Mb
1                                1833s                   252Mb
5                                2501s                   236Mb

It would be nice to be able to control this speed/space tradeoff via a namelist parameter setting the compression level.
There are only a few code changes required - see 9e69c99

*this test still used nf90_def_var_deflate, but at level 0 - perhaps it would be faster to skip nf90_def_var_deflate if level is 0. Before switching to netcdf4 (d2ef6b1) IO took about 1300s. It's unclear whether the extra 200s in the table is the cost of netcdf4 or the level-0 deflate step.

Slack discussion: https://arccss.slack.com/archives/C9Q7Y1400/p1557809112231100

@russfiedler
Copy link
Contributor

@aekiss I note that in your deflate=0 test cases that you still have chunking and byte shuffling on. Not sure how much of this is contributing to the extra time (probably not much) but the byte shuffling is pointless unless compression is also on so it needs to be turned off if DeflateLevel==0

	vicen:_Storage = "chunked" ;
	vicen:_ChunkSizes = 1, 1, 675, 900 ;
	vicen:_DeflateLevel = 0 ;
	vicen:_Shuffle = "true" ;

@nichannah
Copy link
Contributor

nichannah commented Jun 9, 2019

I have something ready which I am testing now. I will update exes soon and let you know.

The 'history_deflate_level' namelist parameter in setup_nml of cice_in.nml will set the netcdf4 deflation level. By default it is set to -1 which is deflation turned off. This is distinct from history_deflate_level = 0 in that the former does not use a compression algorithm at all. It will be interesting to see whether there is any performance difference between history_deflate_level = -1 and = 0.

Also shuffle is always turned off because apparently this doesn't help much for float data.

References: https://www.unidata.ucar.edu/blogs/developer/entry/netcdf_compression

@aekiss
Copy link
Contributor Author

aekiss commented Jun 20, 2019

Thanks @nichannah this is looking good - is ccee631 ready to merge into master? It would be nice to have it for the RYF run we have planned.

@nichannah
Copy link
Contributor

A new namelist option has been added to CICE setup_nml, history_deflate_level.

This defaults to -1 which is no deflation. Testing show an approx 5x space saving with:

history_deflate_level = 1

aekiss added a commit to COSIMA/1deg_jra55_ryf that referenced this issue Aug 2, 2019
aekiss added a commit to COSIMA/01deg_jra55_iaf that referenced this issue Aug 2, 2019
aekiss added a commit to COSIMA/01deg_jra55_ryf that referenced this issue Aug 2, 2019
aekiss added a commit to COSIMA/025deg_core2_nyf that referenced this issue Aug 2, 2019
aekiss added a commit to COSIMA/025deg_jra55_iaf that referenced this issue Aug 2, 2019
aekiss added a commit to COSIMA/025deg_jra55_ryf that referenced this issue Aug 2, 2019
aekiss added a commit to COSIMA/1deg_core_nyf that referenced this issue Aug 2, 2019
aekiss added a commit to COSIMA/1deg_jra55_iaf that referenced this issue Aug 2, 2019
aekiss added a commit to COSIMA/minimal_01deg_jra55_iaf that referenced this issue Aug 2, 2019
aekiss added a commit to COSIMA/minimal_01deg_jra55_ryf that referenced this issue Aug 2, 2019
aekiss added a commit to COSIMA/minimal_01deg_jra55_ryf that referenced this issue Sep 10, 2019
aekiss added a commit to COSIMA/01deg_jra55_iaf that referenced this issue Sep 16, 2019
aekiss added a commit to COSIMA/01deg_jra55_ryf that referenced this issue Sep 16, 2019
aekiss added a commit to COSIMA/025deg_core2_nyf that referenced this issue Sep 16, 2019
aekiss added a commit to COSIMA/025deg_jra55_iaf that referenced this issue Sep 16, 2019
aekiss added a commit to COSIMA/025deg_jra55_ryf that referenced this issue Sep 16, 2019
aekiss added a commit to COSIMA/1deg_core_nyf that referenced this issue Sep 16, 2019
aekiss added a commit to COSIMA/1deg_jra55_iaf that referenced this issue Sep 16, 2019
aekiss added a commit to COSIMA/1deg_jra55_ryf that referenced this issue Sep 16, 2019
aekiss added a commit to COSIMA/minimal_01deg_jra55_iaf that referenced this issue Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants