From 446f738c7d0bfa98ca10ca47b67912985daeecf2 Mon Sep 17 00:00:00 2001 From: Nykri Date: Wed, 22 Oct 2025 17:16:07 +0200 Subject: [PATCH] chore: set default concurrency number to #CPU cores - 1 (#22888) Set default concurrency number to #CPU cores - 1 Co-authored-by: Alex Co-authored-by: Mert <101130780+mertalev@users.noreply.github.com> --- cli/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/src/index.ts b/cli/src/index.ts index a0392186c0..cd49d0e830 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -8,6 +8,7 @@ import { serverInfo } from 'src/commands/server-info'; import { version } from '../package.json'; const defaultConfigDirectory = path.join(os.homedir(), '.config/immich/'); +const defaultConcurrency = Math.max(1, os.cpus().length - 1); const program = new Command() .name('immich') @@ -66,7 +67,7 @@ program .addOption( new Option('-c, --concurrency ', 'Number of assets to upload at the same time') .env('IMMICH_UPLOAD_CONCURRENCY') - .default(4), + .default(defaultConcurrency), ) .addOption( new Option('-j, --json-output', 'Output detailed information in json format')