High memory usage during build
Hi,
I'm running out of memory while Pkg.adding TimeZones on a small server with 1GB of memory. Why is the memory usage so high and does it need to spawn 4 processes?
Step 30/39 : RUN julia -e "using Pkg; Pkg.add(\"TimeZones\")"
---> [Warning] Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
---> Running in 4d6f766148ac
Updating registry at `~/.julia/registries/General`
Resolving package versions...
Installed TimeZones ─ v1.5.3
Updating `~/.julia/environments/v1.5/Project.toml`
[f269a46b] + TimeZones v1.5.3
Updating `~/.julia/environments/v1.5/Manifest.toml`
[f269a46b] + TimeZones v1.5.3
Building TimeZones → `~/.julia/packages/TimeZones/K98G0/deps/build.log`
Killed
The command '/bin/sh -c julia -e "using Pkg; Pkg.add(\"TimeZones\")"' returned a non-zero code: 137
Here's what top looks like while it's building:
MiB Mem : 978.6 total, 66.1 free, 865.7 used, 46.8 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 13.7 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22343 ubuntu 20 0 638108 205480 0 S 0.0 20.5 0:10.50 julia
22388 ubuntu 20 0 443656 129608 0 S 0.0 12.9 0:00.49 julia
22384 ubuntu 20 0 443256 126160 0 S 0.0 12.6 0:00.42 julia
22402 ubuntu 20 0 441316 100640 0 D 31.3 10.0 0:08.13 julia
TimeZones doesn't spawn Julia processes during the build so that part is unrelated (probably spawned by Pkg). There are some parts of the build where memory could be reduced but I'll need to look into it further.
If you could post the build log or run:
using TimeZones
TimeZones.build()
That could be helpful
My project depends on a pretty long list of packages but only chokes on TimeZones. The only other package I've seen more than one thread with is GR but it builds quickly.
~/.julia/packages/TimeZones/K98G0/deps/build.log looks empty. Unfortunately since I'm unable to ]add TimeZones I cannot do using TimeZones :(
In PR https://github.com/JuliaTime/TimeZones.jl/pull/441 the deps/build.jl was removed so this is no longer an issue. Included in TimeZones release 1.12