-
Notifications
You must be signed in to change notification settings - Fork 264
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
Severe performance degradation in 4.9.3-rc2 #3067
Comments
Thank you for reporting this, and thank you for providing the test program. I'll take a look at this and see if I can sort it out. Out of curiosity, do you know which version of |
The results pasted above were using hdf5 1.14.5, but I could also observe the same behaviour with a 1.12.X |
OK, this is very significant and I need to take a look at this. @WardF I don't think you should release 4.9.3 until we get to the bottom of this problem. The access pattern in use here is very common indeed, so this is not an edge case. We can't just slow down everyone's supercomputer programs for more I/O! There will be a crowd of angry scientists outside Unidata offices with pitchforks and torches... |
Also it would be great if we could work out some basic performance testing in CI. It's a difficult problem, but surely we can try to catch such an obvious slowdown somehow... |
My first thought was that the implementation of get_vara/get_vars had changed. |
Using
This seems like it could be related (or at least is not obviously unrelated), I will dig into it. |
The issue appears to be related to the following change in logic in Prior to the first The naive fix on our end is to quadruple the |
At first read-through, it appears that prior to this change, |
If memory serves, this change was in response to a user posted issue about cache size. |
Thanks for reminding me, @DennisHeimbigner. That makes sense. The question now is how to proceed, and I think the answer may be as much about education as it is setting default cache size values. As @edwardhartnett points out, this is a pretty common use case (as reported in this issue), so I am inclined to lean towards default values that ameliorate the observed jump in access time. This might result in issues being opened related to increased memory usage, but ultimately these are parameters that the end user has control over, if I can remember to reference them. |
I commented in #2734 |
This issue is related to Unidata/netcdf4-python#1393 but narrowed down to netcdf-c library in it's 4.9.3-rc2 version.
We have noticed a very significant degradation in read performance when accessing a variable in a loop.
As a reproducer, the International Best Track Archive for Climate Stewardship (IBTrACS) data can be used:
wget https://www.ncei.noaa.gov/data/international-best-track-archive-for-climate-stewardship-ibtracs/v04r01/access/netcdf/IBTrACS.ALL.v04r01.nc
With the following minimal C code:
iterating over the last 10 storms in the input file and accessing the corresponding lat value. With version 4.9.2 and below only the first read takes significant time, while the rest take virtually nothing:
Where as using 4.9.3-rc2, every iteration takes a similar amount of time:
For certain programs, this may result in a very noticeable slowdown.
This has been reproduced in Linux and Mac.
The text was updated successfully, but these errors were encountered: