<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                [TOC] # 租戶內部內存管理 租戶內存默認占到 OceanBase 數據庫內存上限的 80%,OceanBase 數據庫把租戶內部的內存總體上分為兩個部分: * 不可動態伸縮的內存 MemStore * 可動態伸縮的內存 KVCache 其中,不可動態伸縮的內存主要給保存數據庫增量更新的 MemStore 使用,可動態伸縮的內存主要由 KVCache 進行管理。可動態伸縮的 KVCache 會盡量使用除去不可動態伸縮后租戶的全部內存。 除此之外,還有很多內存組件,包括 Plan Cache(執行計劃緩存)、SQL Arena(SQL 執行期內存)、選舉動作等,都要占用一定量的內存。您可以通過查詢`__all_virtual_memory_info`來獲取所有內存組件的使用情況。 ## 不可動態伸縮的內存管理 目前與不可動態伸縮內存相關的配置只有`memstore_limit_percentage`,它表示租戶的 MemStore 部分最多占租戶總內存上限的百分比,默認值為租戶 MinMemory 的 50%。租戶的寫入或者更新會增加 MemStore 的內存使用,當租戶的 MemStore 部分內存到達上限以后,后續的寫入或者更新操作將會被拒絕。OceanBase 數據庫會根據 MemStore 的內存使用比例決定何時進行轉儲或者合并釋放 MemStore 的內存,該比例由配置項`freeze_trigger_percentage`控制,表示當 MemStore 內存占用到達其上限的百分比后就進行凍結(轉儲和合并的前置動作),默認值為租戶 MemStore 內存上限的 70%,即租戶 MinMemory 的 35%。 ## 可動態伸縮的內存管理 可動態伸縮的內存主要部分是 KVCache。OceanBase 數據庫將絕大多數的 KV 格式的緩存統一在了 KVCache 中進行管理,KVCache 支持動態伸縮、不同 KV 的優先級控制以及智能的淘汰機制。 KVCache 一般不需要配置,特殊場景下可以通過參數控制各種 KV 的優先級,優先級高的 KV 類比優先級低的 KV 類更容易被保留在 Cache 中。 用于控制 KV 優先級的參數如下表所示。參數值越大表示優先級越高。 <table cols="3" id="table-okg-xr6-i39" class="table"><colgroup colname="col2" colnum="2" colwidth="1*" id="colgroup-fzt-0vz-8ib" style="width:50%"></colgroup><colgroup colname="col3" colnum="3" colwidth="1*" id="colgroup-1vm-fwm-2li" style="width:50%"></colgroup><thead id="thead-o5t-lz7-txs" class="thead"><tr id="tr-jmi-uu5-9gn"><th id="td-v32-0mw-ps8"><p id="p-zba-dgf-plh">參數</p></th><th id="td-zlu-zz4-jxf"><p id="p-xjn-r63-7nl">含義</p></th></tr></thead><tbody id="tbody-371-euy-kak" class="tbody"><tr id="tr-i69-o3a-7mi"><td namest="col1" nameend="col1" id="td-b1q-76j-pzb"><p id="p-4u4-00l-v2h">fuse_row_cache_priority</p></td><td namest="col2" nameend="col2" id="td-1q5-9c2-41x"><p id="p-wh8-r3t-bl5">融合行緩存在緩存系統中的優先級。</p></td></tr><tr id="tr-yr7-5t9-13d"><td namest="col1" nameend="col1" id="td-ncb-zj8-g41"><p id="p-8qc-ji5-lf4">location_cache_priority</p></td><td namest="col2" nameend="col2" id="td-mk5-asm-mlk"><p id="p-035-cev-fpy">位置緩存在系統緩存服務中的優先級。</p></td></tr><tr id="tr-qwa-8hs-f3p"><td id="td-e5s-rj5-av5"><p id="p-wjl-137-jic">clog_cache_priority</p></td><td morerows="0" id="td-gm6-wa7-rm7"><p id="p-d8r-489-u6q">事務日志占用緩存的優先級。</p></td></tr><tr id="tr-cji-id1-2tl"><td id="td-odo-dht-ace"><p id="p-yry-4yc-p6o">index_clog_cache_priority</p></td><td morerows="0" id="td-owl-nq5-oz6"><p id="p-ncs-1zg-vfk">事務日志索引在緩存系統中的優先級。</p></td></tr><tr id="tr-b2a-thc-ibb"><td id="td-p54-oer-prz"><p id="p-wt2-zlt-fn6">user_tab_col_stat_cache_priority</p></td><td morerows="0" id="td-nql-jlz-fbw"><p id="p-2p7-p9x-7z5">統計數據緩存在緩存系統中的優先級。</p></td></tr><tr id="tr-eoh-7f8-bo2"><td id="td-e4e-h8y-hbq"><p id="p-cdw-kpa-8bq">index_cache_priority</p></td><td morerows="0" id="td-zbu-ksw-tqq"><p id="p-p6z-5ms-1hg">索引在緩存系統中的優先級。</p></td></tr><tr id="tr-c93-ze6-l24"><td id="td-ntp-8y9-qpf"><p id="p-ri6-zuk-haj">index_info_block_cache_priority</p></td><td morerows="0" id="td-ga8-ms0-mid"><p id="p-7le-x80-t4n">塊索引在緩存系統中的優先級。</p></td></tr><tr id="tr-jvo-9sr-tln"><td id="td-iyw-jhy-dw5"><p id="p-fop-kg4-45c">user_block_cache_priority</p></td><td morerows="0" id="td-wv7-31a-nft"><p id="p-857-oz5-bol">數據塊緩存在緩存系統中的優先級。</p></td></tr><tr id="tr-qt7-tbc-09w"><td id="td-9fo-1e8-bgj"><p id="p-43z-ovq-ax9">user_row_cache_priority</p></td><td morerows="0" id="td-ua8-68p-wzv"><p id="p-3m7-poc-w7m">基線數據行緩存在緩存系統中的優先級。</p></td></tr><tr id="tr-zev-rff-pfo"><td id="td-9y1-056-k7x"><p id="p-m6p-ial-ewt">bf_cache_priority</p></td><td morerows="0" id="td-9da-3v8-1zu"><p id="p-rf3-p6l-9un">Bloom Filter 的緩存優先級。</p></td></tr></tbody></table> KVCache 中子 Cache 的信息可以通過查詢`__all_virtual_kvcache_info`參數獲得。其中 sys 和普通租戶的重要組成部分略有不同: * sys 租戶上的 Cache 種類如下: <table id="table-2fd-pos-3lw" class="table"><colgroup colnum="1" colname="col1" colwidth="1*" id="colgroup-gs0-bvg-90e" style="width:33.33333333333333%"></colgroup><colgroup colnum="2" colname="col2" colwidth="2*" id="colgroup-wvu-78y-i9y" style="width:66.66666666666666%"></colgroup><thead id="thead-nv6-3op-dwg" class="thead"><tr id="tr-fds-k5i-3eh"><th id="td-9us-fin-au6"><p id="p-pty-0ie-gl7">類別</p></th><th id="td-mlt-rss-qjb"><p id="p-856-gqm-dnx">說明</p></th></tr></thead><tbody id="tbody-czt-gua-j4m" class="tbody"><tr id="tr-wzb-8wp-pwj"><td id="td-37j-5qm-38b"><p id="p-zme-p6d-pi7">schema_cache</p></td><td id="td-12o-id0-7sx"><p id="p-iyp-zma-l57">存放用戶的 Schema 信息,用于提供 SQL 及系統正常運行所依賴的數據庫對象的元信息。</p></td></tr><tr id="tr-2sj-gyj-taa"><td id="td-r6s-rve-h5y"><p id="p-uuf-5tj-k5h">location_cache</p></td><td id="td-qd4-t3j-mst"><p id="p-g0h-u7p-bwy">存放分區的 location 信息,通過查詢它可以知道一個 Partition 分布在哪些 OBServer 上。</p></td></tr><tr id="tr-u7u-08g-7l4"><td id="td-r2e-6xt-ejw"><p id="p-qtg-u77-5kf">block_index_cache</p></td><td id="td-por-5sh-joi"><p id="p-tt9-n11-1m7">緩存微塊的 Index,加速微塊數據的訪問。</p></td></tr><tr id="tr-3b8-iuv-fr2"><td id="td-yai-hz2-e17"><p id="p-ks1-o46-k7i">user_block_cache</p></td><td id="td-sj8-xiq-irx"><p id="p-17f-7r6-ksv">緩存微塊數據,由于微塊可能通過壓縮算法進行壓縮,為了提升查詢性能,緩存的是解壓后的微塊數據。</p></td></tr><tr id="tr-u7e-jlo-1th"><td id="td-eng-zec-fvd"><p id="p-2ic-zse-c9e">fuse_row_cache</p></td><td id="td-hz5-f6a-rjk"><p id="p-zbe-mk1-0yb">緩存行的快照點數據,用于提高點查詢性能,并且可以避免因轉儲、合并導致的緩存失效問題。</p></td></tr><tr id="tr-gky-8xt-dxx"><td id="td-g5c-b6i-c21"><p id="p-1um-xta-lhu">index_clog_cache</p></td><td id="td-tos-pcg-v0j"><p id="p-5us-e0t-826">緩存 ilog 文件的內容,用于減小讀取 ilog 文件的開銷。</p></td></tr><tr id="tr-5lc-g0d-wda"><td id="td-51l-jqx-wq4"><p id="p-69b-w84-84y">user_tab_col_stat_cache </p></td><td id="td-kri-6x8-323"><p id="p-4j2-rn5-w0y">用戶表列統計信息緩存,用于 SQL 計算代價。</p></td></tr><tr id="tr-w2t-3m4-1nu"><td id="td-e9q-iqr-jbd"><p id="p-e3a-yi8-hj3">user_table_stat_cache </p></td><td id="td-5k8-wo6-nfh"><p id="p-oac-uqb-g3m">用戶表統計信息緩存,用于 SQL 計算代價。</p></td></tr></tbody></table> * 普通租戶上的 Cache 種類如下: <table id="table-x6k-1ap-wv3" class="table"><colgroup colnum="1" colname="col1" colwidth="1*" id="colgroup-hfx-yge-05s" style="width:33.33333333333333%"></colgroup><colgroup colnum="2" colname="col2" colwidth="2*" id="colgroup-glf-x72-0ug" style="width:66.66666666666666%"></colgroup><thead id="thead-clq-4yc-lwl" class="thead"><tr id="tr-kr5-fwi-o35"><th id="td-o4v-g1n-dqg"><p id="p-nmb-fym-9hr">類別</p></th><th id="td-mpc-kka-y0k"><p id="p-0f8-iou-c1p">說明</p></th></tr></thead><tbody id="tbody-mhs-hrw-1vr" class="tbody"><tr id="tr-n52-bkx-7iq"><td id="td-8d1-idn-jqr"><p id="p-73r-17x-ve0">user_block_cache</p></td><td id="td-49i-srh-iuq"><p id="p-5g7-ncy-49n">緩存微塊數據,由于微塊可能通過壓縮算法進行壓縮,為了提升查詢性能,緩存的是解壓后的微塊數據。</p></td></tr><tr id="tr-b2e-zef-38e"><td id="td-d2o-zhx-fz5"><p id="p-t60-a3d-dyo">block_index_cache</p></td><td id="td-mlp-j4g-m21"><p id="p-o35-p71-9tm">緩存微塊的 Index,加速微塊數據的訪問。</p></td></tr><tr id="tr-vvf-pbu-r9l"><td id="td-zvi-3s8-w4p"><p id="p-wfc-lfe-wza">fuse_row_cache </p></td><td id="td-u2l-zqb-l9p"><p id="p-qko-6d1-akv">緩存行的快照點數據,用于提高點查詢性能,并且可以避免因轉儲、合并導致的緩存失效問題。</p></td></tr></tbody></table>
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看