Parallel precompilation and out-of-memory errors

My computer has 8 logical CPUs and only ~4GB of RAM usable to Julia. The result is that when I go to install a bunch of packages, it’s easy for parallel compilation to use up all my RAM and trigger the OOM killer (if I’m lucky) or freeze the whole thing. I’m usually not lucky.

The simplest fix would be if I could disable parallel precompilation, or just limit it to only doing 2 threads at once. Is there a flag I can flip somewhere to do this? (Will the same flag work for when Pluto.jl is triggering the compilation process?)

Thanks—and apologies for any breaking-of-conventions I’ve done. This is my first post on discourse.

I’m running Julia 1.9.0 on archlinux (via the julia-bin package).

1 Like

JULIA_NUM_PRECOMPILE_TASKS

3 Likes

Thanks! It’s pretty clear from the docs you linked, but just for completeness (in case anybody finds this later): I have tested that this solution also works for precompilation triggered by Pluto.

1 Like