From 6067af6ef15170cdf1e70ea0d3953735ba0f2113 Mon Sep 17 00:00:00 2001 From: Guy Date: Mon, 30 Nov 2015 18:38:15 +0200 Subject: [PATCH] Fix read concurrency to work in parallel count When the prefetch size is limited to the multipart size, the entire parallel logic of the read flow does not have an opportunity to use parallel get. This fix increases the read performance significantly over our own s3 on-premise solution. --- src/fdcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fdcache.cpp b/src/fdcache.cpp index 399a771..cf3a4f7 100644 --- a/src/fdcache.cpp +++ b/src/fdcache.cpp @@ -1448,7 +1448,7 @@ ssize_t FdEntity::Read(char* bytes, off_t start, size_t size, bool force_load) // load size(for prefetch) size_t load_size = size; if(static_cast(start + size) < pagelist.Size()){ - size_t prefetch_max_size = max(size, static_cast(S3fsCurl::GetMultipartSize())); + size_t prefetch_max_size = max(size, static_cast(S3fsCurl::GetMultipartSize() * S3fsCurl::GetMaxParallelCount())); if(static_cast(start + prefetch_max_size) < pagelist.Size()){ load_size = prefetch_max_size;