-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Bad memory management in IPython notebook #4199
Comments
This is surprising, because I see IPython using only 50MB. Some questions:
|
Tested on Windows, I only see it using 25MB and an additional 19MB per notebook |
And on Linux, I see 40MB and an additional 22MB (roughly the same) |
Same version?
|
What web browser are you using? What are the memory allocations if you On Thu, Sep 12, 2013 at 11:58 AM, Gaël notifications@github.com wrote:
|
I'm using chromium at the moment. For the figure, I'm still using
I did almost nothing with my system on the time being, but stuff always occurs in memory (hence the residual 9 MB). |
Do you have any IPython configuration, or code run at startup in your profile? |
Ok, this morning, update to IPython 1.1.0-1. Still the same problem. I checked for config file there: ~:
/etc/ipython No change. I also tried to use a random profile just in case: I still have the same problem. I'd like to stress that this problem does not exist in console IPython. |
What do you get for memory usage (in the terminal) after each of the following imports: from tornado import web, ioloop
import jinja2
import zmq
from IPython import kernel
from IPython.html import notebookapp |
I repeated the measurements 4 times and calculated the average
15 MB (+15 MB)
18 MB (+3 MB)
20 MB (+2 MB)
21 MB (+1 MB)
124 MB (+103 MB)
134 MB (+10 MB) Do the python instances launched specifically for each notebook import |
On Sep 14, 2013 8:44 AM, "Gaël" notifications@github.com wrote:
Certainly. Those instances are what we call kernels, so that package exists |
Ok, I understand. I thought a kernel was an IPython instance to which notebooks were connected somehow. I dug... The offending import is:
or
as it is stated in []/IPython/kernel/init.py. But I really need to dig a bit more: when I execute all the lines one after the other from |
Intriguing. One more thing to try is a utility that's been giving us trouble lately:
|
No problem with this utility. I also confirm that:
increases the memory consumption by ~100 MB while
followed by a couple of hits on Do you know any decent memory profiler that I could use to follow and spot memory? |
Ok, I got it: When I'm sorry, I should have checked that first before submitting something here. Especially since I'm using Thanks for your time and for your help anyway. This is has been great to interact with such a helpful and reactive community! Again, sorry for the noise. |
Still I think @minrk, @takluyver (and me) have numpy installed and do not see this behavior. IT woudl at least be nice to understand why you see it. |
Yes of course. My point was that it does not seem to be directly related to IPython, so I closed the bug report. But I planned to report the source of the memory leak here also as you might be interested and as other people might also think that this is due to IPython. |
OK, great. |
I tracked down the memory leak to |
I'd definitely recommend pinging the numpy guys about it - they may have more information on potential problems, or ideas for how to debug it. Also, I'm not convinced that we should be importing numpy wherever it's available, as even normally importing numpy takes a certain amount of time and memory (about 7 MB, on my system). |
can affect startup time, memory usage, etc. as seen in ipython#4199
can affect startup time, memory usage, etc. as seen in ipython#4199
Hi,
I'm using IPython2/3 1.0.0-3 on archlinux.
Issue:
Each time I launch IPython (2 or 3) notebook,
Usecase:
Imagine I have 2 notebooks in one instance and another notebook in another IPython instance. These are gonna eat 700 MB of RAM before doing anything with them.
Expected behaviour:
The text was updated successfully, but these errors were encountered: