DB2的参数配置说明 目 录 ---------------------------------------------------------------------------------------------------- 硬件配置在2CPU,2G内存设置情况 硬件配置在4CPU,4G内存设置情况 硬件配置在8CPU,8G内存设置情况 ----------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------- ● 硬件配置在2CPU,2G内存设置情况 系统大约支持用户并发数:30左右 ---------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- -- 数据库管理器配置参数 -- Database Manager Configuration --------------------------------------------------------------------------------------------------- --1.应用程序支持层堆大小 (aslheapsz) (4K) update dbm cfg using aslheapsz 256; --2.排序堆阈值 (sheapthres) (4K) update dbm cfg using sheapthres 20000 ; --3.代理程序的最大数目 (maxagents) update dbm cfg using maxagents 100; --4.代理程序池大小 (NUM_POOLAGENTS) update dbm cfg using NUM_POOLAGENTS 30; --------------------------------------------------------------------------------------------------- -- 数据库配置参数 -- Database Configuration --------------------------------------------------------------------------------------------------- --1.数据库堆 (DBHEAP)(4K) update database configuration for ncdata00 using DBHEAP 4096; --2.日志缓冲区大小 (logbufsz) (4K) update database configuration for ncdata00 using logbufsz 512; --3.编目高速缓存大小 (CATALOGCACHE_SZ) (4K) update database configuration for ncdata00 using CATALOGCACHE_SZ 1024; --4.用于锁定列表的最大内存 (locklist) (4K) update database configuration for ncdata00 using locklist 4096; --5.最大应用程序控制堆大小 (app_ctl_heap_sz) (4K) update database configuration for ncdata00 using app_ctl_heap_sz 2048; --6.排序堆大小 (sortheap)(4K) update database configuration for ncdata00 using sortheap 2048; --7.语句堆大小 (stmtheap) (4K) update database configuration for ncdata00 using stmtheap 2048; --8.应用程序堆大小 (applheapsz)(4K) update database configuration for ncdata00 using applheapsz 1024; --9.程序包高速缓存大小 (pckcachesz) (4K) update database configuration for ncdata00 using pckcachesz 10240; --10. 逐步升级前锁定列表的最大百分比 (maxlocks) update database configuration for ncdata00 using maxlocks 18; --11. 异步页清除程序数目 (NUM_IOCLEANERS) update database configuration for ncdata00 using NUM_IOCLEANERS 3; --12. I/O 服务器数目 (NUM_IOSERVERS) update database configuration for ncdata00 using NUM_IOSERVERS 3; --13. 活动应用程序的最大数目 (MAXAPPLS) update database configuration for ncdata00 using MAXAPPLS 50; --14. 活动应用程序的平均数目 (AVG_APPLS) update database configuration for ncdata00 using AVG_APPLS 30; --15.日志文件的大小 (logfilsiz) (4K) update database configuration for ncdata00 using logfilsiz 4096; --16.主日志文件数目 (logprimary) update database configuration for ncdata00 using logprimary 12; --17.辅助日志文件数目 (LOGSECOND) update database configuration for ncdata00 using logsecond 100; --18.组提交计数 (MINCOMMIT) update database configuration for ncdata00 using MINCOMMIT 2; ---------------------------------------------------------------------------------------------------- ● 硬件配置在4CPU,4G内存设置情况 系统大约支持用户并发数:80左右 ---------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- -- 数据库管理器配置参数 -- Database Manager Configuration --------------------------------------------------------------------------------------------------- --1.应用程序支持层堆大小 (aslheapsz) (4K) update dbm cfg using aslheapsz 512; --2.排序堆阈值 (sheapthres) (4K) update dbm cfg using sheapthres 30000 ; --3.代理程序的最大数目 (maxagents) update dbm cfg using maxagents 150; --4.代理程序池大小 (NUM_POOLAGENTS) update dbm cfg using NUM_POOLAGENTS 60; -------------------------------------------------------------------------------------------------- -- 数据库配置参数 -- Database Configuration -------------------------------------------------------------------------------------------------- --1.数据库堆 (DBHEAP)(4K) update database configuration for ncdata00 using DBHEAP 7168; --2.日志缓冲区大小 (logbufsz) (4K) update database configuration for ncdata00 using logbufsz l024; --3.编目高速缓存大小 (CATALOGCACHE_SZ) (4K) update database configuration for ncdata00 using CATALOGCACHE_SZ 2048; --4.用于锁定列表的最大内存 (locklist) (4K) update database configuration for ncdata00 using locklist 8192; --5.最大应用程序控制堆大小 (app_ctl_heap_sz) (4K) update database configuration for ncdata00 using app_ctl_heap_sz 3072; --6.排序堆大小 (sortheap)(4K) update database configuration for ncdata00 using sortheap 3072; --7.语句堆大小 (stmtheap) (4K) update database configuration for ncdata00 using stmtheap 3072; --8.应用程序堆大小 (applheapsz)(4K) update database configuration for ncdata00 using applheapsz 1024; --9.程序包高速缓存大小 (pckcachesz) (4K) update database configuration for ncdata00 using pckcachesz 15360; --12. 逐步升级前锁定列表的最大百分比 (maxlocks) update database configuration for ncdata00 using maxlocks 18; --13. 异步页清除程序数目 (NUM_IOCLEANERS) update database configuration for ncdata00 using NUM_IOCLEANERS 5; --14. I/O 服务器数目 (NUM_IOSERVERS) update database configuration for ncdata00 using NUM_IOSERVERS 4; --15. 活动应用程序的最大数目 (MAXAPPLS) update database configuration for ncdata00 using MAXAPPLS 150; --16. 活动应用程序的平均数目 (AVG_APPLS) update database configuration for ncdata00 using AVG_APPLS 60; --17.日志文件的大小 (logfilsiz) (4K) update database configuration for ncdata00 using logfilsiz 5120; --18.主日志文件数目 (logprimary) update database configuration for ncdata00 using logprimary 12; --19.辅助日志文件数目 (LOGSECOND) update database configuration for ncdata00 using logsecond 100; --20.组提交计数 (MINCOMMIT) update database configuration for ncdata00 using MINCOMMIT 3;
---------------------------------------------------------------------------------------------------- ● 硬件配置在8CPU,8G内存设置情况 系统大约支持用户并发数:150左右 ---------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- -- 数据库管理器配置参数 -- Database Manager Configuration --------------------------------------------------------------------------------------------------- --1.应用程序支持层堆大小 (aslheapsz) (4K) update dbm cfg using aslheapsz 1024; --2.排序堆阈值 (sheapthres) (4K) update dbm cfg using sheapthres 40000 ; --3.代理程序的最大数目 (maxagents) update dbm cfg using maxagents 300; --4.代理程序池大小 (NUM_POOLAGENTS) update dbm cfg using NUM_POOLAGENTS 100; --------------------------------------------------------------------------------------------------- -- 数据库配置参数 -- Database Configuration --------------------------------------------------------------------------------------------------- --1.数据库堆 (DBHEAP)(4K) update database configuration for ncdata00 using DBHEAP 10240; --2.日志缓冲区大小 (logbufsz) (4K) update database configuration for ncdata00 using logbufsz 2048; --3.编目高速缓存大小 (CATALOGCACHE_SZ) (4K) update database configuration for ncdata00 using CATALOGCACHE_SZ 3072; --4.用于锁定列表的最大内存 (locklist) (4K) update database configuration for ncdata00 using locklist 10240; --5.最大应用程序控制堆大小 (app_ctl_heap_sz) (4K) update database configuration for ncdata00 using app_ctl_heap_sz 4096; --6.排序堆大小 (sortheap)(4K) update database configuration for ncdata00 using sortheap 4096; --7.语句堆大小 (stmtheap) (4K) update database configuration for ncdata00 using stmtheap 3072; --8.应用程序堆大小 (applheapsz)(4K) update database configuration for ncdata00 using applheapsz 2048; --9.程序包高速缓存大小 (pckcachesz) (4K) update database configuration for ncdata00 using pckcachesz 20480; --12. 逐步升级前锁定列表的最大百分比 (maxlocks) update database configuration for ncdata00 using maxlocks 18; --13. 异步页清除程序数目 (NUM_IOCLEANERS) update database configuration for ncdata00 using NUM_IOCLEANERS 8; --14. I/O 服务器数目 (NUM_IOSERVERS) update database configuration for ncdata00 using NUM_IOSERVERS 5; -缺省情况下,LOCKTIMEOUT是-1,意味着锁等待时间无限期,这和实际应用需求一般是不太相符的,需要将其值设为大于0的一个数。
-DLCHKTIME时间通常要设得比LOCKTIMEOUT时间小一些,否则未等发现死锁,就会被以锁等待超时而返回错误。
EXTENTSIZE:数据块(extent)是表空间的容器内的空间单位。数据库对象(LOB 和 long varchar 除外)存储在 DB2 的页中。这些页组成数据块。数据块大小是在表空间级别定义的。表空间的数据块大小一旦建立,就不能改变。数据库配置参数 DFT_EXTENT_SZ 指定数据库中所有表空间的缺省数据块大小。该值可以从 2 到 256 页;因此 4 KB 页的绝对大小可以从 8 KB 到 1024 KB,8 KB 页的绝对大小可以从 16 KB 到 2048 KB。可通过在 CREATE TABLESPACE 语句中使用 EXTENTSIZE 参数覆盖这一数字。
PREFETCHSIZE:顺序预取是数据库管理器预先使用查询的能力,即在实际引用那些页之前读取它们。这种异步检索可以极大地缩短执行时间。您可以通过改变 CREATE TABLESPACE 语句上的 PREFETCHSIZE 参数来控制预取执行的强度。缺省情况下,该值被设置为 DFT_PREFETCH_SZ 数据库配置参数。该值表示当 DB2 触发预取请求时,一次要读取多少页。通过将该值设置为数据块大小的倍数,就可以并行读取多个数据块。当表空间的容器在单独的硬盘上时,这一功能甚至更有效。
|