Edge & Fog Computing · Study deck

Fog Energy-Latency Tradeoffs

Imagine a road camera that must warn a local sign in one second and also help a team study traffic each month.

Edge Eddie is your guide for this deck.

energylatencycloud
Edge Eddie, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Build an energy-latency budget for a fog workload using measured components.
  • Compare edge, fog, and cloud placement without relying on fixed universal latency or energy numbers.
  • Explain when duty cycling, batching, compression, filtering, and local aggregation help or hurt.
  • Identify queueing, wake-up, retry, thermal, and contention effects that make a design miss its response budget.
iotclass.org

Major section

In 60 Seconds · Start Simple

Fog energy and latency optimization is not the claim that fog is always faster, cheaper, or lower power.

  • The quick warning and the long study do not need to run in the same place.
  • A gateway is the unit that links local devices to another network or service.
  • Retest when the load, radio, code, or site changes.

Key terms

Latency
Latency means the time from an event to the result that needs it. Split that time into capture, travel, wait, work, return, and action.
iotclass.org

Major section

Minimum Viable Understanding · Most Valuable Understanding

Latency is a budget, not a slogan.: Break it into sensing, transmission, queueing, processing, return, and actuation time.

  • Energy is a duty-cycle record, not one active-power number.: Measure active, radio, idle, sleep, wake, retry, and management states.
  • Fog is useful when local coordination changes the budget.: Good fog work filters, aggregates, buffers, prioritizes, or decides locally rather than forwarding raw work unchanged.
  • The answer must be rechecked.: A placement that works at one load, battery level, temperature, or network condition can fail after contention, updates, weather, or site growth.
iotclass.org

Major section

Why This Chapter Exists · The Stable Tradeoff Model

Energy-latency examples are easy to overstate.

  • A single wireless-energy comparison, round-trip latency number, or battery-life calculation can look precise while hiding the site conditions that make it true.
  • "Is the fog node overloaded?": Include queueing delay, thermal throttling, shared workload priority, and fallback behavior in the latency budget.

Key terms

Some points
Some points are clearly bad: they use more energy and miss the latency budget.

Why it matters

"Can we send only local data products upstream?": Measure whether filtering, aggregation, or event extraction reduces enough traffic to justify local processing.

Energy and latency frontier for fog placement.
Energy and latency frontier for fog placement.
iotclass.org

Major section

Build the Budget

A fog energy-latency review starts with two budgets and one set of measurements.

  • The point is not to make the equation perfect.
  • The point is to stop hidden costs from disappearing.
  • A design that ignores sleep leakage, wake time, retransmissions, or queueing can pass a small demo and fail in the field.
iotclass.org

Major section

Interactive Quiz: Sequence the Review · Placement Patterns

The action must continue without any gateway, broker, WAN, or remote service.

  • The local algorithm consumes less energy than waking the radio, negotiating a connection, and sending the payload.
  • The fog node can prioritize safety, alarm, or control work ahead of batch reporting during contention.
  • The work is analytical, historical, or model-lifecycle oriented rather than an immediate local action.

Try it: Interactive Quiz: Sequence the Review · Placement Patterns in the chapter

iotclass.org

Major section

Duty Cycling Without Magic Numbers

"Deep sleep is always better because active power is high.".

  • Duty cycling can produce large energy savings, but only when the application can tolerate the sleep interval and wake penalty.
  • "What is the longest quiet period we can allow before the next measurement or response?".
  • "What event can wake the system early, and what is the measured wake-to-action time?".
iotclass.org

Major section

Compute, Transmit, and DVFS Break-Even · Phoebe's Field Notes: From Millijoules to Months of Battery

That comparison is only the first gate.

  • A lower-energy offload still fails if queueing, round-trip time, protocol overhead, or fallback behavior misses the response budget.
  • Leakage current and the task deadline set the floor; slowing a task indefinitely does not make energy approach zero.

Key terms

Offload
Offload is attractive only if the measured round trip, fog queue, and fallback policy meet the response budget.

Why it matters

When a local task has deadline slack, dynamic voltage and frequency scaling can reduce energy by running slower at lower voltage.

iotclass.org

Major section

Worked Example: Greenhouse Irrigation Gateway · Label the Optimization Record

Sensors timestamp readings, reject impossible values, and preserve a last-known-safe reporting mode.

  • A greenhouse uses soil sensors, valve controllers, and a local gateway.
  • The cloud dashboard helps with seasonal planning, but the irrigation decision must continue during a WAN outage.
  • The important result is not a universal saving percentage.
iotclass.org

Major section

Code Challenge · Common Mistakes

A fog node that is fast when empty can miss deadlines when it shares CPU, GPU, disk, or network with other workloads.

  • Sleep saves energy only if wake time, wake energy, and missed-event behavior fit the response budget.
  • A design can save sensor energy while making the gateway, network, or operations burden unacceptable.
  • Poor wireless links, reconnect storms, and replay after outage can dominate both latency and energy.
iotclass.org

Major section

Review Checklist · Reference Notes

Datasheet values are useful for estimates, but acceptance should come from measured deployment-like behavior.

  • Connection setup, listening windows, retries, acknowledgements, and roaming can matter as much as payload bytes.
  • Transmission time alone does not include queueing, wake-up, processing, result return, actuation, or acknowledgement.
  • The goal is not to crown one tier, but to assign the work each tier can prove.
iotclass.org

Major section

Debate: Edge vs. Cloud Processing Placement · Summary

This scenario is drawn from a manufacturing predictive-maintenance deployment and is meant to be worked through as a design-decision exercise.

  • Its audit history may travel later, but the urgent action cannot wait for an uncertain path.
  • Bandwidth means how much data a path can carry in a given time.
  • The prompt below asks which responsibilities belong near the device and which can move upstream.
  • Fog energy and latency optimization is a measurement practice.
iotclass.org

Deck summary

Key takeaways

Fog energy and latency optimization is not the claim that fog is always faster, cheaper, or lower power.

  • Latency is a budget, not a slogan.: Break it into sensing, transmission, queueing, processing, return, and actuation time.
  • Energy-latency examples are easy to overstate.
  • A fog energy-latency review starts with two budgets and one set of measurements.
  • The action must continue without any gateway, broker, WAN, or remote service.
iotclass.org

Retrieval practice

Recall check 1 of 6

Edge Eddie says: answer from memory, then check your reasoning.

Q1Why does this chapter say fog computing is not automatically faster, cheaper, or lower power?

AFog hardware is always slower than cloud servers, so every workload must stay at the edge or in the cloud.
BLatency never matters for IoT workloads, so only monthly cloud cost should decide where work runs.
CPlacement must be measured against each workload's response, energy, duty-cycle, queueing, and fallback constraints.
DEnergy use is captured by one active-power number, so duty cycle, sleep, wake, retry, and buffering can be ignored.
Show answer

Answer: C Fog is not automatically better; each responsibility is placed at the lowest tier that meets measured response, energy, and fallback constraints.

iotclass.org

Retrieval practice

Recall check 2 of 6

Edge Eddie says: answer from memory, then check your reasoning.

Q2A vibration sensor has a response budget of 200 ms and an energy budget of 8 mJ per analysis window. Bench measurements show edge local processing uses 5 mJ and returns in 40 ms. Fog offload uses 3 mJ at the device and returns in 120 ms. Cloud offload uses 12 mJ at the device and returns in 500 ms. Which statement is the best engineering conclusion?

AFog is the only defensible choice because it uses the least device energy while meeting the 200 ms budget.
BEdge and fog both meet the budgets
CCloud is best because remote compute is usually more powerful than local compute.
DEdge is always best for safety because it has the lowest latency.
Show answer

Answer: B A defensible placement compares measured operating points against explicit budgets.

iotclass.org

Retrieval practice

Recall check 3 of 6

Edge Eddie says: answer from memory, then check your reasoning.

Q3Which statement is the strongest energy-latency claim for the greenhouse gateway design?

AFog always saves energy and latency compared with the cloud, so every greenhouse workload should use fog without measuring local budgets, outage behavior, queues, or maintenance windows.
BThe gateway should coordinate irrigation locally because WAN loss must not stop the watering decision, and the measured gateway wake, queue, and replay tests meet the documented response and energy budgets.
CThe cloud should make all irrigation decisions because it has more compute than a greenhouse gateway, even when WAN loss can block watering.
DEvery sensor should decide independently because edge latency is lower than fog latency, even without pump state, valve conflicts, or site policy.
Show answer

Answer: B A good energy-latency claim is specific, measured, and tied to the local obligation.

iotclass.org

Retrieval practice

Recall check 4 of 6

Edge Eddie says: answer from memory, then check your reasoning.

Q4Place each energy-latency decision element where it lives so you can choose a feasible tier and defend the fallback when conditions change.

AResponse and Energy Budgets
BCloud Dashboard
CRaw Sensor Stream
DFirmware Archive
Show answer

Answer: A Separate budgets, measured tier selection, and operational proof so you can reject placements that miss either the response or energy constraint.

iotclass.org

Retrieval practice

Recall check 5 of 6

Edge Eddie says: answer from memory, then check your reasoning.

Q5This chapter's manufacturing scenario lists reasons an engineer might argue for edge processing (Position A). Which of the following is one of them?

AThe system keeps working during network outages
BCentralized model updates across all plants
CCross-plant pattern detection
DAccess to more powerful models than could run locally
Show answer

Answer: A The chapter lists three reasons for Position A (edge): lower latency for real-time alerts, bandwidth savings, and working during network outages -- distinct from Position B's cloud-side reasons (more powerful models, centralized updates, cross-plant pattern detection).

iotclass.org

Retrieval practice

Recall check 6 of 6

Edge Eddie says: answer from memory, then check your reasoning.

Q6In this chapter's scenario, what monitoring scale and sampling rate is driving the edge-vs-cloud inference placement decision?

A1,000 machines, each with vibration sensors sampled at 1 kHz
B100 machines, each sampled at 1 Hz
C1,000 machines, each sampled at 1 MHz
D10,000 machines, each sampled at 1 kHz
Show answer

Answer: A The chapter's scenario is explicit: 1,000 machines, vibration sensors sampled at 1 kHz, with the goal of predicting failures before they happen -- this scale is what makes the edge-vs-cloud inference placement decision consequential.

iotclass.org

Print reference

Answers 1 of 2

Answer key.

  1. C · Fog is not automatically better; each responsibility is placed at the lowest tier that meets measured response, energy, and fallback constraints.
  2. B · A defensible placement compares measured operating points against explicit budgets.
  3. B · A good energy-latency claim is specific, measured, and tied to the local obligation.
  4. A · Separate budgets, measured tier selection, and operational proof so you can reject placements that miss either the response or energy constraint.
iotclass.org

Print reference

Answers 2 of 2

Answer key.

  1. A · The chapter lists three reasons for Position A (edge): lower latency for real-time alerts, bandwidth savings, and working during network outages -- distinct from Position B's cloud-side reasons (more powerful models, centralized updates, cross-plant pattern detection).
  2. A · The chapter's scenario is explicit: 1,000 machines, vibration sensors sampled at 1 kHz, with the goal of predicting failures before they happen -- this scale is what makes the edge-vs-cloud inference placement decision consequential.
iotclass.org