From 4fcbc07edbe010e73f272f0417be97542e97472f Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Tue, 17 Dec 2019 17:26:05 -0500 Subject: [PATCH] Test out higher concurrency limits --- dist/restore/index.js | 2 +- dist/save/index.js | 2 +- src/cacheHttpClient.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/restore/index.js b/dist/restore/index.js index f187667..dd689a7 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -1622,7 +1622,7 @@ function uploadFile(restClient, cacheId, archivePath) { const resourceUrl = getCacheApiUrl() + "caches/" + cacheId.toString(); const responses = []; const fd = fs.openSync(archivePath, "r"); // Use the same fd for serial reads? Will this work for parallel too? - const concurrency = 4; // # of HTTP requests in parallel + const concurrency = 8; // # of HTTP requests in parallel const threads = [...new Array(concurrency).keys()]; core.debug("Awaiting all uploads"); let offset = 0; diff --git a/dist/save/index.js b/dist/save/index.js index d447efb..c5a5a02 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -1622,7 +1622,7 @@ function uploadFile(restClient, cacheId, archivePath) { const resourceUrl = getCacheApiUrl() + "caches/" + cacheId.toString(); const responses = []; const fd = fs.openSync(archivePath, "r"); // Use the same fd for serial reads? Will this work for parallel too? - const concurrency = 4; // # of HTTP requests in parallel + const concurrency = 8; // # of HTTP requests in parallel const threads = [...new Array(concurrency).keys()]; core.debug("Awaiting all uploads"); let offset = 0; diff --git a/src/cacheHttpClient.ts b/src/cacheHttpClient.ts index a8a22bd..e5f8d85 100644 --- a/src/cacheHttpClient.ts +++ b/src/cacheHttpClient.ts @@ -181,7 +181,7 @@ async function uploadFile(restClient: RestClient, cacheId: number, archivePath: const responses: IRestResponse[] = []; const fd = fs.openSync(archivePath, "r"); // Use the same fd for serial reads? Will this work for parallel too? - const concurrency = 4; // # of HTTP requests in parallel + const concurrency = 8; // # of HTTP requests in parallel const threads = [...new Array(concurrency).keys()]; core.debug("Awaiting all uploads"); let offset = 0;