Run UWSGI with 4 processes and 2 threads. Allocate more CPU/memory

This commit is contained in:
raydds 2020-01-17 11:21:06 -05:00
parent 454646bbb1
commit 2008b4e6e3
2 changed files with 15 additions and 8 deletions

View File

@ -17,7 +17,7 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 60
targetAverageUtilization: 70
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
@ -37,4 +37,4 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 60
targetAverageUtilization: 70

View File

@ -29,6 +29,13 @@ spec:
containers:
- name: atst
image: $CONTAINER_IMAGE
env:
- name: UWSGI_PROCESSES
value: "4"
- name: UWSGI_THREADS
value: "2"
- name: UWSGI_ENABLE_THREADS
value: "1"
envFrom:
- configMapRef:
name: atst-envvars
@ -50,11 +57,11 @@ spec:
mountPath: "/config"
resources:
requests:
memory: 200Mi
cpu: 400m
memory: 400Mi
cpu: 1200m
limits:
memory: 200Mi
cpu: 400m
memory: 400Mi
cpu: 1200m
- name: nginx
image: nginx:alpine
ports:
@ -86,10 +93,10 @@ spec:
resources:
requests:
memory: 20Mi
cpu: 10m
cpu: 100m
limits:
memory: 20Mi
cpu: 10m
cpu: 100m
volumes:
- name: nginx-client-ca-bundle
configMap: