3 minutes
End-of-Life Technology: How to Drive Innovation Without Compromising Stability
When legacy systems approach end-of-life (EOL), enterprise IT teams typically face the choice of moving forward at all costs […]
Payara Micro is designed from the ground-up to be nimble for lightweight, fast deployments. As such, it is ideal for microservices and cloud environments. However, there may be instances where you may want to squeeze every bit of performance out of it. In such cases, the minimalist configuration of Payara Micro comes in handy.
Thanks to this, you can cut Payara Micro’s footprint and speed up startup times, improving the efficiency of your app even more. In effect, depending on your application, you may be able to slash the startup time by up to a third! Here’s how.
If you’re running Payara Micro in a container or a resource-constrained environment, every megabyte and millisecond counts. Minimalist configurations help you optimize resource usage and get your apps up and running quickly in such tight environments.
Two common areas to streamline are clustering and Hazelcast. Clustering is great for load balancing and high availability, but it adds overhead. If you don’t need these features, you can safely disable clustering to reduce memory usage and improve startup time. Hazelcast provides a distributed data grid for caching and session replication. If these features are not useful within your application, you can disable Hazelcast too.
Here’s the command-line option to disable both clustering and Hazelcast:
java -jar payara-micro.jar --noHazelcast
You can also pass these options in a domain.xml file or through the MicroProfile Config API.
As an example, the start time for Payara Micro with Hazelcast is about 4.4 seconds the first time.
Payara Micro 6.2024.5 #badassmicrofish (build 18) ready in 4,432 (ms)
Starting the same instance without Hazelcast using the above command, the startup time drops to about 1.5 seconds.
Payara Micro 6.2024.5 #badassmicrofish (build 18) ready in 1,578 (ms)
JVM Options: Experiment with JVM options, such as garbage collection settings and class data sharing, to optimize memory usage.
Minimalist configurations are a great way to squeeze the most out of Payara Micro, especially in resource-constrained environments. By carefully choosing which features to enable, you can further optimize startup speed and efficiency without sacrificing the core functionality of your application. Download Payara Micro now to get started! Happy Coding!
Share:
3 minutes
When legacy systems approach end-of-life (EOL), enterprise IT teams typically face the choice of moving forward at all costs […]
3 minutes
Working with enterprise Java databases can sometimes feel like swimming upstream. Jakarta EE 11’s Jakarta Data helps developers glide […]
5 minutes
Payara Cloud is becoming part of Payara Qube family of Java application deployment runtimes. This move reflects how the […]