Home United States USA — software Java 9 Will Adjust Memory Limits if Running with Docker

Java 9 Will Adjust Memory Limits if Running with Docker

328
0
SHARE

A first experimental change has been added to Java 9 so the JVM can understand that it is running within a container and adjust memory limits accordingly. Despite the increase in popularity of containers, many tools, including the JVM, still rely on the host’s parameters…
A first experimental change has been added to OpenJDK 9 so the JVM can understand that it is running within a container and adjust memory limits accordingly. Despite the increase in popularity of containers in the last few years, many tools, including the JVM, still rely on the host’s parameters to assess available resources, oftentimes running out of memory with baffling error messages. This change, that could be available to the public once Java 9 is released, tries to prevent many of those scenarios.
Container technologies such as Docker , Heroku or Kubernetes , among others, are a form of lightweight virtual machines based on the Linux operating system. Their reduced footprint means they can provide a very similar functionality to virtual machines faster and consuming fewer resources, but it also comes with disadvantages: while full-blown virtual machines simulate a whole stack of dedicated hardware, meaning existing software works mostly as expected, container technologies use the host’s hardware and OS, meaning that software that relies on host information might run unaware of the extra constraints that containers impose.

Continue reading...