I'm trying to build an IoT network in which IoT devices have some sort of processing power. For example, they are supposed to receive data and do some processing on them and then send them to upper levels. I'm also supposed to have a coordinator for load balancing between these IoT devices.

Devices should send load information periodically to the coordinator, so that it will be able to balance the load between these devices by transferring some data from highly loaded device to the least loaded device.

Now my question is that what should be sent as the load of the device to the coordinator?

I have 2 ideas:

  1. Sending CPU utilization of the device

  2. Considering a task queue for each device (so that each newly received device will be moved to this queue and wait until they are processed) and sending the current queue size to the coordinator

But I'm not sure which one is better (and reasonable of course) and how people usually do this.

  • 1
    this is a broad question, and MP is a complex subject. answer: it depends. in short: If each task takes the same amount of time, scheduling is easy and about any approach works. If the tasks vary in complexity, scheduling is complicated and you'll need to device a way to predict workload ahead of time. Once you know how long something will take, the dispatching is pretty easy; round robin, fifo, etc...
    – dandavis
    Oct 24 '18 at 19:04
  • Be very aware of the time delay in the control loop which you are proposing, and the lifetime of the tasks. Is this homework? Oct 24 '18 at 19:33
  • @SeanHoulihane No, it's a part (a question) of a more complicated project. what do you mean by the delay in control loop?
    – helen
    Oct 24 '18 at 19:35
  • @dandavis Suppose each task consists of processing a picture. Each picture may have different size or complexity, so it isn't a good idea to use the second method (using task queue)?
    – helen
    Oct 24 '18 at 19:38
  • The delay comes from 'periodic sampling' of the load, and the time taken to migrate tasks (which may in turn increase the load). It's relatively trivial to build something unstable, and modeling won't always show this in advance. Oct 24 '18 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.