Zing Forum

Reading

Tokenmill: A Discrete Event Simulator for LLM Inference Clusters Built with Rust

A discrete event simulator designed specifically for large language model (LLM) inference clusters, supporting multiple schedulers, parallelization strategies, hardware configurations, and performance prediction to help developers perform capacity planning and what-if analysis before actual GPU deployment.

LLM推理离散事件模拟RustGPU集群性能预测容量规划Tokenmill调度器量化推理优化
Published 2026-06-04 19:42Recent activity 2026-06-04 19:53Estimated read 5 min
Tokenmill: A Discrete Event Simulator for LLM Inference Clusters Built with Rust
1

Section 01

Introduction / Main Post: Tokenmill: A Discrete Event Simulator for LLM Inference Clusters Built with Rust

A discrete event simulator designed specifically for large language model (LLM) inference clusters, supporting multiple schedulers, parallelization strategies, hardware configurations, and performance prediction to help developers perform capacity planning and what-if analysis before actual GPU deployment.

2

Section 02

Original Author and Source


3

Section 03

Project Background and Motivation

With the widespread application of large language models (LLMs) across various industries, how to efficiently deploy and scale inference infrastructure has become a core challenge for engineering teams. GPU resources are expensive and in short supply; blind hardware procurement often leads to resource waste or performance bottlenecks. Before actual production deployment, developers urgently need a tool that can simulate real inference loads locally to evaluate the effects of different hardware configurations, scheduling strategies, and optimization techniques.

Tokenmill was created to address this pain point. It is a high-performance discrete event simulator developed with Rust, specifically designed to simulate the behavior of LLM inference clusters. Through precise mathematical modeling and rich configuration options, Tokenmill can predict key metrics such as system latency, throughput, memory usage, and energy consumption before actual deployment.


4

Section 04

Core Features and Technical Architecture

Tokenmill's design goal is to provide reliable decision-making basis for capacity planning, hardware selection, and what-if analysis. It has built-in support for almost all key components in modern LLM inference systems:

5

Section 05

Scheduler Support

The simulator implements multiple mainstream scheduling strategies in the industry, including continuous batching (Orca), chunked prefill (Sarathi), and mechanisms supporting preemption and recomputation. These schedulers directly affect request queuing latency and GPU utilization, which are key links in performance tuning.

6

Section 06

Parallelization Strategy Modeling

Tokenmill supports tensor parallelism (TP), pipeline parallelism (PP), expert parallelism (EP), and the decoupled prefill/decode architecture. Users can flexibly combine these parallelization strategies based on model size and hardware configuration to simulate various scenarios from small-scale single-card deployment to large-scale multi-node clusters.

7

Section 07

Hardware Coverage

The project has built-in rich hardware presets covering accelerators such as NVIDIA Rubin (2026), B200, H200, H100, A100, A10G; AMD MI300X/MI325X/MI355X; Google TPU v7-Ironwood/8T/8I; as well as Groq LPU-v1 and Cerebras CS-3/WSE-3. It also supports preset configurations for integrated systems like DGX H100/H200/B200.

8

Section 08

Performance Prediction Dimensions

The simulator can output multi-dimensional performance metrics, including histogram statistics (p50/p95/p99) of TTFT (Time to First Token) and TPOT (Time per Output Token), overall throughput, KV cache utilization, number of preemptions, per-chip TDP power consumption model, total energy consumption, and cost estimation based on GPU hourly prices.