question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JAX-RS application - (slightly) increased time to first OK request between Quarkus 2.2 and 2.4

See original GitHub issue

Describe the bug

We started to see more failed daily GitHubAction CI runs for https://github.com/quarkus-qe/quarkus-startstop The reason is that jax-rs-minimal (using RESTEasy Classic) app often doesn’t hit the threshold for time to first OK request.

Together with @kshpak we did some local runs on MBP 2019 with 6-core Core i7 / SSD drive and Lenovo notebook with i7-8650U (8cores) / SSD drive.

We used GraalVM 21.2 Java11 and checked various Quarkus 2.x versions, we see some increase in the results. The tests we executed (details in step to reproduce) runs 100 iterations of start/stop cycles and calculates avarage without minimum and maximum values. It’s relatively simple approach, but it helps to easily monitor trends in timeToFirstOKRequest times.

Before the testing we switched off as many applications and services as possible. Only terminal window with power cable attached.

MBP - MINIMAL App (AVG timeToFirstOKRequest without min and max values) 2.4.0.Final + GraalVM 21.2

  • 38 ms
  • 41 ms
  • 37 ms

2.2.3.Final + GraalVM 21.2

  • 36 ms
  • 32 ms

Lenovo - MINIMAL App (AVG timeToFirstOKRequest without min and max values) 2.4.0.Final + GraalVM 21.2 Java11

  • 20.1 ms
  • 18.5 ms

2.2.3.Final + GraalVM 21.2 Java11

  • 17.7 ms
  • 18.1 ms

(the diff between Lenovo and MBP is probable because Lenovo has more powerfull CPU with more cores, on MBP I have SentinelOne which can’t be turned off as I have company notebook with managed macOS)

Expected behavior

Similar results between Quarkus 2.x versions

Actual behavior

Quarkus 2.4 has higher time for the first OK request than Quarkus 2.2.

How to Reproduce?

Get https://github.com/quarkus-qe/quarkus-startstop

Use GraalVM 21.2 Java11

Run

  • mvn clean verify -Ptestsuite -Dtest=StartStopTest#jaxRsMinimalNative -Dquarkus.version=2.4.0.Final
  • mvn clean verify -Ptestsuite -Dtest=StartStopTest#jaxRsMinimalNative -Dquarkus.version=2.2.3.Final

Check AVG timeToFirstOKRequest without min and max values line.

Optionally do more iterations of start/stop cycle

diff --git a/testsuite/src/it/java/io/quarkus/ts/startstop/StartStopTest.java b/testsuite/src/it/java/io/quarkus/ts/startstop/StartStopTest.java
index a27707c..978fcf9 100644
--- a/testsuite/src/it/java/io/quarkus/ts/startstop/StartStopTest.java
+++ b/testsuite/src/it/java/io/quarkus/ts/startstop/StartStopTest.java
@@ -98,7 +98,7 @@ public class StartStopTest {

             List<Long> rssKbList = new ArrayList<>(10);
             List<Long> timeToFirstOKRequestList = new ArrayList<>(10);
-            for (int i = 0; i < 10; i++) {
+            for (int i = 0; i < 100; i++) {
                 // Run
                 LOGGER.info("Running... round " + i);
                 runLogA = new File(appDir.getAbsolutePath() + File.separator + "logs" + File.separator + mvnCmds.name().toLowerCase() + "-run.log");

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

GraalVM 21.2 Java11

Quarkus version or git rev

Quarkus 2.x

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rsvobodacommented, Nov 2, 2021

I did my checks yesterday during the night, I think I did some runs with 999-SNAPSHOT. I will check my notes or rerun it. @kshpak please build Quarkus main and run the tests with 999-SNAPSHOT on your Lenovo machine.

0reactions
geoandcommented, Nov 3, 2021

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing REST Services with RESTEasy Reactive - Quarkus
RESTEasy Reactive is a new JAX-RS implementation written from the ground up to work on our common Vert.x layer and is thus fully...
Read more >
RESTEasy Classic - Quarkus
This guide is about RESTEasy Classic which used to be the default JAX-RS implementation until Quarkus 2.8. It is now recommended to use...
Read more >
Jakarta RESTful Web Services - Quarkus
A JAX-RS application consists of one or more resources (see Chapter Resources) and zero or more providers (see Chapter Providers).
Read more >
Writing Your Own Extension - Quarkus
Quarkus extensions add a new developer focused behavior to the core offering, and consist of two distinct parts, buildtime augmentation and runtime ...
Read more >
Announcing RESTEasy Reactive - Quarkus
As you probably guessed from the name, this work is a new JAX-RS ... The application should also start slightly faster and consume...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found