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.

  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

payara qube logo 5 minutes
Payara

Payara Cloud Is Now part of Payara Qube family of Unified Platforms for Enterprise Java

Payara Cloud is becoming part of Payara Qube family of Java application deployment runtimes. This move reflects how the […]

Payara promotional graphic showing transition from Spring to Jakarta EE, including technology logos, a code icon and arrows leading from Spring to Jakarta EE. 6 minutes
Jakarta EE

From Spring Boot To Jakarta EE 11: How Payara Starter Eases The Transition

If you’ve been living in the Spring ecosystem, you’re used to fast project setup. Spring Initializr gives you a […]

Promotional graphic for a podcast episode titled “Why Open Source is the Future of Business Innovation - A conversation with Arun Gupta”. The podcast is hosted by Payara Community. The right side features a photo of the speaker, Arun Gupta, labeled as a “VP, Developer Experience at JetBrains”. The design uses dark blue and teal backgrounds with coral and fish illustrations. 2 minutes
Community

Payara Podcast – Why Open Source is the Future of Business Innovation – A Conversation with Arun Gupta

Open source is no longer a developer-only concern — it’s at the heart of how modern businesses innovate, build […]