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

Memory not released or resused under Linux #43063

Closed
freemin7 opened this issue Nov 13, 2021 · 3 comments
Closed

Memory not released or resused under Linux #43063

freemin7 opened this issue Nov 13, 2021 · 3 comments

Comments

@freemin7
Copy link
Contributor

freemin7 commented Nov 13, 2021

When running @btime length($rand(100000000)) repeatedly Julia allocates around 0.8G of memory (almost) each time and doesn't release it even if the system starts swapping. Unlike here the memory is not reused for the next call. #29085 might be related but that doesn't involve interpolation ($ stuff). The issue does not exist for @time length(rand(100000000))

I could reproduce the issue on x86_64 and AARCH 64 in 1.6.1 and 1.7.0-rc2 on two Linux variants. The repeated allocation of 0.8 Gigabytes does not happen under Windows and a GC.gc() call frees the 0.8G too which doesn't happen under Linux.

@btime length(x) setup=(x = rand(100000000)) on Linux behaves nicely under Linux including GC.gc() working.

@KristofferC
Copy link
Sponsor Member

An interpolated value in BenchmarkTools will never be released (based in how BenchmarkTools uses it) . I'm pretty sure there is an issue about this sonmewhere in the BenchmarkTools repo but can't find it now.

@freemin7
Copy link
Contributor Author

I didn't find anything like that either.

@KristofferC
Copy link
Sponsor Member

It was in a PR JuliaCI/BenchmarkTools.jl#247. Anyway this is not a julia issue but a BenchmarkTools one.

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