DB2数据库性能参数优化

1、Application Support Layer Heap Size (ASLHEAPSZ)
它是app和agent通信的 buffer,占用实例共享内存空间。
监控:
get snapshot for all on | grep –i “Rejected Block Remote Cursor requests”
Rejected Block Remote Cursor requests = 2283
如果Rejected Block Remote Cursor requests值比较高,增大ASLHEAPSZ值,直到该值为0
配置:
update dbm cfg using aslheapsz 20

2、Maximum Requester I/O Block Size (RQRIOBLK)
它是client和server通信的buffer,占用每个agent的私有内存空间。
监控:无法监控
配置:建议设置为最大值64K,缺省32767bytes,(设到最大值不会影响其它性能)
update dbm cfg using rqrioblk 65536

3、Sort Heap Threshold (SHEAPTHRES)
私有模式排序空间最大阀值,值=并发数×SORTHEAP
监控:
需要打开sort 监控开关-db2 update monitor switches using sort on
get snapshot for dbm | grep –i “sort”
如果Post threshold sorts值比较大,增加SORTHEAP 、SHEAPTHRES参数值
如果(Piped sorts accepted/Piped sorts requested)值比较低,增加SORTHEAP 、SHEAPTHRES参数值
配置:
update dbm cfg using sheapthres 80000

4、Enable Intra-Partition Parallelism (INTRA_PARALLEL)
在SMP环境中打开该选项,提高表和索引扫描速度
监控:
list applications
看application对应的Agents(# of Agents)数目是否大于1
配置:
update dbm cfg using intra_parallel yes

5、Maximum Query Degree of Parallelism (MAX_QUERYDEGREE)
指定一个SQL语句的最大subagent数目,当INTRA_PARALLEL值为yes时该参数起作用。如果该值为 ANY (-1),那么优化器将使用服务器的最大cpu数目。
监控:
list applications
看application对应的 Agents(# of Agents)数目是否大于1
配置:
update dbm cfg using MAX_QUERYDEGREE 4 IMMEDIATE

6、Query Heap Size (QUERY_HEAP_SZ)
占用agent的私有内存空间,存储每个agent运行时所有的sql文,包括the input SQLDA,the output SQLDA,the statement text,the SQLCA,the package name,the package creator,the section number,a consistency token,the cursor control block for any blocking cursors。
监控:
无法监控
配置:
一般不需要修改,如果访问大的LOB,可能需要增加该值
update dbm cfg using query_heap_sz 10000

7、Number of FCM Buffers (FCM

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值