From 7ed997cba8ace7341f294b57ab7bcad976b85b46 Mon Sep 17 00:00:00 2001 From: Mingyu Chen Date: Wed, 26 Jul 2023 22:52:40 +0800 Subject: [PATCH] [improvement](s3) increase the connection num of s3 client (#22049) The default maxConnection of s3 client is 25. It should be increased to improve the query performance. In my test, a tpch 300 benchmark with data stored on object storage, the total time can reduce from 430s -> 330s --- be/src/util/s3_util.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/be/src/util/s3_util.cpp b/be/src/util/s3_util.cpp index 14bc5f5c69..9c93832209 100644 --- a/be/src/util/s3_util.cpp +++ b/be/src/util/s3_util.cpp @@ -145,7 +145,10 @@ std::shared_ptr S3ClientFactory::create(const S3Conf& s3_conf aws_config.region = s3_conf.region; if (s3_conf.max_connections > 0) { aws_config.maxConnections = s3_conf.max_connections; + } else { + aws_config.maxConnections = config::doris_remote_scanner_thread_pool_thread_num; } + if (s3_conf.request_timeout_ms > 0) { aws_config.requestTimeoutMs = s3_conf.request_timeout_ms; }