Oracle database operating system memory allocation management for PGA – part 4: Oracle 11.2.0.4 and
2015-11-30 20:24
806 查看
https://fritshoogland.wordpress.com/2014/12/18/oracle-database-operating-system-memory-allocation-management-for-pga-part-4-oracle-11-2-0-4-and-amm/
(PGA limiting for Oracle 12),here (PGA limiting for Oracle 11.2) and the
quiz on using PGA with AMM, into which this blogpost dives deeper.
As laid out in the quiz blogpost, I have a database with the following specifics:
-Oracle Linux x86_64 6u6.
-Oracle database 11.2.0.4 PSU 4
-Oracle database (single instance) with the following parameter set: memory_target=1G. No other memory related parameters set.
In this setup, I run the pga_filler script (source code here),
which creates a collection until the session statistic ‘session pga memory’ exceeds the grow_until variable, which for this case I set to 2100000000 (approximately 2.1G).
So: the instance is set to have AMM (memory_target) with a size of 1GB, which is supposed to be the total amount memory which this instance uses, and a session runs a PL/SQL procedure which only stops
if it has allocated 2.1GB, which is clearly more than configured with the memory_target parameter. Please mind a collection, which the anonymous procedure uses to allocate memory, is outside of the memory areas for which Oracle can move data to the assigned
temporary tablespace (sort, hash and bitmap memory areas).
After startup of the instance with only memory_target set to 1G, the memory partitioning looks like this:
total PGA inuse 1325501440 bytes
total PGA allocated 1342077952 bytes
maximum PGA allocated 1342077952 bytes
[/code]
[oracle@bigmachine [v11204] trace]$ grep Total\ heap\ size v11204_ora_9041.trc
Total heap size =1494712248
Total heap size = 65512
Total heap size = 1638184
[/code]
mmap(0x7f0194f7a000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194f7a000
mmap(0x7f0194f8a000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194f8a000
mmap(0x7f0194f9a000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194f9a000
mmap(0x7f0194faa000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194faa000
mmap(0x7f0194fba000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194fba000
mmap(0x7f0194fca000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194fca000
mmap(0x7f0194fda000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194fda000
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_NORESERVE, 6, 0xea000) = 0x7f0194e6a000
mmap(0x7f0194e6a000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194e6a000
mmap(0x7f0194e7a000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194e7a000
mmap(0x7f0194e9a000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194e9a000
mmap(0x7f0194eba000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194eba000
[/code]
Oracle database operating system memory allocation management for PGA – part 4: Oracle 11.2.0.4 and AMM
This is the 4th post in a series of posts on PGA behaviour of Oracle. Earlier posts are: here(PGA limiting for Oracle 12),here (PGA limiting for Oracle 11.2) and the
quiz on using PGA with AMM, into which this blogpost dives deeper.
As laid out in the quiz blogpost, I have a database with the following specifics:
-Oracle Linux x86_64 6u6.
-Oracle database 11.2.0.4 PSU 4
-Oracle database (single instance) with the following parameter set: memory_target=1G. No other memory related parameters set.
In this setup, I run the pga_filler script (source code here),
which creates a collection until the session statistic ‘session pga memory’ exceeds the grow_until variable, which for this case I set to 2100000000 (approximately 2.1G).
So: the instance is set to have AMM (memory_target) with a size of 1GB, which is supposed to be the total amount memory which this instance uses, and a session runs a PL/SQL procedure which only stops
if it has allocated 2.1GB, which is clearly more than configured with the memory_target parameter. Please mind a collection, which the anonymous procedure uses to allocate memory, is outside of the memory areas for which Oracle can move data to the assigned
temporary tablespace (sort, hash and bitmap memory areas).
After startup of the instance with only memory_target set to 1G, the memory partitioning looks like this:
SYS@v11204 AS SYSDBA> select component, current_size/power(1024,2), last_oper_type from v$memory_dynamic_components where current_size != 0; COMPONENT CURRENT_SIZE/POWER(1024,2) LAST_OPER_TYP ---------------------------------------------------------------- -------------------------- ------------- shared pool 168 STATIC large pool 4 STATIC java pool 4 STATIC SGA Target 612 STATIC DEFAULT buffer cache 424 INITIALIZING PGA Target 412 STATIC
total PGA inuse 1325501440 bytes
total PGA allocated 1342077952 bytes
maximum PGA allocated 1342077952 bytes
[/code]
[oracle@bigmachine [v11204] trace]$ grep Total\ heap\ size v11204_ora_9041.trc
Total heap size =1494712248
Total heap size = 65512
Total heap size = 1638184
[/code]
mmap(0x7f0194f7a000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194f7a000
mmap(0x7f0194f8a000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194f8a000
mmap(0x7f0194f9a000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194f9a000
mmap(0x7f0194faa000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194faa000
mmap(0x7f0194fba000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194fba000
mmap(0x7f0194fca000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194fca000
mmap(0x7f0194fda000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194fda000
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_NORESERVE, 6, 0xea000) = 0x7f0194e6a000
mmap(0x7f0194e6a000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194e6a000
mmap(0x7f0194e7a000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194e7a000
mmap(0x7f0194e9a000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194e9a000
mmap(0x7f0194eba000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x7f0194eba000
[/code]
相关文章推荐
- Oracle9i 动态SGA,PGA特性探索
- AMM和ASMM理解
- Oracle PGA作用
- PGA自动管理原理深入分析及性能调整
- Oracle 11g internals part 1: Automatic Memory Management
- Using Process Memory Matrix script for understanding Oracle process memory usage
- 如何disable AMM以及ASMM
- 关于AMM资料
- Linux下HugePage内存功能配置
- Oracle内存结构(之三)
- Oracle内存管理(之四)
- user process+server process+PGA
- oracle内存相关(sga,pga,latch)
- 内存管理
- OCP 1Z0-053 Q189 -- 启用自动 PGA 内存管理
- Oracle内存架构分析
- Oracle的内存结构
- Oracle体系架构(四)--PGA,UGA,CGA
- orace教程之PGA自动管理
- oracle教程之PGA管理