Skip to main content
QUICK REVIEW

[Paper Review] Dissecting GPU Memory Hierarchy through Microbenchmarking

Xinxin Mei, Xiaowen Chu|arXiv (Cornell University)|Sep 8, 2015
Parallel Computing and Optimization TechniquesComputer Science24 references5 citations
TL;DR

This paper introduces a fine-grained pointer-chasing microbenchmark to reverse-engineer the memory hierarchy of NVIDIA Fermi, Kepler, and Maxwell GPUs. It reveals previously unknown cache behaviors—such as non-traditional L1 data cache replacement policies and 2D spatial locality in texture caches—and demonstrates that Maxwell significantly reduces shared memory latency under bank conflicts, outperforming Fermi and Kepler in efficiency and performance.

ABSTRACT

Memory access efficiency is a key factor in fully utilizing the computational power of graphics processing units (GPUs). However, many details of the GPU memory hierarchy are not released by GPU vendors. In this paper, we propose a novel fine-grained microbenchmarking approach and apply it to three generations of NVIDIA GPUs, namely Fermi, Kepler and Maxwell, to expose the previously unknown characteristics of their memory hierarchies. Specifically, we investigate the structures of different GPU cache systems, such as the data cache, the texture cache and the translation look-aside buffer (TLB). We also investigate the throughput and access latency of GPU global memory and shared memory. Our microbenchmark results offer a better understanding of the mysterious GPU memory hierarchy, which will facilitate the software optimization and modelling of GPU architectures. To the best of our knowledge, this is the first study to reveal the cache properties of Kepler and Maxwell GPUs, and the superiority of Maxwell in shared memory performance under bank conflict.

Motivation & Objective

  • To reverse-engineer the undocumented memory hierarchy of modern NVIDIA GPUs, particularly focusing on cache structures and memory access characteristics.
  • To address the performance bottleneck caused by the gap between GPU compute power and memory bandwidth, which limits application efficiency.
  • To provide a reproducible, fine-grained methodology for measuring GPU memory throughput, latency, and cache behavior across multiple generations.
  • To compare architectural evolution across Fermi, Kepler, and Maxwell GPUs, highlighting shifts from performance-optimization to energy efficiency.
  • To offer actionable insights for software optimization and modeling of GPU applications by exposing hidden hardware behaviors.

Proposed method

  • Design and implement a novel fine-grained pointer-chasing (P-chase) microbenchmark to probe cache behavior, tailored for GPU-specific memory hierarchies.
  • Use the P-chase technique to identify cache parameters such as associativity, line size, and replacement policies by analyzing access patterns and latency variations.
  • Measure global and shared memory throughput and latency under various access patterns, including stride and bank conflict scenarios.
  • Systematically vary memory access patterns (e.g., stride size, data alignment) to isolate the impact of bank conflicts on shared memory performance.
  • Apply the microbenchmark across three generations of NVIDIA GPUs (Fermi, Kepler, Maxwell) to enable cross-architecture comparison.
  • Validate results through repeated experiments and provide publicly available source code and data for reproducibility.

Experimental results

Research questions

  • RQ1What are the underlying cache structures (e.g., L1 data cache, texture cache, TLB) in modern NVIDIA GPUs, and how do they differ from CPU cache models?
  • RQ2How does shared memory bank conflict affect access latency, and what architectural optimizations mitigate this issue?
  • RQ3What are the actual throughput and latency characteristics of global and shared memory across Fermi, Kepler, and Maxwell GPUs?
  • RQ4How has the GPU memory hierarchy evolved from Fermi to Maxwell in terms of bandwidth, capacity, and efficiency?
  • RQ5To what extent does the Maxwell architecture reduce the performance penalty of shared memory bank conflicts compared to Fermi and Kepler?

Key findings

  • The L1 data cache in GPUs uses a non-traditional replacement policy, differing from standard CPU cache behaviors.
  • The texture L1 cache employs 2D spatial locality optimized set-associative mapping, which improves access efficiency for 2D data patterns.
  • The L2 TLB in GPUs consists of unequal sets, indicating a non-uniform memory access behavior across different memory regions.
  • Shared memory access latency increases almost linearly with the number of potential bank conflicts, with 32-way conflicts on Fermi causing latencies up to 1209 cycles.
  • Kepler’s 8-byte mode reduces bank conflict probability by doubling the shared memory bank width, improving performance over Fermi’s 4-byte mode.
  • Maxwell’s shared memory is highly optimized: even under 32-way bank conflicts, latency remains at the level of L1 data cache (30 cycles), demonstrating superior conflict mitigation compared to Fermi (90 cycles) and Kepler (42 cycles).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.