chenBright commented on code in PR #3782:
URL: https://github.com/apache/brpc/pull/3782#discussion_r4728121832
##########
src/brpc/rdma/rq_connection.cpp:
##########
@@ -1077,7 +1076,7 @@ void RqConnection::Debug(std::ostream& os,
butil::StringPiece connector) const {
int RqConnection::GlobalInitialize() {
g_rdma_resource_mutex = new bthread::Mutex;
- for (int i = 0; !FLAGS_rdma_use_srq && i < FLAGS_rdma_prepared_qp_cnt;
++i) {
+ for (int i = 0; i < FLAGS_rdma_prepared_qp_cnt; ++i) {
RdmaResource* res = AllocateQpCq(FLAGS_rdma_prepared_qp_size,
FLAGS_rdma_prepared_qp_size);
if (!res) {
Review Comment:
The latest release already preallocates 1,024 dedicated QPs by default. SRQ
was merged after that release, so this PR changes the behavior for users of an
unreleased master snapshot who enabled SRQ.
The resource concern is valid. A deployment sized primarily for SRQ can set
rdma_prepared_qp_cnt=0 to skip preallocation. Dedicated-RQ fallback still works
because it allocates a QP on demand. The updated documentation covers both the
default resource cost and this setting.
I’d keep the existing release default and let operators configure the pool
size independently of the client’s queue preference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]