# Large idle memory usage

**URL:** <https://discourse.julialang.org/t/large-idle-memory-usage/20368>\
**Category:** Performance\
**Created:** [February 1, 2019, 9:46pm UTC](https://discourse.julialang.org/t/large-idle-memory-usage/20368 "2019-02-01T21:46:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NS1](https://avatars.discourse-cdn.com/v4/letter/n/7ba0ec/32.png) [@NS1](https://discourse.julialang.org/u/NS1)\
**Post date:** [February 1, 2019, 9:46pm UTC](https://discourse.julialang.org/t/large-idle-memory-usage/20368/1 "2019-02-01T21:46:30Z")

</div>

Hi,  
I found that Julia has quite a large memory footprint in my machine, and wanted to ask if it’s normal.  
By opening Atom, a Julia process opens, with ~500 MB. When starting julia in the REPL, another process with similar memory usage appears.

- Why are there two julia processes per Atom session?
- Is this amount of RAM usage normal?  
I would add that when opening julia in the command line it also takes ~500MB of RAM.  
This is with removing everything from the startup.jl file.

Thanks for your time!  
Nimrod

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [February 2, 2019, 5:27am UTC](https://discourse.julialang.org/t/large-idle-memory-usage/20368/2 "2019-02-02T05:27:11Z")

</div>

I “only” get about 200MB (Julia 1.1 on Linux), which compares quite poorly to the 40MB an ipython shell uses. This is known, but someone else has to tell you why that is though. Not sure why you get 500MB.

The two julia processes for atom are probably: the one you expect (the one you interact with) and another one running to do clever clever stuff with your code (show help, find where functions are defined etc.)

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [February 2, 2019, 5:35am UTC](https://discourse.julialang.org/t/large-idle-memory-usage/20368/3 "2019-02-02T05:35:11Z")

</div>

Atom by defaults opens two sessions at startup to have one ready if you restart Julia. It’s called something like `boot mode = cycler` in the settings. Try to kill Julia in atom and you’ll see that a new session will be ready immediately

---

<div class="post-metadata">

**Author:** ![NS1](https://avatars.discourse-cdn.com/v4/letter/n/7ba0ec/32.png) [@NS1](https://discourse.julialang.org/u/NS1)\
**Post date:** [February 2, 2019, 8:25pm UTC](https://discourse.julialang.org/t/large-idle-memory-usage/20368/4 "2019-02-02T20:25:38Z")

</div>

Thank you, good to know!

---

<div class="post-metadata">

**Author:** ![NS1](https://avatars.discourse-cdn.com/v4/letter/n/7ba0ec/32.png) [@NS1](https://discourse.julialang.org/u/NS1)\
**Post date:** [February 2, 2019, 8:31pm UTC](https://discourse.julialang.org/t/large-idle-memory-usage/20368/5 "2019-02-02T20:31:25Z")

</div>

Thanks!  
I use Julia 1.0 on Win10 - maybe the difference comes from this.

---

<div class="post-metadata">

**Author:** ![casabre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/casabre/32/21822_2.png) [@casabre](https://discourse.julialang.org/u/casabre)\
**Post date:** [February 9, 2021, 7:53am UTC](https://discourse.julialang.org/t/large-idle-memory-usage/20368/6 "2021-02-09T07:53:50Z")

</div>

I am a bit late to the party but from my point of view the issue still remains. I would use Julia in a service-like environment where multiple Julia docker would run simultaneously and thus, this big difference is quite heavy.

I am observing more or less the same with docker container by comparing just the idle REPL.  
Julia 1.5.3: ~91 MB  
Python 3.9.1: ~ 6 MB

Compared to the previous numbers, there is quite an improvement to Julia 1.1 but it still compares quite poorly.

I am quite new to Julia and hence, I am pretty interested which internals are causing that the memory footprint is that big. Do you know, who could give some more details on this?

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [February 14, 2021, 7:56pm UTC](https://discourse.julialang.org/t/large-idle-memory-usage/20368/7 "2021-02-14T19:56:03Z")

</div>

The memory usage is in part by stuff like BLAS that you can drop if you know how to, and probably mostly about Julia having an excellent optimizing compiler, and the price you pay is more memory use. Interpreted languages, or Python (actually has a compiler now by default, just simpler) inherently use less memory.

On my machine idle Julia 1.6 rc1 takes 0.5% of memory (down from 0.6% for older Julia) and it seems like a good trade-off. This is with 32 GB RAM (I had to downgrade my machine from 128 GB… strangely my Supermicro wouldn’t boot). If you only cared about memory use, you would use older Python2 or even better Perl which has lowest mem (and fastest startup):

```julia
$ ps aux |grep julia
pharald+ 4098 22.3 0.5 1636904 187208 pts/14 Sl+ 19:38 0:01 /home/pharaldsson_sym/julia-1.6.0-rc1/bin/julia --startup-file=no

pharald+ 4228 34.8 0.6 749156 203908 pts/14 Sl+ 19:41 0:01 /home/pharaldsson_sym/julia-1.5.1/bin/julia --startup-file=n

pharald+ 4269 0.2 0.0 27428 8928 pts/14 S+ 19:43 0:00 python3

pharald+ 4391 0.0 0.0 21060 4576 pts/14 S+ 19:48 0:00 perl

```
