-
Notifications
You must be signed in to change notification settings - Fork 265
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
Slow nccopy in 4.6.3+ compared to 4.4.1.1 #1398
Comments
If the -d2 option is removed, then the speed seems ok. So I think the problem is |
A possibly related fact - my recent performance testing of PIO shows that it's an order of magnitude slower when using compression. This does not agree with what I expect from compression, which is a pretty small slowdown. |
I assume that deflation was specified to force the output to be in netcdf-4 format, |
Ed, is your slowdown related to the use of nccopy, or is it more general? |
PIO uses deflate level of 1 by default for netCDF-4 access. PIO does not use nccopy, it uses the C library directly for data access. So I would look for something that happened to the compression in the C library. I suspect nccopy is just seeing what is happening in the C layer, not adding any slowdown in this case. |
I had the def_var_chunking code print out the chunksizes being used. |
The fact that the 4.4.1.1 version has no such slowdown would suggest that something changed, when using compression, between 4.4.1.1 and the current versions. I'll be doing some profiling as soon as I'm done here at the RMHPC symposium. |
@DennisHeimbigner I'm happy to test that, but regardless of chunk sizes, changing the version of netcdf (and nothing else) sees a time increase from seconds to over an hour. The geometry of the file will no doubt play a part overall, but holding it constant between the netCDF versions makes me think that it is not the primary issue. |
@DennisHeimbigner the results of the |
|
At the moment, I am pretty sure the problem is with the default chunking sizes. |
More specifically, this command simulates the default chunking of 4.4.1.1
|
I stand corrected, we did change the default chunk sizes at some point. So, that's a great lesson learned. I'll follow up with Martin. So, nccopy doesn't inherit the chunk sizes when copying? I can't recall if I knew this, or if I'm surprised by it. |
Thanks for your help with this Dennis; closing out this issue now as I'm confident you have solved it. -Ward |
OK, but is it really solved? Because apparently whatever changes were made to the default chunksizes resulted in a significant slowdown. Or did I misunderstand what happened with this ticket? |
I did not mean to imply we solved it. The error is that the default chunking |
Ok, I see that there is an error in nccopy to fix. |
Yes, examining the chunking is on the (long) list of things to investigate from the PIO performance effort. I will have many more details and some graphs at the June 3 NOAA meeting, which we are now calling a HPC I/O Workshop. |
re: issue #1398 re: esupport NDY-294972 The new chunking code added to nccopy missed one case. In the event that there are no chunking specifications of any kind, and the input is not netcdf-4, and the output is netcdf-4 and must be chunked, then use the default chunking that the library computes as part of the nc_def_var() function. Misc. changes: 1. add some chunking debug code to hdf5var.c
As reported by Martin Schmidt, using a 1.7GB netCDF classic file:
nccopy -k3 -d2 [infile] [outfile] takes approximately 30 seconds using netCDF-C 4.4.1.1, whereas it takes nearly 100 minutes in 4.6.3, 4.7.0 and the current
master
. Debugging is under way.The text was updated successfully, but these errors were encountered: