[CDRIVER-4663] Eagerly create minPoolSize connections Created: 15/Jun/23 Updated: 23/Jan/24 |
|
| Status: | In Code Review |
| Project: | C Driver |
| Component/s: | Performance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Ryan Timmons | Assignee: | Kyle Kloberdanz |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | perf-pain | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Quarter: | FY24Q4 | ||||||||||||||||
| Description |
|
The C/C++ driver's connection pool does not eagerly create connections even when the minPoolSize config is set. This is surprising behavior and has lead to difficult-to-diagnose performance issues when the first operation has wildly different performance from subsequent operations. What's more is that the driver spec seems to require this behavior:
|
| Comments |
| Comment by James Littlejohn [ 10/Jan/24 ] |
|
ryan.timmons@mongodb.com Yeah, minh.luu@mongodb.com landed our version of pre-warm (which is pinging the admin database too) very recently in https://github.com/mongodb/genny/pull/970 through DEVPROD-2090. We mostly got blocked up on the performance implications of it (for other readers, Genny can't suddenly increase in performance). It'd be nice if the C Driver had an option to do this itself, but if it were non-configurable it'd cause some issues (solvable with work) for us. |
| Comment by Ryan Timmons [ 09/Jan/24 ] |
|
Hey james.littlejohn@mongodb.com, do you think the client_pool_warmup code that kyle.kloberdanz@mongodb.com has above would work for Genny? I think we recently did some work to pre-warm connections in Genny, so I'm curious if there's any overlap? |
| Comment by Kevin Albertson [ 07/Nov/23 ] |
|
See this comment in I expect another non-deprecated option may need to be added to support this use-case. |
| Comment by Ger Hartnett [ 04/Jul/23 ] |
|
Changed to a bug because it doesn't follow the driver spec. |
| Comment by Ger Hartnett [ 16/Jun/23 ] |
|
Adding a link to PERF-4166 |