From f372d29579fd4b854e60cf87dfafc6ad4b89bb54 Mon Sep 17 00:00:00 2001 From: Wiktor Kopec Date: Thu, 2 Sep 2021 14:33:34 -0700 Subject: [PATCH] Kubernetes container limits documentation (#777) --- documentation/README.md | 2 +- documentation/kubernetes.md | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 documentation/kubernetes.md diff --git a/documentation/README.md b/documentation/README.md index facfe15f6b4..723912dae4e 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -10,7 +10,7 @@ When running a dotnet application, differences in diverse local and production e - [Getting Started](#) - [Running on a local machine](#) - [Running in Docker](#) - - [Running in a kubernetes cluster](#) + - [Running in a kubernetes cluster](./kubernetes.md) - [Enabling SSL](#) - [API Endpoints](./api/README.md) - [OpenAPI document](./openapi.json) diff --git a/documentation/kubernetes.md b/documentation/kubernetes.md new file mode 100644 index 00000000000..e7db26ebda5 --- /dev/null +++ b/documentation/kubernetes.md @@ -0,0 +1,20 @@ +# Running in Kubernetes + +## Recommended container limits + +```yaml +resources: + requests: + memory: "32Mi" + cpu: "50m" + limits: + memory: "256Mi" + cpu: "250m" +``` + +How much memory and CPU is consumed by dotnet-monitor is dependant on which scenarios are being executed: +- Metrics consume a negligible amount of resources, although using custom metrics can affect this. +- Operations such as traces and logs may require memory in the main application container that will automatically be allocated by the runtime. +- Resource consumption by trace operations is also dependent on which providers are enabled, as well as the [buffer size](./api/definitions.md#EventProvidersConfiguration) allocated in the runtime. +- It is not recommended to use highly verbose [log levels](./api/definitions.md#LogLevel) while under load. This causes a lot of CPU usage in the dotnet-monitor container and more memory pressure in the main application container. +- Dumps also temporarily increase the amount of memory consumed by the application container. \ No newline at end of file