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

Excessive GPU usage in MacOS #678

Closed
dcabecinhas opened this issue Aug 4, 2020 · 16 comments
Closed

Excessive GPU usage in MacOS #678

dcabecinhas opened this issue Aug 4, 2020 · 16 comments
Labels
GLMakie This relates to GLMakie.jl, the OpenGL backend for Makie.

Comments

@dcabecinhas
Copy link

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]

@SimonDanisch
Copy link
Member

What GLMakie version?

@SimonDanisch
Copy link
Member

If you're not 0.1.9, try updating to that and run the timing again ;)

@dcabecinhas
Copy link
Author

dcabecinhas commented Aug 4, 2020

It is happening with GLMakie 0.1.9. I'm pasting the package versions I get in a clean environment.
Let me know if you need more info or have any suggestion regarding pinpointing the issue.

(tmp) pkg> st
Status `~/tmp/Project.toml`
  [ee78f7c6] Makie v0.11.1

(tmp) pkg> st -m
Status `~/tmp/Manifest.toml`
  [537997a7] AbstractPlotting v0.12.6
  [79e6a3ab] Adapt v2.0.2
  [27a7e980] Animations v0.4.0
  [6e34b625] Bzip2_jll v1.0.6+3
  [fa961155] CEnum v0.4.1
  [a2cac450] ColorBrewer v0.4.0
  [35d6a980] ColorSchemes v3.9.0
  [3da002f7] ColorTypes v0.10.7
  [c3611d14] ColorVectorSpace v0.8.5
  [5ae59095] Colors v0.12.3
  [e66e0078] CompilerSupportLibraries_jll v0.3.3+0
  [d38c429a] Contour v0.5.4
  [9a962f9c] DataAPI v1.3.0
  [864edb3b] DataStructures v0.17.20
  [e2d170a0] DataValueInterfaces v1.0.0
  [ffbed154] DocStringExtensions v0.8.2
  [da5c29d0] EllipsisNotation v0.4.0
  [c87230d0] FFMPEG v0.3.0
  [b22a6f82] FFMPEG_jll v4.3.1+1
  [5789e2e9] FileIO v1.4.0
  [53c48c17] FixedPointNumbers v0.8.4
  [59287772] Formatting v0.4.1
  [b38be410] FreeType v3.0.1
  [d7e528f0] FreeType2_jll v2.10.1+3
  [663a7486] FreeTypeAbstraction v0.8.0
  [559328eb] FriBidi_jll v1.0.5+4
  [f7f18e0c] GLFW v3.2.2
  [0656b61e] GLFW_jll v3.3.2+0
  [e9467ef8] GLMakie v0.1.9
  [5c1252a2] GeometryBasics v0.2.15
  [a2bd30eb] Graphics v1.0.2
  [3955a311] GridLayoutBase v0.3.3
  [a09fc81d] ImageCore v0.8.14
  [82e4d734] ImageIO v0.3.0
  [9b13fd28] IndirectArrays v0.5.1
  [8197267c] IntervalSets v0.5.1
  [c8e1da08] IterTools v1.3.0
  [82899510] IteratorInterfaceExtensions v1.0.0
  [682c06a0] JSON v0.21.0
  [c1c5ebd0] LAME_jll v3.100.0+2
  [dd192d2f] LibVPX_jll v1.9.0+0
  [d4300ac3] Libgcrypt_jll v1.8.5+1
  [7e76a0d4] Libglvnd_jll v1.3.0+1
  [7add5ba3] Libgpg_error_jll v1.36.0+1
  [94ce4f54] Libiconv_jll v1.16.0+5
  [ee78f7c6] Makie v0.11.1
  [dbb5928d] MappedArrays v0.2.2
  [7eb4fadd] Match v1.1.0
  [7269a6da] MeshIO v0.4.0
  [e1d29d7a] Missings v0.4.3
  [66fc600b] ModernGL v1.1.2
  [e94cdb99] MosaicViews v0.2.2
  [77ba4419] NaNMath v0.3.4
  [510215fc] Observables v0.3.1
  [6fe1bfb0] OffsetArrays v1.1.2
  [e7412a2a] Ogg_jll v1.3.4+1
  [458c3c95] OpenSSL_jll v1.1.1+5
  [efe28fd5] OpenSpecFun_jll v0.5.3+3
  [91d4177d] Opus_jll v1.3.1+2
  [bac558e1] OrderedCollections v1.3.0
  [f57f5aa1] PNGFiles v0.3.0
  [19eb6ba3] Packing v0.4.0
  [5432bcbf] PaddedViews v0.5.5
  [69de0a69] Parsers v1.0.7
  [995b91a9] PlotUtils v1.0.5
  [189a3867] Reexport v0.2.0
  [ae029012] Requires v1.0.1
  [65257c39] ShaderAbstractions v0.2.2
  [992d4aef] Showoff v0.3.1
  [73760f76] SignedDistanceFields v0.4.0
  [a2af1166] SortingAlgorithms v0.3.1
  [276daf66] SpecialFunctions v0.10.3
  [90137ffa] StaticArrays v0.12.4
  [2913bbd2] StatsBase v0.33.0
  [09ab397b] StructArrays v0.4.4
  [3783bdb8] TableTraits v1.0.0
  [bd369af6] Tables v1.0.5
  [1cfade01] UnicodeFun v0.4.1
  [02c8fc9c] XML2_jll v2.9.10+1
  [aed1982a] XSLT_jll v1.1.33+2
  [4f6342f7] Xorg_libX11_jll v1.6.9+2
  [0c0b7dd1] Xorg_libXau_jll v1.0.9+2
  [935fb764] Xorg_libXcursor_jll v1.2.0+2
  [a3789734] Xorg_libXdmcp_jll v1.1.3+2
  [1082639a] Xorg_libXext_jll v1.3.4+2
  [d091e8ba] Xorg_libXfixes_jll v5.0.3+2
  [a51aa0fd] Xorg_libXi_jll v1.7.10+2
  [d1454406] Xorg_libXinerama_jll v1.1.4+2
  [ec84b674] Xorg_libXrandr_jll v1.5.2+2
  [ea2f1a96] Xorg_libXrender_jll v0.9.10+2
  [14d82f49] Xorg_libpthread_stubs_jll v0.1.0+1
  [c7cfdc94] Xorg_libxcb_jll v1.13.0+2
  [c5fb5394] Xorg_xtrans_jll v1.4.0+1
  [83775a58] Zlib_jll v1.2.11+15
  [0ac62f75] libass_jll v0.14.0+3
  [f638f0a6] libfdk_aac_jll v0.1.6+3
  [b53b4c65] libpng_jll v1.6.37+3
  [f27f6e37] libvorbis_jll v1.3.6+5
  [1270edf5] x264_jll v2020.7.14+1
  [dfaa095f] x265_jll v3.0.0+2
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8ba89e20] Distributed
  [b77e0a4c] InteractiveUtils
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [44cfe95a] Pkg
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode

