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.

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.
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.
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.
Major section
Why This Chapter Exists
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.
- "Should this device process locally or offload?": Compare the energy of local compute against radio transmission, queueing, wake-up, and retry cost.
- "Is the fog node overloaded?": Include queueing delay, thermal throttling, shared workload priority, and fallback behavior in the latency budget.
Major section
The Stable Tradeoff Model · Build the Budget
The first board has separate response and energy sketches.
- The last keeps a point inside the limits and adds a fallback card.
- Every candidate placement has an operating point.
- Some points are clearly bad: they use more energy and miss the latency budget.
- Some points are feasible but fragile.

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
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?".
Major section
Compute, Transmit, and DVFS Break-Even
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.
- If the payload grows tenfold, transmission can erase the saving.
Major section
Compute, Transmit, and DVFS Break-Even (continued)
If a local classifier draws 40 mW for 150 ms, local energy is about 6 mJ.
- If sending compact features draws 120 mW for 20 ms and receiving the result draws 60 mW for 5 ms, the radio side is about 2.7 mJ before queueing and protocol overhead.
- Offload is attractive only if the measured round trip, fog queue, and fallback policy meet the response budget.
- If deadline slack exists, DVFS may reduce the 6 mJ local path without using the radio at all.
- The break-even test above is not only a classroom exercise.
Major section
Phoebe's Field Notes: From Millijoules to Months of Battery
The mathematical gist: At one window/s, 6.00 mJ local processing costs 0.144 Wh/day, while 2.70 mJ radio offload costs 0.0648 Wh/day.
- A 3 Ah, 3.7 V cell retains about 8.85 Wh after six months at 2% monthly self-discharge and 10% derating.
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.
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.
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.
Major section
Debate: Edge vs. Cloud Processing Placement
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.
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.
- The first board has separate response and energy sketches.
- The action must continue without any gateway, broker, WAN, or remote service.
Retrieval practice
Recall check 1 of 5

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?
Show answer
Answer: D Fog is not automatically better; each responsibility is placed at the lowest tier that meets measured response, energy, and fallback constraints.
Retrieval practice
Recall check 2 of 5

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?
Show answer
Answer: D A defensible placement compares measured operating points against explicit budgets.
Retrieval practice
Recall check 3 of 5

Edge Eddie says: answer from memory, then check your reasoning.
Q3A node can run a classifier locally for 40 mW during 150 ms, or send compact features using 120 mW for 20 ms and receive a result using 60 mW for 5 ms. Before queueing overhead, why is offload only a candidate instead of an automatic choice?
Show answer
Answer: D Break-even evidence starts with measured local and radio energy, then applies the response-budget and queueing gates before accepting offload.
Retrieval practice
Recall check 4 of 5

Edge Eddie says: answer from memory, then check your reasoning.
Q4What supplies a safe alternative when the selected compute tier loses capacity or connectivity?
Show answer
Answer: C Runtime behavior needs a safe alternative when the chosen tier loses capacity or connectivity.
Q5Complete the measured-placement helper. It should reject tiers that miss the response or energy budget, then choose the feasible tier with the lowest device energy.
Show answer
Answer: A The helper first filters by measured latency and energy budgets.
Retrieval practice
Recall check 5 of 5

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?
Show answer
Answer: B 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.
Print reference
Answers 1 of 2
Answer key.
- D · Fog is not automatically better; each responsibility is placed at the lowest tier that meets measured response, energy, and fallback constraints.
- D · A defensible placement compares measured operating points against explicit budgets.
- D · Break-even evidence starts with measured local and radio energy, then applies the response-budget and queueing gates before accepting offload.
- C · Runtime behavior needs a safe alternative when the chosen tier loses capacity or connectivity.
- A · The helper first filters by measured latency and energy budgets.
Print reference
Answers 2 of 2
Answer key.
- B · 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.