Balance partitions using the communication the model actually performs
Relate edge cuts, boundary-node reuse and per-layer traffic under explicit assumptions.
On this page
The question for today
What you’ll understand
- Count directed message transfers across an undirected partition cut.
- Distinguish edge balance, node balance and unique boundary feature traffic.
- Identify the communication excluded from a simple cut-based estimate.
Partitioning a graph places some neighborhoods near their features and other neighborhoods across a machine boundary. A low edge cut can reduce communication, but equal node counts alone do not guarantee equal work or memory. High-degree nodes, feature widths, sampling frequencies and repeated boundary reuse all affect the actual cost. Start with a declared communication strategy, then use partition statistics that correspond to its transfers.
A partition objective needs a workload model
For an undirected graph represented by two message directions per edge, one cut edge can require two cross-partition messages per layer under a direct edge-message strategy. Other implementations fetch a source feature once and reuse it for several destinations, replicate boundary features or cache them across batches. Their traffic can depend more on unique remote source rows than cut edges. A partition score should state whether it approximates message bytes, feature fetches, update traffic or simply structural cuts.
Balancing the number of owned nodes helps distribute node-table memory but can leave one machine with many more edges or frequently sampled hubs. Feature dimensions can also differ by node type. Include the memory for optimizer state, adjacency, boundary replicas and batch activations when defining capacity constraints. DistDGL combines graph partitioning and distributed data access to support large training workloads, but a partitioning paper’s reported scaling does not guarantee that a new graph, sampler or machine interconnect has the same bottleneck.
Reuse can change what should be counted
If one remote source feeds many local destinations, pulling its vector once can be cheaper than sending a separate feature-sized message for every edge. Conversely, an attention or edge-conditioned message can depend on destination or edge attributes, making a shared feature fetch only part of the work. Boundary replication reduces read traffic but creates update and version-management obligations. Measure unique fetched IDs and transferred bytes per batch alongside structural cut counts. High cache hit rates can mask stale replicas unless their validation policy is also checked.
A partition map and node-ID remapping must travel together. Repartitioning can change ownership while requests are in flight, so an epoch or routing fence is needed in a design that permits live migration. Decide where gradients for moved nodes are applied and when the old owner stops accepting writes. These requirements are separate from finding a good static cut. A partition assignment that improves read locality but causes dropped or duplicated updates is not a correct optimization of the training system.
Measure hot partitions and backpressure
Instrument the slowest worker, remote request fanout, cross-partition bytes and waiting time rather than reporting cluster averages alone. Sampling can create transient hotspots even when full-graph degrees appear balanced. Bound concurrent requests and batches so one partition’s slowdown does not cause every worker to retain unbounded feature buffers. Communication and compute can overlap, but the overlap depends on dependencies and available resources; adding their isolated peak rates does not produce an end-to-end throughput prediction.
For a simple overload analogy, Reset the queue lab and set both arrival λ=4 and service μ=3. Predict backlog five after two Steps, since elapsed time is one second and the initial backlog is four. Separately Reset and set both λ=2 and μ=3; predict backlog three at the same time. The exact fluid model is max(0,4+(λ−μ)t). It has no partitions, packets or graph sampling and cannot calculate a real worker’s waiting-time distribution.
Work it through
Equal node counts can produce very different cuts
Use the undirected cycle 0–1–2–3–4–5–0. Compare partitions A={0,1,2}, B={3,4,5} with A={0,2,4}, B={1,3,5}. Assume direct messages in both directions, eight four-byte elements per message and two layers. Exclude all other communication.
The contiguous assignment cuts edges 2–3 and 5–0, so c=2. Each cut has two message directions, giving four cross-partition messages per layer despite each partition owning three nodes.
Each vector occupies 8×4=32 bytes. The contiguous assignment therefore transfers 4×32=128 bytes per layer, or 256 bytes across two layers under the specified direct-message strategy.
The alternating assignment cuts all six edges. It sends twelve messages per layer, totaling 12×32×2=768 bytes across two layers, three times the contiguous assignment. Both assignments remain perfectly balanced by node count.
Structural placement changes this declared traffic by a factor of three without changing node balance. A feature-fetch implementation with reuse would require its own boundary-row accounting rather than blindly reusing this formula.
The living notebook
Explore the model
Interactive lab · queue
A hot destination can accumulate work
Reset → set λ=4 and μ=3 → two Steps predict backlog 5 at t=1. Separately Reset → set λ=2 and μ=3 → two Steps predict backlog 3. Both runs start from four.
- Fluid backlog
- 4
- Net rate · λ − μ
- −1 /s
- M/M/1 mean residence
- 1 s
Fluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forChanging controls recomputes a fresh model at retained time; Reset makes comparisons independent. This fluid queue is an overload analogy, not a partition or network simulator.
Pause & reason
Check your understanding
Your turn
Try it yourself
Replace the cycle with the path 0–1–2–3–4–5 and compare the same contiguous and alternating assignments. Keep both-direction 32-byte messages and two layers. Compute both totals.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
The path has five undirected edges. Count cuts before multiplying by directions, bytes and layers.
Compare with the solution
The contiguous assignment cuts only 2–3, so traffic is 1×2×32×2=128 bytes. The alternating assignment cuts all five edges, giving 5×2×32×2=640 bytes. The fivefold difference holds only for the declared direct-message payload boundary and does not include gradients, metadata, reuse or synchronization.
Keep the idea
Take it with you
- Partition quality depends on the chosen message or feature-transfer strategy.
- Equal node counts do not imply equal communication or computation.
- Ownership remapping and update correctness remain necessary during migration.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.