arXiv:2608.22853cs.DBAug 2026

Manuscript Offprint

arXiv:2608.22853

Why We Created Yet Another Memory Framework: Understanding MGA's Role in Next-Gen Database Systems

Vikramraj Sitpal, Pei Li, Shubham Kumar, Somansh Reddy Satish, Ravi Thammaiah, Nagarajan Muthukrishnan

Vikramraj Sitpal*

Oracle America Inc.

Redwood Shores, California, USA

vikramraj.sitpal@oracle.com

Somansh Reddy Satish†

Oracle America Inc.

Redwood Shores, California, USA

somanshreddy@gmail.com

Pei Li*

Oracle America Inc.

Redwood Shores, California, USA

peili.io@oracle.com

Ravi Thammaiah

Oracle America Inc.

Redwood Shores, California, USA

ravi.thammaiah@oracle.com

Shubham Kumar*

Oracle America Inc.

Redwood Shores, California, USA

shubham.ac.kumar@oracle.com

Nagarajan Muthukrishnan

Oracle America Inc.

Redwood Shores, California, USA

nagarajan.muthukrishnan@oracle.com

ABSTRACT

Despite the presence of multiple memory regions in modern database systems, supporting an efficient form of memory remains a challenge under production constraints. In enterprise-grade data systems, existing abstractions impose a trade-off between coarse-grained global sharing and strict process isolation, resulting in data copying, memory fragmentation, and limited support for controlled sharing. These challenges become more pronounced as workloads grow more diverse, and systems must tolerate process failures while maintaining predictable performance.

This paper introduces the Managed Global Area (MGA), a scoped shared-memory abstraction in Oracle AI Database that addresses these limitations. MGA allows components to explicitly define allocation source, membership, and coordination semantics across selected processes while integrating with a production database engine. Unlike fully shared memory regions in Oracle, such as the System Global Area (SGA), MGA supports dynamic process membership and modular memory usage without imposing system-wide visibility.

We evaluate MGA on analytical and AI workloads that stress shared-memory execution, including TPC-H hash joins and ONNX Runtime inference. Under concurrent execution, MGA reduces latency for join-intensive TPC-H queries by up to 35%. For ONNX-based inference, MGA-enabled model sharing reduces memory footprint by up to 90% and lowers large-model inference latency by up to 37%. These results demonstrate that dynamically scoped shared memory can improve both efficiency and predictability in production database systems.

1 INTRODUCTION

In modern database systems, memory is a critical resource that directly determines performance, scalability, and predictability under production workloads. This challenge becomes particularly pronounced in converged database systems such as Oracle, which natively support diverse data types, workloads, and development paradigms within a single unified engine. As database engines scale to hundreds of CPU cores and support increasingly diverse execution models, including OLTP/OLAP, vectorized execution, and multi-tenant concurrency, traditional memory abstractions often become a limiting factor rather than an enabler [2, 13].

Oracle AI Database has historically relied on two primary memory areas, the System Global Area (SGA) and the Program Global Area (PGA) [17]. As shown in Figure 1, the SGA is a fully shared-memory region that is accessible by all server processes, enabling global coordination and inter-process communication. In contrast, the PGA is private to individual server execution entities and is optimized for fast and isolated execution. While this dichotomy has served Oracle well for decades, it introduces fundamental limitations for modern workloads that require selective and dynamic sharing and predictable performance under memory pressure. Beyond simply allocating a shared-memory region, the database must also support how that region is backed, enabling flexible placement across heterogeneous memory types and hierarchies [9].

In production environments, these limitations manifest as concrete and recurring challenges. Database components that require controlled sharing among a subset of processes cannot efficiently leverage either SGA or PGA semantics. Using the SGA enforces coarse-grained sharing and static structures, which increase contention and complicate lifecycle management [11]. Relying on the PGA prevents direct sharing and leads to excessive data copying, indirect coordination mechanisms, and fragmented memory usage [5, 18]. These inefficiencies become increasingly pronounced as core counts grow and workloads become more skewed [1], ultimately surfacing as tail-latency regressions and reduced throughput under strict service-level objectives [12].

This is further amplified in converged databases [3], where heterogeneous components with different lifetimes and isolation needs rely on multiple execution entities that require selective sharing of state without resorting to SGA exposure or costly PGA-based designs with fixed memory-backing semantics.

∗^{*}These authors contributed equally to this work.

†^{\dagger}Author was at Oracle America Inc. during the time of paper preparation.

This is the authors' accepted manuscript. The final version will appear in the Proceedings of the VLDB Endowment (PVLDB), 2026.

This work is licensed under the Creative Commons BY-NC-ND 4.0 International License. Visit https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of this license. For any use beyond those covered by this license, obtain permission by emailing info@vldb.org. Copyright is held by the owner/author(s). Publication rights licensed to the VLDB Endowment.

