From: Jérôme Benoit Date: Sun, 13 Aug 2023 23:05:18 +0000 (+0200) Subject: perf: reduce the worker_threads pool size in hybrid examples X-Git-Tag: v2.6.26~41^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1c73490dc3186af3546e1bca17113007dbb045ef;p=poolifier.git perf: reduce the worker_threads pool size in hybrid examples Signed-off-by: Jérôme Benoit --- diff --git a/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts b/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts index ca7c42d4..5fc7542b 100644 --- a/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts +++ b/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts @@ -22,7 +22,7 @@ const pool = new FixedClusterPool( .execute({ port: 8080, workerFile: requestHandlerWorkerFile, - maxWorkers: Math.round(availableParallelism() / 2), + maxWorkers: Math.round(availableParallelism() / 4), enableTasksQueue: true, tasksQueueOptions: { concurrency: 8 diff --git a/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts b/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts index 62e772da..b9e48bdd 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts +++ b/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts @@ -21,7 +21,7 @@ const pool = new FixedClusterPool( pool .execute({ port: 8080, - maxWorkers: Math.round(availableParallelism() / 2), + maxWorkers: Math.round(availableParallelism() / 4), workerFile: requestHandlerWorkerFile, enableTasksQueue: true, tasksQueueOptions: {