-
Notifications
You must be signed in to change notification settings - Fork 254
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
Allow to disable both connection pooling and pruning idependently #327
Allow to disable both connection pooling and pruning idependently #327
Conversation
WALL profile of existing connections being used before the patch:
After the patch:
So as expected the next bottleneck is |
I pushed a new commit using my SSHKit fix. Please re-review. |
Looks good for me. |
This looks good to me as well. @byroot Can you add a CHANGELOG entry explaining the "somewhat backwards incompatible" behavior so that users are not caught off guard? Once that's in I would like to merge this. Thanks! |
Sure! |
@mattbrictson done! |
🎉 |
Allow to disable both connection pooling and pruning idependently
Ref: #326
By profiling capistrano, it occurred that connection pruning was a significant performance hotspot.
See #326 (comment)
So much that 12% of the execution time (on a micro benchmark but still) was spent checking expirations.
I think that for many cases just checking is the connection is closed on checkout is enough.
I ran the same benchmark a saw some interesting performance improvements (even though it's always hard to be put an exact number because of the network).
NB: This is somewhat backwards incompatible.
idle_timeout = 0
used to disable connection pooling entirely by always reaping connections, while now it actually let connections live indefinitely until they are closed.If a version bump is not an option, I can make
idle_timeout = 0
disable pooling as well, but then we need something likeidle_timeout = false
to disable connection pruning.