<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/803tN2ccW" -->

---
title: Java 21 to 25: 22.7% increase in throughput (RPS) and a...
description: A real-world benchmarking report from Trendyol's International Payment team comparing Java 21 and Java 25 (LTS) performance. Upgrading to Java 25 delivered a...
canonical: https://daily.dev/posts/java-21-to-25-22-7-increase-in-throughput-rps-and-a-20-1-reduction-in-average-latency--803tn2ccw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Java 21 to 25: 22.7% increase in throughput (RPS) and a 20.1% reduction in average latency. | daily.dev
og:description: A real-world benchmarking report from Trendyol's International Payment team comparing Java 21 and Java 25 (LTS) performance. Upgrading to Java 25 delivered a...
og:url: https://daily.dev/posts/java-21-to-25-22-7-increase-in-throughput-rps-and-a-20-1-reduction-in-average-latency--803tn2ccw
og:image: https://api.daily.dev/og/posts/803tN2ccW.png
og:image:alt: Java 21 to 25: 22.7% increase in throughput (RPS) and a 20.1% reduction in average latency.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Java 21 to 25: 22.7% increase in throughput (RPS) and a 20.1% reduction in average latency.

**[Trendyol Tech](https://daily.dev/sources/trendyoltech)** · 5 min read · 21 upvotes · 1 comments

## Summary

A real-world benchmarking report from Trendyol's International Payment team comparing Java 21 and Java 25 (LTS) performance. Upgrading to Java 25 delivered a 22.7% increase in throughput (RPS) and a 20.1% reduction in average latency, along with 63–120MB lower RAM usage and 50% less network data overhead. Key migration notes include enabling -XX:+UseCompactObjectHeaders (not on by default), upgrading Gradle to v9.1+ for Java 25 compatibility, and rebuilding rather than just swapping the runtime image to fully benefit from optimized class/data layout. Post-production rollout showed ~10% memory reduction.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/trendyol-tech/java-21-to-25-22-7-increase-in-throughput-rps-and-a-20-1-reduction-in-average-latency-c5d7c5e7b78c>

## Questions this post answers

### What performance improvements can I expect from upgrading a Java 21 service to Java 25 LTS?

Upgrading from Java 21 to Java 25 LTS can yield a 22.7% increase in throughput (RPS) and a 20.1% reduction in average latency, based on production benchmarking under identical Docker resource limits (2 CPU cores, 2GB RAM). P99 latency under heavy load dropped from roughly 13 seconds on Java 21 to about 7 seconds on Java 25, alongside a 63-120MB lower memory footprint and 50% less network data overhead.

_daily.dev surfaces real-world JVM upgrade benchmarks for teams weighing a move to Java 25._

### Do I need to enable any flag to get compact object headers in Java 25?

Yes, -XX:+UseCompactObjectHeaders must be explicitly enabled, as it is not turned on by default in Java 25. Simply switching the runtime image without this flag fails to optimize the runtime class and data layout, so a full migration process redesign rather than a plain image swap is required to see the memory and layout benefits.

_teams planning a Java 25 rollout track flag-level gotchas like this one on daily.dev._

### What Gradle version do I need to build a project on Java 25?

Gradle 9.1 or above is required for full Java 25 support; Gradle 8.4 and other versions lower than 9.1 do not fully support Java 25. Teams currently on Gradle 8.4 with Java 21 need to upgrade their build tooling as part of the Java 25 migration, which adds its own one-time compatibility challenges alongside the JVM upgrade.

_developers upgrading build tooling alongside a JVM bump check compatibility notes like this on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@malochak** · 0 upvotes

> I’m running Kotlin/Spring app on shared resources, I was shocked how little ram it takes

## Similar posts on daily.dev

- [Java Performance Update: From JDK 21 to JDK 25 – Inside.java](https://daily.dev/posts/java-performance-update-from-jdk-21-to-jdk-25-inside-java-frayw9b7n) · Inside Java · 0 upvotes · 0 comments
- [Java 25: What’s New?](https://daily.dev/posts/java-25-what-s-new--9ailst9zb) · Foojay.io · 32 upvotes · 2 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#java](https://daily.dev/tags/java), [#jvm](https://daily.dev/tags/jvm)

[View this post on daily.dev](https://daily.dev/posts/java-21-to-25-22-7-increase-in-throughput-rps-and-a-20-1-reduction-in-average-latency--803tn2ccw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Java 21 to 25: 22.7% increase in throughput (RPS) and a 20.1% reduction in average latency.","url":"https://daily.dev/posts/java-21-to-25-22-7-increase-in-throughput-rps-and-a-20-1-reduction-in-average-latency--803tn2ccw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/java-21-to-25-22-7-increase-in-throughput-rps-and-a-20-1-reduction-in-average-latency--803tn2ccw"},"datePublished":"2026-07-10T19:25:47.275Z","dateModified":"2026-09-13T18:50:15.534Z","description":"A real-world benchmarking report from Trendyol's International Payment team comparing Java 21 and Java 25 (LTS) performance. Upgrading to Java 25 delivered a...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"Trendyol Tech","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Trendyol Tech","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/67480ca531174b03952be35abd6572a9","url":"https://daily.dev/sources/trendyoltech"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/java-21-to-25-22-7-increase-in-throughput-rps-and-a-20-1-reduction-in-average-latency--803tn2ccw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":21},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"performance,java,jvm","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Trendyol Tech","item":"https://daily.dev/sources/trendyoltech"},{"@type":"ListItem","position":3,"name":"Java 21 to 25: 22.7% increase in throughput (RPS) and a 20.1% reduction in average latency."}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/java-21-to-25-22-7-increase-in-throughput-rps-and-a-20-1-reduction-in-average-latency--803tn2ccw","comment":[{"@type":"Comment","text":"I’m running Kotlin/Spring app on shared resources, I was shocked how little ram it takes","datePublished":"2026-07-13T19:56:55.614Z","url":"https://daily.dev/posts/803tN2ccW#c-8HxrOxipZ","author":{"@type":"Person","name":"Konrad Małocha","url":"https://daily.dev/malochak","image":"https://lh3.googleusercontent.com/a/ACg8ocLcTM20oI5XEFCYPml73Z6F6nLr_xzDHBZH-yAeaMzTi9kskdcL=s96-c"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/java-21-to-25-22-7-increase-in-throughput-rps-and-a-20-1-reduction-in-average-latency--803tn2ccw#faq","mainEntity":[{"@type":"Question","name":"What performance improvements can I expect from upgrading a Java 21 service to Java 25 LTS?","acceptedAnswer":{"@type":"Answer","text":"Upgrading from Java 21 to Java 25 LTS can yield a 22.7% increase in throughput (RPS) and a 20.1% reduction in average latency, based on production benchmarking under identical Docker resource limits (2 CPU cores, 2GB RAM). P99 latency under heavy load dropped from roughly 13 seconds on Java 21 to about 7 seconds on Java 25, alongside a 63-120MB lower memory footprint and 50% less network data overhead. daily.dev surfaces real-world JVM upgrade benchmarks for teams weighing a move to Java 25."}},{"@type":"Question","name":"Do I need to enable any flag to get compact object headers in Java 25?","acceptedAnswer":{"@type":"Answer","text":"Yes, -XX:+UseCompactObjectHeaders must be explicitly enabled, as it is not turned on by default in Java 25. Simply switching the runtime image without this flag fails to optimize the runtime class and data layout, so a full migration process redesign rather than a plain image swap is required to see the memory and layout benefits. teams planning a Java 25 rollout track flag-level gotchas like this one on daily.dev."}},{"@type":"Question","name":"What Gradle version do I need to build a project on Java 25?","acceptedAnswer":{"@type":"Answer","text":"Gradle 9.1 or above is required for full Java 25 support; Gradle 8.4 and other versions lower than 9.1 do not fully support Java 25. Teams currently on Gradle 8.4 with Java 21 need to upgrade their build tooling as part of the Java 25 migration, which adds its own one-time compatibility challenges alongside the JVM upgrade. developers upgrading build tooling alongside a JVM bump check compatibility notes like this on daily.dev."}}]}
```

