An exercise to try
Read a load test and choose a configuration
A load-test report usually leads with tokens per second, but people need answers that are right and on time. Turn one report into those numbers, then choose a configuration.
- Time
- 25 minutes
- What you need
- This page and a calculator. No chatbot or code is needed.
Illustration. The configurations, counts and prices here are invented teaching material, not results from a real test.
Running a load test needs a real service and a tool that sends it requests at a set rate. This exercise teaches you to read the report such a test produces.
Words used here
- Output tokens per second. Tokens written across the whole server each second, for all requests together.
- p95. The time within which 95 percent of requests finished; the slowest 5 percent took longer.
- Goodput. Good answers per second, counting only replies that are complete, correct and on time.
- 4-bit and 16-bit. How many bits store each of the model's numbers. Fewer bits need less memory but can change answers.
- Requests sharing the server. Requests worked on at the same moment. More at once raises the total token rate but slows each one.
The test
The same 3,600 requests, one arriving each second for an hour, went to two configurations of a library assistant. The target was a complete reply within 10 seconds of arrival. Every complete reply, on time or late, was then graded against the assistant's rules, as in Grade an AI answer.
- A. A 4-bit version of the model, with up to 64 requests sharing the server.
- B. The 16-bit model, with up to 16 requests at once, on a larger server.
| Measure | A | B |
|---|---|---|
| Output tokens per second | 900 | 720 |
| p95 time to full reply | 19 s | 8 s |
| Failed: error or cut off | 288 | 36 |
| Complete but later than 10 s | 792 | 144 |
| On time, failed the quality check | 360 | 180 |
| Late, passed the quality check | 720 | 126 |
| Server cost per hour | $5.40 | $6.48 |
Step 1. Count the good answers
Start from 3,600 requests and subtract the three kinds of loss: failed, late and wrong. What is left is complete, correct and on time.
Step 2. Work out goodput
Divide the good answers by the 3,600 seconds of the test. Also write the share of requests that got a good answer.
Step 3. Work out the cost of a good answer
Divide the cost per hour by the good answers in that hour. Per 1,000 good answers is easier to compare.
Step 4. Choose
Pick a configuration for a chat service with the 10 second target, and write one sentence a colleague could check against the table.
Check your work
- Good answers: A has 3,600 − 288 − 792 − 360 = 2,160. B has 3,600 − 36 − 144 − 180 = 3,240.
- Goodput: A delivers 0.6 good answers per second, 60 percent of requests. B delivers 0.9 per second, 90 percent.
- Cost per 1,000 good answers: A is $5.40 ÷ 2.16 = $2.50. B is $6.48 ÷ 3.24 = $2.00.
- Choose B. A writes 25 percent more tokens per second and its server costs about 17 percent less per hour, yet it delivers 1,080 fewer good answers each hour and each good answer costs 25 percent more. Its p95 of 19 seconds also breaks the 10 second target.
Three things let the token-rate winner lose. Letting more requests share the server raises total tokens per second while each request waits longer, as the inference read shows. A cut-off reply still adds its tokens to the count. In this test A also failed twice as many quality checks among on-time replies, 360 against 180, and 432 against 198 across all completed replies; fewer bits can change answers, so a 4-bit version needs its own quality test (What fewer bits buy you).
The common wrong answer picks A for its higher token rate and lower hourly price. Neither number counts whether anyone got a usable answer in time.
Try a different case
Suppose A's server cost $4.00 an hour. First, work out A's cost per 1,000 good answers for the chat service and say whether you would switch. Then take an overnight job where nobody waits: a late reply that passed the quality check now counts as good. Recount the good answers for both and compare the cost per 1,000 at A's new price.
Check this one too
- Chat: $4.00 ÷ 2.16 is about $1.85 per 1,000 good answers, now cheaper than B's $2.00. Still choose B: A gives no good on-time answer to 40 percent of requests, and its p95 of 19 seconds breaks the target. A cheaper good answer does not help a user who did not get one.
- Overnight: A has 2,160 + 720 = 2,880 good answers, so $4.00 ÷ 2.88 is about $1.39 per 1,000. B has 3,240 + 126 = 3,366, so $6.48 ÷ 3.366 is about $1.93. With no deadline A is the cheaper choice, as long as 2,880 good answers an hour are enough for the job; B still produces more.
Where this sits: Tail latency and goodput defines the measures, and the serving guide's Compare the same job describes a fair test; read How do we serve a model? next. If you run a service yourself, a serving engine's benchmark tool can produce such a report; that step is optional.