You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a plot in a headless environment, I observe 100% CPU usage after the plot is created. All threads stay at 100% usage indefinitely. Minimum example to reproduce:
using GLMakie, AbstractPlotting
p =scatter(1:4)
With Xvfb configuration /usr/bin/Xvfb :1 -screen 0 1024x768x24 &
This causes the CPU usage to hover around 4% on each thread instead of 100%:
using GLMakie, AbstractPlotting
GLMakie.set_window_config!(vsync=false, framerate =1)
p =scatter(1:4)
This causes the CPU usage to stop:
using GLMakie, AbstractPlotting, FileIO
p =scatter(1:4)
GLMakie.destroy!.(p.current_screens)
It may also be worth noting that saving the plot (via FileIO.save("test.png", p)) causes the CPU usage to resume, so you'd have to destroy the screens after saving (not before, because you can't destroy the screens twice):
using GLMakie, AbstractPlotting, FileIO
p =scatter(1:4)
FileIO.save("test.png", p)
GLMakie.destroy!.(p.current_screens)
I am using Julia 1.4.2 and these versions of GLMakie and AbstractPlotting:
This seems to be a deeper problem with GLFW. I tried using WaitEvents instead of PollEvents, but that seems to make xvfb (or similar) crash/hang. Ultimately, all of this can be worked around by setting the GLMakie renderloop to a noop. On a headless system, there is no point in running the renderloop anyway.
When creating a plot in a headless environment, I observe 100% CPU usage after the plot is created. All threads stay at 100% usage indefinitely. Minimum example to reproduce:
With Xvfb configuration
/usr/bin/Xvfb :1 -screen 0 1024x768x24 &
This causes the CPU usage to hover around 4% on each thread instead of 100%:
This causes the CPU usage to stop:
It may also be worth noting that saving the plot (via
FileIO.save("test.png", p)
) causes the CPU usage to resume, so you'd have to destroy the screens after saving (not before, because you can't destroy the screens twice):I am using Julia 1.4.2 and these versions of GLMakie and AbstractPlotting:
CC @ianshmean
The text was updated successfully, but these errors were encountered: