业务报错Cannot get stream index,maybe comm_max_stream is not

【问题描述】业务报错Cannot get stream index,maybe comm_max_stream is not enough

【机制说明】

comm_max_stream参数表示任意两个dn之间stream的最大数量

在cn查询当前任意两个dn之间stream情况:

select node_name,remote_name,count(*) from pgxc_comm_send_stream group by 1,2 order by 3 desc limit 100;

在dn查询当前dn与其他dn之间stream情况:

select node_name,remote_name,count(*) from pg_comm_send_stream group by 1,2 order by 3 desc limit 100;

comm_max_stream需要大于 并发数*每并发平均stream算子数*(smp的平方)

为什么不能设置过大,因为comm_max_stream会占用内存,占用内存=256byte*comm_max_stream*comm_max_datanode

根据上述公式,并发过大,查询太复杂,smp过**导致不足

如果comm_max_datanode不大,进程内存充足,可以适当将comm_max_stream往上调大

【分析过程】

现场该参数为默认值1024,在正常跑批时查到dn之间stream数量大约为600-700,当跑批时如果有临时查询,就会超过上限,导致报错

【闭环方案】

现场评估内存情况后,将参数调大至2048

原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/bigdata/316621.html

(0)
上一篇 2025年10月29日 23:21
下一篇 2025年10月29日 23:23

相关推荐

发表回复

登录后才能评论