-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug/Feat: Performance degradation with multiple requests #86
Comments
Thanks for the report, but can you provide a bit more detail, so we can try to reproduce this? We need something to compare these profiler results with. What queries are you running? How much data they return? What's your Trino server configuration? When you say slower, what's the expected speed? |
Which versions of |
We used apache jmeter. We ran select * from limit by 5500. If we run this alone we get the result within 500ms.What we did was to run about 100 select statements with random values to query a table from jmeter. If we set the ramp factor to 50 and number of threads to 100, the same select statement took about 30 seconds. Same thing done against nodejs returned result in about 5 seconds. |
0.312.0. Trino server is 420 |
That's not a correct query. Which node.js driver are you using? |
Sorry, some of the queries are: package: node-jdbc with some modification to use closure when looping over each row |
Most if not all of the individual queries are very fast sub-100ms. Kindly provide a direction, if possible, to debug where the latency could be. |
I can recommend instrumenting your app with OpenTelemetry and collect traces, both from your app and the Trino server. That should show where the congestion happens - which span in a trace is unexpectedly longer. Unfortunately, this driver is not yet instrumented, but I'll try to work on that in the nearest future.
We have one simple benchmark here: https://github.com/trinodb/trino-go-client/blob/master/trino/trino_test.go#L1697 |
Issue: For 50 simultaneous requests at a time we are getting 5-8 times slower performance compared to node.js. Results are being returned much more slower.
Possible cause: Is it because of semaphores lock? Also, tried calling dbConnect within qHandler.
Test Code:
Please find below some profiles.
CPU profile:
Block profile:
Mutex profile:
Heap Profile:
The text was updated successfully, but these errors were encountered: