dgs-framework
dgs-framework copied to clipboard
Performance issues
same environment same service code
jmeter pressure test DGS: 400/sec graphql-spring-boot-starter: 2200/sec resful api:2200/sec
where is so much performance consumed ?
That's interesting and quite surprising! We've run perf tests in the past which showed it was pretty much equal to just a RestController, and haven't noticed any significant changes. Could you share your test setup so that we can reproduce it?
That's interesting and quite surprising! We've run perf tests in the past which showed it was pretty much equal to just a RestController, and haven't noticed any significant changes. Could you share your test setup so that we can reproduce it?
It’s a simple database query, the only difference being@PostMapping and@DgsQuery
After testing, the returned results have multiple Boolean types or other types, and the performance is much degraded @paulbakker
Do you mean using scalars? Maybe you can share an example of the result which you think is causing the problem?
@AbbadoLambily I would really help if you share with us the project, or at least your GraphQL Schema and GraphQL Queries.
Test code has been uploaded to my github Https://github.com/abbadolambily/dgs-demo.git After the service is running, use Test.jmx to perform JMETER pressure test
@berngp @paulbakker 😄
@berngp Did you find the reason? 😔
When I run your JMeter GraphQL test plan, I get ~1650 requests / sec with DGS v4.9.25.
I also tried it with the latest release candidate (v4.10.0-rc.4), as we made some potential performance improvements there, and I got ~2150 requests / sec, about a 30% increase.
When I run your JMeter test plan against the REST endpoint, I get 17,000 requests / sec. However, I am not sure it's a fair comparison, as your REST endpoint does not take a request body, whereas the GraphQL endpoint obviously does, and has to parse the query on each request, etc.
Other relevant details about my setup:
JVM: 11.0.13-zulu Heap size: 16gb GC: G1
Where can I download the RC version of Maven dependency @kilink
Hi @AbbadoLambily, the changes have been released in v4.10.0