This article refers to using Azul Platform Prime with the ZST component. Since Azul Zulu Prime JVM 19.07 the ZST component is optional and depending on your use case Azul Zulu Prime without ZST might be the preferred choice now as by its different memory management it is not affected by the problem described here. For large heapsizes (-Xmx setting) of hundreds of GBytes the ZST component adds performance advantages for most applications.
If you get this error when trying to launch an application it means that Azul Zulu Prime JVM was unable to reserve enough memory to launch the application.
When you launch an application on Azul Zulu Prime JVM it reserves some of your system's RAM for its own use. At a minimum Azul Zulu Prime JVM will reserve a chunk of memory equal to your heap size (Xmx). If no other Azul Zulu Prime JVM apps are already running it will reserve an additional chunk of memory, usually about 7% of system RAM, for the Azul Zulu Prime JVM Contingency Memory and Pause Prevention pools.
If Azul Zulu Prime JVM can't reserve all of the memory that it needs it will throw this error: Memory management: unable to fund java heap account and your application won't start.
You can check system memory usage with the 'free' and 'zing-ps -s' command. The zing-ps command also shows the absolute maximum upper limit available for -Xmx values. Those are usually defined as 75% or 85% of the system RAM in /etc/zing/pmem.conf depending on the Azul Zulu Prime JVM version.
This failure to start can also happen if there are not enough free 2MB pages and 4MB pages for Azul Zulu Prime JVM available due to memory fragmentation. To check that, please run "grep Normal /proc/buddyinfo" and look at the last two columns to see if there are sufficient 2 and 4 MBytes pages.
Example of one machine with zero 2M and 4M pages available:
$ grep Normal /proc/buddyinfo
Node 0, zone Normal 168 69 184 186 182 109 71 386 492 0 0
If no large other processes are occupying memory, then the cause of memory fragmentation might be a high usage activity of the Linux page cache (file system cache). In that situation you can tell the operating system to write back the cache to disk to free memory. Please take care when using the following on a production system if an application is already running in parallel on it as writing all file system cache content back to disk can take seconds to a few minutes on machines with hundreds of GBytes of RAM and temporarily increases I/O load significantly!
To flush the page cache (file system cache):
echo 1 | sudo tee /proc/sys/vm/drop_caches
Since ZST 5.21.7 this situation is resolved much better with Azul Zulu Prime JVM automatically. Please consider upgrading the ZST component if you experience this problem often. ZST is available for download at http://www.azul.com/software-downloads-and-documents/.
In addition since ZST 5.21.7, an enhanced memory defragmentation can be enabled in Azul Zulu Prime JVM: https://docs.azul.com/zing/index.htm#ZingAppA_EnhancedLinuxMemoryDefragmentation.htm
If the recommendations above don't work for you, reboot the system or contact our support: https://www.azul.com/support/