32-bit processes & Java heap size
JeffTownsend@IBM 270000F26V Visits (3851)
For an OMNIbus Web GUI server that services requests for lots of users there may be a need to increase the Java heap size that is allocated for the server. However, it should be noted that for 32-bit processes there is an upper limit for the amount of memory that can be used: 4GB. This cannot be changed and is in force even if your server has a 64-bit processor, 64-bit Operating System and more than 4GB memory. This limit has some knock-on effects to the amount of heap that can practically be allocated.
The memory used by the Web GUI server is split into two: heap and JVM. The heap is used to store all the data and objects that are created in memory in the Web GUI server. The JVM memory is used by Java to manage itself, the heap and for various other housekeeping tasks such as keeping track of threads.
This arrangement effectively means that the memory potentially available to the JVM in a 32-bit process = 4GB - heap. (This assumes that the server has 4GB free in the first place.)
When the heap is set too high then it is possible that the server can run out of JVM memory. For example: a 3.5G heap setting would only leave 0.5G for the JVM memory which may not be enough. If you have a high heap size setting and are getting errors such as "native memory exhausted" or "Unable to create a Thread" then this is a good indicator that you are running out of JVM memory.
There are two ways to solve this problem: