Reduce memory usage in QRF calibration - #2399
Conversation
brhooper
left a comment
There was a problem hiding this comment.
Thanks @mo-AliceLake. This change should reduce memory requirements for the QRF steps (and SAMOS, though we don't actually use this operationally at the moment) by removing some unnecessary dataframe copying and removing objects from memory when they are no longer required.
The existing unit and acceptance tests pass with these changes.
I've made on small suggestion of an additional change we could make. I expect it will only facilitate a small additional memory reduction compared to your changes. I ran the tests with my suggested change included and they still pass.
…_forest.py Co-authored-by: Ben Hooper <114418734+brhooper@users.noreply.github.com>
…_forest.py Co-authored-by: Ben Hooper <114418734+brhooper@users.noreply.github.com>
MoseleyS
left a comment
There was a problem hiding this comment.
Output from FPOSTEST testing shows that memory use for a screen-temperature QRF apply task has reduced from ~50GB to ~18GB, which allows a larger number of threads to run on the same node. I don't have any evidence that the code also runs faster, but it certainly isn't slower.
brhooper
left a comment
There was a problem hiding this comment.
Thanks @mo-AliceLake, I'm happy with this PR.
Correction. The memory reduction was from 50GB to 37GB. Still great, but I'd slightly over-egged it due to a calculation error. |
There is a need to reduce memory usage of QRF calibration scripts, to be able to run operationally.
This branch reduces memory requirements by removing unnecessary intermediate copies of DataFrames and iris cubes.