I have been testing the performance of Phoebus, measuring the CPU and memory usage. I have found that the CPU usage is very high when opening multiple screens in detached windows in Phoebus. I have tested opening 10 windows from the command line using the following command:
./phoebus.sh -resource file:/path/to/bob/testBob0.bob?target=window -resource file:/path/to/bob/testBob1.bob?target=window -resource file:/path/to/bob/testBob2.bob?target=window ...
The CPU usage of Phoebus was ~120%, while opening the same number of standalone windows in CS-Studio was of order 40%.
In addition I see a lot of threading related exceptions thrown when initially opening 6 or more detached windows in this way. Below is a snippet but I have also attached the full log: phoebus_thread_exceptions.txt
2024-10-16 12:50:25 SEVERE [org.phoebus.ui.application.PhoebusApplication] UI Freezeup
...
*********************************
*** JavaFX Application Thread ***
*********************************
"JavaFX Application Thread" prio=5 Id=34 WAITING on java.util.concurrent.locks.ReentrantLock$NonfairSync@68d8eaf8 owned by "QuantumRenderer-0" Id=29
at java.base@21.0.4/jdk.internal.misc.Unsafe.park(Native Method)
- waiting on java.util.concurrent.locks.ReentrantLock$NonfairSync@68d8eaf8
at java.base@21.0.4/java.util.concurrent.locks.LockSupport.park(LockSupport.java:221)
at java.base@21.0.4/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:754)
at java.base@21.0.4/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:990)
at java.base@21.0.4/java.util.concurrent.locks.ReentrantLock$Sync.lock(ReentrantLock.java:153)
at java.base@21.0.4/java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:322)
at app//com.sun.javafx.tk.quantum.QuantumToolkit.runWithRenderLock(QuantumToolkit.java:440)
at app//com.sun.javafx.tk.quantum.GlassViewEventHandler$ViewEventNotification.run(GlassViewEventHandler.java:882)
...
...
2024-10-16 12:50:26 SEVERE [org.phoebus.ui.application.PhoebusApplication] UI Updates resume
Further info
- I do not see this error when opening 10 screens in tabs (i.e. without the
?target=window extension).
- I have tested against the master GitHub branch as well as the v4.7.3 release and see the same behaviour in both.
- I am running Phoebus on a machine with 4 cores, 8GB RAM running Fedora 40 OS.
- I am using no special JVM environment variables although have tested using
-Dprism.forceGPU=true, which only increased the CPU usage.
Is this something that has been noticed before with multiple detached windows?
I have been testing the performance of Phoebus, measuring the CPU and memory usage. I have found that the CPU usage is very high when opening multiple screens in detached windows in Phoebus. I have tested opening 10 windows from the command line using the following command:
The CPU usage of Phoebus was ~120%, while opening the same number of standalone windows in CS-Studio was of order 40%.
In addition I see a lot of threading related exceptions thrown when initially opening 6 or more detached windows in this way. Below is a snippet but I have also attached the full log: phoebus_thread_exceptions.txt
Further info
?target=windowextension).-Dprism.forceGPU=true, which only increased the CPU usage.Is this something that has been noticed before with multiple detached windows?