• 04 memory structure


    本章提要
    --------------------------------------------------
    SGA: System Global Area ( 包括background process)
    PGA: Process Global Area 进程或线程专用内存
    UGA: User Global Area 与session相关, 可能在SGA 或 PGA内分配
         采用dedicated server 那么, UGA 就在 PGA 中, 否则, UGA在 SGA中
    --------------------------------------------------
    auto management memory
    level 1: set two parameter to size SGA and PGA
    level 2: MEMORY_TARGET (11g以后, 取代了 PAG_AGGREGATE_TARGET, 只要设置这一个就行了)

    1. PGA and UGA
        PGA: include UGA, memory sorting, hash operation, bitmap merging 等.
        自动管理PGA内存, 设置memory_target(SGA 和 PGA一起)
        也可以设置 pga_aggregate_target 这个参数来设置 pga 的下界
        如果使用安装oracle软件时, 会有提示这个参数的大小. 而且有个默认值
        So, in short, I prefer to use automatic PGA memory management for end-user sessions—for the
        applications that run day to day against my database. Manual memory management makes sense for
        large batch jobs that run during periods when they are the only activities in the database.
    2. SGA
        SGA 是共享的, 与PGA不同, 包括以下:
        java pool: oracle 内部 JVM 使用内存.
        large pool: shared server 中 session 相关, rman I/O 相关
        shard pool: sql, plsql 相关
        block buffer: 关于 data file 之间.
        redo buffer: redo log file 之间.
        Fixed SGA: 其他
        等等
        自动管理SGA内存, 设置memory_target(SGA 和 PGA一起)
        也可以设置 sga_target 这个参数来设置 pga 的下界
    3. 总结内存结构
        个人感觉, 只要设置参数 MEMORY_TARGET 就可以了, 根据操作系统情况, 40%~70% 大概, 其余参数不用设置.

  • 相关阅读:
    程序向informix数据库插入text类型的中文乱码问题
    深入理解Java:注解(Annotation)基本概念
    ssm架构的理解
    队列的java实现
    栈的java实现
    LinkedList的实现原理
    ArrayList的实现
    快速排序
    数据结构之桶排序
    leetcode
  • 原文地址:https://www.cnblogs.com/moveofgod/p/3863690.html
Copyright © 2020-2023  润新知