@dcabecinhas
Copy link
Author

dcabecinhas commented Aug 6, 2020

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.

@SimonDanisch

Manifest with no issues:

(tmp) pkg> st
Status `~/tmp/Project.toml`
  [537997a7] AbstractPlotting v0.10.11
  [e9467ef8] GLMakie v0.1.4 ⚲

(tmp) pkg> st -m
Status `~/tmp/Manifest.toml`
  [85c772de] AbstractNumbers v0.2.1
  [537997a7] AbstractPlotting v0.10.11
  [79e6a3ab] Adapt v2.0.2
  [6e34b625] Bzip2_jll v1.0.6+3
  [fa961155] CEnum v0.4.1
  [a2cac450] ColorBrewer v0.4.0
  [35d6a980] ColorSchemes v3.9.0
  [3da002f7] ColorTypes v0.10.8
  [c3611d14] ColorVectorSpace v0.8.5
  [5ae59095] Colors v0.12.3
  [e66e0078] CompilerSupportLibraries_jll v0.3.3+0
  [d38c429a] Contour v0.5.4
  [9a962f9c] DataAPI v1.3.0
  [864edb3b] DataStructures v0.17.20
  [e2d170a0] DataValueInterfaces v1.0.0
  [ffbed154] DocStringExtensions v0.8.2
  [da5c29d0] EllipsisNotation v0.4.0
  [c87230d0] FFMPEG v0.3.0
  [b22a6f82] FFMPEG_jll v4.3.1+1
  [5789e2e9] FileIO v1.4.0
  [53c48c17] FixedPointNumbers v0.8.4
  [b38be410] FreeType v3.0.1
  [d7e528f0] FreeType2_jll v2.10.1+3
  [663a7486] FreeTypeAbstraction v0.8.0
  [559328eb] FriBidi_jll v1.0.5+4
  [f7f18e0c] GLFW v3.2.2
  [0656b61e] GLFW_jll v3.3.2+0
  [e9467ef8] GLMakie v0.1.4 ⚲
  [5c1252a2] GeometryBasics v0.2.15
  [a2bd30eb] Graphics v1.0.2
  [a09fc81d] ImageCore v0.8.14
  [6218d12a] ImageMagick v1.1.5
  [c73af94c] ImageMagick_jll v6.9.10-12+3
  [8197267c] IntervalSets v0.5.1
  [c8e1da08] IterTools v1.3.0
  [82899510] IteratorInterfaceExtensions v1.0.0
  [682c06a0] JSON v0.21.0
  [aacddb02] JpegTurbo_jll v2.0.1+1
  [c1c5ebd0] LAME_jll v3.100.0+2
  [dd192d2f] LibVPX_jll v1.9.0+0
  [d4300ac3] Libgcrypt_jll v1.8.5+1
  [7e76a0d4] Libglvnd_jll v1.3.0+1
  [7add5ba3] Libgpg_error_jll v1.36.0+1
  [94ce4f54] Libiconv_jll v1.16.0+5
  [89763e89] Libtiff_jll v4.1.0+0
  [dbb5928d] MappedArrays v0.2.2
  [7269a6da] MeshIO v0.4.0
  [e1d29d7a] Missings v0.4.3
  [66fc600b] ModernGL v1.1.2
  [e94cdb99] MosaicViews v0.2.2
  [77ba4419] NaNMath v0.3.4
  [510215fc] Observables v0.3.1
  [6fe1bfb0] OffsetArrays v1.1.2
  [e7412a2a] Ogg_jll v1.3.4+1
  [458c3c95] OpenSSL_jll v1.1.1+5
  [efe28fd5] OpenSpecFun_jll v0.5.3+3
  [91d4177d] Opus_jll v1.3.1+2
  [bac558e1] OrderedCollections v1.3.0
  [19eb6ba3] Packing v0.4.0
  [5432bcbf] PaddedViews v0.5.5
  [69de0a69] Parsers v1.0.7
  [995b91a9] PlotUtils v1.0.5
  [189a3867] Reexport v0.2.0
  [ae029012] Requires v1.0.1
  [65257c39] ShaderAbstractions v0.2.2
  [992d4aef] Showoff v0.3.1
  [73760f76] SignedDistanceFields v0.4.0
  [a2af1166] SortingAlgorithms v0.3.1
  [276daf66] SpecialFunctions v0.10.3
  [90137ffa] StaticArrays v0.12.4
  [2913bbd2] StatsBase v0.33.0
  [09ab397b] StructArrays v0.4.4
  [3783bdb8] TableTraits v1.0.0
  [bd369af6] Tables v1.0.5
  [1cfade01] UnicodeFun v0.4.1
  [02c8fc9c] XML2_jll v2.9.10+1
  [aed1982a] XSLT_jll v1.1.33+2
  [4f6342f7] Xorg_libX11_jll v1.6.9+2
  [0c0b7dd1] Xorg_libXau_jll v1.0.9+2
  [935fb764] Xorg_libXcursor_jll v1.2.0+2
  [a3789734] Xorg_libXdmcp_jll v1.1.3+2
  [1082639a] Xorg_libXext_jll v1.3.4+2
  [d091e8ba] Xorg_libXfixes_jll v5.0.3+2
  [a51aa0fd] Xorg_libXi_jll v1.7.10+2
  [d1454406] Xorg_libXinerama_jll v1.1.4+2
  [ec84b674] Xorg_libXrandr_jll v1.5.2+2
  [ea2f1a96] Xorg_libXrender_jll v0.9.10+2
  [14d82f49] Xorg_libpthread_stubs_jll v0.1.0+1
  [c7cfdc94] Xorg_libxcb_jll v1.13.0+2
  [c5fb5394] Xorg_xtrans_jll v1.4.0+1
  [83775a58] Zlib_jll v1.2.11+15
  [3161d3a3] Zstd_jll v1.4.5+0
  [0ac62f75] libass_jll v0.14.0+3
  [f638f0a6] libfdk_aac_jll v0.1.6+3
  [b53b4c65] libpng_jll v1.6.37+3
  [f27f6e37] libvorbis_jll v1.3.6+5
  [1270edf5] x264_jll v2020.7.14+1
  [dfaa095f] x265_jll v3.0.0+2
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8ba89e20] Distributed
  [b77e0a4c] InteractiveUtils
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [44cfe95a] Pkg
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode

Manifest with high GPU and CPU usage:

(tmp) pkg> st 
Status `~/tmp/Project.toml`
  [537997a7] AbstractPlotting v0.11.2
  [e9467ef8] GLMakie v0.1.5 ⚲

(tmp) pkg> st -m
Status `~/tmp/Manifest.toml`
  [537997a7] AbstractPlotting v0.11.2
  [79e6a3ab] Adapt v2.0.2
  [6e34b625] Bzip2_jll v1.0.6+3
  [fa961155] CEnum v0.4.1
  [a2cac450] ColorBrewer v0.4.0
  [35d6a980] ColorSchemes v3.9.0
  [3da002f7] ColorTypes v0.10.8
  [c3611d14] ColorVectorSpace v0.8.5
  [5ae59095] Colors v0.12.3
  [e66e0078] CompilerSupportLibraries_jll v0.3.3+0
  [d38c429a] Contour v0.5.4
  [9a962f9c] DataAPI v1.3.0
  [864edb3b] DataStructures v0.17.20
  [e2d170a0] DataValueInterfaces v1.0.0
  [ffbed154] DocStringExtensions v0.8.2
  [da5c29d0] EllipsisNotation v0.4.0
  [c87230d0] FFMPEG v0.3.0
  [b22a6f82] FFMPEG_jll v4.3.1+1
  [5789e2e9] FileIO v1.4.0
  [53c48c17] FixedPointNumbers v0.8.4
  [b38be410] FreeType v3.0.1
  [d7e528f0] FreeType2_jll v2.10.1+3
  [663a7486] FreeTypeAbstraction v0.8.0
  [559328eb] FriBidi_jll v1.0.5+4
  [f7f18e0c] GLFW v3.2.2
  [0656b61e] GLFW_jll v3.3.2+0
  [e9467ef8] GLMakie v0.1.5 ⚲
  [5c1252a2] GeometryBasics v0.2.15
  [a2bd30eb] Graphics v1.0.2
  [a09fc81d] ImageCore v0.8.14
  [82e4d734] ImageIO v0.2.0
  [9b13fd28] IndirectArrays v0.5.1
  [8197267c] IntervalSets v0.5.1
  [c8e1da08] IterTools v1.3.0
  [82899510] IteratorInterfaceExtensions v1.0.0
  [682c06a0] JSON v0.21.0
  [c1c5ebd0] LAME_jll v3.100.0+2
  [dd192d2f] LibVPX_jll v1.9.0+0
  [d4300ac3] Libgcrypt_jll v1.8.5+1
  [7e76a0d4] Libglvnd_jll v1.3.0+1
  [7add5ba3] Libgpg_error_jll v1.36.0+1
  [94ce4f54] Libiconv_jll v1.16.0+5
  [dbb5928d] MappedArrays v0.2.2
  [7269a6da] MeshIO v0.4.0
  [e1d29d7a] Missings v0.4.3
  [66fc600b] ModernGL v1.1.2
  [e94cdb99] MosaicViews v0.2.2
  [77ba4419] NaNMath v0.3.4
  [510215fc] Observables v0.3.1
  [6fe1bfb0] OffsetArrays v1.1.2
  [e7412a2a] Ogg_jll v1.3.4+1
  [458c3c95] OpenSSL_jll v1.1.1+5
  [efe28fd5] OpenSpecFun_jll v0.5.3+3
  [91d4177d] Opus_jll v1.3.1+2
  [bac558e1] OrderedCollections v1.3.0
  [f57f5aa1] PNGFiles v0.2.1
  [19eb6ba3] Packing v0.4.0
  [5432bcbf] PaddedViews v0.5.5
  [69de0a69] Parsers v1.0.7
  [995b91a9] PlotUtils v1.0.5
  [189a3867] Reexport v0.2.0
  [ae029012] Requires v1.0.1
  [65257c39] ShaderAbstractions v0.2.2
  [992d4aef] Showoff v0.3.1
  [73760f76] SignedDistanceFields v0.4.0
  [a2af1166] SortingAlgorithms v0.3.1
  [276daf66] SpecialFunctions v0.10.3
  [90137ffa] StaticArrays v0.12.4
  [2913bbd2] StatsBase v0.33.0
  [09ab397b] StructArrays v0.4.4
  [3783bdb8] TableTraits v1.0.0
  [bd369af6] Tables v1.0.5
  [1cfade01] UnicodeFun v0.4.1
  [02c8fc9c] XML2_jll v2.9.10+1
  [aed1982a] XSLT_jll v1.1.33+2
  [4f6342f7] Xorg_libX11_jll v1.6.9+2
  [0c0b7dd1] Xorg_libXau_jll v1.0.9+2
  [935fb764] Xorg_libXcursor_jll v1.2.0+2
  [a3789734] Xorg_libXdmcp_jll v1.1.3+2
  [1082639a] Xorg_libXext_jll v1.3.4+2
  [d091e8ba] Xorg_libXfixes_jll v5.0.3+2
  [a51aa0fd] Xorg_libXi_jll v1.7.10+2
  [d1454406] Xorg_libXinerama_jll v1.1.4+2
  [ec84b674] Xorg_libXrandr_jll v1.5.2+2
  [ea2f1a96] Xorg_libXrender_jll v0.9.10+2
  [14d82f49] Xorg_libpthread_stubs_jll v0.1.0+1
  [c7cfdc94] Xorg_libxcb_jll v1.13.0+2
  [c5fb5394] Xorg_xtrans_jll v1.4.0+1
  [83775a58] Zlib_jll v1.2.11+15
  [0ac62f75] libass_jll v0.14.0+3
  [f638f0a6] libfdk_aac_jll v0.1.6+3
  [b53b4c65] libpng_jll v1.6.37+3
  [f27f6e37] libvorbis_jll v1.3.6+5
  [1270edf5] x264_jll v2020.7.14+1
  [dfaa095f] x265_jll v3.0.0+2
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8ba89e20] Distributed
  [b77e0a4c] InteractiveUtils
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [44cfe95a] Pkg
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode

@jkrumbiegel jkrumbiegel added the GLMakie This relates to GLMakie.jl, the OpenGL backend for Makie. label Aug 9, 2020
@SimonDanisch
Copy link
Member

@jkrumbiegel seems to be right about this being a mac issue - I cant reproduce this on linux.
As a matter of fact, gpu usage even drops a bit when I open a makie window :D

@jonniedie
Copy link

I'm getting a similar thing on Windows. GPU usage goes to ~60% for an empty Scene. I'm also Julia 1.5.0, Makie 0.11.1, GLMakie 0.1.9.

@dcabecinhas
Copy link
Author

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.

@ffreyer
Copy link
Collaborator

ffreyer commented Aug 12, 2020

JuliaPlots/GLMakie.jl#107 allows you to completely turn of SSAO. I think that was mostly the point of that pr, actually.

@NightMachinery
Copy link

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.

image


[[GLMakie]]
deps = ["AbstractPlotting", "ColorTypes", "Colors", "FileIO", "FixedPointNumbers", "FreeTypeAbstraction", "GLFW", "GeometryBasics", "LinearAlgebra", "Markdown", "MeshIO", "ModernGL", "Observables", "Printf", "Serialization", "ShaderAbstractions", "StaticArrays"]
git-tree-sha1 = "01cf7fa2c64d5d9d79f9e4a89e33bc08fc33b7d1"
uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
version = "0.1.9"

