# torvalds/test-tlb

Stupid memory latency and TLB tester

Repository: https://github.com/torvalds/test-tlb
Canonical: https://ross.abutalabs.com/products/test-tlb
Language: C
License: GPL-2.0
License Family: copyleft
Last push: 2024-08-19T21:13:36+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3449, "days_push": 744, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1050, forks 221 (observed 2026-08-28T04:03:22.814779+00:00)

## What it is
A small C benchmark tool by Linus Torvalds that measures memory access latency and TLB behavior across working-set sizes from a few kilobytes to hundreds of megabytes, including hugepage tests via madvise. It is a quick hack with hardcoded constants (page size, CPU frequency, stride) that users are expected to tweak for their machine.

## Use cases
- measure memory latency across cache hierarchy levels
- test TLB performance with different page sizes
- benchmark hugepage vs normal page memory access
- measure cache line effects with different strides
- estimate memory access latency in CPU cycles
- compare memory latency on different machines

## When to choose
- you want a tiny, hackable microbenchmark for memory latency and TLB behavior on Linux
- you want to experiment with strides, random chains, and hugepages to understand your machine's memory hierarchy

## When to avoid
- you need polished, automated benchmarking with noise reduction or statistical reporting
- you need a portable tool - hugepage tests rely on Linux-specific madvise behavior
- you want a benchmark that works out of the box without editing hardcoded constants

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: benchmarking, developer-tools
- domain: performance, hardware, developer-tools, operating-systems
- platform: cli, c, cpp
- tags: memory-latency, tlb, microbenchmark, cache-testing, hugepages, hardware-performance, linux

## Member repositories
- torvalds/test-tlb (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:22.814779+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:00:25.782905+00:00, confidence not recorded.
  - readme: https://github.com/torvalds/test-tlb (fetched 2026-08-28T04:03:22.814779+00:00, sha 938dc7c3da27)
- Data as of 2026-08-30T08:39:29.467469+00:00.
