DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Upgrade Guide To Spring Boot 3.0 for Spring Data JPA and Querydsl
  • Improving Backend Performance Part 1/3: Lazy Loading in Vaadin Apps
  • Spring Data: Easy MongoDB Migration Using Mongock
  • Introduction to Spring Boot and JDBCTemplate: Refactoring to SpringData JPA

Trending

  • Manual Sharding in PostgreSQL: A Step-by-Step Implementation Guide
  • Cosmos DB Disaster Recovery: Multi-Region Write Pitfalls and How to Evade Them
  • How To Develop a Truly Performant Mobile Application in 2025: A Case for Android
  • Agile and Quality Engineering: A Holistic Perspective
  1. DZone
  2. Coding
  3. Frameworks
  4. Performance Comparison: Spring Boot + Spring Data vs. Micronaut + GORM

Performance Comparison: Spring Boot + Spring Data vs. Micronaut + GORM

This article analyzes the performance differences between Spring Boot and Spring Data versus Micronaut and GORM.

By 
Ravi Isnab user avatar
Ravi Isnab
·
Updated Oct. 23, 18 · Analysis
Likes (8)
Comment
Save
Tweet
Share
15.4K Views

Join the DZone community and get the full member experience.

Join For Free

------------------------------------------------------

Update 10/23/2018 12:30 pm PDT:

------------------------------------------------------

With the latest release of micronautv1.0.0, it matches Spring without any changes to bombardier i.e. it's keeping the connection alive by default now.

For more information: check the original blog post.

Thanks to Micronaut team to responding so quickly to this post.

------------------------------------------------------

Update 10/23/2018 8:45 am PDT:

------------------------------------------------------

With the keep-alive connection header while testing with bombardier, micronaut provides the same results as Spring. Please review blog to see the most updated results.

You can find the result output for all of the run(s) here.

If you are interested in latest run with bombardier with keep-alive that output is here.

All the result outputs are here.

------------------------------------------------------

Update 10/23/2018 7:38 am PDT:
------------------------------------------------------


I have been working with Micronaut's team and they have quickly found the reason why bombardier tests provide such different results. bombardier closes the connection after every request and hence the huge discrepancy in the result. To address this Micronaut 1.0.GA would release with Http 1.1 default of keeping the connection open. I will be updating this article as soon as I can get hands on it. I will be updating the article pretty soon here with the results of providing Connection:keep-alive header with bombardier on Micronaut 1.0.0.RC3

---------------------------------------------------------------------------------------------------------------------------

Recently, I came across the Micronaut framework and found it to be very interesting. It provides a low memory footprint and fast bootup time. I have used Micronaut now for a couple of non-database-backed applications and it starts up really fast and is performing really well. In my performance tests comparing a Micronaut app to a Spring app, Micronaut performed better (this will be covered in a separate post).

The next step for me was to see if I could recommend Micronaut for database-backed applications. Micronaut works with straight-up Hibernate and even provides GORM (a Spring Data alternative). I am already familiar with Spring Data, so I am curious about GORM. I decided to give it a spin and see how it holds up compared to a Spring Data app.

You can find my repository on GitHub.

Details of the test:

  • This is a very basic application with a single domain object: Person.
  • Three records were inserted into an in-memory H2 database at startup time.
  • Only GETs are tested.
  • I haven't tweaked any of the apps for better performance — this is as out-of-the-box as we can get.
  • Spring Boot v2.0.6 is used Micronaut: 1.0.0.RC3 is used.
  • OS: MacOS High Sierra, 16 GB RAM, 2.5 Ghz Intel Core I7.
  • The mvn and java versions are as follows:
$ mvn -version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T12:39:06-07:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_162, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
  • I used different tools (bombardier, ab, loadtest for performance tests since each one of them offers different results).

Results

Tabular comparison: Total time to complete requests = total time

Image title

Summary

  • Micronaut has a much faster startup time than Spring.
  • With bombardier, the Spring data app blows the Micronaut app out of the water as far as throughput is concerned.
  • With ab, micronaut wins by a slight margin.
  • With loadtest, it's too small a difference to decide.

Next Steps

This is probably going to be an in-progress article. I will add more information as I gain it. I will

  • Try a different load test tool.
  • Try loading these applications in a container to take my machine out of the picture.
  • Try a more real-world scenario, e.g. more entities and real relationships between them and constraints on domain classes.

Please feel free to share your thoughts/comments on the article. Try this out on your machine and feel free to share your results. Just be nice!

Spring Framework Spring Data Spring Boot Data (computing) Gorm (computing) Comparison (grammar) app

Published at DZone with permission of Ravi Isnab, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Upgrade Guide To Spring Boot 3.0 for Spring Data JPA and Querydsl
  • Improving Backend Performance Part 1/3: Lazy Loading in Vaadin Apps
  • Spring Data: Easy MongoDB Migration Using Mongock
  • Introduction to Spring Boot and JDBCTemplate: Refactoring to SpringData JPA

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!