Julia 1.4

@NightMachinery
Copy link

This happens even without a Makie scene on display, just by using Makie.save(dest, scene). In fact, when used this way, it seems to leak resources, as I used it within a function and the scene is now gone, but the GPU usage hasn't stopped. There is no close function to close the scene either.

@pbouffard
Copy link
Contributor

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.

@gdkrmr
Copy link

gdkrmr commented Mar 3, 2021

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.

@JuliDi
Copy link

JuliDi commented Jun 7, 2021

The issue does not seem fixed on macOS 11.4. (tested in Jupyter lab with IJulia v1.23.2)
Using the latest stable versions for Julia and Makie, i.e.
Julia 1.6.1
Makie v0.13.12
GLMakie v0.2.7

Small plots (~5k points) consume roughly 20-30 % GPU.
Bigger plots (~2M points on multiple subplots) consume 100 % GPU and the whole system becomes very slow.

With CairoMakie v0.5.6 both plots work flawlessly.
So this might be related to how many points the plot has, if GLMakie tries to include every single data point on the default zoom level, this could explain why.
However, on Jupyter you can't use the GLMakie plots interactively (i.e. zoom in) so I can't confirm this.

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.
Is this something that might get solved in the future or is this just a limitation of how GLMakie works?

@ffreyer
Copy link
Collaborator

ffreyer commented Jun 7, 2021

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.

@JuliDi
Copy link

JuliDi commented Jun 7, 2021

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.

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.

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.

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.
Re-rendering on demand would, of course, be the perfect solution. Might be something for a future release.

Great package and documentation on Makie, however. Thanks for the awesome work!

@ffreyer ffreyer mentioned this issue Oct 15, 2022
2 tasks
@jkrumbiegel
Copy link
Member

I think this can be closed with rendering on demand that we have now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GLMakie This relates to GLMakie.jl, the OpenGL backend for Makie.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants