Main Point: An AI model can fit in memory and still run slowly because its calculations wait for data. Measure the bytes crossing the limiting connection and the effective transfer rate before choosing an improvement.
Key Points
- Capacity measures what fits; bandwidth measures data moved per second; latency measures the delay for an access.
- Every bandwidth figure needs a named interface and a clear distinction between peak and measured performance.
- Reusing loaded data can reduce traffic. At an effective 1 TB/s, moving 100 GB once takes an ideal 0.1 seconds; moving it ten times takes 1 second.
1. Separate Storage Space From Data Movement
- The retailer's customer assistant fits in device memory, yet its calculation units often wait. Increasing capacity would provide more room, while the existing delay may come from supplying values to the calculations.
- Memory capacity is the amount a resource can hold. Bandwidth is the amount of data that crosses a specified interface per unit of time. A large working area can still have a narrow delivery passage.
- Persistent storage retains datasets, checkpoints and records after a task ends. Host memory supports the CPU and application software. Device memory holds the accelerator's working state.
- Draw the paths separately: fetching a customer record, preparing inputs on the host, transferring values to the device and reading device memory during model execution. Each path has its own rate and delay. A fast connection at one level cannot remove a bottleneck elsewhere.
2. Label The Boundary Behind A Bandwidth Claim
- High-bandwidth memory (HBM) is DRAM-based memory placed close to accelerators. Stacked memory and advanced integration provide wide interfaces and substantial transfer rates. Its manufacture and packaging affect what can be built.
- A published HBM4 figure may describe one memory stack. A device specification may aggregate several memory interfaces. An application measurement may describe the rate actually achieved by a particular workload. Keep these scopes separate.
- Before dividing bytes by a rate, record the interface, units, source and workload. Check whether the figure is a peak specification, a device aggregate or an effective measured rate.
- Access patterns, contention and other limits can reduce effective bandwidth. A quoted peak becomes useful only when its boundary matches the traffic being analysed.
3. Distinguish Streaming Throughput From Access Delay
- Latency is the delay before a particular access or operation completes. A path can move a large stream each second while an individual small access still takes noticeable time.
- Consider linked audit records: each record reveals the address of the next. The program must wait for that result before requesting the following record. Those dependent access delays accumulate.
- A large transfer of known values can have many requests under way together. Bandwidth then matters more directly. Diagnose whether the application has large streams, small dependent reads or both.
- Values already close to execution can be used sooner than fresh values fetched from farther away. A powerful arithmetic unit can therefore wait even when every value fits somewhere in the system.
4. Reduce Repeated Traffic Where Reuse Is Possible
| Technique | What It Changes | What To Check |
|---|---|---|
| Cache | Keeps selected values close to execution | Whether the same values are used again |
| Tiling | Arranges a calculation into blocks | Whether loaded values serve several operations |
| Fusion | Combines suitable operations | Whether intermediate writes and rereads fall |
| Data layout | Changes how values are arranged | Whether the arrangement matches actual accesses |
- Each technique depends on the program and workload. A cache needs useful reuse; a layout that helps one shape can hinder another. There is no universal improvement percentage.
- Batching, kernels and numerical precision can also affect traffic and device use. Treat them as candidates to measure, with quality and implementation constraints included.
5. Calculate Actual Traffic At The Chosen Interface
Assumptions: Decimal units; 1 TB = 1,000 GB; effective transfer rate is 1 TB/s at the named boundary. The table isolates data movement.
| Case | Traffic | Calculation | Ideal Transfer Component |
|---|---|---|---|
| One read | 100 GB | 100 ÷ 1,000 GB/s | 0.1 s |
| Ten reads without reuse | 1,000 GB | 1,000 ÷ 1,000 GB/s | 1 s |
- The payload's nominal size stays 100 GB in both cases. Repeated movement increases the actual traffic to 1,000 GB.
- Reusing some values nearby can reduce the traffic crossing that boundary. Startup delay, calculation, other transfers and waiting still add time to the complete request. Access patterns can also change the effective rate.
- When measurements show underused calculation units and traffic near its effective limit, inspect access patterns, reuse, kernels, batching, precision and cache behaviour before buying additional capacity.