Closed justinrporter closed 5 years ago
There is an option (--aggressive-unload
) which deals with this.
Currently, by default, jug will keep all the results from the tasks it ran in memory. The reasoning is that it avoids loading and re-loading, which in some instances could be terrible. With --aggressive-unload
it removes everything from memory unless it is needed for the very next task. Neither is a very fancy method, though.
Ahhhh I think I remember seeing that somewhere and it didn't quite click. Thanks!
Can I propose that when --target
is passed, --aggressive-unload
should be active by default? My reasoning is that, unless the task is recursive, you are guaranteed not to need the results of the task in memory if you're only running one stage of your pipeline.
Another thought might be to automatically start unloading when your memory footprint gets to be near the system RAM?
Anyway, thanks for the awesome library.
In certain circumstances, when the jug executor is run for long periods of time, memory appears not to be released from previous tasks. This leads to an eventual OOM when many tasks are executed.
For example, if you have a situation like this:
Then you get the following output:
I imagine that this has something to do with the way finished jobs are serialized, and that there is a reference to that data hanging around somewhere?