-
Notifications
You must be signed in to change notification settings - Fork 623
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
High Contention due to inroduced call to DriverManager.println #984
Comments
Would you be able to share more on this? |
Related to #802 |
I've attached the code from DriverManager. You see that they are synchronizing logSync which is defined: This means that even if there is no logging, there is a contention point that all threads creating a prepared statement go through. I think this method should be avoided, especially in success scenarios where high throughput is required. |
Yes I saw that, but did you do some tests or benchmarks with and without? Or is that just an observation of the code above and that's it? |
This came up in real life. The complaint was we could not scale vertically on a larger machine (128 vcpu). |
Thanks, that is useful context that could have been provided in the first post. |
🎉 This issue has been resolved in |
Describe the bug
NativeDB_exec and NativeDB.prepare() call DriverManager.println()
Unfortunately this method has a global lock creating a huge bottleneck in multithread (connection per thread) environments.
I suggest removing these calls.
To Reproduce
Prepare statements on multiple threads
Expected behavior
No contention between threads working on separate connections.
Additional context
println imp for your reference :-(
The text was updated successfully, but these errors were encountered: