From 253c1da72d2ea20250e0d1e1d6d946f9a5463b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E7=8E=AE=E6=96=87?= Date: Tue, 4 Mar 2025 15:05:09 +0800 Subject: [PATCH] fuse: don't limit max_threads to num of CPU cores fuse threads are mostly blocked on waiting IO. They are not CPU intensive. So, there is no reason to limit them by the number of CPU cores. We got 7x IOPS with this patch on a 2 core VM. --- src/fuse/FuseClients.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/fuse/FuseClients.cc b/src/fuse/FuseClients.cc index 3bd676c..844512a 100644 --- a/src/fuse/FuseClients.cc +++ b/src/fuse/FuseClients.cc @@ -77,12 +77,7 @@ Result FuseClients::init(const flat::AppInfo &appInfo, enableWritebackCache = fuseConfig.enable_writeback_cache(); memsetBeforeRead = fuseConfig.memset_before_read(); maxIdleThreads = fuseConfig.max_idle_threads(); - int logicalCores = std::thread::hardware_concurrency(); - if (logicalCores != 0) { - maxThreads = std::min(fuseConfig.max_threads(), (logicalCores + 1) / 2); - } else { - maxThreads = fuseConfig.max_threads(); - } + maxThreads = fuseConfig.max_threads(); bufPool = net::RDMABufPool::create(fuseConfig.io_bufs().max_buf_size(), fuseConfig.rdma_buf_pool_size()); iovs.init(fuseRemountPref.value_or(fuseMountpoint), fuseConfig.iov_limit());