[bisq-network/bisq] Limit system ram to 4GB (#4048)

Stan notifications at github.com
Thu May 7 19:14:49 UTC 2020


> Btw, this means Bisq (or any JavaFX app) could behave differently on different systems, depending on that system's video settings (graphic card hardware? graphics drivers? amount of shared RAM between video and system? etc -- don't know what could play a role, but smth to keep in mind when looking at performance).

JavaFX does behave differently with different GPUs.  It does use native GPU drivers, and there have been many leak problems in JFX related to GPU and mesa drivers.

Here is a list of some [jfx leak related issues](https://bugs.openjdk.java.net/browse/JDK-8115293?jql=project%20%3D%20JDK%20AND%20component%20%3D%20javafx%20AND%20text%20~%20%22leak%22) -- old and new.  You have to hunt around for those related to GPUs, and for issues about leak related bugs found and fixed after JFX 11 was released.   

Issue [8188094](https://bugs.openjdk.java.net/browse/JDK-8188094) shows how to make JFX leak from a simple app running on Linux.  The unresolved issue reports the problem in JDK/JFX 8/9, and I reproduced it running JFX 11 on Ubuntu + NVIDIA GPU in Feb. 2020, when I started working on this problem.

JFX 14 has some leak bugfixes, but Bisq is holding back on upgrading to OpenJDK 14 until the new  [java packaging tool](https://openjdk.java.net/jeps/343) is released from incubation to GA.

I did a lot of profiling to find the leaks (maybe you saw some of my comments in issue [3918](https://github.com/bisq-network/bisq/issues/3918)) using JMC/JFR, JProfiler, async-profiler, bcc and bpftrace tools, under the assumption the problem was/is in the Bisq UI and JFX.  I'm sure there are leaks to find and fix, but the only firm conclusion my analysis supported was that Bisq's JVM was reserving far more resident and virtual memory at startup than the Linux JVM needs.  (I could not find problems with Bisq's on-heap management.)  The problem was more serious when it starts with an empty data dir, syncs the entire chain, and the JVM never gives back any memory (to the OS).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4048#issuecomment-625445260
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200507/5009ec67/attachment-0001.html>


More information about the bisq-github mailing list