Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Revamp the vertx-web-kotlinx benchmark, splitting code into different modules and adding new benchmark portions for the Expesed Vert.x SQL Client along with R2DBC and Exposed R2DBC as comparisons - #10560

Merged
msmith-techempower merged 67 commits into
TechEmpower:masterfrom
huanshankeji:vertx-web-kotlinx-exposed
Jan 14, 2026

Conversation

@ShreckYe

@ShreckYe ShreckYe commented Jan 11, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds a benchmark portion for the Exposed Vert.x SQL Client library as a replacement for the default Vert.x SQL client as the database backend in the vertx-web-kotlinx benchmark portion. Other database backends including R2DBC and Exposed R2DBC are added BTW for comparison. Common code is extracted and split into different modules to avoid downloading unnecessary dependencies when benchmarking a certain portion.

Misc changes:

  • Use Gradle Version Catalogs.
  • Bump dependencies to the latest.

Got `java.lang.IllegalStateException: Field offsetHours is not set`.
See commit 9cf28f1 for a failed attempt to try using kotlinx-datetime.
…s/Java/vertx/` from commit 057c25b to commit 1838aa5, and fix some typos

Some changes are not ported.

There is about 5% performance improvement in the JSON test as tested on my device.
…mprove the plaintext test performance

```
io.netty.channel.uring.IoUringIoHandler processCompletionsAndHandleOverflow
vertx: WARNING: CompletionQueue overflow detected, consider increasing size: 4096
```

This is still one warning when the value is set to 8192 as tested on my device, instead of many for the default 4096.
…and fix capitalization BTW

The "Requests/sec" result of Approach 1 is only 40% of Approach 3 as tested on my device.
…ng it and also catch Java NIO `SocketException` for developing on other OSs such as macOS and Windows

Tested with the `tfb` command on both macOS and Linux.
…Kotlin/ktor/ktor-exposed`

The following exception occurs when running the benchmark:

```
org.postgresql.util.PSQLException: Transaction isolation level 0 not supported.
```
… not supported.` with huanshankeji/exposed-vertx-sql-client@bb69856 published to Maven local, and fix some remaining issues in the benchmark code debugging with `tfb`

Here are some results with max parameters (threads, connections, number of queries) of interest as benchmarked on my device. The "single query" result is only 65% of that of `vertx-web-kotlinx`, which is not ideal. The "updates" result exceeds that of `vertx-web-kotlinx` by about 10%-15%, which needs to be looked into further. Setting `validateBatch = false` does not make noticeable difference.
PostgreSQL table names are case-insensitive.
…rWowRandom` `Random` instance every `Verticle
…client` to more explicitly compare with the `vertx-web-kotlinx` portion
Tests without the database are not needed here in this portion.
…t into the `vertx-web-kotlinx` portion and update the project structure

Changes:
* Split the project into multiple modules/subprojects.
* Update the project structure following a new project generated with `gradle init`.
* Partially adapt to Gradle version catalog (putting only the versions).
* Bump Kotlin to 2.3.0 which is just released BTW.

Common code is not extracted yet.
ShreckYe and others added 19 commits December 20, 2025 15:25
…match parameters in SQL statement` in the `r2dbc` `updates` test with Copilot
…ion: [08006] Cannot exchange messages because the request queue limit is exceeded` alternatively by not using pipelining
This doesn't fix the `r2dbc` `update` failure though.
…run the test several times to determine the optimal pool size
…dbc`, refactoring `CommonWithDbVerticle` to support optional transactions
…postgresql` `db` test several times with different (original and reverted) code before and after abstraction (introducing abstract classes and interfaces), Kotlin and Vert.x versions, and kotlinx-serialization `Json` configurations to investigate possible performance regressions

Results show no noticeable performance regressions. I first noticed some in the `db` test but they appear to be just measurement errors. The optimized `Json` improves the `json` test throughput with max parameters by about 5% as tested on my device but there is no noticeable difference in the `db` test.
…ose corresponding test fails"

This reverts commit 3f1e03e.

The wrong `update_url` was removed.
… Result publishers (#7)

* Initial plan

* Fix updateSortedWorlds to properly consume R2DBC batch update results

Co-authored-by: ShreckYe <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: ShreckYe <[email protected]>
@ShreckYe
ShreckYe marked this pull request as draft January 11, 2026 15:44
@ShreckYe ShreckYe changed the title Prereview of "Revamp the vertx-web-kotlinx benchmark, splitting code into modules, extracting common code, and adding new portions for the Expesed Vert.x SQL client along with R2DBC and Exposed R2DBC as comparisons" Revamp the vertx-web-kotlinx benchmark, splitting code into modules, extracting common code, and adding new portions for the Expesed Vert.x SQL client along with R2DBC and Exposed R2DBC as comparisons Jan 11, 2026
@ShreckYe ShreckYe changed the title Revamp the vertx-web-kotlinx benchmark, splitting code into modules, extracting common code, and adding new portions for the Expesed Vert.x SQL client along with R2DBC and Exposed R2DBC as comparisons Revamp the vertx-web-kotlinx benchmark, splitting code into different modules and adding new benchmark portions for the Expesed Vert.x SQL Client along with R2DBC and Exposed R2DBC as comparisons Jan 11, 2026
@ShreckYe
ShreckYe marked this pull request as ready for review January 12, 2026 01:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants