From 2008b4e6e3fee110dc899c2e97e5bb55cce44de1 Mon Sep 17 00:00:00 2001 From: raydds Date: Fri, 17 Jan 2020 11:21:06 -0500 Subject: [PATCH] Run UWSGI with 4 processes and 2 threads. Allocate more CPU/memory --- deploy/azure/autoscaling.yml | 4 ++-- deploy/azure/azure.yml | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/deploy/azure/autoscaling.yml b/deploy/azure/autoscaling.yml index e208d943..8bab90f4 100644 --- a/deploy/azure/autoscaling.yml +++ b/deploy/azure/autoscaling.yml @@ -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 diff --git a/deploy/azure/azure.yml b/deploy/azure/azure.yml index 81612d5d..7feb0823 100644 --- a/deploy/azure/azure.yml +++ b/deploy/azure/azure.yml @@ -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: