grails-core icon indicating copy to clipboard operation
grails-core copied to clipboard

[Question] - Standalone container performance

Open mobilemindtec opened this issue 1 year ago • 2 comments

Issue description

I have a question about the performance of grails running a standalone container.

When I run ./gradlew bootRun my application responds 454413 in one minute. When I compile the application using ./gradlew war and run java -Dgrails.env=prod -server -Xmx2048M -jar build/libs/g6-app-0.1.war the same application only responds to 3132 requests in one minute.

I don't understand what it could be.

Grails 6.0.0
JVM java 20.0.2
Container Undertow

mobilemindtec avatar Sep 11 '23 12:09 mobilemindtec

I believe a possible reason for this is here https://github.com/spring-projects/spring-boot/issues/16471

Generally in my projects I use a tomcat docker image and upload the ".war" to tomcat. Test to see the performance.

fernando88to avatar Sep 13 '23 11:09 fernando88to

Hi,

I changed the build command to ./gradlew bootJar and ran the .jar instead of the .war. It seems that the slowness is related to .war. By making this change, the number of requests increased incredibly. Thanks!

Statistics        Avg      Stdev        Max
  Reqs/sec      9490.78    9544.63   94628.63
  Latency      333.12ms   299.59ms      2.92s
  Latency Distribution
     50%   199.36ms
     75%   313.30ms
     90%   813.43ms
     95%      0.99s
     99%      1.72s
  HTTP codes:
    1xx - 0, 2xx - 540046, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:     4.56MB/s

mobilemindtec avatar Sep 13 '23 13:09 mobilemindtec