HackerPapers

arXiv:1911.03282cs.PF

nanoBench: A Low-Overhead Tool for Running Microbenchmarks on x86 Systems

Andreas Abel, Jan Reineke

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

We present nanoBench, a tool for evaluating small microbenchmarks using hardware performance counters on Intel and AMD x86 systems. Most existing tools and libraries are intended to either benchmark entire programs, or program segments in the context of their execution within a larger program. In contrast, nanoBench is specifically designed to evaluate small, isolated pieces of code. Such code is common in microbenchmark-based hardware analysis techniques. Unlike previous tools, nanoBench can execute microbenchmarks directly in kernel space. This allows to benchmark privileged instructions, and it enables more accurate measurements. The reading of the performance counters is implemented with minimal overhead avoiding functions calls and branches. As a consequence, nanoBench is precise enough to measure individual memory accesses. We illustrate the utility of nanoBench at the hand of two case studies. First, we briefly discuss how nanoBench has been used to determine the latency, throughput, and port usage of more than 13,000 instruction variants on recent x86 processors. Second, we show how to generate microbenchmarks to precisely characterize the cache architectures of eleven Intel Core microarchitectures. This includes the most comprehensive analysis of the employed cache replacement policies to date.

arXiv comments
Journal reference
DOI
doi:10.1109/ISPASS48437.2020.00014
Subjects
cs.PFPerformance

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jul 2025 to Jul 2025. Found in 1 HN submission from Nov 2019 to Nov 2019. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

  1. Test Results for AMD Zen 5 1 comment
    • The linked PDF in the post contains a section on how the values are measured and a link to the test suite. Search in [1] for "How the values were measured". For another project that measures the same/very similar values you can check out [2]. They have a paper about the tool…

      rftView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.