perf: try to reduce memory usage by adding --preload argument for multi workers.
parent
c5aa570482
commit
af5d0dcb9f
|
|
@ -19,6 +19,7 @@ class GunicornService(BaseService):
|
||||||
cmd = [
|
cmd = [
|
||||||
'gunicorn', 'maxkb.wsgi:application',
|
'gunicorn', 'maxkb.wsgi:application',
|
||||||
'-b', bind,
|
'-b', bind,
|
||||||
|
'--preload',
|
||||||
'-k', 'gthread',
|
'-k', 'gthread',
|
||||||
'--threads', '200',
|
'--threads', '200',
|
||||||
'-w', str(self.worker),
|
'-w', str(self.worker),
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ class GunicornLocalModelService(BaseService):
|
||||||
cmd = [
|
cmd = [
|
||||||
'gunicorn', 'maxkb.wsgi:application',
|
'gunicorn', 'maxkb.wsgi:application',
|
||||||
'-b', bind,
|
'-b', bind,
|
||||||
|
'--preload',
|
||||||
'-k', 'gthread',
|
'-k', 'gthread',
|
||||||
'--threads', '200',
|
'--threads', '200',
|
||||||
'-w', str(worker),
|
'-w', str(worker),
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ class SchedulerService(BaseService):
|
||||||
cmd = [
|
cmd = [
|
||||||
'gunicorn', 'maxkb.wsgi:application',
|
'gunicorn', 'maxkb.wsgi:application',
|
||||||
'-b', bind,
|
'-b', bind,
|
||||||
|
'--preload',
|
||||||
'-k', 'gthread',
|
'-k', 'gthread',
|
||||||
'--threads', '200',
|
'--threads', '200',
|
||||||
'-w', str(self.worker),
|
'-w', str(self.worker),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue