# OceanBase 常用参数和变量 * 下表所示是常用的跟开发有关的参数(parameters) <table data-tag="table" id="table-h9t-xdi-8er" class="table"><colgroup width="243" span="1" data-tag="col" id="col-kq8-eel-9ml" colwidth="1*" colnum="1" colname="col1" style="width:25%" class="col"></colgroup><colgroup width="105" span="1" data-tag="col" id="col-15q-e9a-dox" colwidth="1*" colnum="2" colname="col2" style="width:25%" class="col"></colgroup><colgroup width="298" span="1" data-tag="col" id="col-qkh-azn-kvr" colwidth="1*" colnum="3" colname="col3" style="width:25%" class="col"></colgroup><colgroup width="68" span="1" data-tag="col" id="col-rvg-6kv-59n" colwidth="1*" colnum="4" colname="col4" style="width:25%" class="col"></colgroup><thead id="thead-pas-o3k-dgs" class="thead"><tr id="tr-spa-3hv-kgn"><th id="td-h8x-jgi-ah9"><p id="p-tux-su6-dul"><b>参数名</b></p></th><th id="td-t04-fev-lt3"><p id="p-a5e-9tv-6s1"><b>参数值</b></p></th><th id="td-kq4-igb-qv0"><p id="p-os8-afq-2v1"><b>参数含义</b></p></th><th id="td-52d-2c1-np9"><p id="p-de4-9df-yny"><b>范围</b></p></th></tr></thead><tbody data-tag="tbody" id="tbody-ty4-mxo-vdj" class="tbody"><tr data-tag="tr" id="tr-ur1-t1g-gf2" class="tr"><td data-tag="td" id="td-69x-k3s-cbq" class="td"><p data-tag="p" id="p-b2t-1rm-r0j" class="p">minor_freeze_times</p></td><td data-tag="td" id="td-4gh-9gk-eae" class="td"><p data-tag="p" id="p-ria-kh8-0gv" class="p">0</p></td><td data-tag="td" id="td-6h6-spo-j1h" class="td"><p data-tag="p" id="p-qwt-3kv-ewl" class="p">指定多少次minor freeze后会触发major freeze。</p></td><td data-tag="td" id="td-edp-egy-7yj" class="td"><p data-tag="p" id="p-wz5-y9p-2lw" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-w0z-ap9-5s2" class="tr"><td data-tag="td" id="td-jh9-nja-0gr" class="td"><p data-tag="p" id="p-wnx-6pw-by3" class="p">enable_major_freeze</p></td><td data-tag="td" id="td-3yp-6zo-7q1" class="td"><p data-tag="p" id="p-5zu-mp1-uhq" class="p">True</p></td><td data-tag="td" id="td-pjq-sf0-zoe" class="td"><p data-tag="p" id="p-u9k-6c8-9i4" class="p">指定集群是否开启自动major freeze。</p></td><td data-tag="td" id="td-y8y-y6d-zd0" class="td"><p data-tag="p" id="p-mlj-pmk-eui" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-75x-l88-6xq" class="tr"><td data-tag="td" id="td-0gk-xsr-jh6" class="td"><p data-tag="p" id="p-kd1-76y-7aw" class="p">major_freeze_duty_time</p></td><td data-tag="td" id="td-bgj-wm0-exv" class="td"><p data-tag="p" id="p-8b2-t51-2e3" class="p">02:00</p></td><td data-tag="td" id="td-241-pn5-la1" class="td"><p data-tag="p" id="p-qo0-3yc-45x" class="p">指定集群自动 major freeze的开始时间。</p></td><td data-tag="td" id="td-xg6-scn-q4w" class="td"><p data-tag="p" id="p-dr8-ypi-v1m" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-vvx-3b5-i7b" class="tr"><td data-tag="td" id="td-viu-qxk-5qc" class="td"><p data-tag="p" id="p-ifw-6m5-wxy" class="p">enable_rebalance</p></td><td data-tag="td" id="td-abk-i50-3ry" class="td"><p data-tag="p" id="p-jxe-5yd-qro" class="p">True</p></td><td data-tag="td" id="td-el4-3lf-h4o" class="td"><p data-tag="p" id="p-a6g-drv-45l" class="p">指定是否开启分区负载均衡。True开启,False关闭。</p></td><td data-tag="td" id="td-9fh-4gt-9qy" class="td"><p data-tag="p" id="p-18w-wwm-rk1" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-161-o3a-6k7" class="tr"><td data-tag="td" id="td-7ad-ztq-pwn" class="td"><p data-tag="p" id="p-p0p-9d6-yci" class="p">enable_auto_leader_switch</p></td><td data-tag="td" id="td-1wt-cap-l3w" class="td"><p data-tag="p" id="p-jne-qfp-vw7" class="p">True</p></td><td data-tag="td" id="td-lvc-vd9-l6e" class="td"><p data-tag="p" id="p-y4b-s8i-hlm" class="p">指定是否开启分区自动切主。</p></td><td data-tag="td" id="td-5vw-y8a-dj1" class="td"><p data-tag="p" id="p-w5c-xja-kjb" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-5e2-02b-w2x" class="tr"><td data-tag="td" id="td-xd4-l9w-8z1" class="td"><p data-tag="p" id="p-7x8-eo1-e10" class="p">large_query_threshold</p></td><td data-tag="td" id="td-ll5-ede-kqd" class="td"><p data-tag="p" id="p-z1x-z9y-6ci" class="p">100ms</p></td><td data-tag="td" id="td-9wz-ofa-0im" class="td"><p data-tag="p" id="p-7wn-cnh-q0i" class="p">指定一个查询执行时间被判定为大查询的阈值。</p></td><td data-tag="td" id="td-f3o-sjs-cfg" class="td"><p data-tag="p" id="p-q1q-603-fpv" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-ksw-2sn-frt" class="tr"><td data-tag="td" id="td-ef7-2h8-ans" class="td"><p data-tag="p" id="p-d0z-upz-c4d" class="p">large_query_worker_percentage</p></td><td data-tag="td" id="td-97n-38l-y3q" class="td"><p data-tag="p" id="p-wgf-2m3-qu5" class="p">30</p></td><td data-tag="td" id="td-uz9-038-tnt" class="td"><p data-tag="p" id="p-eim-cqx-pyr" class="p">指定大查询要使用的CPU工作线程比例。</p></td><td data-tag="td" id="td-jny-vqq-ouy" class="td"><p data-tag="p" id="p-sov-nug-52y" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-t9s-aib-xph" class="tr"><td data-tag="td" id="td-v6l-sgf-xfz" class="td"><p data-tag="p" id="p-w07-18y-ybw" class="p">data_copy_concurrency</p></td><td data-tag="td" id="td-qgf-cvm-8aw" class="td"><p data-tag="p" id="p-lpp-9gj-9bp" class="p">20</p></td><td data-tag="td" id="td-hqq-n6b-spw" class="td"><p data-tag="p" id="p-q93-nfj-3ec" class="p">指定分区迁移时集群最大的迁移任务数。</p></td><td data-tag="td" id="td-mli-ewq-5vv" class="td"><p data-tag="p" id="p-56d-49v-8fy" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-lq3-3b1-atx" class="tr"><td data-tag="td" id="td-ykt-hdv-lhs" class="td"><p data-tag="p" id="p-78l-csa-tx8" class="p">server_data_copy_out_concurrency</p></td><td data-tag="td" id="td-nsk-w8o-2oh" class="td"><p data-tag="p" id="p-2oo-yta-iiq" class="p">2</p></td><td data-tag="td" id="td-jjb-fqg-dj5" class="td"><p data-tag="p" id="p-gbz-i6y-h0b" class="p">指定分区迁移时每个节点最大的迁出任务数。</p></td><td data-tag="td" id="td-vmr-676-6zx" class="td"><p data-tag="p" id="p-gq3-pzt-gwx" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-9am-kub-jih" class="tr"><td data-tag="td" id="td-t1b-xqb-qg2" class="td"><p data-tag="p" id="p-hsc-xc5-xfz" class="p">server_data_copy_in_concurrency</p></td><td data-tag="td" id="td-n7f-4pg-crk" class="td"><p data-tag="p" id="p-2tx-tt1-77n" class="p">2</p></td><td data-tag="td" id="td-jam-eyb-37l" class="td"><p data-tag="p" id="p-8y2-dn7-vv7" class="p">指定分区迁移时每个节点最大的迁入任务数。</p></td><td data-tag="td" id="td-1wf-gjl-jsy" class="td"><p data-tag="p" id="p-boy-otn-6pj" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-uxg-req-ucx" class="tr"><td data-tag="td" id="td-8tr-b5b-mvf" class="td"><p data-tag="p" id="p-6un-n2e-58q" class="p">freeze_trigger_percentage</p></td><td data-tag="td" id="td-8sb-mgv-qzx" class="td"><p data-tag="p" id="p-1vv-eoj-yoc" class="p">70</p></td><td data-tag="td" id="td-82y-e4c-tsz" class="td"><p data-tag="p" id="p-a7o-j7x-knw" class="p">指定增量内存使用比例的一个阈值,达到这个值会触发 minor freeze 。</p></td><td data-tag="td" id="td-enh-9yt-79a" class="td"><p data-tag="p" id="p-qx4-tqi-144" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-ebz-19z-g68" class="tr"><td data-tag="td" id="td-ig6-xtq-xu8" class="td"><p data-tag="p" id="p-fx0-8j9-58f" class="p">enable_perf_event</p></td><td data-tag="td" id="td-lfg-iva-8jc" class="td"><p data-tag="p" id="p-gw3-dc1-h7m" class="p">True</p></td><td data-tag="td" id="td-h6x-rqx-trf" class="td"><p data-tag="p" id="p-one-zax-1ci" class="p">指定是否开启性能事件信息收集,默认是False.</p></td><td data-tag="td" id="td-ybj-pnu-yqi" class="td"><p data-tag="p" id="p-s8c-mih-dl8" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-gtv-xhr-f6n" class="tr"><td data-tag="td" id="td-4s4-at7-fij" class="td"><p data-tag="p" id="p-ez1-xu7-v0g" class="p">enable_sql_audit</p></td><td data-tag="td" id="td-3g2-gno-8a3" class="td"><p data-tag="p" id="p-lz3-1y1-p3i" class="p">True</p></td><td data-tag="td" id="td-jd8-j7h-e8s" class="td"><p data-tag="p" id="p-157-2u9-mzs" class="p">指定是否开启SQL日志,默认是True。</p></td><td data-tag="td" id="td-c5o-q1h-4eo" class="td"><p data-tag="p" id="p-die-qok-82y" class="p">集群</p></td></tr><tr data-tag="tr" id="tr-dvx-gru-745" class="tr"><td data-tag="td" id="td-5bz-5xp-yao" class="td"><p data-tag="p" id="p-ry1-dt2-eyn" class="p">sql_work_area</p></td><td data-tag="td" id="td-jmy-apt-mio" class="td"><p data-tag="p" id="p-in4-f0e-9eu" class="p">1G</p></td><td data-tag="td" id="td-qjn-5vt-011" class="td"><p data-tag="p" id="p-yh1-m6u-096" class="p">指定租户的SQL工作内存。</p></td><td data-tag="td" id="td-r3w-fcn-llu" class="td"><p data-tag="p" id="p-cxb-8wd-6yy" class="p">租户</p></td></tr><tr data-tag="tr" id="tr-nty-xd7-z0o" class="tr"><td data-tag="td" id="td-gl1-xn6-4u3" class="td"><p data-tag="p" id="p-wrn-v8q-7ex" class="p">writing_throttling_maximum_duration</p></td><td data-tag="td" id="td-fy2-zqe-x6n" class="td"><p data-tag="p" id="p-pue-odo-9n9" class="p">1h</p></td><td data-tag="td" id="td-i0m-b8b-ik4" class="td"><p data-tag="p" id="p-xns-ieq-2zb" class="p">指定触发租户限流时增量内存预估最大使用时间。</p></td><td data-tag="td" id="td-8v9-kzz-kwe" class="td"><p data-tag="p" id="p-y2a-bwb-7a3" class="p">租户</p></td></tr><tr data-tag="tr" id="tr-p6c-hlg-q6y" class="tr"><td data-tag="td" id="td-1xh-7tt-2az" class="td"><p data-tag="p" id="p-7i0-5m1-qlg" class="p">writing_throttling_trigger_percentage</p></td><td data-tag="td" id="td-lop-1h7-8fk" class="td"><p data-tag="p" id="p-ddm-kin-x5k" class="p">100</p></td><td data-tag="td" id="td-z7r-jm5-c38" class="td"><p data-tag="p" id="p-p8t-11x-nv1" class="p">指定触发租户限流时增量内存的使用比例阈值。</p></td><td data-tag="td" id="td-rqr-7jl-evi" class="td"><p data-tag="p" id="p-2xq-402-ku1" class="p">租户</p></td></tr><tr data-tag="tr" id="tr-o37-p29-x94" class="tr"><td data-tag="td" id="td-1fe-mnc-xif" class="td"><p data-tag="p" id="p-c8f-x7r-u6x" class="p">max_stale_time_for_weak_consistency</p></td><td data-tag="td" id="td-aoy-zrd-h3o" class="td"><p data-tag="p" id="p-83f-xyr-w6f" class="p">5s</p></td><td data-tag="td" id="td-5dr-y0q-wfm" class="td"><p data-tag="p" id="p-17x-ykt-7ct" class="p">指定弱一致读能接受备副本的最大时延。</p></td><td data-tag="td" id="td-c1l-1wc-zi9" class="td"><p data-tag="p" id="p-irt-l8z-rne" class="p">租户</p></td></tr></tbody></table>