test-tlb is a memory latency and TLB benchmarking tool written in C that measures how quickly a system can access memory at various scales and patterns.
The tool addresses the need to understand memory access performance by running timed tests that measure latency across different memory sizes, from kilobytes to hundreds of megabytes. It tests both sequential access patterns (using a configurable stride) and random memory access chains, and can optionally use huge pages to reduce TLB misses. The tests run for one-second intervals and report results in nanoseconds, with optional conversion to CPU cycles if the processor frequency is correctly configured.
Developers working on performance-critical systems, kernel development, or hardware characterization should consider this tool. It suits anyone needing to understand their specific machine's memory hierarchy behavior, particularly when exploring how cache line size, page size, and TLB behavior interact. The tool is intentionally a quick hack with hardcoded constants that must be manually adjusted to match your hardware—page size, CPU frequency in gigahertz, huge page size, memory test range, and cache line stride all require inspection and potential modification before meaningful results can be obtained. The README emphasizes that results depend heavily on system state, virtual-to-physical memory mapping, and random list patterns, so multiple test runs are needed to establish stable baselines.
Development activity shows infrequent commits with long gaps between updates, indicating this is a stable, mature tool that receives maintenance only when necessary rather than active ongoing development. The codebase remains minimal and focused, with no evidence of feature expansion or architectural refactoring over time.