Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 17. Configuring Queue Proxy resources
The Queue Proxy is a sidecar container to each application container within a service. It improves managing Serverless workloads, ensuring efficient resource usage. You can configure the Queue Proxy.
17.1. Configuring Queue Proxy resources for a Knative Service Link kopierenLink in die Zwischenablage kopiert!
In addition to configuring Queue Proxy resource requests and limits globally in the deployment config map, you can also configure them at the service level. Use the corresponding annotations for CPU, memory, and ephemeral storage resource types.
Prerequisites
- You have installed Red Hat OpenShift Pipelines on your cluster.
-
You have installed the OpenShift (
oc) CLI. -
You have installed the Knative (
kn) CLI.
Procedure
Change the config map of your service with resource requests and limits:
apiVersion: serving.knative.dev/v1 kind: Service metadata: name: example-service namespace: default spec: template: metadata: annotations: queue.sidecar.serving.knative.dev/cpu-resource-request: "1" queue.sidecar.serving.knative.dev/cpu-resource-limit: "2" queue.sidecar.serving.knative.dev/memory-resource-request: "1Gi" queue.sidecar.serving.knative.dev/memory-resource-limit: "2Gi" queue.sidecar.serving.knative.dev/ephemeral-storage-resource-request: "400Mi" queue.sidecar.serving.knative.dev/ephemeral-storage-resource-limit: "450Mi"You can use the special
queue.sidecar.serving.knative.dev/resource-percentageannotation to calculateQueue Proxyresources as a percentage of the application container. When CPU and memory resource requirements calculated from the application container requirements fall outside the following boundaries, the system adjusts the values to fit within the boundaries. In this case, the system applies the following minimum and maximum boundaries to the CPU and memory resource requirements.Expand Table 17.1. Resource requirements boundaries Resource requirements Min Max CPU request
25m
100m
CPU limit
40m
500m
Memory request
50Mi
200Mi
Memory limit
200Mi
500Mi
NoteIf you simultaneously set a percentage annotation and a specific resource value using the corresponding resource annotation, then the latter takes precedence.
WarningThe
queue.sidecar.serving.knative.dev/resource-percentageannotation is now deprecated, and a future version of OpenShift Serverless will remove it.