[英]How to reduce opentelemetry-collector container's memory usage
I have deployed opentelemetry-collector as a container by pulling the image from https://hub.docker.com/r/otel/opentelemetry-collector/tags .我通过从https://hub.docker.com/r/otel/opentelemetry-collector/tags中提取图像,将opentelemetry-collector部署为容器。 I checked the container's memory usage using docker stats command and I got MEM USAGE / LIMIT -> 15.3MiB / 7.667GiB
我使用docker stats命令检查了容器的内存使用情况,我得到了MEM USAGE / LIMIT -> 15.3MiB / 7.667GiB
Is there any possibility to reduce the memory usage for this default image to below 10MiB是否有可能将此默认图像的内存使用量减少到10MiB 以下
I want to reduce the opentelemetry-collector container's memory usage to below 10MiB我想将 opentelemetry-collector 容器的内存使用量减少到 10MiB 以下
You can add --memory=10m
to your docker run
command.您可以将
--memory=10m
添加到 docker docker run
命令中。
https://docs.docker.com/config/containers/resource_constraints/ https://docs.docker.com/config/containers/resource_constraints/
Now - this isn't magic.现在 - 这不是魔法。 If the process needs more than that to run then it will just crash.
如果进程需要的不仅仅是运行那么它就会崩溃。
If that is the case, then you will need to look at changing the configuration of the service and/or possibly its source code.如果是这种情况,那么您将需要考虑更改服务的配置和/或可能的源代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.