云数据库 GaussDB-线程池:thread_pool_attr

时间:2023-11-01 16:22:17

thread_pool_attr

参数说明:用于控制线程池功能的详细属性,该参数仅在enable_thread_pool打开后生效,仅sysadmin用户可以访问。该参数属于POSTMASTER类型参数,请参考表1中对应设置方法进行设置。

取值范围:字符串,长度大于0

该参数分为3个部分,'thread_num, group_num, cpubind_info',这3个部分的具体含义如下:

  • thread_num:线程池中的线程总数,取值范围是0~4096。其中0的含义是数据库根据系统CPU core的数量来自动配置线程池的线程数,如果参数值大于0,线程池中的线程数等于thread_num。线程池大小推荐根据硬件配置设置,计算公式如下:thread_num = CPU核数*3~5,thread_num最大值为4096。
  • group_num:线程池中的线程分组个数,取值范围是0~64。其中0的含义是数据库根据系统NUMA组的个数来自动配置线程池的线程分组个数,如果参数值大于0,线程池中的线程组个数等于group_num。
  • cpubind_info:线程池是否绑核的配置参数。可选择的配置方式有集中:1. '(nobind)' ,线程不做绑核;2. '(allbind)',利用当前系统所有能查询到的CPU core做线程绑核;3. '(nodebind: 1, 2)',利用NUMA组1,2中的CPU core进行绑核;4. '(cpubind: 0-30)',利用0-30号CPU core进行绑核;5. '(numabind: 0-30)',在NUMA组内利用0-30号CPU core进行绑核。该参数不区分大小写。

默认值

  • 独立部署:'1024,2,(nobind)'(60核CPU/480G内存,32核CPU/256G内存);'512,2,(nobind)'(16核CPU/128G内存);'256,2,(nobind)'(8核CPU/64G内存);'128,2,(nobind)'(4核CPU/32G内存);'64,2,(nobind)'(4核CPU/16G内存)
  • 金融版(标准型):

    CN:'1024,2,(nobind)'(196核CPU/1536G内存);'768,2,(nobind)'(128核CPU/1024G内存,104核CPU/1024G内存);'684,2,(nobind)'(96核CPU/1024G内存,96核CPU/768G内存);'512,2,(nobind)'(80核CPU/640G内存,72核CPU/576G内存,64核CPU/512G内存,60核CPU/480G内存);'256,2,(nobind)'(32核CPU/256G内存),'128,2,(nobind)'(16核CPU/128G内存);'64,2,(nobind)'(8核CPU/64G内存)

    DN:'4096,2,(nobind)'(196核CPU/1536G内存,128核CPU/1024G内存,104核CPU/1024G内存,96核CPU/1024G内存,96核CPU/768G内存,80核CPU/640G内存,72核CPU/576G内存,64核CPU/512G内存,60核CPU/480G内存);'2048,2,(nobind)'(32核CPU/256G内存),'1024,2,(nobind)'(16核CPU/128G内存);'512,2,(nobind)'(8核CPU/64G内存)

  • 企业版:

    CN:'1024,2,(nobind)'(196核CPU/1536G内存);'768,2,(nobind)'(128核CPU/1024G内存,104核CPU/1024G内存);'512,2,(nobind)'(96核CPU/1024G内存,96核CPU/768G内存,80核CPU/640G内存,80核CPU/512G内存,72核CPU/576G内存,64核CPU/512G内存,60核CPU/480G内存);'256,2,(nobind)'(32核CPU/256G内存);'128,2,(nobind)'(16核CPU/128G内存);'64,2,(nobind)'(8核CPU/64G内存)

    DN:'1536,2,(nobind)'(196核CPU/1536G内存,128核CPU/1024G内存,104核CPU/1024G内存);'1024,2,(nobind)'(96核CPU/1024G内存,96核CPU/768G内存,80核CPU/640G内存,80核CPU/512G内存,72核CPU/576G内存,64核CPU/512G内存,60核CPU/480G内存);'512,2,(nobind)'(32核CPU/256G内存);'256,2,(nobind)'(16核CPU/128G内存);'128,2,(nobind)'(8核CPU/64G内存)

  • 金融版(数据计算型):

    CN:'768,2,(nobind)'(196核CPU/1536G内存);'512,2,(nobind)'(128核CPU/1024G内存,96核CPU/768G内存);'256,2,(nobind)'(72核CPU/576G内存);'128,2,(nobind)'(64核CPU/512G内存);'64,2,(nobind)'(32核CPU/256G内存)

    DN:'2048,2,(nobind)'(196核CPU/1536G内存,128核CPU/1024G内存,96核CPU/768G内存);'1024,2,(nobind)'(72核CPU/576G内存);'512,2,(nobind)'(64核CPU/512G内存);'256,2,(nobind)'(32核CPU/256G内存)

support.huaweicloud.com/distributed-devg-v3-opengauss/gaussdb-10-0333.html