zoukankan      html  css  js  c++  java
  • 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% 大概, 其余参数不用设置.

  • 相关阅读:
    iptables服务器主机防火墙
    VMware克隆Linux虚拟机报错
    CentOS7.3下yum安装MariaDB10.3.12并指定utf8字符集
    CentOS7.3yum安装MariaDB报错[Errno 256]
    [LeetCode] 121. Best Time to Buy and Sell Stock
    [LeetCode] 116. Populating Next Right Pointers in Each Node
    [LeetCode] 113. Path Sum II
    jQuery实现图片添加及预览
    H5移动端适配——解决移动端必须手动调整以适配的问题
    [LeetCode] 110. Balanced Binary Tree
  • 原文地址:https://www.cnblogs.com/moveofgod/p/3863690.html
Copyright © 2011-2022 走看看