openshift3scale

Why does 3Scale APIManager demand so much resource


Does anyone know why 3Scale APIManager demands so much resource when I install it from the Openshift Operator?

The default install has requested 4CPUs and approx 9Gi of memory, but with a limit of 90Gi. So it will not install unless my project has over 90Gi of memory allocated.

If I load test with 100 threads the most I can get the load up to is 2 CPUs and 4Gi of memory accross all the pods.

Here's my API Manager yaml

apiVersion: apps.3scale.net/v1alpha1
kind: APIManager
metadata:
  annotations:
    apps.3scale.net/apimanager-threescale-version: '2.9'
    apps.3scale.net/threescale-operator-version: 0.6.0
  name: apimanager
  generation: 2
  namespace: user-greg-clinker-sandbox <--TODO
spec:
  imageStreamTagImportInsecure: false
  resourceRequirementsEnabled: true
  system:
    appSpec:
      replicas: 1
    database:
      postgresql:
        persistentVolumeClaim:
          storageClassName: nfs-non-vdi-retain-backup-enc
    fileStorage:
      persistentVolumeClaim:
        storageClassName: nfs-non-vdi-retain-backup-enc
    redisPersistentVolumeClaim:
      storageClassName: nfs-non-vdi-retain-backup-enc
    sidekiqSpec:
      replicas: 1
    sphinxSpec: {}
  appLabel: 3scale-api-management
  zync:
    appSpec:
      replicas: 1
    queSpec:
      replicas: 1
  backend:
    cronSpec:
      replicas: 1
    listenerSpec:
      replicas: 1
    redisPersistentVolumeClaim:
      storageClassName: nfs-non-vdi-retain-backup-enc
    workerSpec:
      replicas: 1
  tenantName: 3scale
  apicast:
    managementAPI: status
    openSSLVerify: false
    productionSpec:
      replicas: 3
    registryURL: 'http://apicast-staging:8090/policies
    responseCodes: true
    stagingSpec:
      replicas: 3
  wildcardDomain: 3scale2.apps.ocp.net

Here's my resource usage afterwards

spec:
  hard:
    limits.cpu: '24'
    limits.memory: 128Gi
    requests.cpu: '6'
    requests.memory: 13743895347200m
  scopes:
    - NotTerminating
status:
  hard:
    limits.cpu: '24'
    limits.memory: 128Gi
    requests.cpu: '6'
    requests.memory: 13743895347200m
  used:
    limits.cpu: 16100m
    limits.memory: 85048677Ki
    requests.cpu: 3950m
    requests.memory: '8832423808'

Solution

  • You can find the necessary compute resources for each 3scale component here when you set resourceRequirementsEnabled: true. These are the minimum required when deploying a 3scale for Production purposes. In case you're deploying just a staging environment setting resourceRequirementsEnabled: false you'll be fine.

    Note that 3scale is already in version 2.11 (2.12 will be released soon)

    I hope this information is helpful for you.