question

JeffreyK-4635 avatar image
0 Votes"
JeffreyK-4635 asked asergaz commented

Long waiting time to deploy to iot modules to iot edge devices

When testing deployments of modules to IoT edge devices, I noticed wait time of 3-5mins for modules to be deployed to the IoT edge devices. I created default and layered deployment for a IoT device and I see the lag in getting the modules deployed to the end device.

Is there any properties or setup I need to enable to perform better throughput?
Is there the sequence flow that I can refer during this process?
Where can I see the logs during this activity of deployments?


My IoT device is a VM created in Azure with following configuration
"hardwareProfile": {
"vmSize": "Standard_DS3_v2"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsDesktop",
"offer": "Windows-10",
"sku": "rs5-enterprise-standard-g2",
"version": "latest"
},
"osDisk": {
"osType": "Windows",
"managedDisk": {
"storageAccountType": "Premium_LRS",
"diskSizeGB": 127
},

azure-iot-edge
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VenkatYalla-0009 avatar image
1 Vote"
VenkatYalla-0009 answered asergaz commented

This behavior is dictated by the IoT Hub service not IoT Edge.

IoT Hub evaluates ADM deployment updates roughly every 5 min unless an existing deployment name/priority is updated (as you found), so this is expected behavior. I'm not aware of any way to adjust this.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @JeffreyK-4635 ,
Please share with us if you have any other questions related with your original post. Otherwise could you go ahead and mark the above as answer?

Thank you so much.

Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

0 Votes 0 ·
asergaz avatar image
0 Votes"
asergaz answered asergaz commented

Hi @JeffreyK-4635 ,
Before trying to help you further please clarify the following:

  1. What version of IoT Edge are you using? 1.1 or 1.2?

  2. Are you using Windows or Linux Containers?

  3. Why 3-5 minutes is too long for your scenario?


    Where can I see the logs during this activity of deployments?

Please start here: Troubleshoot your IoT Edge device

I would try to see more information using the command iotedge logs edgeAgent



· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Below my updates
1. IoT edge version 1.1
2. Windows Container
3. I want to understand what is the expected time and justify the delay or is it expected?
4. Is there any sequence flow that I can look into?



1 Vote 1 ·

Thank you for providing the details @JeffreyK-4635 .
I am researching on official documentation around expected delay times together with Product Team.

Appreciate your time so far.

0 Votes 0 ·

@JeffreyK-4635 I couldn't find official documentation about expected delay times, but one thing to consider is the size of the module - do you notice a difference when a module is lower in size?

Another suggestion to monitor edge modules is to use the troubleshooting page in Azure Portal, let me know if the data there can help you troubleshoot this?

Thank you!


0 Votes 0 ·
Show more comments

Hello @JeffreyK-4635 ,
Please let me know the answers to the above or please share if you have found the answers to your questions already :).

Thanks!

0 Votes 0 ·
dteteruk avatar image
1 Vote"
dteteruk answered JeffreyK-4635 commented

@JeffreyK-4635 As far as I know time you need to download module depends on size of module. If module is several GB and connection is not stable it may take a lot of time.
You can simply check #s of traffic passed by network adapter. Run below command in terminal and see if numbers are changing it means download process in progress.

cat /proc/net/dev

108558-image.png



image.png (12.0 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@dteteruk - I noticed one thing that when I update an existing Azure Edge deployment (which needed to be triggered when target condition was met) by just adding a space in between the targetcondition or priority field, the edgeAgent immediately gets the notification to install the modules from the layered deployment and the module is up and running less than 5-10secs.

I think the issue is there is a lag from the edgeAgent to identify the layered deployments once the target condition is met. I would like to know the following:
1. Time edgeAgent would wait to check on the deployments.
2. Is there a way to boost the time wait if any?
3. How to triage this process as in the logs of the edgeAgent? I do not see any logs from edgeAgent when waiting for the layered deployment to notify for the deployment rather it waits until then.

0 Votes 0 ·

My scenario is like this,
1. One default deployment created applies all the edge devices connected to the IotHub
2. One layered deployment created triggered once the targetcondition is satisfied
3. User applies changes in edge device which satisfies the target condition for the layered deployment to be triggered
4. Edge agent take 3-4mins to install the modules associated with the Layered deployment

0 Votes 0 ·