Slow device provisioning

Hi,

I noticed provisioning a raspberry pi 3 with openbalena took a long time (more than 7 mins). The device logs showed the Supervisor start time is > 5 mins.

[Logs] [9/5/2019, 11:38:55 AM] Supervisor starting
[Logs] [9/5/2019, 11:44:00 AM] Creating network ‘default’
[Logs] [9/5/2019, 11:44:00 AM] Creating volume ‘resin-data’
[Logs] [9/5/2019, 11:44:00 AM] Downloading image

Is this normal? I am running openbalena on a vm with 4 cpu cores and the supervisor start time is the same when I assigned 8 or 12 GB of memory to the server. Is there a way to find out what is the bottleneck?

When provisioning with balena cloud, the Supervisor start time is only 7 seconds. There is a huge difference.

05.09.19 14:05:58 (-0700) Supervisor starting
05.09.19 14:06:04 (-0700) Applying configuration change {“SUPERVISOR_POLL_INTERVAL”:“900000”}
05.09.19 14:06:04 (-0700) Applied configuration change {“SUPERVISOR_POLL_INTERVAL”:“900000”}
05.09.19 14:06:04 (-0700) Creating network ‘default’

Thanks

Hi,

I am not aware that this is a problem, but looking at your logs it would seem that on balenaCloud a configuration value is changed before creating the default network… I am wonder if this has something to do with it.

Could you try adding a config variable to your openBalena application, BALENA_SUPERVISOR_POLL_INTERVAL with a value of 900000 to see if the same behaviour is observed?

Hi @richbayliss,

I tried that and the result is the same. Supervisor starting took > 5 mins to finish.

[Logs] [9/11/2019, 2:32:14 PM] Supervisor starting
[Logs] [9/11/2019, 2:37:22 PM] Applying configuration change {“SUPERVISOR_POLL_INTERVAL”:“900000”}
[Logs] [9/11/2019, 2:37:22 PM] Applied configuration change {“SUPERVISOR_POLL_INTERVAL”:“900000”}
[Logs] [9/11/2019, 2:37:23 PM] Creating network ‘default’
[Logs] [9/11/2019, 2:37:23 PM] Creating volume ‘resin-data’

Thanks

@pli thank’s for that, I will take a look and see if I can a) replicate it locally, and b) work out why it’s behaving differently - because it really shouldn’t…