Score:1

Does Ubuntu 20.04 LTS have an upper memory limit for Java processes?

us flag

I've got this problem: There is a server running "Ubuntu 20.04.1 LTS" and a JDK 8 application. The machine has 256 GB of memory.

Currently the JVM is started with the arguments -Xms25g -Xmx25g, however I want the JVM to use 32g or even more and I want to set the size immediately so that it's reserved and not calculated at runtime.

If I start the JVM with -Xms32g -Xmx32g it crashes after startup, with 25gb it doesn't.

The JVM wrote an error dump, starting with

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fe590e47acb, pid=778060, tid=0x00007fdd5d090700
#
# JRE version: OpenJDK Runtime Environment (8.0_282-b08) (build 1.8.0_282-8u282-b08-0ubuntu1~20.04-b08)
# Java VM: OpenJDK 64-Bit Server VM (25.282-b08 mixed mode linux-amd64 )
# Problematic frame:
# V  [libjvm.so+0x87dacb]
...

Otherwise there is no exception or error written in any logs I checked.

So I wonder whether there is a limit somewhere I'm not aware of?

guiverc avatar
cn flag
Are you asking about Ubuntu Core 20? or Ubuntu 20.04 LTS, as 20 & 20.04 are used by different Ubuntu products & you mention both.
in flag
The `-xms` option sets the initial size, but is not a minimum reserved amount as GC will come along and reduce the allocated memory if any can be freed. `-xmx` sets a maximum *heap* size, but this is not a memory limit for the JVM, which can use a great deal more than the amount set aside just for the heap. As there is no information regarding what it is you’re trying to run, it will be difficult to offer alternative numbers. That said, these two values do not need to match. Consider trying something like `-xms16g -xmx32g` and see if the exception persists
us flag
Hi @matigo, well it does not matter what my application does. Maybe it does nothing but nonetheless I want to give it 64g, so why is it not possible on Ubuntu 20.04 LTS?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.