<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/jvm-on-unikernel-nanos-gc-trade-offs-and-heap-uncommit-xiwgwg4rr" -->

---
title: JVM on Unikernel Nanos — GC trade-offs and heap uncommit
description: Five HotSpot garbage collectors, Serial, Parallel, G1, ZGC, and Shenandoah, all run successfully on the Nanos unikernel using a standard Eclipse Temurin 25 JVM...
canonical: https://daily.dev/posts/jvm-on-unikernel-nanos-gc-trade-offs-and-heap-uncommit-xiwgwg4rr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: JVM on Unikernel Nanos — GC trade-offs and heap uncommit | daily.dev
og:description: Five HotSpot garbage collectors, Serial, Parallel, G1, ZGC, and Shenandoah, all run successfully on the Nanos unikernel using a standard Eclipse Temurin 25 JVM...
og:url: https://daily.dev/posts/jvm-on-unikernel-nanos-gc-trade-offs-and-heap-uncommit-xiwgwg4rr
og:image: https://api.daily.dev/og/posts/XIWGwg4rr.png
og:image:alt: JVM on Unikernel Nanos — GC trade-offs and heap uncommit
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# JVM on Unikernel Nanos — GC trade-offs and heap uncommit

**[Foojay.io](https://daily.dev/sources/foojayio)** · 14 min read · 1 upvotes · 0 comments

## Summary

Five HotSpot garbage collectors, Serial, Parallel, G1, ZGC, and Shenandoah, all run successfully on the Nanos unikernel using a standard Eclipse Temurin 25 JVM with no modifications. Testing with the Renaissance page-rank benchmark on Oracle Cloud ARM64 reproduces trends from an earlier Akamas study on Linux: Parallel GC cuts execution time by 20.7% and peak heap by 38.2% versus G1, and ZGC achieves pauses around 0.04 ms. Heap uncommit also works: G1 repeatedly releases committed heap back to about 0.5 GB after garbage collection cycles, and ZGC and Shenandoah release memory too when uncommit is enabled via flags like -XX:ZUncommitDelay. Setting -Xms equal to -Xmx disables uncommit entirely.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://foojay.io/today/jvm-on-unikernel-nanos-gc-trade-offs-and-heap-uncommit>

## Questions this post answers

### Does ZGC's heap uncommit feature work when running Java on the Nanos unikernel?

Yes, ZGC successfully uncommits unused heap memory on Nanos when enabled. In a test with -Xms1g -Xmx8g and -XX:ZUncommitDelay=5, the GC log recorded 20 Uncommitted events ranging from 4 to 468 MB each, totaling about 7.7 GB of cumulative uncommit, with committed heap fluctuating between 6.9 and 7.4 GB under continuous load.

_Anyone sizing JVM heaps for unikernel or constrained deployments can track GC behavior details like this on daily.dev._

### How much does switching from G1 to Parallel GC improve Java application performance?

Switching from G1 to Parallel GC reduced execution time by 20.7% and peak heap usage by 38.2% in a Renaissance page-rank benchmark run on an ARM64 Nanos unikernel with Eclipse Temurin 25. This closely matches an earlier Akamas study on Linux with OpenJDK 15, which found a 22% reduction in execution time and 30% reduction in memory usage when switching from G1 to Parallel.

_Developers picking a garbage collector for a Java workload can compare trade-offs like these on daily.dev._

### Can I run a full JVM with G1, ZGC, or Shenandoah garbage collectors on a unikernel?

Yes, all five major HotSpot garbage collectors, Serial, Parallel, G1, ZGC, and Shenandoah, run successfully on the Nanos unikernel using a standard Eclipse Temurin 25 distribution with no modifications to the JVM or collectors. ZGC and Shenandoah require nontrivial kernel memory-management support, including multiple mappings of the same physical memory and runtime memory commit and release, all of which Nanos supports.

_Teams evaluating unikernels for Java workloads can follow JVM compatibility findings like this on daily.dev._

## Similar posts on daily.dev

- [foojay – a place for friends of OpenJDK](https://daily.dev/posts/foojay-a-place-for-friends-of-openjdk-fgo2ektwa) · Foojay.io · 0 upvotes · 0 comments
- [JEP 545: Faster Startup and Warmup with ZGC](https://daily.dev/posts/jep-545-faster-startup-and-warmup-with-zgc-epicfdqv4) · Inside Java · 4 upvotes · 0 comments
- [The Ultimate 10 Years Java Garbage Collection Guide \(2016–2026\) – Choosing the Right GC for Every Workload](https://daily.dev/posts/the-ultimate-10-years-java-garbage-collection-guide-2016-2026-choosing-the-right-gc-for-every-wo-gcjhfz5py) · Jakarta EE · 3 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java), [#jvm](https://daily.dev/tags/jvm)

[View this post on daily.dev](https://daily.dev/posts/jvm-on-unikernel-nanos-gc-trade-offs-and-heap-uncommit-xiwgwg4rr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"JVM on Unikernel Nanos — GC trade-offs and heap uncommit","url":"https://daily.dev/posts/jvm-on-unikernel-nanos-gc-trade-offs-and-heap-uncommit-xiwgwg4rr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/jvm-on-unikernel-nanos-gc-trade-offs-and-heap-uncommit-xiwgwg4rr"},"datePublished":"2026-10-28T00:51:11.892Z","dateModified":"2026-10-28T03:56:25.698Z","description":"Five HotSpot garbage collectors, Serial, Parallel, G1, ZGC, and Shenandoah, all run successfully on the Nanos unikernel using a standard Eclipse Temurin 25 JVM...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e1910f12583ee8880490f4c5659583bb?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e1910f12583ee8880490f4c5659583bb?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Foojay.io","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Foojay.io","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1820f6a6ae944760aa322b67ed85f848","url":"https://daily.dev/sources/foojayio"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/jvm-on-unikernel-nanos-gc-trade-offs-and-heap-uncommit-xiwgwg4rr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java,jvm","timeRequired":"PT14M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Foojay.io","item":"https://daily.dev/sources/foojayio"},{"@type":"ListItem","position":3,"name":"JVM on Unikernel Nanos — GC trade-offs and heap uncommit"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/jvm-on-unikernel-nanos-gc-trade-offs-and-heap-uncommit-xiwgwg4rr#faq","mainEntity":[{"@type":"Question","name":"Does ZGC's heap uncommit feature work when running Java on the Nanos unikernel?","acceptedAnswer":{"@type":"Answer","text":"Yes, ZGC successfully uncommits unused heap memory on Nanos when enabled. In a test with -Xms1g -Xmx8g and -XX:ZUncommitDelay=5, the GC log recorded 20 Uncommitted events ranging from 4 to 468 MB each, totaling about 7.7 GB of cumulative uncommit, with committed heap fluctuating between 6.9 and 7.4 GB under continuous load. Anyone sizing JVM heaps for unikernel or constrained deployments can track GC behavior details like this on daily.dev."}},{"@type":"Question","name":"How much does switching from G1 to Parallel GC improve Java application performance?","acceptedAnswer":{"@type":"Answer","text":"Switching from G1 to Parallel GC reduced execution time by 20.7% and peak heap usage by 38.2% in a Renaissance page-rank benchmark run on an ARM64 Nanos unikernel with Eclipse Temurin 25. This closely matches an earlier Akamas study on Linux with OpenJDK 15, which found a 22% reduction in execution time and 30% reduction in memory usage when switching from G1 to Parallel. Developers picking a garbage collector for a Java workload can compare trade-offs like these on daily.dev."}},{"@type":"Question","name":"Can I run a full JVM with G1, ZGC, or Shenandoah garbage collectors on a unikernel?","acceptedAnswer":{"@type":"Answer","text":"Yes, all five major HotSpot garbage collectors, Serial, Parallel, G1, ZGC, and Shenandoah, run successfully on the Nanos unikernel using a standard Eclipse Temurin 25 distribution with no modifications to the JVM or collectors. ZGC and Shenandoah require nontrivial kernel memory-management support, including multiple mappings of the same physical memory and runtime memory commit and release, all of which Nanos supports. Teams evaluating unikernels for Java workloads can follow JVM compatibility findings like this on daily.dev."}}]}
```

