Deploying a Large MoE Model on a Four-Node Cluster: Benchmarks and Selection Guide

    This article shares hands-on experience deploying a very large MoE model on a four-node cluster. It covers cluster hardware and network design, memory sizing for weights and KV cache, tiered storage with NVMe offload, multi-node vLLM startup via Ray, stress test methodology and results, typical workload performance, and practical hardware selection advice, with data caveats clearly stated.

    Deploying a Large MoE Model on a Four-Node Cluster: Benchmarks and Selection Guide

    1. Test Objectives and Data Boundaries

    When enterprises deploy very large MoE models in their own data centers, three questions usually come up: Can the cluster run the model as a long-lived service? Is latency acceptable under multi-user concurrency? How far behind is the experience compared with cloud-hosted services? This article answers these three questions using a four-node cluster as an example.

    The data comes from one internal test. The original test did not fully record the model version, input/output lengths, or measurement methodology, so the numbers in this article should be treated as order-of-magnitude references only. Before reusing any of these figures, re-measure on your own hardware and business workloads.

    2. Cluster Hardware and Networking

    The test cluster consists of four nodes, each equipped with one Grace Blackwell-architecture superchip. The exact model is anonymized. Key per-node specifications:

    • CPU: 20-core ARM
    • Unified memory: 128 GB LPDDR5X, shared by the node’s CPU and GPU
    • Storage: ~2 TB NVMe SSD
    • Networking: one 200 Gbps high-speed NIC, connected via RDMA to a 400 G switch
    • Theoretical peak: ~1 PFLOPS (FP4 sparse), ~4 PFLOPS across all four nodes

    Two points deserve special attention. First, the four nodes’ memory is independent; they form a distributed memory pool over the network, with no hardware-level unified addressing. Whether the full 512 GB can actually be utilized depends on how the model is sharded and how the inference engine schedules memory. Second, the switch is 400 G, but each node’s NIC is only 200 Gbps. The ceiling for inter-node communication is 200 Gbps, roughly 25 GB/s. When estimating cross-node traffic, use the NIC rate, not the switch port rate.

    Choosing four small nodes instead of a single large machine was based on three considerations. Memory scales by node, making cost more controllable at the same total capacity. Per-node power draw is low, so deployment works in an ordinary machine room or office rack. RDMA networking keeps cross-node latency low, which matters for the frequent data exchange in expert parallelism. All three depend on the network working correctly: a misconfigured RDMA setup causes a clear throughput drop.

    3. Calculate Memory Before Deployment

    The defining trait of MoE models is a very large total parameter count, while each token only activates a subset of experts. The weight footprint usually exceeds single-node memory, so you need to estimate two components separately before deployment.

    The first component is weights. The footprint is roughly total parameters multiplied by bytes per parameter. FP8 uses 1 byte per parameter, FP4 about 0.5 bytes, plus quantization scaling factors and runtime overhead.

    Take a DeepSeek-class model at the 671B-parameter scale as an example. Full FP8 weights are about 671 GB, already exceeding the 512 GB total memory, so they cannot all stay resident. With expert weights in FP4, weights drop to about 336 GB; after overhead, the space left for KV cache is limited. You must therefore confirm the model’s actual parameter count and quantization format before deployment.

    The second component is KV cache. Its footprint is roughly per-token size multiplied by context length, multiplied by concurrency. Per-token size is determined by the attention architecture. For a model using MLA with 61 layers storing 576 elements per token per layer, each token takes about 35 KB in FP8. One million tokens cost about 35 GB; eight concurrent requests with 64K inputs each cost about 18 GB in total. Models with other attention structures must be recalculated against their actual parameters.

    Taken together, given FP4 expert weights, a single 1M-context request needs about 35 GB of KV cache, and the remaining space can accommodate it. Multiple concurrent long contexts will fill memory quickly, which must be factored into concurrency planning. Also note that under a unified-memory architecture, vLLM’s GPU memory utilization parameter may not mean the same thing as on discrete GPUs — verify this empirically.

    4. Tiered Storage: More Capacity at the Cost of Cold-Data Latency

    The test used a two-tier storage scheme. At the first tier, model weights are sharded by layer and kept resident in the four nodes’ memory, with each node holding roughly a quarter of the weights. At the second tier, large, infrequently accessed auxiliary data — referred to here as Engram-style lookup data — lives on each node’s NVMe SSD and is swapped into memory on demand. This lets memory prioritize hot weights and KV cache. Swap-in/swap-out is handled by the inference engine’s scheduling mechanism, but the exact behavior varies by version; confirm it on the version you actually run.

    The cost of tiered storage shows up in tail latency. A cold-data hit requires reading from SSD, which is far slower than memory access. When the hit rate is low, P95 and P99 latency rise noticeably. Frequent swapping also increases SSD write volume and affects drive lifespan. Before going live, record cache hit rate, swap-in latency, and SSD health metrics, and set alerting thresholds.

    5. Key Points for Multi-Node vLLM Startup

    Running vLLM across nodes requires Ray as the scheduling layer. Below is an illustrative procedure — replace NIC names, IPs, and paths with your actual cluster values.

    1. # Node 0 (head node)
    2. export NCCL_SOCKET_IFNAME=<NIC name>
    3. export NCCL_IB_HCA=<RDMA device name> # Set in RoCE or InfiniBand environments
    4. ray start --head --port=6379
    5. # Nodes 1 to 3 (worker nodes)
    6. export NCCL_SOCKET_IFNAME=<NIC name>
    7. export NCCL_IB_HCA=<RDMA device name>
    8. ray start --address=<head node IP>:6379
    9. # Start the inference service on the head node
    10. vllm serve <model path> \
    11. --tensor-parallel-size 2 \
    12. --pipeline-parallel-size 2 \
    13. --distributed-executor-backend ray \
    14. --max-model-len <set based on memory estimate> \
    15. --gpu-memory-utilization <set based on measurement> \
    16. --kv-cache-dtype fp8

    The parallelism combination here is tensor parallelism 2 times pipeline parallelism 2, for four parallel ranks in total, matching the four nodes with one chip each. Each chip carries roughly a quarter of the weights. Before starting the service, run ray status on the head node to confirm all four nodes and four chips are registered.

    Two parameters should be derived from the earlier estimates. Do not set --max-model-len directly to 1M; back-calculate it from remaining memory and target concurrency. Start --gpu-memory-utilization at a conservative value, observe system memory and OS usage, then raise it gradually.

    6. Stress Test Methodology and Results

    The stress test used fixed concurrency levels of 1, 4, 8, 16, and 32, measuring time to first token (TTFT), inter-token latency (ITL), and total throughput. Each round warmed up first, then ran for 5 minutes, taking steady-state averages.

    Averages hide tail latency, so re-tests should record P50 and P95 as well. Concurrency should be explicitly defined as the number of simultaneously in-flight requests. Each result set should also record: model version, input length, output length, precision configuration, streaming vs. non-streaming responses, and KV cache hit status.

    Key results from this test (all internal-test averages):

    • Single short Q&A request: TTFT on the order of ~0.3 seconds.
    • 8 concurrent requests with 64K long inputs: TTFT rises to the seconds range, with the main cost in the prefill phase of long contexts.
    • 32 concurrent requests: throughput enters a plateau, and the bottleneck shifts from compute to memory bandwidth and cross-node communication. Lowering the maximum context length trades for more concurrency.

    These results were not compared against cloud services under identical conditions, so they do not support a conclusion that the experience matches flagship cloud offerings.

    7. Performance in Typical Scenarios

    For everyday Q&A, responses are smooth, with stable Chinese comprehension and multi-turn dialogue, making it suitable as the foundation for enterprise knowledge Q&A.

    For long-document processing, the 1M context window can ingest hundreds of pages of contracts or technical documents in one pass for summarization and clause extraction. This length is typically beyond what 7B–70B-class local models can handle. A single long-context request consumes a large amount of KV cache, so under multi-request concurrency you need to lower the length ceiling.

    For complex reasoning, math and code reasoning approach flagship open-source model quality. Generation slows as outputs grow longer; for very long outputs, streaming responses improve perceived wait time.

    For agent and coding workloads, the model executes multi-round tool calls reliably. Through an AI gateway’s authentication, rate limiting, and logging capabilities, the model can safely connect to internal enterprise systems. High-frequency short requests like code completion can benefit from lightweight caching and request batching to reduce TTFT.

    8. Selection Recommendations

    First, secure memory before compute. Total memory determines whether weights and KV cache fit; compute determines generation speed. When memory is insufficient, no amount of compute will run the target model.

    Second, plan networking around NIC rates. The 200 Gbps link per node in this article is the ceiling for cross-node communication. When budget is tight, prefer fewer nodes over lower network specs.

    Third, tiered storage expands the range of deployable model sizes at the cost of cold-data tail latency. Before going live, monitor the cache hit rate and set an acceptable ceiling for tail latency.

    Fourth, the management plane matters as much as performance. Model version management, multi-tenant quotas, and call auditing typically affect long-term operating cost more than single-point performance differences.

    Fifth, choose precision by scenario. Mixed FP8/FP4 precision achieved a good quality-throughput balance in this test. For precision-sensitive workloads, keep higher precision in the output layers and validate with your own regression test set before going live.

    9. Applicability Boundaries and FAQ

    This solution fits enterprises whose data must stay on-premises, that need long contexts, and that have moderate daily call volumes. If you need high concurrency, or multiple long contexts running simultaneously, estimate first using the formulas in Section 3. Add nodes or lower the context ceiling where necessary.

    Q: How large an MoE model can 512 GB of memory host?
    A: It depends on the quantization format and KV cache demand. Full FP8 weights for 671B parameters are about 671 GB, exceeding 512 GB. With FP4 expert weights, about 336 GB plus runtime overhead can fit, but remaining headroom is limited.

    Q: What networking does multi-node vLLM deployment require?
    A: Nodes must communicate over RDMA, with the NIC name and RDMA device correctly configured. A misconfiguration slows cross-node communication and clearly degrades throughput. Before deployment, use communication test tools to verify bandwidth and latency.

    Q: How does a 1M context affect concurrency?
    A: KV cache grows linearly with context length and concurrency. With the model architecture estimated in this article, a single 1M request takes about 35 GB, and eight requests at 64K each take about 18 GB. The longer the context, the fewer requests you can serve simultaneously.

    Q: How should I choose NVMe drives for tiered storage?
    A: Choose enterprise-grade, write-endurance-rated NVMe SSDs, sized to the volume of cold data. Before going live, measure the cold-data hit rate and swap-in latency. If tail latency misses the target, add memory or narrow the offload scope.