Data Center Economics in the Inference Era: A Practical Guide to Token Factories
This article reframes data centers as power-constrained token factories, where output is measured by effective token throughput delivered within a power ceiling rather than peak compute. It covers how to define and measure effective throughput per watt, compares five service tiers by throughput and latency, and shows how to estimate revenue under explicit assumptions. A runnable Python benchmark, capacity planning formulas, batching and caching practices, troubleshooting, and security and operations checklists are included. All numbers are illustrative and should be replaced with your own measurements.
Start Here: Treat the Data Center as a Power-Constrained Token Factory
What is a token factory in the inference era? Put simply, a data center’s output is no longer peak compute but the effective token throughput it can reliably deliver within a power limit. How do you get there? Define your measurement basis first, benchmark to obtain real values, then estimate revenue using tiered pricing. How do you choose a service tier? Look at latency sensitivity and budget. What should you watch out for? Rate limiting, quotas, rollback, and data persistence must be in place first. All numbers in this article are illustrative; rely on your own measurements.
1. Effective Throughput per Watt: Definitions and Measurement Basis
Effective throughput per watt cannot be written as just “tokens/s divided by watts.” You must fix the following basis, or the numbers are not comparable:
- Hardware and precision: GPU model, memory, training/inference precision (e.g., FP16/BF16/INT8).
- Workload conditions: concurrency, input/output context length, sampling parameters.
- Facility basis: whether PUE is included. Report both IT-side power and wall power including PUE.
- Effectiveness: count only tokens that are successfully returned and meet the SLA; exclude failures and timeouts.
- SLA boundaries: upper limits on time to first token (TTFT) and time per output token (TPOT).
Recommended reporting format: tokens/s/W (IT, PUE=1.x, concurrency=32, input 512/output 512, BF16).
2. Five Service Tiers Compared: How to Choose
| Tier | Throughput | Latency | Use Case |
|---|---|---|---|
| Free | Low | Relaxed | Trials, offline batches |
| Mid | Medium | Medium | General Q&A |
| Advanced | High | Lower | Interactive applications |
| Fast | Very high | Low | Real-time conversation |
| Ultra-fast | Extremely high | Very low | Latency-sensitive workloads |
Prices are illustrative and should be replaced with actual cost calculations.
3. Revenue Estimation: Derive Under Given Assumptions, Not as an Absolute Conclusion
The original phrasing “revenue can be derived directly from throughput and generation rate” should be changed to “estimated under given assumptions.”
Formula: Daily revenue ≈ effective tokens/s × 86400 × sellable utilization × price per 1000 tokens.
Example: 2000 effective tokens/s, 60% utilization, and a price of CNY 0.02 per 1000 tokens yields a daily revenue of about CNY 2073.6. Sensitivity: a 10-percentage-point drop in utilization or a 10% drop in price reduces revenue by roughly the same proportion; longer contexts lower effective throughput at the same time.
4. A Minimal Runnable Example: Dependencies, Startup, Input and Output
Environment: Python 3.10, requests==2.31.0. Environment variables: API_BASE, API_KEY, MODEL.
pip install requests==2.31.0export API_BASE="https://your-endpoint/v1"export API_KEY="your-key"export MODEL="your-model"python bench.py --concurrency 8 --in 512 --out 512
# bench.pyimport os, time, requests, argparsefrom concurrent.futures import ThreadPoolExecutorp = argparse.ArgumentParser()p.add_argument("--concurrency", type=int, default=8)p.add_argument("--in", dest="nin", type=int, default=512)p.add_argument("--out", type=int, default=512)a = p.parse_args()url = os.environ["API_BASE"].rstrip("/") + "/chat/completions"h = {"Authorization": f"Bearer {os.environ['API_KEY']}"}def one(i):body = {"model": os.environ["MODEL"], "messages": [{"role": "user", "content": "x" * a.nin}],"max_tokens": a.out, "stream": False}t = time.time()r = requests.post(url, headers=h, json=body, timeout=120)dt = time.time() - tif r.ok:n = r.json()["usage"]["completion_tokens"]return n, dt, Truereturn 0, dt, Falset0 = time.time()with ThreadPoolExecutor(a.concurrency) as ex:res = list(ex.map(one, range(a.concurrency * 4)))wall = time.time() - t0ok = sum(1 for _, _, s in res if s)tok = sum(n for n, _, _ in res)print(f"ok={ok} tokens={tok} wall={wall:.2f}s tps={tok/wall:.1f}")
Example output: ok=32 tokens=16384 wall=12.3s tps=1332.8.
5. Capacity Planning Checklist and Formulas
Required GPUs ≈ target tokens/s ÷ effective tokens/s per GPU, then divide by the target utilization.QPS ≈ target tokens/s ÷ output tokens per request.Daily electricity cost ≈ total power in kW × 24 × electricity price.- Checklist items: SLA, PUE, redundancy, peak headroom, context distribution.
6. Batch Scheduling, Cache Reuse, and Common Troubleshooting
Practices: continuous batching, KV Cache reuse, prefix caching, elastic scheduling, and model compression (quantization/distillation). Elastic scheduling must be paired with rate limiting and quotas to prevent overload.
| Symptom | Possible Cause | Action |
|---|---|---|
| OOM | Concurrency too high / context too long | Lower concurrency, cap length |
| Low KV Cache hit rate | Large prefix differences | Fix the system prefix |
| Batch jitter | Mixed short and long requests | Separate queues, cap batch size |
7. Security, Operations, and Risk Notes
Before going live, you must have: rate limiting and quotas, canary release and rollback, data persistence and backups, cost control and alerting, and observability (TTFT/TPOT/hit rate/failure rate). Alternatives include choosing between self-hosted and managed, and distilling smaller models to cut costs. Any cited data and charts must state their source and measurement basis. When deploying on general cloud products such as Baidu AI Cloud, first validate the measurement basis and SLA with a small traffic volume, then scale up gradually.
