# Memory Allocation Increases with Iterations

**URL:** <https://discourse.julialang.org/t/memory-allocation-increases-with-iterations/97532>\
**Category:** Performance\
**Tags:** question\
**Created:** [April 16, 2023, 1:32am UTC](https://discourse.julialang.org/t/memory-allocation-increases-with-iterations/97532 "2023-04-16T01:32:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mikkoku](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mikkoku/32/16274_2.png) [@mikkoku](https://discourse.julialang.org/u/mikkoku)\
**Post date:** [April 16, 2023, 7:02am UTC](https://discourse.julialang.org/t/memory-allocation-increases-with-iterations/97532/2 "2023-04-16T07:02:40Z")

</div>

Is the OOM only happening in a shared cluster environment? If that is the case then [Garbage collection not aggressive enough on Slurm Cluster](https://discourse.julialang.org/t/garbage-collection-not-aggressive-enough-on-slurm-cluster/61649) might be relevant.

Did you check that 1 sample does not cause OOM? In your code there is nothing that should keep the garbage collector from freeing the memory from the last iteration.

---

_[View the full topic](https://discourse.julialang.org/t/memory-allocation-increases-with-iterations/97532)._
