diff options
author | Harald Musum <musum@oath.com> | 2018-02-13 11:49:45 +0100 |
---|---|---|
committer | Harald Musum <musum@oath.com> | 2018-02-13 11:49:45 +0100 |
commit | 25acc1f2797d0f6fbe2914eb0291f99e7d65db5a (patch) | |
tree | ece7e7b3c531de5648e2bd9020e3c81ea38f42bb | |
parent | 933df7c47d001e3c09b6cc4cf771f1bafef5e7d4 (diff) |
Use available processors as thread count
-rw-r--r-- | filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java index 20ad2e48fe2..66e04f8b92b 100644 --- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java +++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java @@ -36,7 +36,7 @@ public class FileReferenceDownloader { private final static Duration rpcTimeout = Duration.ofSeconds(10); private final ExecutorService downloadExecutor = - Executors.newFixedThreadPool(10, new DaemonThreadFactory("filereference downloader")); + Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), new DaemonThreadFactory("filereference downloader")); private final ConnectionPool connectionPool; private final Map<FileReference, FileReferenceDownload> downloads = new LinkedHashMap<>(); private final Map<FileReference, Double> downloadStatus = new HashMap<>(); // between 0 and 1 |