Figure

Figure 1: Oracle AI Database Memory Architecture [17]

Existing academic and open-source memory management techniques [5, 10, 20, 21] focus on redesigning engine internals or introducing specialized memory abstractions. Other work advocates tighter database-operating system (OS) co-design to overcome limitations of generic OS abstractions [6, 7, 25]. However, in large-scale production systems such as Oracle AI Database, requiring a DB engine redesign or kernel-level modifications is often impractical. Memory abstractions must integrate with a mature and highly optimized codebase, preserve backward compatibility, and operate entirely within user space while maintaining predictable latency behavior [8, 15, 22].

Modern database systems face increasing query complexity and growing hardware heterogeneity, which expose limitations in conventional memory management models [9]. To address these challenges, we introduce the Managed Global Area (MGA), a new memory abstraction in Oracle AI Database.

MGA serves both as an execution-level memory framework and as a scoped shared-memory area. As a framework, it provides a low-level interface that allows database components to explicitly define source, allocation, sharing, and coordination policies across a selected set of trusted processes. As a memory area, MGA represents an instance-scoped shared area that physically stores shared data structures. Its scope can range from a single process to all processes within the database instance. Processes dynamically attach to and detach from MGA, enabling modular, elastic, and on-demand memory usage without imposing global semantics.

Unlike traditional memory systems, MGA provides fine-grained control over memory allocation and process attachment. Memory regions can be selectively attached to specific processes rather than being globally visible. This selective attachment model reduces unnecessary contention on shared structures and limits unintended access, thereby mitigating common risks such as accidental data corruption in shared-memory environments.

One of MGA’s key advantages is its ability to provide contiguous memory allocations, which improves both performance and efficiency by minimizing the overhead associated with fragmented memory. This feature is particularly important for performance-critical operations, such as hash joins and in-memory analytics, where contiguous memory is essential for fast data processing and minimal latency. Furthermore, MGA offers reduced data copying compared to traditional PGA-based designs, which often require costly memory transfers during query execution. By minimizing the need for data copying, MGA reduces CPU cycles and memory bandwidth consumption, which directly contributes to faster query response times.

In addition, MGA provides enhanced yet configurable memory accounting and improved observability, which are vital for monitoring and optimizing memory usage in a database system. These capabilities allow administrators to gain better insights into memory consumption patterns and fine-tune resource allocation to meet the specific needs of different workloads. MGA also mitigates the common problem of memory fragmentation, a persistent issue in many traditional memory management systems that can degrade performance over time. By offering more efficient memory reuse and recycling, MGA ensures that memory resources are utilized optimally, even in long-running, heavy workloads.

Beyond its immediate benefits for conventional memory architectures, MGA’s framework-based design positions it as a future-proof solution that can extend to emerging memory technologies, such as persistent and other non-volatile memories. Although MGA is primarily designed for local DRAM (and PMEM in the past) in Oracle AI Database, its underlying design principles extend naturally to other memory backends, including remote disaggregated memory and Compute Express Link (CXL)-based memory, as explored in recent work on distributed shared-memory database architectures [9, 24]. Together, these capabilities make MGA not only a critical component for modern database systems but also a foundational building block for future database architectures that must adapt to new hardware advancements and operate efficiently across increasingly heterogeneous memory systems. As memory technologies evolve, MGA’s ability to integrate and manage diverse memory types will help it continue meeting the performance, scalability, and reliability demands of next-generation database applications.

We evaluate MGA using AI inference and analytical workloads, with shared-memory execution identified as the dominant bottleneck. MGA substantially improves latency across both workload classes, delivering up to 35% speedup on TPC-H join queries and up to 37% speedup on ONNX-based inference.

This paper makes the following contributions:

  • We identify and characterize fundamental limitations of existing memory areas in Oracle AI Database when supporting modern, large-scale analytical and multi-process workloads under production constraints.

  • We describe the design and implementation of MGA, focusing on the key engineering decisions and trade-offs required to integrate a new memory abstraction into a mature, production database.

  • We discuss experience and lessons learned from using MGA within Oracle AI Database, highlighting implications for future database memory management designs.

  • We evaluate MGA using representative analytical workloads and AI workloads to demonstrate its effectiveness without compromising stability or observability.

The remainder of the paper is organized as follows. Section 2 provides background on existing memory areas in modern Oracle AI Database systems and introduces the design rationale of MGA. Section 3 presents the motivation and an overview of the system architecture, and describes the lifecycle of MGA. Section 4 details the implementation of MGA, including memory layout, synchronization, and recovery mechanisms. Section 5 presents use cases and experimental evaluation of MGA under realistic operational conditions, including MGA-backed hash join execution on TPC-H, as well as the runtime and memory efficiency of ONNX model sharing. Section 6 discusses related work, and Section 7 concludes with directions for future work.

References (13)