News

BellSoft Liberica Release

BellSoft, developer of the Liberica JDK and a leading contributor to OpenJDK, has released version 23.0 of its Liberica Native Image Kit (NIK) with a host of bug fixes, enhancements, and new features, including ParallelGC as an experimental feature.

The Liberica NIK is a multilingual tool designed to transform applications into performant native images. It's based on GraalVM, a Java Virtual Machine (JVM) and Java Development Kit (JDK) created by Oracle. 

Historically, GraalVM Native Image technology has used only SerialGC in the GraalVM Community Edition (a single-threaded "stop-the-world" garbage collector) and G1 (Garbage-First) GC in the Enterprise Edition. SerialGC uses a single thread for the garbage collection process and freezes all threads while performing the collection, which leads to increased latency. ParallelGC uses several "worker threads" to scan the objects, which accelerates the GC procedure.

GraalVM's just-in-time (JIT) compiler and ahead-of-time (AOT) compilation provide almost instant startup of applications (native images), which is critical for specific cloud services such as Lambdas. But the implementation of ParallelGC in GraalVM CE means that native images will have significantly lower latency.

The default setting is one thread per CPU core, the company says, with a max amount of eight. The number of worker threads can be set at runtime with the -XX:ParallelGCThreads=N option, adding "to activate ParallelGC, use the --gc=parallel flag at image build time." The threads are activated at startup, which affects the startup time slightly, the company says. ParallelGC reuses most of the SerialGC code and allocates memory in thread-local fashion to minimize interference between worker threads.

The list of other improvements in Liberica NIK 23.0 includes:

  1. Add JFR ThreadCPULoad event implementation
  2. Thread user CPU time implementation for LinuxThreadCpuTimeSupport.getThreadCpuTime() method
  3. URLConnection.getContentType() returns null for html resource
  4. Remove type checks from JNI-to-Java call stubs, which can break compatibility
  5. Add support for TrayIcon on macOS and Windows

BellSoft makes and supports the Liberica Java Development Kit (JDK) and solutions for "business challenges" in server, cloud, and IoT applications of Java technology. The company says the Liberica JDK is currently used on millions of servers and desktops around the world. Liberica JDK for embedded is a Java runtime for embedded systems that aims to take advantage of the full functionality of Java, but with enhanced performance and security on ARM-based architectures.

Currently, ParallelGC is available for macOS and Linux as an experimental feature not intended for production use. Interested developers can download the new version of Liberica NIK from the Download Center.

About the Author

John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS.  He can be reached at [email protected].