-
Notifications
You must be signed in to change notification settings - Fork 103
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
spanner: slow initial session creation #323
Comments
I think the best approach to reduce initialization time would be to run the following in parallel, google-cloud-rust/spanner/src/session.rs Line 238 in 2f9219b
|
Sounds reasonable. Even individual session creation requests seem slow however. I wonder why that is. I will try to reproduce using one of the offical spanner clients. |
Indeed official spanner clients are also slow at creating sessions. The golang client compensates for this by performing the initial session pool population both in parallel over each gRPC channel and asynchronously using goroutines. |
That said now when I'm testing the golang client seems to be able to create 25 sessions in a single |
The culprit seems to be the lack of the |
Creation of
google_cloud_spanner::client::Client
can block for several seconds on the initial session pool population.Would it make sense to defer the session pool initialization entirely to the "session creation task"?
The text was updated successfully, but these errors were encountered: