The Edge Roofline and the 7-Minute Throttle

A 3-billion-parameter robot policy cannot decode faster than 11 ms per token on Jetson Thor, whatever the 2070 TFLOPS headline says, and a sealed box can slow even that after minute seven.

Learn to predict how fast a model runs on a small computer inside a robot, from two numbers on its datasheet, and how long it keeps that speed once the box heats up.

Pick a device, then slide the batch size from 1 up to 1,024. Watch the dot on the roofline. Then switch the enclosure from fan to sealed and read the ten-minute strip. We build every part from zero below.

You need a rough idea of what a neural network weight is (one stored number) and the idea of a watt (energy per second). We build the rest.

Built from NVIDIA’s Jetson Thor announcement, the Jetson Linux Platform Power and Performance guide and the roofline paper by Williams, Waterman and Patterson. Part of the Physical AI Systems edge track.

Run a 3B model on the edge

1

Models, not measurements. Bandwidths are NVIDIA’s (Thor 273 GB/s, AGX Orin 64GB 204.8 GB/s, Orin Nano Super 102 GB/s). Thor’s dense peaks are NVIDIA’s too (517 TFLOPS FP8, 1,035 FP4); for the two Orins the dense peak is taken as half the sparse headline (275 and 67 TOPS), an assumption. The model is 3 billion parameters; the KV cache is not counted. The thermal strip is a toy first-order model with made-up enclosure numbers and a 99 °C throttle point (the Orin software throttle in the Jetson Linux guide).

Chapter 0

The 7-Minute Throttle

Follow every watt of a robot’s computer into heat, and see why the speed you measure in the first minute is not the speed you keep

You bolt a Jetson into a delivery robot. On the bench it answers every camera frame in 40 ms. You are proud. You seal the robot’s shell, drive it around the car park, and after a few minutes the robot starts to stutter. Nothing crashed. No code changed. The computer is simply slower than it was.

The cause is heat. Every watt that goes into a chip comes out as heat. A chip that is dissipating 100 W in a sealed box is a small heater, and the box has to move that heat into the air. Until it does, the chip gets hotter.

Power becomes heat, heat becomes temperature

A watt is one joule of energy each second. A processor turns almost all of its electrical power into heat. The part that matters is the junction, the tiny region of silicon where the transistors switch. Its temperature is the junction temperature, written Tj. You cannot touch it. You read it from a sensor on the die.

Heat flows from the junction to the air through a chain: the die, the package, a heat sink, the enclosure, the room. Each link resists the flow a little. Add the links up and you get one number, the thermal resistance Rth, in kelvin per watt (K/W). A low Rth means heat escapes easily. Chapter 5 builds this idea properly; here we only need the one rule it gives.

In steady state, the junction sits above the room by power times resistance. A chip at 100 W with 0.8 K/W runs 80 K hotter than the air around the box. In a 35 °C room that is 115 °C. That is above any safe limit, so something has to give.

Why it takes minutes

The junction does not jump to 115 °C. The heat sink, the case and the air inside the box all have to warm up first, and they warm slowly. Think of a pan on a hob. The ring is hot at once. The water takes minutes. The pan’s slowness is its thermal time constant, written τ (tau). After one τ the temperature has covered about 63% of the way to its final value.

Tj(t)
The junction temperature t seconds after the chip starts working hard.
Ta
The ambient temperature: the air around the robot before it starts.
P
The power the chip dissipates, in watts. It all turns into heat.
Rth
The thermal resistance from junction to air, in K/W. P times Rth is the final rise above ambient.
τ
The thermal time constant, in seconds. It says how slowly the enclosure warms.

Now a worked example with toy numbers. Take P = 100 W, Rth = 0.8 K/W, Ta = 35 °C and τ = 260 s. The final rise is 100 × 0.8 = 80 K, so Tj would settle at 115 °C. The software throttle on a Jetson AGX Orin starts at 99 °C. That is a rise of 64 K, which is 64 / 80 = 0.8 of the way. Solve 1 − e−t/τ = 0.8: e−t/τ = 0.2, so t = τ × ln 5 = 260 × 1.609 = 418 s. That is 6.97 minutes. The throttle arrives at about minute seven.

Slide the power and the resistance below. The curve rises, bends, and either flattens under the dashed throttle line or crosses it.

Warm up the box

The curve is junction temperature over ten minutes. The dashed line is the 99 °C throttle point. Raise the power or the resistance and watch the crossing move left.

100 W
0.80 K/W

Toy model: ambient 35 °C, time constant 260 s, one lump of thermal mass. The 99 °C point is the Orin software throttle from NVIDIA’s Jetson Linux guide. Real boxes have several time constants.

What the throttle does

The chip protects itself. When a thermal zone passes its trip point, the software lowers the clocks. In the Jetson Linux guide for Orin, software throttling starts at 99.0 °C and hardware throttling at 103.0 °C. Hardware throttling cuts the clocks by fixed steps: 87.5%, 75% or 50%. The software shutdown follows at 104.5 °C and the hardware shutdown at 105.0 °C.

A lower clock means less power, so less heat. The chip settles at a lower, sustained speed. The speed it hit when cold is the boost speed. Your first benchmark measured boost. Your robot lives at sustained.

Symptom, measurement, fix

The symptom is latency that creeps up after several minutes, with no code change, and drops again after a rest. The measurement is a log of clocks and temperatures over time. On a Jetson, tegrastats prints the GPU clock (GR3D_FREQ), the memory clock (EMC_FREQ) and the temperatures every second by default. Run it for ten minutes under your real load, not for ten seconds. The fix has three parts: a better path for heat (a fan, a heat sink bonded to the case), a lower power mode that you choose on purpose, and a latency budget set at the sustained speed.

The hero at the top of the page does all of this for a model. The roofline above the strip says how fast the model can go. The strip says how long that holds. Both come from the chapters below.

The road

  1. The roofline from zero: two numbers on a datasheet and one picture.
  2. Decode hits the wall: why a 3B model needs 11 ms per token on Thor.
  3. Joules, not watts: the cost of one answer.
  4. Power modes: nvpmodel, jetson_clocks and the DVFS governor.
  5. Thermal design points and enclosures: sizing Rth.
  6. Measuring power on the SoC: rails, sampling and attribution.
  7. Compute budgets across tasks: one SoC, many jobs.
  8. Field guide: numbers, checklist and code.
A robot is fast for six minutes, then slows by a third, then stays slow. Nothing in the code changed. What is the best first measurement?

Chapter 1

The Roofline from Zero

Draw the two limits of any computer on one picture, and read off which one stops your program

Picture a restaurant kitchen with one very fast cook and one slow runner who fetches ingredients from the store room. If every dish needs a long cook and few ingredients, the cook is the limit. If every dish needs a basket of ingredients and a quick toss, the runner is the limit, and the fast cook stands idle. The kitchen’s speed is set by whichever of the two is slower for the dish you ordered.

A processor is that kitchen. The cook is the arithmetic units. The runner is the memory system. The roofline model, by Williams, Waterman and Patterson (Communications of the ACM, 2009), draws both limits on one chart so you can see at a glance which one binds.

Three terms, defined

A FLOP is one floating-point operation: one add or one multiply of decimal-style numbers. A multiply followed by an add counts as two. A chip’s peak is the most operations it can finish each second, written in TFLOPS (trillions of operations per second). For integer work the unit is TOPS.

Memory bandwidth is how many bytes the memory can deliver each second, in GB/s. On Jetson Thor the datasheet says 273 GB/s. It is a property of the memory chips and the wires, not of the arithmetic units.

Arithmetic intensity is the dish: how many operations your program does for each byte it fetches from memory. It is operations divided by bytes, in FLOP per byte. It belongs to the program, not to the chip.

The rule

In one second the memory can deliver B bytes. Your program does I operations with each byte. So the memory can feed at most B × I operations per second. The arithmetic units can do at most the peak. The chip cannot beat the smaller of the two.

attainable
The most operations per second your program can reach on this chip.
peak
The arithmetic ceiling from the datasheet, in operations per second. It is the flat roof.
BW
Memory bandwidth in bytes per second. On the chart, BW sets the slope of the slanted wall.
I
Arithmetic intensity of your program, in operations per byte. It is the position along the bottom axis.

Plot attainable speed against intensity on log scales and the rule draws a roof: a slanted wall that rises with I, then a flat roof once the wall meets the peak. The corner is the ridge point, where BW × I equals the peak. Divide the peak by the bandwidth to find it: ridge = peak / BW. A program to the left of the ridge is memory-bound. A program to the right is compute-bound.

Worked numbers for three Jetsons

Use NVIDIA’s own figures. For Jetson Thor the table lists 1,035 TFLOPS for sparse FP8 and 517 TFLOPS for dense FP8, with 273 GB/s of memory bandwidth. The ridge is 1,035 × 1012 / 273 × 109 = 3,791 FLOP per byte for sparse FP8, and 517 / 273 × 1,000 = 1,894 for dense FP8. The sparse FP4 headline of 2,070 TFLOPS gives 7,582.

The word sparse matters. Structured sparsity lets a chip skip half the weights in a fixed pattern, which doubles the headline, but only if your model was pruned to match. Most models are not. Quote the dense number unless you know yours is sparse.

For the AGX Orin 64GB, 275 sparse INT8 TOPS and 204.8 GB/s give a ridge of 1,343. For the Orin Nano Super, 67 TOPS and 102 GB/s give 657. In every case the ridge sits at hundreds or thousands of operations per byte. Your program must do that much work per byte fetched to use the chip fully.

Now see where ordinary programs land. A sum of two FP32 vectors does one add and moves 12 bytes (two reads, one write), so I = 0.083. A matrix times a vector in FP8, with n × n weights, does 2n2 operations and reads n2 bytes, so I = 2. A matrix times a matrix of side 4,096 in FP8 does 2n3 operations on 3n2 bytes, so I = 2n/3 = 2,731. Try the slider on Thor with dense FP8.

Find the bound

The purple slanted line is the memory wall. The blue flat line is the compute roof. Drag the intensity and watch the dot climb the wall, then hit the roof. The three marks are real programs.

2 FLOP/B

Thor figures from NVIDIA: 517 TFLOPS dense FP8, 273 GB/s. Program intensities are computed from the operation and byte counts in the text.

At I = 2 the wall allows only 273 × 109 × 2 = 546 GFLOPS, which is 0.1% of the 517 TFLOPS roof. The cook is nearly asleep. Only the big matrix product, at 2,731, passes the ridge and runs at full speed.

A chip has a peak of 100 TFLOPS and a bandwidth of 500 GB/s. Where is its ridge point, and which limit binds a program with intensity 50 FLOP/B?

Chapter 2

Decode Hits the Wall

Place a 3-billion-parameter model on the roofline, and see why 11 ms per token is a floor that no TOPS number can lower

A robot’s policy model writes its answer one token at a time. A token is a small piece of output, such as a word piece or one step of an action. To write token 7 the model needs token 6, so the steps cannot run in parallel. This stage, one token after another, is called decode. (The latency stack that wraps it, from camera to motor, is the subject of the inference latency stack.)

Decode is where the edge roofline bites hardest. Here is why, from the inside.

What one decode step does

A model with 3 billion parameters (stored numbers, also called weights) works like this for one token. The token becomes a vector. That vector is multiplied by one big matrix of weights, then the next, layer after layer. Every weight is used in exactly one multiply and one add. So one token costs about 2 operations per parameter.

For 3 billion parameters that is 6 × 109 operations, or 6 GFLOP. Thor does 517 TFLOPS dense FP8, so the arithmetic alone takes 6 × 109 / 517 × 1012 = 11.6 µs. Microseconds.

But the weights live in main memory, not on the chip. Each weight is used once per token, then not again until the next token. The chip has to read all 3 billion of them every step. In FP8, each weight is one byte, so that is 3 GB per step.

The arithmetic of the wall

Read 3 GB at 273 GB/s: 3 / 273 = 0.01099 s, which is 10.99 ms. Compare that with 11.6 µs of arithmetic. Memory takes about 950 times longer. The cook finishes and waits for the runner.

tstep
Time for one decode step. At batch 1 it gives the latency per token.
bytes
Bytes read from memory in one step: parameters times bytes per parameter. The KV cache adds more, and this lesson leaves it out.
BW
Memory bandwidth. Thor: 273 GB/s.
ops
Operations in one step: 2 times the parameters times the batch size.
peak
Arithmetic roof for the chosen precision.

The intensity at batch 1 in FP8 is 6 GFLOP / 3 GB = 2 FLOP per byte. On the chart that is far left, near the bottom of the wall. The prediction is a hard floor: no faster than 11 ms per token on Thor. On the AGX Orin 64GB the same model needs 3 / 204.8 = 14.6 ms. On the Orin Nano Super it needs 3 / 102 = 29.4 ms.

A robot loop that runs at 30 Hz has a 33 ms tick. On Thor you can decode at most 33 / 11 = 3 tokens per tick. On the Nano Super you can decode one. That is a design fact you can state before you write any code.

Two ways to move the dot

The dot moves in two ways. Each does something different, and they are easy to mix up.

Shrink the bytes. Store the weights in 4 bits instead of 8. The model now has 1.5 GB to read, so one step takes 1.5 / 273 = 5.5 ms. Half the time, from half the bytes. The intensity doubles to 4 FLOP/B because the same work now sits on fewer bytes.

Raise the batch. Serve several streams at once, for instance four cameras, or several candidate actions. The weights are still read once, but now each one is used B times. Operations grow by B and bytes do not. Intensity is 2B in FP8. The step time stays at 11 ms until intensity reaches the ridge. For dense FP8 on Thor the ridge is 1,894, so the batch must reach about 947 before arithmetic matters. Until then each extra stream is nearly free.

Stream the weights

Two bars per step: the purple bar is the time to read the weights, the blue bar is the time to do the arithmetic. The step takes the longer of the two. Change the device, the precision, the model size or the batch.

3 B
1

Peaks are dense: Thor 517 TFLOPS FP8 and 1,035 FP4 (NVIDIA); Orin 137.5 and Nano Super 33.5 TOPS are half of their sparse headlines (275 and 67), an assumption. FP16 is modelled at half the FP8 rate; Orin and Nano have no FP4 unit, so 4-bit weights are read small but computed at the INT8 rate. KV cache and activations are not counted.

Failure mode: “INT8 raises the roof”

The symptom is a team that buys a chip with double the TOPS and sees no speed-up on a one-token-at-a-time model. The measurement is to compute bytes per step over bandwidth, and compare it to the measured latency. If they match, the model is on the wall. The fix is to cut bytes (lower precision, a smaller model, pruned weights) or to raise the intensity (batch, speculative decoding), not to raise the roof. A higher roof helps only right of the ridge. Batch-1 decode stays left of it at every precision.

Quantisation helps decode because it shrinks bytes, and only if the runtime keeps the weights small in memory. A runtime that stores INT4 but expands to FP16 before use gains nothing. The topic of quantising a model while proving it still gives the same answers is in quantize, compile, prove parity, and the wider efficiency toolbox is in TinyML: efficiency.

A 3B model in FP8 runs at 11 ms per token on a device with 273 GB/s. You switch to 4-bit weights on the same device, with the same runtime and batch 1. What do you expect?

Chapter 3

Joules, Not Watts

Measure what one answer costs the battery, and find out why the lowest power mode can be the cheapest and not the slowest

Two robots carry the same battery and run the same model. Robot A uses a 15 W mode and takes a long time per answer. Robot B uses a 50 W mode and answers quickly. A watt meter says B is hungrier. Does that mean B dies first?

Not necessarily. Watts measure how fast energy flows. A battery holds a fixed amount of energy. What drains it is the total energy you spend, so the right question is how much energy one answer costs.

The joule

A joule (J) is the unit of energy. A watt is one joule per second. If a chip draws P watts for t seconds, it spends E = P × t joules. A battery rated 50 Wh holds 50 × 3,600 = 180,000 J. Divide that by the energy of one answer and you know how many answers the battery gives.

E
Energy spent for one answer, in joules, including the wait until the next request.
Pact
Power while the chip works on the answer.
t
Time the chip works. For a bandwidth-bound step it is bytes divided by bandwidth.
Pidle
Power while the chip waits. It is not zero.

T is the time between requests, for example 100 ms at 10 answers per second. The chip works for t and waits for the rest. The idea of finishing fast so the chip can sleep is called race to idle. It works when a faster clock really shortens the work, and when the idle floor is low. Sleep states and the battery budget are covered in sleep and the battery budget.

A worked example on the AGX Orin 64GB

NVIDIA’s nvpmodel table gives four modes for the 64GB module. The memory clock is 2,133 MHz in the 15 W mode and 3,200 MHz in the 30 W, 50 W and MaxN modes. Assume bandwidth follows the memory clock. Then the 15 W mode has 204.8 × 2,133 / 3,200 = 136.5 GB/s, and the others keep 204.8 GB/s.

Our 3 GB decode step takes 3 / 136.5 = 22.0 ms in the 15 W mode and 3 / 204.8 = 14.6 ms in the other three. Now assume, for a toy, that each mode draws its budget while working: 15 W, 30 W, 50 W and 60 W (the module’s average TDP budget for MaxN). The energy per step, with no idle term, is:

ModeStep timePower (toy)Energy per step
15 W22.0 ms15 W0.33 J
30 W14.6 ms30 W0.44 J
50 W14.6 ms50 W0.73 J
MaxN14.6 ms60 W0.88 J

The 50 W mode is no faster than the 30 W mode, because the memory clock is the same. It spends 67% more energy for the same answer. The lowest mode is the cheapest per answer. It is also the slowest, which may break a latency budget. Nothing here is free; you are choosing a point on a curve.

Use the meter below. It adds the idle term, so the request rate matters.

Joules per answer

Each bar is the energy of one answer: the warm part is working, the grey part is waiting. Pick a mode to highlight it, then change how often a request arrives.

10 Hz

Illustrative: each mode draws its nominal budget while working (MaxN taken as 60 W), idle power is 6 W, bandwidth follows the memory clock in NVIDIA’s nvpmodel table, and the model is 3 GB of FP8 weights read once per answer. Measure your own board; real draw is below the budget and varies.

Why bytes dominate energy

Moving data costs more energy than doing arithmetic on it. Mark Horowitz’s widely quoted 45 nm table, reprinted in Han et al. (2015), lists a 32-bit float add at 0.9 pJ, a 32-bit float multiply at 3.7 pJ, a 32-bit read from on-chip SRAM at 5 pJ and a 32-bit read from DRAM at 640 pJ. A picojoule (pJ) is a millionth of a millionth of a joule. DRAM costs 640 / 5 = 128 times more than SRAM, and 173 times more than a multiply.

Our 3 GB sweep is 750 million 32-bit words. At the 45 nm price of 640 pJ each that is 0.48 J. Modern LPDDR5X is cheaper per bit than a 45 nm chip, and I did not find a verified modern figure, so treat this only as a ratio. The lesson stands: a smaller model, fewer bytes and lower precision cut energy as they cut time.

Failure mode

The symptom is a power budget met on paper and a battery that dies early. The measurement is joules per inference: integrate power over a full request cycle, idle included, and divide by the number of answers. The fix is to choose the mode by joules per answer at your real request rate, and to confirm that a higher mode is really faster before you pay for it.

Mode X draws 30 W and takes 15 ms per answer. Mode Y draws 50 W and also takes 15 ms. Ignoring idle time, what is the energy per answer in each, and what does it say?

Chapter 4

Power Modes: nvpmodel, jetson_clocks and DVFS

Read a power-mode table as a menu of clocks, and learn why the first inferences after idle can be the slow ones

Your robot has been parked for ten minutes. Someone presses go. The first three answers take 60 ms each. The fourth takes 25 ms, and so do all that follow. Nothing is broken. The chip was asleep at a slow clock and it needed a moment to wake.

This chapter is about the dials that control that behaviour. There are two layers. The first picks a budget. The second decides how quickly the clocks move inside it.

Clock and voltage: the operating point

A chip’s speed is its clock, the number of ticks each second, in MHz. A faster clock needs a higher supply voltage so the transistors switch in time. Switching power in CMOS (the chip technology almost everything uses) grows roughly as C · V2 · f: the capacitance being charged, the square of the voltage, and the frequency. So a higher clock costs more than its share of power, because the voltage rises too.

A pair of clock and voltage that the vendor has tested is an operating performance point, or OPP. A chip has a table of OPPs for each block: the CPU cores, the GPU and the memory. DVFS, dynamic voltage and frequency scaling, is the act of moving between rows of that table while the chip runs. A governor is the software that decides when to move. It watches load and raises the clock when the work is heavy.

nvpmodel: a menu of budgets

NVIDIA’s nvpmodel tool picks a power mode: a stored choice of how many CPU cores are online and the highest clock each block may reach. The Jetson Linux guide lists the AGX Orin 64GB modes like this.

ModeCPU cores onlineMax CPU MHzMax GPU MHzMemory MHz
MaxN (0)122,201.61,3013,200
15W (1)41,113.64082,133
30W (2), default81,7286123,200
50W (3)121,497.68163,200

You switch with sudo /usr/sbin/nvpmodel -m 3 and query with sudo /usr/sbin/nvpmodel -q. The AGX Orin module range is 15 W to 60 W. Jetson Thor ranges from 40 W to 130 W, per NVIDIA’s announcement. Two details from the guide matter. MaxN is “an unconstrained power mode” that allows the maximum number of cores and clock, and hardware throttling engages when total module power passes the TDP budget, so MaxN is not guaranteed to be the fastest. And the memory clock is the same 3,200 MHz in three of the four modes, which is why Chapter 3 found no speed difference between 30 W and 50 W for a bandwidth-bound step.

A mode is a ceiling, not a setting. Inside it the governor still moves the clock up and down.

The governor and the slow first inferences

The default governor samples load and raises the clock when the load stays high. It starts low to save power. A model that runs in bursts, or just after an idle gap, first runs while the clock is still climbing. That is the cause of the slow first answers. The latency of the early inferences is higher than the latency in steady state, and it varies between runs.

jetson_clocks removes the variation. According to NVIDIA’s forum guidance it disables the DVFS governor and locks the clocks at the maximum of the active mode. It also sets the fan to full speed in advance. Run it after nvpmodel, because it locks to whichever mode is active. sudo jetson_clocks --restore returns the saved settings.

Menu and warm-up

Top: the chosen mode’s ceilings, from NVIDIA’s table. Bottom: the latency of 40 inferences after an idle gap. Switch the governor and see the first bars change.

Ceilings are NVIDIA’s nvpmodel table for the AGX Orin 64GB. The warm-up ramp is a toy: the clock starts at 30% of the ceiling and approaches it with a time constant of six inferences. Your governor will differ, so measure it.

The CPU side: schedutil and energy-aware scheduling

On the CPU, Linux has its own governor, schedutil, which sets the clock from the scheduler’s view of load. Energy-aware scheduling (EAS) goes one step further: it uses a table of power costs to place each waking task on the CPU where it costs the least energy while still finishing in time. The kernel documentation says EAS targets heterogeneous CPU topologies such as Arm big.LITTLE and does not support symmetric ones. It also requires schedutil. Phones and many robots with mixed cores use it. Check your own chip before you rely on it.

Failure mode

The symptom is variable latency and a slow start, mostly right after idle. The measurement is to log latency for each of the first 50 inferences after a pause, and the GPU and memory clocks beside them. The fix is to lock clocks for the work that needs steady latency, and to budget the power on purpose: pick a mode, run jetson_clocks, and confirm cooling can carry that mode (Chapter 5). Locking clocks in a hot box only moves the problem to the throttle.

A robot’s first few answers after a pause are slow, then fast. In which setup does the effect disappear, and what is the cost?

Chapter 5

Thermal Design Points and Enclosures

Turn a power mode into a thermal resistance you must build, and see how the same module needs very different boxes

You are the mechanical engineer on a robot. The software team says the computer runs at up to 130 W. The industrial designer wants a small, sealed, dust-proof shell with no vents. You have to say yes or no, and you have one tool: a number in kelvin per watt.

TDP is a promise about heat, not about speed

TDP, thermal design power, is the heat the cooling system must carry away so the chip stays inside its limits. It is not the power the chip draws at its peak, and it is not a guarantee of speed. A module with a 60 W budget can briefly draw more. It must average no more than the budget, or the throttle steps in. (NVIDIA lists the AGX Orin 64GB average budget at 60 W and an instantaneous limit of 65 W.)

The heat path as a chain of resistances

Chapter 0 gave one number, Rth. It is really a chain, and the links add up. Heat leaves the junction and crosses the package into the case. It crosses a thin layer of thermal paste or pad into a heat sink. It crosses from the sink into the air inside the box. Then it crosses the shell to the outside. Each crossing has a resistance in K/W, and in a series chain the total is the sum.

Rth,max
The largest total resistance, junction to outside air, that keeps the chip at its limit. A bigger real resistance means a throttle.
Tlim
The temperature at which throttling starts. We use 99 °C, the Orin software throttle.
Ta
The hottest air the robot will see in service. A summer car park, not a lab.
P
The sustained power of the chosen power mode.

This is the rule from Chapter 0 turned around. Before, we knew Rth and found the temperature. Now we know the limit and find the Rth we are allowed.

Worked numbers for Thor’s envelope

Take Tlim = 99 °C and Ta = 35 °C. The rise allowed is 64 K. NVIDIA gives Jetson Thor a 40 W to 130 W power range. At 130 W the allowed resistance is 64 / 130 = 0.49 K/W. At 100 W it is 0.64 K/W. At 40 W it is 1.60 K/W. The same module in its lowest mode may sit in a box 3.3 times more resistant than in its highest mode.

The ambient temperature matters as much. On a 45 °C day the rise falls to 54 K, and the 130 W limit becomes 54 / 130 = 0.42 K/W. A box that passes in the lab fails in the sun.

Now compare two toy boxes. In a sealed shell, natural convection inside and out might give: junction to case 0.10, case to heat sink through paste 0.05, heat sink to sealed-box air plus shell to the outside 0.90 K/W. Total 1.05 K/W. At 35 °C that supports (99 − 35) / 1.05 = 61 W. With a fan across the heat sink the last link may fall to 0.25 K/W. Total 0.40 K/W, and the box supports 160 W. All these resistances are made-up, but the pattern is real: the last link, from the hardware to the outside air, dominates, and it is the one that design changes most.

Dial the enclosure

The curve is the largest resistance each power allows. Stay under it and the chip holds speed. Turn the dial for your box and the ambient air, and see which Thor power modes survive.

1.05 K/W
35 °C

Toy resistances (illustrative, not from a datasheet). The 40 W and 130 W marks are the ends of NVIDIA’s stated Jetson Thor power range; the 99 °C throttle is the Orin software throttle, used here as an assumption for Thor.

Fans and curves

A fan lowers the last resistance, and it does so in steps. Jetson boards run a daemon, nvfancontrol, with fan profiles. On Orin NX and Orin Nano the default profile is “quiet” and another is “cool”, and sudo nvfancontrol -q shows the active one. A quiet profile keeps the fan slow for noise; a cool profile keeps it fast. The throttle point then arrives later, at a price in noise and in the fan’s own power and life. A robot that shares a room with people may not be allowed the loud profile.

Failure mode

The symptom is a robot designed to the peak power in a sealed box, which throttles in service. The measurement is to run the real load at the hottest ambient you expect, wait until the temperature stops rising, then compute Rth = (Tj − Ta) / P. Compare it with the Rth,max for your mode. The fix is one of three moves: lower the mode so Rth,max grows, improve the heat path so Rth falls, or accept the sustained speed and budget for it. When the box is too small for the mode, the throttle is the design.

A module holds 99 °C at most. The air is 40 °C. It will run at 118 W sustained. What is the largest box resistance that avoids a throttle?

Chapter 6

Measuring Power on the SoC

Read the power rails of a module, know which blocks share each rail, and choose a sampling rate that does not lie

A teammate shows you a log: “CPU rail 14 W, GPU rail 3 W.” The model runs on the GPU, so the numbers look backwards. Who is right? Nobody is wrong. The rail names do not mean what the teammate thought, and the log is sampled once a second while the work comes in 15 ms bursts.

A rail, a shunt and a monitor

Inside a module, a power-management chip makes several supply voltages from the main input. Each supply line is a rail. A rail feeds one group of blocks on the chip. To measure a rail you place a tiny resistor in its path, a shunt. A current flowing through it makes a small voltage across it (Ohm’s law: V = I × R). A monitor chip reads that voltage and the rail voltage, and works out current and power.

On Jetson AGX Orin the monitor is the INA3221, a three-channel current and voltage monitor read over I2C (a two-wire chip-to-chip bus). Two of them sit at addresses 0x40 and 0x41, per the Jetson Linux guide.

The rail map

On the first INA3221 (0x40), channel 1 is VDD_GPU_SOC, channel 2 is VDD_CPU_CV, channel 3 is VIN_SYS_5V0, and channel 4 is the sum of channels 1 and 2. On the second (0x41), channel 2 is VDDQ_VDD2_1V8AO, the DDR and 1.8 V always-on rail. You read them under /sys/bus/i2c/drivers/ina3221/, for example curr1_input for current in mA. The guide warns never to write to those nodes. The tegrastats tool prints the same rails as VDD_GPU_SOC and so on, in mW.

Read the names with care. By their names, VDD_GPU_SOC feeds the GPU and the surrounding system-on-chip logic, and VDD_CPU_CV feeds the CPU cores and the computer-vision blocks. A decode step that streams weights through the memory system loads the first rail. A label like “CPU rail” in a log can hide blocks that share the rail. The first job of any power log is to write down which rail feeds what. (I did not verify the Thor rail map, so check your own board’s guide.)

The sum channel matters too. On AGX Orin the power-limit protection reads the summation channel, and the guide says it caps the CPU and GPU at 50% when the instantaneous limit is passed: 65 W for the 64GB module.

Read the rails

Pick a workload. Each card is one rail, with the blocks its name says it feeds. Channel 4 is the sum of channels 1 and 2. Notice where a memory-bound decode shows up.

Rail names and the channel layout are NVIDIA’s (AGX Orin, Jetson Linux guide). The wattages are illustrative, made up to show the pattern, and are not measurements.

Sampling: a slow meter misses fast work

Now the time axis. tegrastats prints every 1,000 ms by default, and you can change that with --interval in milliseconds. On an x86 machine, Intel’s RAPL energy counters refresh about every 1 ms. If your work comes in bursts shorter than the sampling interval, an instantaneous reading is a coin toss.

Worked example. A model answers 10 times a second. Each answer is 14.6 ms of 60 W work, then 6 W of idle. The true average is (60 × 14.6 + 6 × 85.4) / 100 = 13.9 W. A reading taken at a random moment sees 60 W 14.6% of the time and 6 W the rest of the time. A reading every 1,000 ms over two seconds gives only two samples, so the mean can be 6 W, 33 W or 60 W. Only with many samples does the average settle.

Sample the bursts

The warm line is the true power over two seconds. The teal dots are what a meter reads at the interval you pick. Press Resample to shift when the meter starts.

1000 ms

Toy waveform: 14.6 ms bursts at 60 W every 100 ms on a 6 W floor, so the true mean is 13.9 W. The 1,000 ms default and the roughly 1 ms RAPL refresh are from NVIDIA’s and Intel’s documents. A real shunt monitor also averages inside each reading.

Failure mode

The symptom is a power number that does not match physics: a busy GPU on a quiet rail, or an average that moves each run. The measurement is to read the rail map first, then sample faster than the shortest burst, or use an energy counter that accumulates (RAPL-style) and read it twice. The fix is to attribute power by rail, name the rail in every plot, and report mean power over a full request cycle, not a single reading. The measuring instruments for firmware, a power profiler and a logic analyser, are covered in sleep and the battery budget.

A model runs 8 ms of 50 W work every 50 ms on a 5 W floor. A meter reads once per second. What is the best fix?

Chapter 7

Compute Budgets Across Tasks

Add up what every task on the robot asks of the one chip, and find out who slows down when the sum is too big

Three teams build one robot. The perception team shows a vision network that runs in 5 ms. The language team shows a policy that decodes at 20 tokens a second. The mapping team shows a map builder that keeps up with the cameras. Each demo is fine. Then all three run on one Jetson, and every number gets worse.

Each team measured alone. The chip is shared. The memory bus, the power limit and the heat belong to everyone, so the robot’s speed is set by the sum.

What is shared

Four things are shared on a module like Jetson Thor. The first is memory capacity: 128 GB of LPDDR5X, which holds every model at once. The second is memory bandwidth: 273 GB/s, one bus used by the CPU, GPU, camera engines and video encoders together. The third is power: the mode’s budget, 40 W to 130 W on Thor. The fourth is heat: the enclosure from Chapter 5.

The bandwidth is the first to run out for models that decode, as Chapter 2 showed. A decode step uses the full bus for 11 ms. A second task that also reads the bus makes the step longer. We call this contention: two users of one resource, each slowed by the other.

The budget as a table

A compute budget is a plan that gives each task a share of each shared thing, and checks the total against what the chip can sustain. Build it in three steps. Step 1: for every task, write its demand in the same unit, such as GB/s of memory traffic. Step 2: sum the demands. Step 3: compare the sum with a capacity you trust, which is lower than the datasheet peak, since no real system reaches the peak bandwidth.

Worked example with toy numbers on Thor. The policy decodes a 3 GB FP8 model at 20 tokens a second, so it reads 3 × 20 = 60 GB/s. The perception network reads 1.2 GB per frame at 30 frames a second, which is 36 GB/s. The mapper streams 25 GB/s. The camera and encoder engines add 20 GB/s. The sum is 141 GB/s. Take 75% of 273 as the sustainable capacity: 205 GB/s. The load is 141 / 205 = 69%. It fits, with a margin.

Now ask the policy for 40 tokens a second. It needs 120 GB/s, and the sum becomes 201 GB/s, 98% of capacity. There is almost no margin left. Ask for 50, and the sum is 231 GB/s, which is 113%. The demand is above the capacity. If every task slows in proportion, each gets 205 / 231 = 89% of what it wants, so each runs 12.7% slower than its solo demo. The policy’s 11 ms step becomes 12.4 ms. No single team broke anything.

Fill the budget

The bar stacks each task’s memory traffic. The dashed line is the sustainable capacity. Raise the policy rate or the perception rate, or switch the mapper off, and watch who slows down.

20 tok/s
30 Hz

Toy budget. Thor’s 273 GB/s is NVIDIA’s; the 75% sustainable fraction, the perception network (1.2 GB per frame), the mapper (25 GB/s) and the camera engines (20 GB/s) are made up. The policy reads 3 GB of FP8 weights per token. Slowdown is shared in proportion, a simplification.

Partition by latency, power and memory

A budget is more than a bandwidth sum. Give each task a deadline (the longest it may take), a power share and a memory footprint. Tasks with hard deadlines, like obstacle avoidance, get first call. Soft tasks, like logging, get what is left. Some chips let you pin work to a block, for example vision work on a fixed-function accelerator, so the GPU and its bus are free for the policy. Jetson Thor has no deep learning accelerator; the AGX Orin 64GB has two. Check what your module has before you plan to offload.

Failure mode

The symptom is a robot that misses deadlines only when all features run together. The measurement is to run every task at its real rate at once, log each one’s latency, and compare with the solo numbers. The fix is a written system-level budget, owned by one person, with a measured number for every row, re-checked whenever a team changes a model, a rate or a precision. Without it, each team benchmarks alone and the sum exceeds the SoC.

Tasks need 60, 36, 25 and 20 GB/s. The sustainable capacity is 120 GB/s. By what factor do the tasks slow if they share in proportion?

Chapter 8

Field Guide

Keep the roofline check, the thermal check, the numbers and the commands in one place

The whole lesson is two checks. The roofline check asks which limit stops the model, memory or arithmetic, and gives a floor on latency before you write code. The thermal check asks whether the box holds that speed after minute seven. A benchmark without its power mode and its enclosure is not reproducible, so always write both next to the number.

The numbers

QuantityValueSource
Thor memory128 GB LPDDR5X, 256-bit, 273 GB/sNVIDIA, Introducing Jetson Thor
Thor peak2,070 TFLOPS sparse FP4; 1,035 sparse FP8; 517 dense FP8NVIDIA, Introducing Jetson Thor
Thor power and price40 W to 130 W; developer kit $3,499; no DLANVIDIA blog; NVIDIA TensorRT DLA docs and developer forum (no DLA)
Thor ridge7,582 sparse FP4; 3,791 sparse FP8; 1,894 dense FP8 (FLOP/B)Derived: peak / 273 GB/s
AGX Orin 64GB275 sparse INT8 TOPS; 204.8 GB/s; 15 W to 60 W; ridge 1,343NVIDIA datasheet; derived
Orin Nano Super67 sparse INT8 TOPS; 102 GB/s; ridge 657NVIDIA developer blog; derived
3B FP8 decode3 GB per step: 11.0 ms Thor, 14.6 ms Orin, 29.4 ms Nano SuperDerived: bytes / bandwidth
Orin throttleSoftware 99.0 °C; hardware 103.0 °C; shutdown 104.5 and 105.0 °CJetson Linux guide
Energy table, 45 nmFloat add 0.9 pJ; multiply 3.7 pJ; SRAM 5 pJ; DRAM 640 pJ (32-bit)Han et al. 2015, from Horowitz
Samplingtegrastats default 1,000 ms; RAPL refresh about 1 msJetson Linux guide; Intel SDM

The terms

Arithmetic intensity: operations per byte moved. Ridge point: peak divided by bandwidth. Memory-bound: left of the ridge. Tj: junction temperature. Rth: thermal resistance in K/W. τ: thermal time constant. DVFS: moving between clock and voltage points. Joule per inference: power times time, idle included. Rail: one supply line to a group of blocks.

The checklist

  1. Write the model’s parameters, precision and batch. Compute bytes per step and operations per step.
  2. Divide: bytes over bandwidth, operations over peak. The larger is your floor. Record which one it is.
  3. Check the ridge. If you are left of it, cut bytes or raise the batch; a higher roof will not help.
  4. Pick the power mode on purpose. Compare modes by joules per answer at your real request rate.
  5. Lock clocks if you need steady latency, and confirm the cooling can carry that mode.
  6. Compute the allowed Rth for the hottest ambient. Measure the real one.
  7. Log clocks, temperature and rails for ten minutes under the full load. Sample faster than your shortest burst.
  8. Write one system budget for all tasks. Re-run it with every task running.
  9. Report every result with its power mode, enclosure and ambient temperature.

The core as code

# roofline.py: where does a model sit, and how long does that hold?
import math

DEVICES = {                      # NVIDIA figures: peak ops/s (sparse headline), bytes/s
    "thor": {"peak8": 1035e12, "bw": 273e9},
    "orin": {"peak8": 275e12,  "bw": 204.8e9},
    "nano": {"peak8": 67e12,   "bw": 102e9},
}

def decode_step(dev, params, bytes_per_param, batch=1):
    d = DEVICES[dev]
    ops = 2 * params * batch                  # one multiply-add per weight per stream
    nbytes = params * bytes_per_param         # every weight is read once per step
    t_mem = nbytes / d["bw"]
    t_cmp = ops / d["peak8"]
    intensity = ops / nbytes
    return max(t_mem, t_cmp), intensity, "memory" if t_mem >= t_cmp else "compute"

def throttle(power_w, r_th, ambient=35.0, tau=260.0, limit=99.0, secs=600):
    """First-order warm-up. Returns seconds until the throttle point, or None."""
    rise = power_w * r_th
    if ambient + rise <= limit:
        return None
    return -tau * math.log(1 - (limit - ambient) / rise)

t, i, bound = decode_step("thor", 3e9, 1.0)
print(f"{t*1e3:.1f} ms/token, {i:.0f} FLOP/B, {bound}-bound")   # 11.0 ms, 2 FLOP/B, memory
print(throttle(100, 0.8))                                        # 418.4 s, about minute seven

And the thermal check on a real board, as shell commands.

# the thermal check, on a Jetson, with your real load running
sudo nvpmodel -q                    # which power mode is active?
sudo nvpmodel -m 2                  # choose a mode on purpose (AGX Orin 64GB: 2 = 30W)
sudo jetson_clocks                  # lock clocks at the mode's maximum (run AFTER nvpmodel)
tegrastats --interval 1000 --logfile run.log &   # clocks, temps, rails, every second
python3 run_model_loop.py --minutes 10           # your model, your real input rate
# then: R_th = (Tj_settled - T_ambient) / P_module
sudo jetson_clocks --restore        # give the clocks back to the governor

Where it sits in the field

The roofline is the first model to reach for before any optimisation. It sits between the hardware lessons below it (how DRAM sets bandwidth, how the board boots and runs, Jetson platform bring-up) and the software above (export, partition and fallback, quantize and prove parity, the inference latency stack). The study of DRAM and bandwidth itself is a separate planned lesson, so the roofline here is taught from zero. The roofline returns in GPU performance work in ML performance.

Keep going

Pair this lesson with sleep and the battery budget for the energy side, TinyML: efficiency for shrinking the model, robot real-time performance for deadlines, and real-time Linux for scheduling.

Sources and credit

  1. NVIDIA, Introducing NVIDIA Jetson Thor: Thor figures.
  2. NVIDIA, Jetson Linux Platform Power and Performance: nvpmodel tables, throttle temperatures, INA3221 channels, fan profiles.
  3. NVIDIA, Tegrastats utility: fields and the 1,000 ms default.
  4. NVIDIA, Orin Nano Super: 67 TOPS and 102 GB/s.
  5. Williams, Waterman and Patterson, “Roofline: An Insightful Visual Performance Model for Multicore Architectures”, Communications of the ACM, 2009.
  6. Han, Pool, Tran and Dally, Learning both Weights and Connections for Efficient Neural Networks, 2015, which reprints Horowitz’s 45 nm energy table.
  7. Linux kernel documentation, Energy Aware Scheduling.
  8. Intel, Software Developer Manual Volume 3B, RAPL energy status registers.

Not used, because I could not verify them from a primary source: a specific clock drop for an Orin Nano at 15 W without a fan, a stated percentage of latency creep, and client NPU TOPS figures. Where this lesson needs a thermal number it uses a labelled toy.

The takeaway. Two checks decide an edge design before any code runs. Divide the bytes by the bandwidth to find the floor, and divide the temperature rise by the power to find the box. Then measure both on the real board, for ten minutes.

Go back to the roofline and the strip and try Thor at FP4 with the case sealed. Then open Teach to draw the roofline from memory, or Present to explain the 7-minute throttle to a friend.

The Edge Roofline and the 7-Minute Throttle
NVIDIA, Introducing Jetson Thor · Back to Gleams