MGA (Managed Global Area) Reference Note (Doc ID 2638904.1)

简介: MGA (Managed Global Area) Reference Note (Doc ID 2638904.1)

About MGA (Managed Global Area):

The MGA allows a "smaller set" of processes (or even all processes) to share an address space for the duration (typically a query). The MGA is made up of namespaces which contain segments and heaps with space management either directly or through a heap manager (KGH).

Processes can attach to their namespace for the duration they require. For e.g., in a parallel query environment, PQs participating with the QC can share the namespace from QC to share the results. Once done, they will detach from the same and the namespace can be torn down.

The MGA is allocated dynamically which gives us more flexibility to create, control and share. The sharing is dynamic in the sense that processes coordinate before sharing. So in that sense, MGA sits between the SGA and PGA. In addition, since the MGA is a shared memory area, a latch (latch: MGA) is used to control access and protect it.

Difference between MGA/PGA/SGA:

The MGA is not the SGA or PGA. The PGA is private and the SGA is completely shared by all processes and is not elastic. The MGA is elastic (processes can create and drop their MGA segments dynamically), shared between a set of processes or all processes, and counted under the PGA target/limit values (in v$PGASTAT). The SGA is typically created once while the MGA is created on demand.

There can be multiple MGAs in an instance while we have just one SGA.

MGA Clients and Use Cases:

The MGA is a general feature which has multiple consumers and the benefit is based on the consumers. MGA consumers are: IPC, MGA hash join, IMCDT and PQ in current releases. PQ is not a client by default. When a query uses features like MGA hash join or IMCDT, PQs internally attach to the namespace. (In other words, MGA hash join and IMCDT are actually executed by PQs with MGA being shared.)

  1. IPC:

IPC is enable by default on Exadata. It's mainly used for shared PD, where big IPC segments (heap based) are allocated and shared across all the processes.

Shared PD meaning is that, sharing "protection domain". Sharing of PD : This helps a daemon process register/de-register memory regions and allow other processes to share those memory regions instead of having to register the memory regions again in each process.

These segments are registered with HA for RDBMS operations.

The primary consumers of IPC0 MGA namespace are Buffer Cache/DLM (kcl.c uses this through ksmsq APIs).

Since IPC0 alone performs memory registration on behalf of all other processes in the instance, it is normal for IPC0 to have high RSS in the OS.

  1. MGA Hash Join:

MGA hash join is used by parallel query execution. It's used by Hash join shared operations in the execution plan. It improves the performance of large joins.

It also:

  • avoids/limits PQ distribution for hash-hash joins
  • avoids the cost of PQ redistribution
  1. IMCDT

IMCDT is used by cursor duration tables. It's also used by parallel slaves to load into memory cursor duration tables.

IMCDT points to: In memory cursor duration tables. This can be controlled with hidden parameter "_in_memory_cdt"

             See NOTE:2388236.1 What is _in_memory_cdt Parameter?

MGA Usage:

From 19c onward, we can now get MGA usage from database instance by querying the v$pgastat view. For example:

SQL> select * from v$pgastat;

NAME VALUE UNIT CON_ID


...
MGA allocated (under PGA) bytes 0
maximum MGA allocated bytes 0
...

Note: In 18c, the values associated with the MGA entries in v$pgastat are not displayed. (The values show as 0.) Reference:

 Enhancement Bug:30596770  ADD VALUES FOR MGA IN 18C V$PGASTAT




New Wait Events Related to MGA:

latch: MGA shared context root latch

latch: MGA shared context latch

latch: MGA heap latch

