How to restrict memory and CPU usage of edgeAgent container

Viewed 262

Can you tell me how to limit the CPU and memory size of the edgeAgent container? I limited the size on portal.azure.com, but it didn’t work at all.

setting on portal.azure.com

I noticed that the edgeAgent is set in the configuration file config.yaml of the iotedged damon program, should I set it here? If the same configuration is set on config.yaml and portal.azure.com, which one has higher priority?

Thanks in advance!

1 Answers

The documentation stated that you can specify the settings in the configuration: https://docs.microsoft.com/en-us/azure/iot-edge/how-to-use-create-options?view=iotedge-2018-06#restrict-module-memory-and-cpu-usage

It is a valid scenario to deploy the setting with every deployment from the portal without touching the config.yaml. As you are already using a customized tag for deployment, you can add the settings to your deployment the same way.

Be aware that there are a lot of settings you can tweak for low powered devices. I've stumbled across this before as well: https://www.hezser.de/blog/2020/11/03/azure-iot-edge-on-constraint-devices/

Related