# Why does the memory consumption of DMRG far exceed the sum of MPS and MPO by several times?

**URL:** <https://itensor.discourse.group/t/why-does-the-memory-consumption-of-dmrg-far-exceed-the-sum-of-mps-and-mpo-by-several-times/1310>\
**Category:** DMRG and Numerical Methods\
**Created:** [November 23, 2023, 12:53pm UTC](https://itensor.discourse.group/t/why-does-the-memory-consumption-of-dmrg-far-exceed-the-sum-of-mps-and-mpo-by-several-times/1310 "2023-11-23T12:53:54Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![kmp5](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/kmp5/32/251_2.png) [@kmp5](https://itensor.discourse.group/u/kmp5)\
**Post date:** [November 27, 2023, 2:30pm UTC](https://itensor.discourse.group/t/why-does-the-memory-consumption-of-dmrg-far-exceed-the-sum-of-mps-and-mpo-by-several-times/1310/6 "2023-11-27T14:30:17Z")

</div>

Yes we are finding this issue too - Julia accumulates memory during runtime. You can see some benchmarking of this issue on in this post [Memory usage in DMRG with Julia 1.x - #7 by mtfishman](https://itensor.discourse.group/t/memory-usage-in-dmrg-with-julia-1-x/1092/7). We are working on creating a memory buffer system to minimize this problem and improve performance. I think the recommended solution is still the [`--heap-size-hint` flag](https://julialang.org/blog/2023/04/julia-1.9-highlights/#memory_usage_hint_for_the_gc_with_--heap-size-hint) but you can follow Matt’s thread for updates.

---

_[View the full topic](https://itensor.discourse.group/t/why-does-the-memory-consumption-of-dmrg-far-exceed-the-sum-of-mps-and-mpo-by-several-times/1310)._
