Skip to main content
QUICK REVIEW

[Paper Review] DynaSOAr: A Parallel Memory Allocator for Object-oriented Programming on GPUs with Efficient Memory Access

Matthias Springer, Hidehiko Masuhara|arXiv (Cornell University)|Oct 28, 2018
Parallel Computing and Optimization TechniquesComputer Science3 citations
TL;DR

DynaSOAr is a CUDA-based, lock-free dynamic memory allocator for GPU-accelerated object-oriented programming that optimizes both memory allocation and access patterns. By combining a hierarchical bitmap-based allocator with a Structure of Arrays (SOA) data layout and a parallel do-all operation, it achieves up to 3x speedup in application performance and reduces memory fragmentation, enabling up to 2x larger problem sizes with the same memory budget compared to state-of-the-art allocators.

ABSTRACT

Object-oriented programming has long been regarded as too inefficient for SIMD high-performance computing, despite the fact that many important HPC applications have an inherent object structure. On SIMD accelerators, including GPUs, this is mainly due to performance problems with memory allocation and memory access: There are a few libraries that support parallel memory allocation directly on accelerator devices, but all of them suffer from uncoalesed memory accesses. We discovered a broad class of object-oriented programs with many important real-world applications that can be implemented efficiently on massively parallel SIMD accelerators. We call this class Single-Method Multiple-Objects (SMMO), because parallelism is expressed by running a method on all objects of a type. To make fast GPU programming available to average programmers, we developed DynaSOAr, a CUDA framework for SMMO applications. DynaSOAr consists of (1) a fully-parallel, lock-free, dynamic memory allocator, (2) a data layout DSL and (3) an efficient, parallel do-all operation. DynaSOAr achieves performance superior to state-of-the-art GPU memory allocators by controlling both memory allocation and memory access. DynaSOAr improves the usage of allocated memory with a Structure of Arrays data layout and achieves low memory fragmentation through efficient management of free and allocated memory blocks with lock-free, hierarchical bitmaps. Contrary to other allocators, our design is heavily based on atomic operations, trading raw (de)allocation performance for better overall application performance. In our benchmarks, DynaSOAr achieves a speedup of application code of up to 3x over state-of-the-art allocators. Moreover, DynaSOAr manages heap memory more efficiently than other allocators, allowing programmers to run up to 2x larger problem sizes with the same amount of memory.

Motivation & Objective

  • To address the performance bottleneck of dynamic memory allocation in object-oriented GPU programming, especially for data-parallel workloads.
  • To enable efficient, scalable, and lock-free memory management in SIMD architectures like GPUs for applications with dynamic object sets.
  • To improve memory access efficiency by coalescing accesses through a Structure of Arrays (SOA) layout and hierarchical bitmaps.
  • To support the Single-Method Multiple-Objects (SMMO) programming model, where a single method is applied in parallel to all instances of a class.
  • To reduce memory fragmentation and improve heap utilization, allowing larger problem sizes within fixed memory limits.

Proposed method

  • DynaSOAr uses a hierarchical bitmap data structure to manage free and allocated memory blocks in a lock-free, atomic-operation-based manner, minimizing contention and fragmentation.
  • It organizes objects in fixed-size blocks and uses rotation-shifting of bitmaps to reduce thread contention during allocation.
  • The allocator enforces an SOA (Structure of Arrays) data layout to enable coalesced memory access patterns, improving memory bandwidth utilization.
  • It integrates a parallel do-all operation that synchronizes and executes a method across all active objects in a single kernel launch, enabling efficient execution of SMMO workloads.
  • Object pointers encode block size and offset, enabling efficient memory layout and supporting class inheritance without memory waste.
  • The design trades raw allocation speed for better overall application performance by optimizing data access and reducing fragmentation.

Experimental results

Research questions

  • RQ1Can a GPU memory allocator be designed to optimize not only raw allocation speed but also memory access coalescing and data locality?
  • RQ2How can dynamic memory allocation be made efficient and scalable in a lock-free, parallel GPU environment for object-oriented workloads?
  • RQ3To what extent can a Structure of Arrays (SOA) layout improve memory bandwidth utilization and cache efficiency in GPU-accelerated object-oriented applications?
  • RQ4Can hierarchical bitmaps effectively manage free memory blocks with low fragmentation and high scalability in a massively parallel setting?
  • RQ5How does the integration of a parallel do-all operation enhance the performance of SMMO-style applications on GPUs?

Key findings

  • DynaSOAr achieves up to 3x speedup in application-level performance compared to state-of-the-art GPU allocators, primarily due to improved memory access coalescing via SOA layout.
  • The allocator reduces memory fragmentation to approximately 18% and maintains low, stable fragmentation levels even after extensive allocation and deallocation cycles.
  • With the same heap size, DynaSOAr enables up to 2x larger problem sizes than other allocators due to its design with no internal fragmentation.
  • The use of rotation-shifting in hierarchical bitmaps reduces thread contention and improves allocation performance, with ablation studies showing a significant performance drop without this optimization.
  • Object enumeration via the parallel do-all operation has negligible overhead and scales efficiently with heap size, demonstrating the robustness of the hierarchical bitmap design.
  • The Linux Scalability benchmark shows that DynaSOAr achieves 96.9% heap utilization, outperforming Halloc (49.8%) and BitmapAlloc (98.4%) in terms of both performance and efficiency.

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.