# Memory usage in Julia v1.9.0-beta2

**URL:** <https://discourse.julialang.org/t/memory-usage-in-julia-v1-9-0-beta2/92320>\
**Category:** General Usage\
**Created:** [December 30, 2022, 3:23pm UTC](https://discourse.julialang.org/t/memory-usage-in-julia-v1-9-0-beta2/92320 "2022-12-30T15:23:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fastwave](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fastwave/32/14725_2.png) [@fastwave](https://discourse.julialang.org/u/fastwave)\
**Post date:** [December 30, 2022, 3:23pm UTC](https://discourse.julialang.org/t/memory-usage-in-julia-v1-9-0-beta2/92320/1 "2022-12-30T15:23:35Z")

</div>

This caught my attention, as I had problems with the 1.8 series. However, I’ve found that 1.9 consumes about 5 x the memory for my use case, which went up from 1.7G (1.8.3) to 10.3G in 1.9.0-beta2 . In turn v1.8.3 is worse than v1.7.3, but not nearly as much as v1.8.0 was. (see [[Resource usage in versions 1.7.2 and 1.8.0](https://discourse.julialang.org/t/resource-usage-in-versions-1-7-2-and-1-8-0/86111)](https:// Resource usage in versions 1.7.2 and 1.8.0 ))  
The tested code is [FMA/fullstate-amp-1.jl at master · rs1909/FMA · GitHub](https://github.com/rs1909/FMA/blob/master/examples/synthetic_ten_dimensional/fullstate-amp-1.jl) , which is part of [GitHub - rs1909/FMA: Foliations, Manifolds and Autoencoders](https://github.com/rs1909/FMA)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [December 30, 2022, 3:39pm UTC](https://discourse.julialang.org/t/memory-usage-in-julia-v1-9-0-beta2/92320/2 "2022-12-30T15:39:07Z")

</div>

> [@fastwave](#):
>
> This caught my attention, as I had problems with the 1.8 series. However, I’ve found that 1.9 consumes about 5 x the memory for my use case, which went up from 1.7G (1.8.3) to 10.3G in 1.9.0-beta2

How do you measure this? “Consumes memory” is a bit imprecise.

---

<div class="post-metadata">

**Author:** ![fastwave](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fastwave/32/14725_2.png) [@fastwave](https://discourse.julialang.org/u/fastwave)\
**Post date:** [December 30, 2022, 3:55pm UTC](https://discourse.julialang.org/t/memory-usage-in-julia-v1-9-0-beta2/92320/3 "2022-12-30T15:55:54Z")

</div>

I use the ‘top’ command on Linux and read off the RES value, that is “anything occupying physical memory” as per the man page of ‘top’.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [December 30, 2022, 9:30pm UTC](https://discourse.julialang.org/t/memory-usage-in-julia-v1-9-0-beta2/92320/4 "2022-12-30T21:30:00Z")

</div>

Is it possible that the issue is related to the number OpenBLAS threads?  
At some times the default changed.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [December 30, 2022, 10:58pm UTC](https://discourse.julialang.org/t/memory-usage-in-julia-v1-9-0-beta2/92320/5 "2022-12-30T22:58:53Z")

</div>

Don’t know if related but if one looks at the size of the new DLL some of them are BIG. Biggest one I saw had ~140 MB.

---

<div class="post-metadata">

**Author:** ![fastwave](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fastwave/32/14725_2.png) [@fastwave](https://discourse.julialang.org/u/fastwave)\
**Post date:** [December 30, 2022, 11:22pm UTC](https://discourse.julialang.org/t/memory-usage-in-julia-v1-9-0-beta2/92320/6 "2022-12-30T23:22:35Z")

</div>

v1.9.0-beta2 has 1 thread, v1.8.4 has 8 threads. There is certainly a difference, but the effect should be the opposite? It is on a ryzen 3700X processor.

```julia
~/julia-1.9.0-beta2/bin/julia 
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.9.0-beta2 (2022-12-29)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> using LinearAlgebra

julia> BLAS.get_num_threads()
1

```

```julia
~/julia-1.8.4/bin/julia 
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.8.4 (2022-12-23)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> using LinearAlgebra

julia> BLAS.get_num_threads()
8

```
