diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-02-13 12:52:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 12:52:39 +0100 |
commit | 4c9c8a6a7b7025a09df28dc91dbba0fc7b26091e (patch) | |
tree | 0eefda2b1632a2459166afa75fd69822b33bf583 /filedistribution/src | |
parent | b72f7d59aa3f1915ff8ab785bc5021ad620321ed (diff) | |
parent | 25acc1f2797d0f6fbe2914eb0291f99e7d65db5a (diff) |
Merge pull request #5023 from vespa-engine/hmusum/use-available-processors-as-thread-count
Use available processors as thread count
Diffstat (limited to 'filedistribution/src')
-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 |