Merge pull request #9143 from jumpserver/pr@v3@perf_gunicorn

perf: 去掉 gunicorn threads
pull/9150/head
老广 2022-12-02 10:47:16 +08:00 committed by GitHub
commit 017a674f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -93,8 +93,8 @@ class BaseActionCommand(BaseCommand):
def add_arguments(self, parser):
cores = 10
if (multiprocessing.cpu_count() + 1) < cores:
cores = multiprocessing.cpu_count() + 1
if (multiprocessing.cpu_count() * 2 + 1) < cores:
cores = multiprocessing.cpu_count() * 2 + 1
parser.add_argument(
'services', nargs='+', choices=Services.export_services_values(), help='Service',

View File

@ -21,7 +21,6 @@ class GunicornService(BaseService):
'gunicorn', 'jumpserver.asgi:application',
'-b', bind,
'-k', 'uvicorn.workers.UvicornWorker',
'--threads', str(self.worker * 2),
'-w', str(self.worker),
'--max-requests', '4096',
'--access-logformat', log_format,