相关文章
|
编译器 C# Windows
Inno Setup制作安装包教程
Inno Setup制作安装包教程
1520 0
|
移动开发 算法 调度
【贪心算法】一文让你学会“贪心”(贪心算法详解及经典案例)
贪心算法是一种非常常见的算法,它的简单和高效性使其在实际应用中被广泛使用。 贪心算法的核心思想是在每一步都采取当前状态下最优的选择,而不考虑未来可能产生的影响。虽然贪心算法不能保证总是得到最优解,但在很多情况下,它可以获得很好的结果。 本篇文章将介绍贪心算法的基本概念和一些经典应用,以及如何通过贪心算法来解决一些实际问题。希望通过本文的阅读,读者可以对贪心算法有更加深刻的理解,并能够在实际问题中应用贪心算法来得到更好的解决方案。 让我们暴打贪心算法吧!
6422 0
|
11月前
|
人工智能 JSON API
LongDocURL:中科院联合阿里推出多模态长文档理解基准数据集,用于评估模型对复杂文档分析与推理的能力
LongDocURL 是由中科院与淘天集团联合推出的多模态长文档理解基准数据集,涵盖 2,325 个问答对,支持复杂文档的理解、推理和定位任务。
530 77
LongDocURL:中科院联合阿里推出多模态长文档理解基准数据集,用于评估模型对复杂文档分析与推理的能力
|
存储 传感器 定位技术
【NI Multisim 14.0原理图设计基础——元器件分类】
一、元器件分类 NI Multisim 14.0不仅提供了数量众多的元器件符号图形,而且还设计了元器件的模型,并分门类地存储在各个元器件库中。下面按照元器件库的命名不同详细介绍常用的元器件。 1.电源库 单击“元器件”工具栏中的“放置源” 按钮,Sources 库的“系列”栏包括以下几种,如图所示: 电源(POWER-SOURCES):包括常用的交直流电源、数字地、地线、星形或三角形连接的三相电源、VCC、VDD、VEE、VSS 电压源,其元器件”栏下内容如图所示: 电压信号源(SIGNAL-VOLTAG…):包括交流电压、时钟电压、脉冲电压、指数电压、FM、AM等多种形式的电压信号,其“元器
18473 3
【NI Multisim 14.0原理图设计基础——元器件分类】
|
弹性计算 监控 数据挖掘
事件驱动架构的优势与应用:深度解析与实战应用
【8月更文挑战第17天】事件驱动架构以其松耦合、可扩展性、异步处理、实时性和高可靠性等优势,在实时数据处理、复杂业务流程、弹性伸缩和实时通信等多个领域展现出巨大的应用潜力。通过合理应用事件驱动架构,可以构建灵活、可扩展和可维护的系统架构,满足不断变化的业务需求和技术挑战。对于开发者而言,深入理解事件驱动架构的核心概念和优势,将有助于更好地设计和实现高质量的软件系统。
|
存储 调度 块存储
十二年磨一剑:三代架构演进,打造高性能、低成本的块存储!
上周,全球计算机存储顶会USENIX FAST 2024 在美国加州圣克拉拉召开,继去年获得国内首个FAST最佳论文奖后,凭借在分布式块存储上的创新,阿里云新作再次斩获FAST大会最佳论文奖。这也是国内唯一一家连续两年获得FAST最佳论文奖的科技公司。
106814 105
|
Java Unix Linux
Android Studio中Terminal运行./gradlew clean build提示错误信息
遇到 `./gradlew clean build`命令执行出错时,首先应检查错误信息的具体内容,这通常会指向问题的根源。从权限、环境配置、依赖下载、版本兼容性到项目配置本身,逐一排查并应用相应的解决措施。记住,保持耐心,逐步解决问题,往往复杂问题都是由简单原因引起的。
1147 2
|
编解码
ENVI无缝镶嵌、拼接栅格数据的方法
【8月更文挑战第10天】使用ENVI进行无缝镶嵌的方法包括:准备具有一致空间参考的栅格数据;通过“File”菜单逐个加载数据;启动“Seamless Mosaic”工具;添加待镶嵌图像;调整几何校正、颜色平衡及羽化参数以平滑过渡;设定输出路径与格式;最后执行镶嵌并检查结果质量,必要时微调参数直至满意。
1470 1
|
机器学习/深度学习 算法 数据挖掘
【Python机器学习专栏】金融数据分析中的机器学习应用
【4月更文挑战第30天】本文探讨了机器学习在金融数据分析中的应用,如股价预测、信用评分、欺诈检测、算法交易和风险管理,并以Python为例展示了如何进行股价预测。通过使用机器学习模型,金融机构能更准确地评估风险、识别欺诈行为并优化交易策略。Python结合scikit-learn库简化了数据分析过程,助力金融从业者提高决策效率。随着技术发展,机器学习在金融领域的影响力将持续增强。
946 0
|
敏捷开发 前端开发 JavaScript
实践总结|前端架构设计的一点考究(上)
本文总结了作者在日常/大促业务的“敏捷”开发过程中产生的疑惑,并尝试做出思考得到一些解决思路和方案。在前端开发和实践过程中,梳理了一些简单设计方案可以缓解当时 “头疼” 的几个敏捷迭代问题,并实践在项目迭代中。
290 0

热门文章

最新文章