Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High memory usage during build #321

Closed
dvasya opened this issue Mar 2, 2021 · 3 comments
Closed

High memory usage during build #321

dvasya opened this issue Mar 2, 2021 · 3 comments

Comments

@dvasya
Copy link

dvasya commented Mar 2, 2021

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                                         
@omus
Copy link
Member

omus commented Mar 2, 2021

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

@dvasya
Copy link
Author

dvasya commented Mar 3, 2021

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 :(

@omus
Copy link
Member

omus commented Aug 22, 2023

In PR #441 the deps/build.jl was removed so this is no longer an issue. Included in TimeZones release 1.12

@omus omus closed this as completed Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants