How Micro is Payara Micro?

Cloud & Microservices

4_fish_1_resized.jpgElastic Middleware describes middleware capable of expanding and contracting quickly on demand. A common example is the ability for an application server cluster to quickly expand the number of cluster nodes to meet an unpredicted surge in the level of traffic.


The whole philosophy of Payara Micro is to turn the idea of application servers on its head and change the perception that they are large, complex and unwieldy environments for building server side applications. So as part of our development we’ve done some analysis of how small the core runtime of Payara Micro is.

If you are familiar with the Eclipse Memory Analyzer Toolkit ; a fantastic tool that every Java developer should be aware of; you’ll know that it essentially analyzes JVM heap dumps to rapidly tell you which objects are holding the most memory in your JVM. As part of our Payara Micro tuning we recently ran MAT across a “raw” Payara Micro instance i.e. a server with clustering enabled but no applications deployed to determine the heap used and to look for tuning opportunities. So to get the data we fired up Payara Micro;

We then fired up jvisualvm and hit the “Heap Dump” button on the “Monitor” tab

jvisualvm

Opened up the heap dump in MAT and here’s the results;

MAT Results

As you can see Payara Micro only uses 17Mb of JVM Heap when running raw. Now that is micro!Why does that matter? Well a smaller core runtime leaves more memory available for your applications to use. It means less garbage collections for better performance. It means higher densities of deployments on cloud environments.It also means if you use the built in JSR 107 Caching capabilities you can store more data in memory across your Payara Micro Grid.

Now you may be thinking that’s all well and good but what about when running an application. So we also analysed the heap usage after we’d deployed a recent demonstration application we created for NetBeans day.The demo application isn’t complicated but consists of an entity bean, session bean, JAX-RS service; embedded Derby and a servlet and the NetBeans RESTful service test application so it does initialize and use most of the runtime components  and containers people use. The war was approximately 300Kb in size.

Diagram

If you’ve never seen the NetBeans Test app for RESTful web services it’s shown below for this application.

NetBeans Test app

So here’s the updated MAT results;

MAT results

25.6MB of heap used. We think this is pretty good. We hope you do to! We’d love you try out your applications and let us know the results.

Comments (1)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  1. mustafa can aloglu

    Is it possible to shrink the heap size more by using class loader white list?
    Tnks a lot.
    Can

Related Posts

SpringBoot Actuator Health for Microprofile Developers 7 minutes
Cloud & Microservices

Spring Boot Actuator Health for MicroProfile Developers

If you worked with MicroProfile Health, you already understand the value of exposing application health information through standardized endpoints. […]

Webinar banner for “High-Frequency Trading on Jakarta EE: GC Stress Testing with Azul C4 and Payara Micro,” March 25, 2026, 2 PM GMT. Features Azul and Payara Micro logos and speaker photos of Luqman Saeed, Jakarta EE Specialist, and Simon Ritter, Deputy CTO and Java Champion. 1 minute
Cloud & Microservices

High-Frequency Trading on Jakarta EE: Join Our Upcoming Live Webinar

Modern high-frequency trading (HFT) platforms operate under extreme performance constraints, processing tens of thousands of messages per second while […]

Illustration promoting the Payara Platform Community Survey, featuring bold text on a blue background alongside a clipboard with a checklist, star ratings, and check marks, with coral and fish graphics in an underwater theme. 1 minute
Community

Help Shape the Future of Payara Platform Community – Take Our 2026 Survey

Earlier this week, we’ve launched the 2026 Payara Platform Community Survey and we’d love to hear from you. If […]