question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plot updates cause heap to grow massively

See original GitHub issue

So I’ve been working on updating plots from within the notebook and noticed that interaction really slows down after a lot of plot updates. I started profiling a little bit using the bokeh serve fourier_animated.py example on 0.12.3dev4 and found that the heap just keeps on growing, after about 30 seconds it had grown to 1 GB and the plot starts slowing down.

screen shot 2016-10-01 at 5 05 11 pm

It seems something is not being garbage collected. After a bit of investigation I found that there are a lot of LinearMapper instances that accumulate:

image

and there also seem to be a lot of change events:

image

Here’s the heap allocation for the same example in 0.12.2:

screen shot 2016-10-01 at 5 13 34 pm

Bokeh 0.12.3dev4 Chrome Version 53.0.2785.116 (64-bit) OS X 10.11.6

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
mattpapcommented, Oct 3, 2016

@philippjfr, regarding testing this I started issue #5269.

0reactions
philippjfrcommented, Oct 3, 2016

Working well for me, the JS heap now hovers around 30-50 MB on the fourier_example even after running it for a while. Thanks for the quick fix!

+1 on adding automated testing for this somehow, because it’s easy to miss but really important.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Massive memory hemorrhage that causes heap size to go ...
I'm left with several questions: (a) does the Garbage Profiler graph mean what I think it means? Or am I confusing correlation with...
Read more >
Balanced GC performance improvements: Eden + heap sizing ...
A high level summary of the changes is as follows: Eden Sizing: Allow eden to be resized by stats relevant to eden size,...
Read more >
Modded MC and memory usage, a history with a crappy graph
If your MC is taking 15-20 minutes to load, and is thrashing 100% CPU, you are very likely a victim of this issue....
Read more >
Schematic representation of how to update the heap.: In step 1 ...
The heapification down-moves progressively node 3 in the heap by swapping it ... Algorithm to find influencers via optimal percolation in massively large ......
Read more >
SRE Case Study: Triaging a Non-Heap JVM Out of Memory ...
Symptoms. At the beginning, we noticed garbage collection (GC) overhead exceeded and CPU usage alerts for some hosts. · Action · Analysis ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found