-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Excessive GPU usage in MacOS #678
Comments
What GLMakie version? |
If you're not 0.1.9, try updating to that and run the timing again ;) |
It is happening with GLMakie 0.1.9. I'm pasting the package versions I get in a clean environment.
|
The issue seems to have been introduced in GLMakie 0.1.5. With GLMakie 0.1.4 I can zoom and pan a plot and have only low single digit %s for both CPU and GPU. With GLMakie 0.1.5 I get constant high % GPU and low % CPU when idling but ~100% CPU when zooming or panning a plot. Manifest with no issues:
Manifest with high GPU and CPU usage:
|
@jkrumbiegel seems to be right about this being a mac issue - I cant reproduce this on linux. |
I'm getting a similar thing on Windows. GPU usage goes to ~60% for an empty |
It looks to me it is related to the SSAO passes added on GLMakie 0.1.5. They are expensive (at least on my computer) and executed on every frame rendering without a flag to turn it off. Commenting the SSAO passes in render_frame() reverts the GPU utilization to "normal" values. |
JuliaPlots/GLMakie.jl#107 allows you to completely turn of SSAO. I think that was mostly the point of that pr, actually. |
It's really bad on my Macbook Pro. It makes the fans go overdrive and the whole OS feels sluggish. It happens with a simple open window, no need to draw anything.
Julia 1.4 |
This happens even without a Makie scene on display, just by using |
Any updates on this? I would use JuliaPlots/GLMakie.jl#107 but it seems to be pretty far behind the master branch at this point. |
I have the same issue on Manjaro: An open GLMakie window will consume 100% GPU and will slow down the whole system. Also the julia process gets very slow when doing something else. |
The issue does not seem fixed on macOS 11.4. (tested in Jupyter lab with IJulia v1.23.2) Small plots (~5k points) consume roughly 20-30 % GPU. With CairoMakie v0.5.6 both plots work flawlessly. Edit: Tried it on a REPL session and it does seem related to the number of points you are using. 200k Points work just fine but 2M seem too much. So the solution for me probably is to just reduce the number of points plotted. |
The issue with SSAO, to my understanding, was that it added more buffers. The changes in JuliaPlots/GLMakie.jl#107 made it possible to stop allocating those buffers and take SSAO out of the rendering process. Which is now the default (i.e. FXAA runs, SSAO doesn't). Another potential buffer related problem is the retina scaling stuff touched on in JuliaPlots/GLMakie.jl#145. We are rendering at double resolution specifically on apple systems. I have no idea and no way to test if that is needed though. The other performance "problem" is that GLMakie uses a renderloop, i.e. it will re-render everything 30 times per second or whatever the default is. Theoretically we could render on demand, but for that we need to figure out when there is demand and rework AbstractPlotting/GLMakie accordingly. Since it hasn't been mentioned here - there are some configs hidden in GLMakie. https://github.com/JuliaPlots/GLMakie.jl/blob/3762f689ec785ff40b429c9ecca7d81a54895ed0/src/rendering.jl#L69 You could try lowering the framerate or even pause rendering if your desperate. |
Thanks for the tip, that might explain why the plots seem blurry on my external screen while they look sharp on the built-in screen.
Looks like this is the problem. Especially re-rendering 30 times per second is overkill for virtually every static plot (even if you want to do the interactive zooming stuff). Reducing it to 10-15 fps makes it run a lot smoother, consuming only 30-40 % GPU, while still allowing me to zoom in and out. Great package and documentation on Makie, however. Thanks for the awesome work! |
I think this can be closed with rendering on demand that we have now. |
Opening any Makie window (even an empty scene) results in a "GPU utilization" of ~40%, an "Energy Impact" above 200 (numbers from Activity Monitor.app), and makes the laptop fan run at maximum speed.
Julia 1.5.0
Makie 0.11.1
MacOS 10.15.6
MacBook Pro (Retina, 13-inch, Late 2013) [Intel integrated graphics card]
The text was updated successfully, but these errors were encountered: