COE 558Lecture 01Part 10
Latency budget, exercises and summary
Designing against a response-time threshold, three design exercises (smart glasses, AR, VR), and the lecture in one page.
- Concepts
- 4
- Slides
- 72-77
- Reading
- 24 min
Why this part matters
Parts 7 to 9 gave you the physics of latency, the layers of the continuum, and ways to map a pipeline onto them. One ingredient was still missing: a deadline. Without a deadline, “edge or cloud?” is a matter of taste. With one, it becomes an inequality you can check with a calculator.
This part names that deadline τ, shows where defensible values of τ come from, and then turns it into a design method you can reuse on any system. You will practise the method on three workloads that sit at the heart of edge computing research: smart glasses, warehouse augmented reality and virtual reality (Chen et al. 2017, RFC 9699). The part ends by folding the whole lecture into one loop: split the service into tasks, give each a deadline, place it, and check response time against the deadline. For the exam you will compute response times and pick feasible mappings. For the research project, any edge system you propose should state τ per task, justify it from a published source, and report measured response time at a percentile.
By the end you can
- Explain the latency budget [0, τ] and decide whether a mapping is feasible by checking RT ≤ τ, counting latency out, processing time and latency back.
- Justify τ from published human and physical limits (XR, conversation, web, wearable assistance) and check it at a percentile, not the mean.
- Apply the four-step method (tasks, τ per task, placement, RT and trade-offs) and defend a smart-glasses placement with battery, privacy and reach arguments.
- Explain why one AR or VR app needs several layers, and why motion-to-photon forces tracking and reprojection onto the device.
- State the lecture as one design loop, where τ decides the edge and cloud split, and connect it to virtualization, containers and cloud service models.
Picture a video call. When you speak, your voice should reach the other person quickly enough that the two of you do not talk over each other. The ITU-T telephony standard G.114 puts a number on “quickly enough”: if one-way delay stays below 150 ms, most applications experience essentially transparent interactivity, and 400 ms should not be exceeded for general network planning. So for one direction of that call, you have about 150 ms to spend, and every hop, queue and processing step you place in the path takes some of it.
That allowance is the Latency budget. Its upper limit is written τ (tau): the maximum acceptable end-to-end Response time (RT) of a service. The budget is the interval , and a design is inside it when . Notice who sets τ. It is not the network, and it is not the hardware you happen to own. It comes from the user and the application: human perception for a chat or a game, physics for a headset that must keep up with your head. The network and the servers only decide how much of the budget you spend.
What counts against the budget
It is tempting to compare τ with the Latency to a layer: the client reaches the edge with small latency, the fog with medium latency and the cloud with large latency. But latency is only part of the bill. Recall from part 9 that response time is the trip out, plus the Processing time (PT) at the server, plus the trip back:
A per-layer latency figure is one-way, so never compare a single arrow directly with τ. When a pipeline splits its tasks across several layers, every hop between them joins the sum as well, together with every task’s processing time. The gauge below makes the consequence visible: the same request, three placements, one deadline.
Worked example
Is the fog mapping within τ = 100 ms? (illustrative numbers)
Write the budget
The service must answer within τ = 100 ms.Sum the fog mapping
One-way latency to the fog is 20 ms and processing takes 70 ms. So RT = 20 + 70 + 20 = 110 ms. That is over budget by 10 ms.Try the edge
One-way latency to the edge is 5 ms. If the edge server can still process in 70 ms, RT = 5 + 70 + 5 = 80 ms, which fits. In practice edge servers are smaller, so check that PT does not grow enough to undo the saving.Result
Fog fails (110 > 100). Edge passes (80 ≤ 100). Always write the sum and the inequality.
The last step of that example hides the real tension of this whole part. Moving closer shrinks the latency terms, but closer sites are smaller, so the processing term can grow. Neither “always edge” nor “always cloud” is a rule; the inequality decides. The simulator lets you feel that tension. Its three tasks are an image resize, object detection and drawing boxes, and the presets map them to different layers. Set τ to 100 ms and find the one preset that stays in budget.
- T1Image resizePT 8 ms
- T2Object detectionPT 40 ms
- T3Draw boxesPT 8 ms
Formula
RT = Σ one-way hops + Σ PT
RT = (5 + 15 + 15 + 5) + (8 + 40 + 8) = 96 ms
Client→Edge 5 · Edge→Fog 15 · Fog→Edge 15 · Edge→Client 5
Each hop costs the difference between the one-way latencies of the two layers: Device 0, Edge 5, Fog 20, Cloud 70 ms from the client.
Recall
At τ = 100 ms, which simulator preset passes, and why do “all edge” and “all cloud” fail?
Where real values of τ come from
Because τ belongs to the user, you should never invent it. Studies of human perception and device physics give defensible numbers, and they span four orders of magnitude: a headset that must track your head has a couple of tens of milliseconds, a conversation has about a hundred and fifty, a recognition assistant has most of a second, and a user waiting for a report keeps attention for about ten seconds. The table collects the values this course relies on, roughly from the strictest to the most relaxed. You will use every row in the design exercises that follow.
| Interaction | τ | Source |
|---|---|---|
| VR / XR motion-to-photon | ≤ 20 ms (7 to 15 ms preferred) | RFC 9699 |
| VR motion-to-photon consensus | < 15 to 20 ms | Elbamby et al. |
| Response feels instantaneous | 0.1 s | Nielsen |
| One-way conversational delay | < 150 ms preferred, 400 ms ceiling | ITU-T G.114 |
| Web interaction rated good (INP) | ≤ 200 ms at p75 | web.dev |
| Wearable face recognition | 370 to 1000 ms | Chen et al. 2017 |
| Step-by-step instruction (Lego, Draw, Sandwich) | 600 ms tight, 2.7 s loose | Chen et al. 2017 |
| Flow of thought stays unbroken | 1 s | Nielsen |
| User keeps attention on the task | 10 s | Nielsen |
One more rule turns these numbers into a real test. A budget is a promise about the experience of users, and users remember the slow requests, not the average one. So published budgets are stated at a percentile.
Quick check
A service has τ = 120 ms. One-way latency to the fog is 25 ms and processing takes 75 ms. Is the fog mapping within budget?
Quick check
Which published figure is the standard reference for acceptable one-way conversational delay?
Knowing the inequality is not the same as designing a system. Real services are not one request and one server; they are pipelines of tasks with different needs. Design questions of this kind have no single right answer, but they do have a right method, and it is the same four steps every time: list the tasks, set τ per task, place each task on a layer, then check Response time (RT) and the trade-offs.
Smart glasses are a good first case because every constraint pulls hard. The device is small, runs on a tiny battery and sits on your face, so it cannot get hot. Yet the job, recognizing the faces and objects in front of you, is heavy vision computing. Before reading on, take a minute and list the tasks a face-recognition assistant on glasses would need. That effort is what makes the model answer stick.
Worked example
Architecting smart glasses on the E2C continuum
1. List the tasks
The Service pipeline is: capture a camera frame, compress or downscale it, detect and recognize nearby faces or objects, generate guidance text, render the overlay on the display, store history and photos, and retrain the recognition models.2. Set τ per task
The overlay must follow head motion, so it lives in a display loop of tens of milliseconds (RFC 9699 gives 20 ms for XR). Chen et al. derive 370 to 1000 ms for face recognition from how long people take to recognize a familiar face, and 600 ms tight to 2.7 s loose for step-by-step assembly guidance on Google Glass from a user study. Storage and training have no interactive deadline.3. Place each task
This is a Mapping. Capture, compression and overlay rendering stay on the glasses, the Mist layer. Detection, recognition and guidance use Offloading to a nearby Edge server (a cloudlet). Storage, analytics and model training go to the Cloud.4. Check RT and trade-offs
In Chen et al.’s Figure 17, face recognition with Glass on a WiFi cloudlet reached 435 ms at the 90th percentile. That meets the loose bound (1000 ms) but misses the tight bound (370 ms), and even the phone on the cloudlet (410 ms) misses it. With a phone client, the cloud gave 615 ms against 410 ms on the cloudlet, and the paper notes that cloud offload almost always adds 100 to 200 ms compared with a cloudlet.Result
Device for capture and display, edge for recognition, cloud for storage and training.
Step 4 is worth a second look, because it shows the method working honestly. The cloudlet design does not magically hit every bound: it meets the loose face-recognition deadline and misses the tight one. That is a real, measured result at the tail, and it is exactly the kind of statement a good design report makes. The cloud alternative misses by more, so the edge is the better placement, not a perfect one.
The trade-offs behind the placement
Latency is not the only reason for this split. Shi et al., summarizing Ha et al.’s cloudlet study for wearable cognitive assistance, report that offloading can cut energy use by 30 to 40%, which matters on a device with a battery the size of a stick of gum. They also argue that processing at the edge protects privacy better than uploading raw data to the cloud, and faces are among the most sensitive data there is.
The price is dependence. The glasses now need a working wireless link and an edge site near wherever the wearer walks. Edge sites are few and expensive, so scalability and reach are limited. The cloud has global reach and elastic capacity, but it misses the tight end of the budget. That is exactly why the design keeps both, and why every placement you propose should name what it gains and what it gives up.
| Task | τ | Layer | Reason |
|---|---|---|---|
| Capture and downscale camera frame | Every frame | Mist (glasses) | Raw video is heavy; shrink it before it touches the radio |
| Render the overlay on the display | ≈ 20 ms display loop | Mist (glasses) | Must follow head motion; no network trip fits |
| Detect and recognize faces or objects | 370 to 1000 ms | Edge (cloudlet) | Too heavy for the glasses, too slow via the cloud |
| Generate guidance text | 600 ms to 2.7 s | Edge (cloudlet) | Needs the recognition result, which already lives there |
| Store history and photos | Seconds or more | Cloud | Durable, cheap, reachable from any device |
| Retrain recognition models | Hours | Cloud | Needs large datasets and GPU pools |
Recall
Without looking: list the tasks of a smart-glasses face-recognition pipeline and place each on the continuum.
Quick check
Moving face recognition from the smart glasses to a nearby edge server mainly trades what?
Picture a warehouse worker holding a tablet. Overlays mark the next shelves to pick from, a ring counts progress, and a green arrow on the floor says the target is 12 m ahead. It looks like one app. For design purposes it is at least six tasks with deadlines that range from milliseconds to hours. That is the central idea of this concept: τ belongs to a task, not to an app, and a single app routinely needs every layer of the continuum at once.
Motion-to-photon: the tightest budget in the course
Both augmented and virtual reality are governed by one deadline, so it pays to understand it before designing either. When you move your head, or the tablet, the image must move with you. The time from the movement to the matching light leaving the display is motion-to-photon (MTP) latency. If it is too long, your eyes and your inner ear disagree. Elbamby et al. explain that high MTP sends conflicting signals to the vestibulo-ocular reflex, which can cause motion sickness. In AR the failure is also visible: a virtual label that lags behind a real shelf is noticed at once, because the real world is the reference.
The research community broadly agrees on the ceiling. Elbamby et al. report a broad consensus that MTP must stay below 15 to 20 ms. RFC 9699 uses 20 ms at most for XR as a whole, and shows how little of it is left for computing once the display has taken its share:
Estimates of the split vary. Elbamby et al. put display delay at about 10 to 15 ms, expected to fall to 5 ms, which leaves 14 ms for computing and communication. Either way, only a few milliseconds remain for any network trip, and a trip to a distant cloud does not fit even once.
The standard escape is reprojection, also called time warp: the device takes the last rendered frame and shifts it to match the newest head pose just before display. Reprojection is cheap, so it can run locally inside the MTP budget, and it means a heavy frame rendered elsewhere can arrive a little late without the image lagging behind your head. This one technique is what lets the heavy work leave the device at all.
Warehouse AR: six tasks, four layers
Worked example
Architecting warehouse AR picking
1. List the tasks
Camera and motion-sensor (IMU) pose tracking; anchoring overlays to shelves and drawing arrows; recognizing shelf labels and items; looking up the pick list and inventory for this warehouse; optimizing routes across all pickers; fleet-wide analytics and demand forecasting.2. Set τ per task
Tracking and anchoring share the 20 ms MTP budget, of which only 7 to 8 ms remain for sensor processing, rendering and the Round-trip time (RTT) to the edge. Recognition can take a few hundred milliseconds: Nielsen’s 1 s keeps the flow of thought, and 0.1 s feels instant. Inventory lookups should finish within a second, routing within seconds, and analytics can take hours.3. Place each task
4. Check RT and trade-offs
RFC 9699 is blunt: running these rendering tasks in the cloud is not feasible, because end-to-end delays must be within a few milliseconds. The same RFC names heat and battery drain as reasons to offload at all. The fog node keeps shared state close and scales to the whole site, while the cloud gives reach across sites.Result
One app, four layers: the deadline of each task picks its layer, not the name of the app.
| Task | τ | Layer | Reason |
|---|---|---|---|
| Camera and IMU pose tracking | ≤ 20 ms motion to photon | Device | Only 7 to 8 ms remain after the display |
| Anchor overlays, render arrows | Within the same 20 ms | Device, heavy parts on in-building edge | Offloading cuts heat and battery drain |
| Recognize shelf labels and items | a few hundred ms | Edge | Heavy vision work, still interactive |
| Pick list and inventory lookup | < 1 s | Fog (warehouse server) | Shared by every picker on site |
| Route optimization across pickers | Seconds | Fog | Needs site-wide state, not per-frame speed |
| Fleet analytics and demand forecasting | Hours | Cloud | Cross-warehouse data, big compute |
Notice the new role of the fog layer. Nothing in the smart-glasses design was shared between users, but a warehouse is a team. The pick list and the route optimizer serve every picker in the building, their deadline is around a second rather than a frame, and keeping them on site avoids sending every lookup to the cloud. Shared site state is the natural job of fog.
Recall
In the warehouse AR app, which task belongs on a fog node, and why?
Quick check
In the warehouse AR app, which task has the tightest latency budget?
Interactive VR: every pixel under the deadline
Virtual reality shares the same budget, but raises the stakes: in AR only the overlay depends on MTP, while in VR every pixel you see does. The same four steps apply, and the same pattern appears, with a GPU-hungry rendering task pulled between a light headset and a distant data center.
Worked example
Architecting interactive VR
1. List the tasks
Head tracking, reprojection, frame rendering, encoding and streaming frames, physics and multiplayer state, the content library, and user profiles.2. Set τ per task
Tracking through display: MTP under 15 to 20 ms. Multiplayer state: tens of milliseconds up to about 150 ms, borrowing G.114’s conversational figure as an analogy for social presence (an analogy, not a VR standard). Content downloads: seconds.3. Place each task
4. Check RT and trade-offs
Elbamby et al. report that online VR computing can take up to 100 ms and the communication delay from the network edge to a server can reach 40 ms. Even ideal 4G loopback latency is 25 ms, already above 20 ms before any rendering. Remote cloud servers suit only low-resolution, non-interactive VR where the whole 360° video can be streamed ahead.Result
Headset protects the frame deadline, edge supplies GPU power, cloud supplies content.
| Task | τ | Layer | Reason |
|---|---|---|---|
| Head tracking | < 15 to 20 ms MTP | Headset | Starts the motion-to-photon clock |
| Reprojection (time warp) | Inside the MTP budget | Headset | Fixes the pose even when a remote frame is late |
| Full-quality frame rendering | Per frame | Edge GPU | Too heavy for a light headset, too far for the cloud |
| Physics and multiplayer state | tens of ms up to ≈ 150 ms | Fog or nearest region | Shared by all players in a session |
| Content library and assets | Seconds | Cloud | Large, rarely changing, global |
| User profiles | Seconds | Cloud | Durable records, no frame deadline |
The trade-offs are sharp. An edge GPU per site is expensive, so each site serves a limited number of users. The alternative, a headset tethered by cable to a local PC, meets the budget but gives up mobility. In Latency budget terms, every design is judged the same way: does the per-frame Response time (RT) fit inside MTP, measured at the tail rather than the average?
Recall
Why can a VR headset not send every frame to a distant cloud for rendering?
Quick check
A VR headset must keep motion-to-photon latency within about 20 ms. Where should head-pose reprojection run?
Put the three designs side by side and one pattern falls out. The lecturer’s reference answers below are a compact version of the tables you built above. If you placed recognition, sensor interaction and rendering at the edge and storage and analytics in the cloud, you have the same architecture.
| Application | Edge role | Cloud role | Driving τ |
|---|---|---|---|
| Smart glasses (AR) | Recognize nearby objects or faces | Storage and complex computation | 370 to 1000 ms per recognition |
| Industrial AR | Real-time interaction with sensors | Large datasets and analytics | ≤ 20 ms MTP, < 1 s lookups |
| VR headsets | Frame rendering for smooth visuals | Processing large datasets | < 15 to 20 ms MTP |
Every app keeps the Cloud, and every app adds the Edge. What decides the Mapping of a task is a single comparison: is its deadline shorter than the cloud round trip plus the processing it needs? Recognizing a face, reacting to a sensor and drawing the next frame all have deadlines the cloud cannot meet. Storing photos, crunching datasets and training models have none, and they want exactly what the cloud is good at: scale, durability and reach.
Latency is the strongest force in that split, but not the only one. Satyanarayanan’s SEC 2017 keynote gives three reasons to use the edge, and all three appeared in the exercises. Latency, in both mean and tail, drives rendering and recognition. Bandwidth, both peak and average, explains why glasses and AR tablets should not stream raw video to a distant data center. Privacy, which he calls an exposure firewall for the IoT, explains keeping faces on a nearby server.
The whole lecture in one picture
That pattern is the lecture’s conclusion in miniature. Before, you architected an application on a single Server layer: pick a machine, deploy the backend, done. Now, because data, IoT devices and machine learning produce and consume so much close to the user, the server is spread across the Edge-to-cloud (E2C) continuum.
That changes the unit of design. You no longer place a server; you place each task of each service Service pipeline. And a placement needs a criterion. The lecture chooses response time, written as a function of Latency and Processing time (PT). Its concrete form generalizes the budget condition from the start of this part to a pipeline that crosses several layers:
Response time is the right criterion because it is what users actually experience, and because it keeps both levers in view. A faster server only shrinks the processing terms; placement is what shrinks the latency terms. Every argument in this part, from the fog example that missed by 10 ms to the headset that cannot afford one 4G round trip, was an argument about which lever was available.
The design loop
- Break the service into a pipeline of tasks.
- Set τ for each task from a published source.
- Choose a Mapping of tasks to Device, Edge, Fog and Cloud.
- Compute RT from latency and processing time, at a percentile.
- Check RT ≤ τ and weigh battery, privacy, cost and reach. If it fails, remap and repeat.
Recall
State the lecture summary in one sentence, including the design criterion.
Recall
Write the latency budget condition and name each term.
Quick check
According to the lecture summary, what is mapped to a layer of the E2C continuum?
Where the course goes next
Placing a task on a layer is still abstract. In practice it means running that task inside a virtual machine or a container on that layer. Satyanarayanan’s keynote notes that cloudlets can run lighter-weight containers such as Docker inside VMs, which is exactly what the virtualization and container lectures build.
Renting those layers means choosing a cloud model. NIST SP 800-145 defines the service models (SaaS, PaaS, IaaS) and the deployment models (private, community, public, hybrid). Those definitions are the subject of the cloud models lecture, and they decide who operates each layer in your mapping.
Recap
If you remember nothing else
- τ is the maximum acceptable end-to-end response time. A mapping is feasible only if RT ≤ τ, where RT counts latency out, processing time and latency back.
- τ comes from people and physics: about 20 ms for XR motion-to-photon, 150 ms one-way for conversation, 200 ms for web interactions, 370 to 1000 ms for face recognition.
- Check budgets at a percentile (p75, p90), not at the mean. Users feel the slow requests.
- Set τ per task, not per app. One AR app mixes 20 ms tracking with analytics that can take hours.
- Tight-deadline tasks go to the device or edge. Shared site state goes to fog. Storage, training and analytics go to the cloud.
- Offloading to the edge saves battery and keeps raw data private, but adds network dependence and needs edge sites where users are.
- Summary: the server now spans the E2C continuum. Each pipeline task is mapped individually, and response time is the guiding criterion.
Sources
- G.114: One-way transmission time (05/2003)DocsITU-TBelow 150 ms one-way most applications have essentially transparent interactivity; 400 ms planning limit.(opens in a new tab)
- RFC 9699: Use Case for an Extended Reality Application on Edge Computing InfrastructureRFCIETF / RFC EditorMTP at most 20 ms, 7 to 15 ms preferred; display 12 to 13 ms leaves 7 to 8 ms; cloud not feasible; heat and battery.(opens in a new tab)
- Towards Low-Latency and Ultra-Reliable Virtual Reality (Elbamby, Perfecto, Bennis, Doppler)PaperarXivMTP consensus below 15 to 20 ms; 4G ideal loopback 25 ms; online VR computing up to 100 ms, edge-to-server 40 ms.(opens in a new tab)
- An Empirical Study of Latency in an Emerging Class of Edge Computing Applications for Wearable Cognitive Assistance (Chen et al.)PaperACM/IEEE SEC 2017Figure 17: p90 latencies against bounds (face 370 to 1000 ms, 435 ms on cloudlet with Glass); cloud adds 100 to 200 ms.(opens in a new tab)
- Edge Computing: Vision and Challenges (Shi, Cao, Zhang, Li, Xu)PaperIEEE Internet of Things Journal 3(5), 2016Summarizes Ha et al.: cloudlet offloading cuts energy use by 30 to 40%; edge processing protects privacy better than uploading raw data.(opens in a new tab)
- Edge Computing (SEC 2017 keynote), M. SatyanarayananArticleACM/IEEE Symposium on Edge ComputingEdge value: latency (mean and tail), bandwidth, privacy; containers within VMs on cloudlets.(opens in a new tab)
- Response Times: The 3 Important LimitsArticleNielsen Norman Group0.1 s feels instant, 1 s keeps flow of thought, 10 s keeps attention.(opens in a new tab)
- Interaction to Next Paint (INP)DocsGoogle web.devGood at or below 200 ms, poor above 500 ms, measured at the 75th percentile.(opens in a new tab)
- NIST SP 800-145: The NIST Definition of Cloud ComputingDocsNISTService models (SaaS, PaaS, IaaS) and deployment models (private, community, public, hybrid).(opens in a new tab)