# Low memory environment

**URL:** <https://discourse.julialang.org/t/low-memory-environment/11474>\
**Category:** Internals & Design\
**Tags:** precompilation\
**Created:** [June 6, 2018, 2:34pm UTC](https://discourse.julialang.org/t/low-memory-environment/11474 "2018-06-06T14:34:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [June 6, 2018, 2:34pm UTC](https://discourse.julialang.org/t/low-memory-environment/11474/1 "2018-06-06T14:34:06Z")

</div>

I have an old netbook running Lubuntu with an atom dual core cpu and 1GB of RAM and 1GB of swap. Last week I tried compiling 0.7 alpha on it and everything went fine (although really really really slow, ~10x compared to my work laptop) except precompilation, which filled up the entire RAM and swap and then crashed. Julia 0.6.3 Compiled just fine.

I would prefer to not skip precompilation because the machine is so slow. Is there a way to make precompilation use less memory? E.g. by splitting it into several parts so that it will consume less memory? I guess that this may be of general importance because people run Julia on embedded devices such as the Raspberry Pi.

As a side note: OpenBLAS does not recognize the atom processor as a target automatically.

---

<div class="post-metadata">

**Author:** ![NaOH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/naoh/32/5632_2.png) [@NaOH](https://discourse.julialang.org/u/NaOH)\
**Post date:** [June 6, 2018, 3:25pm UTC](https://discourse.julialang.org/t/low-memory-environment/11474/2 "2018-06-06T15:25:31Z")

</div>

Check out zram:

- [Running out of RAM in Ubuntu? Enable ZRAM - CNX Software](https://www.cnx-software.com/2018/05/14/running-out-of-ram-in-ubuntu-enable-zram)

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [June 6, 2018, 4:09pm UTC](https://discourse.julialang.org/t/low-memory-environment/11474/3 "2018-06-06T16:09:42Z")

</div>

I could switch to a swap file instead of a swap partition and simply increase it for the time of the build. I did not know about zram, thanks I will try this!

---

<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:** [June 6, 2018, 4:41pm UTC](https://discourse.julialang.org/t/low-memory-environment/11474/4 "2018-06-06T16:41:42Z")

</div>

Try comment out including the precompile file in `stdlib/Pkg/src/Pkg.jl`, it is known that it results in a bit higher memory requirement.

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [June 7, 2018, 12:43pm UTC](https://discourse.julialang.org/t/low-memory-environment/11474/5 "2018-06-07T12:43:31Z")

</div>

I solved it by adding a swap file, zram seemed a bit too complicated for a one time thing.
