Home / use case

Predicting local LLM speed on a 2011 NAS by measuring memory bandwidth in two seconds

At a glance
Hardware
Intel i5-2520M from 2011, used as a NAS
8 GB DDR3-1600, one DIMM, 4 threads
Key gotcha
If you see something like 0.2 tok/s instead of the expected figure, it's usually swapping, and you're measuring your SSD rather than RAM.

What they built

lowspecai runs a 2011 Intel i5-2520M laptop as a NAS with 8 GB of DDR3-1600 on a single DIMM, and used it to show what actually limits local token generation: how many bytes the machine can read per second, not cores, GHz or TOPS.

The argument is that a dense model reads all its weights once per generated token, so tokens per second is roughly memory bandwidth divided by bytes of weights read per token. A two-second numpy script measures that bandwidth on any machine.

Setup

  • Intel i5-2520M from 2011, used as a NAS
  • 8 GB DDR3-1600, one DIMM, 4 threads
  • Python with numpy for the benchmark

How it works

  1. Allocate a 512 MB float32 array, sum it once to fault the pages in, then time five read-only sums and take the fastest.
  2. Use a read-only pass, not a copy: a copy reads and writes each byte, so it reports half the real DRAM traffic.
  3. Divide the measured bandwidth by the model's weight size (for MoE models, the active weights) to get the ceiling.

Results & numbers

  • Read-only bandwidth measured 8.98 to 9.04 GB/s, about 70% of the 12.8 GB/s theoretical peak for single-channel DDR3-1600.
  • Adding threads plateaued at about 10.5 GB/s total, so the single DIMM, not the cores, is the limit.
  • At 9.0 GB/s, a 7B model at Q4_K_M (4.4 GB) has a ceiling of 2.0 tok/s, and the author expects 1.2 to 1.6 tok/s in practice.

Gotchas

  • If you see something like 0.2 tok/s instead of the expected figure, it's usually swapping, and you're measuring your SSD rather than RAM.
  • A CPU upgrade barely helps generation; it speeds up prompt processing, which is compute-bound.
  • Adding a second DIMM only helps if a slot is free; replacing a full pair with bigger sticks adds capacity, not bandwidth.
  • The author's other bandwidth rows are estimates from stated specs, and the vendor's 40B MoE speed claim was not tested by them.
“Measure your read bandwidth, divide by the size of the weights, and you know what your hardware is going to do”— lowspecai

Do it yourself

  1. Run the numpy snippet below and note the GB/s read figure.
  2. Check your memory layout with sudo dmidecode -t memory | grep -E "Size|Locator|Speed|Rank" to see if you're single-channel.
  3. Divide the bandwidth by the model file size (or active weights for MoE) for a tokens-per-second ceiling.
  4. Expect real runs at about 60 to 80% of that ceiling; much lower usually means swapping.
  5. If you're single-channel with a free slot, a matching second DIMM is the cheapest speed upgrade.
import numpy as np, time
mb = 512
a = np.ones(mb * 1024 * 1024 // 4, dtype=np.float32)
a.sum()
ts = []
for _ in range(5):
    t = time.perf_counter(); a.sum(); ts.append(time.perf_counter() - t)
print(f"{mb / 1024 / min(ts):.2f} GB/s read")
Source: lowspecai (DEV Community) · Published 2026-10-23 · Added 2026-10-24. This write-up summarizes the original source; see it for full details.

Similar setups

Fine-tuning a 32B model on a 6 GB laptop GPU by streaming weights from disk

A developer posting as mycute fine-tunes a 32B NF4 model on an RTX 3050 Laptop with 6 GB of VRAM by streaming one transformer block at a time from an NVMe SSD, and documents three measurement mistakes they corrected.

mycute (DEV Community) · 2026-10-26

A local Qwen model took over a server-patching job when the cloud model refused

Seppe Gadeyne was patching seven servers and about 30 WordPress sites with an AI agent when the cloud model's safety filter stopped answering; he switched the same session to a Qwen model on his RTX 5090 workstation, which finished the job.

Seppe Gadeyne (DEV Community) · 2026-10-23

oMLX Prefill Accelerator: a second Mac speeds long-prompt prefill up to ~3×

oMLX 0.7.4.dev1 can run early layers of a long prompt on a faster Mac (for example M5 Max) while an M3 Ultra with enough unified memory keeps the KV cache and decode, with measured prefill gains on DeepSeek V4.1 Flash and Qwen3.8 Flash-Next.

GitHub · 2026-11-07

Fixing silent tool-call failures caused by Ollama's 4,096-token default context

orca forge found their app's 29 tools were silently failing because Ollama's OpenAI-compatible endpoint loaded the model at the default 4,096-token context and truncated input without an error; moving tool calls to /api/chat with num_ctx set fixed it.

orca forge (DEV Community) · 2026-10-23