atom-julia-client icon indicating copy to clipboard operation
atom-julia-client copied to clipboard

Memory is not freed even after killing the Julia process

Open ma-sadeghi opened this issue 7 years ago • 6 comments

I'm running a Julia code that allocates lots of memory. When I kill the Julia process, however, the allocated memory is not freed, although the variables don't show up anymore in the Workspace tab. I wonder how I can free the allocated memory?

OS: Windows 10

ma-sadeghi avatar Jun 28 '18 14:06 ma-sadeghi

the allocated memory is not freed

How do you know? Did you check that a julia process is taking up that memory in the task manager/htop/whatever?

pfitzseb avatar Jun 29 '18 08:06 pfitzseb

@pfitzseb I checked the Julia process in Windows Task Manager. If I close Atom and restart it, the used memory in Task Manager is significantly less.

Edit: By killing the Julia process, I meant killing the embedded REPL inside Atom.

ma-sadeghi avatar Jun 29 '18 14:06 ma-sadeghi

Every time Julia is stopped within Atom, the processus is not killed and restarting it launches a new instance of Julia, which results in an accumulation. Other related processes seems to behave the same.

Here is the situation after restarting Julia once (an instance of Julia is also launched on startup but it looks like it is never used):

image

Disabling PowerShell wrapping had no effect.

I reproduced the problem with julia-client v0.7.0, v0.6.13 and v0.6.12, with respectively Atom.jl v0.7.0, v0.6.15 and v0.6.12 (and some other combinations along the way). So it looks like the problem comes from one of the dependencies, as I did not test to downgrade them.

Finally, I run Windows 10.

PS: The package is awesome, thanks for it !

Kolaru avatar Jul 22 '18 21:07 Kolaru

If you've set the Boot Mode setting to Cycler (I think that's the default nowadays) then that's expected -- we spin up a pool of Julia instances to keep downtime low if one crashes/is killed. Just switch to Basic to only ever have one instance of Julia up and running.

pfitzseb avatar Jul 23 '18 08:07 pfitzseb

Setting the Boot Mode to basic does not fully solve the problem. No instance of Julia is spanned at startup (as expected), but the spanned instances are still not killed when Julia is stopped (either via the stop button or the exit() command in the REPL).

Kolaru avatar Jul 23 '18 13:07 Kolaru

Potentially related: https://github.com/JunoLab/atom-julia-client/issues/489

pfitzseb avatar Jul 24 '18 14:07 pfitzseb