March 24, 2023

VMware Tanzu Application Service increases its value with Spring Boot 3

In this blog, we dive deep into how Tanzu Application Service and Spring Boot 3 can drive significant application memory savings by making use of native images. 

DaShaun Carter has authored a pattern for developers to use new features with Spring Boot 3 and native images to reduce the memory consumption of Java Applications.

In his initial testing, DaShaun saw an approximate memory reduction of 25-75% within Application Instances running on the Tanzu Application Service. DaShaun achieved this by converting existing java applications to native images and using the binary buildpack within Tanzu Application Service instead of the traditional java buildpack and java virtual machine.

Let's deep dive into this DaShaun’s notes:

Below is an excerpt from DaShaun’s GitHub page:

<p>Description automatically generated

This is an example of 75% memory reduction when switching to native images and the binary buildpack using the same codebase.

Some of your Spring Boot 3 applications may be more cost-effective as native images. Spring Boot 3 with AOT processing can significantly reduce the memory footprint of the container needed to run your application.

There are many things to consider before moving forward with this conversion:

  • You will have no JVM to connect agents to
  • Some workloads will be more performant; some will be less performant – the classic “it depends” on your workload.
  • Balancing cost vs. value needs to be addressed.
    • Application performance changes + or – X%
    • Application costs could be reduced by 25-75%

There are thousands of workloads running on TAS today that could get a huge refund with minimal effort.

What will it take to see these benefits?

  1. Upgrade to Java 17 to see the performance benefits first.
  2. Upgrade to Spring Boot 3 to get the AOT native-image processing capabilities.
  3. Change your pipeline to deploy the binary native image instead of with Java buildpack

For most workloads, there will be zero code changes required. Some workloads that are referencing the javax.* packages, will need some attention. However, most IDEs make the javax to Jakarta changes automatically. There is also the Spring Boot Migrator that can handle those migrations at scale.

Check out DaShaun’s GitHub page to get the full details.

Explore native images with your applications.

While your mileage may vary from a performance perspective, transitioning to native images at scale could dramatically reduce overall foundation resource consumption. These savings could reduce the load on on-premises vSphere clusters or turn into actual cost savings by dialing down cloud spending with your hyperscaler of choice. 

At scale, even a 25% percent decrease in memory consumption could provide a significant cost saving. I have witnessed single applications running 1000s of instances across many Tanzu Application Service foundations. This could equate to 100s or 1000s of gigabytes of ram being allocated back to Diego for scheduling new applications.

To get the full details, check out DaShaun’s GitHub page to learn more about our making use of these new features within Tanzu Application Service!

Filter Tags

Tanzu Tanzu Application Service Blog Intermediate