From c5aa570482acbb9488bc8e3aa431018afe3f8dd1 Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Thu, 23 Oct 2025 10:20:05 +0800 Subject: [PATCH] perf: try to reduce memory usage by decreasing default core workers to 2. --- apps/common/management/commands/services/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/management/commands/services/command.py b/apps/common/management/commands/services/command.py index d36515dfe..a3fa3d72f 100644 --- a/apps/common/management/commands/services/command.py +++ b/apps/common/management/commands/services/command.py @@ -102,7 +102,7 @@ class BaseActionCommand(BaseCommand): ) parser.add_argument('-d', '--daemon', nargs="?", const=True) parser.add_argument('-w', '--worker', type=int, nargs="?", - default=3 if os.cpu_count() > 6 else math.floor(os.cpu_count() / 2)) + default=2 if os.cpu_count() > 6 else math.floor(os.cpu_count() / 2)) parser.add_argument('-f', '--force', nargs="?", const=True) def initial_util(self, *args, **options):