mirror of
https://github.com/deepseek-ai/3FS
synced 2025-06-26 18:16:45 +00:00
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.
This commit is contained in:
@@ -77,12 +77,7 @@ Result<Void> 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());
|
||||
|
||||
Reference in New Issue
Block a user