New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tagged task group设置不同tag的task数量 #2581
Comments
现在有两个参数可以配置 |
我看了下代码,这两个参数只能动态添加,且不能超过bthread_concurrency的上限,我的需求是:初始化的时候,设置bthread_currency, 同时指定不同的tag对应的worker number,看起来这两个参数不能完全满足 |
感觉你可以把bthread_min_concurrency设置成非0的,然后bthread_concurrency设置成一个比较大的数。 |
@wwbmmm 你有啥好的建议吗?你觉得这么搞可以吗? |
感觉多组的tag配置还是动态设置比较好,gflag本身不适合用来表达过于复杂的逻辑。如果用户需要在启动时指定,可以定义自己的gflag配置,然后根据自己的gflag配置调用bthread的接口来设置每一组的worker数量。 |
多谢二位,动态配置确实可以实现目的,但感觉还是不够方便。最好有一种更只管简单的方式,大家线上用tagged group,也很少使用平均分配的方式吧。 |
我理解bRPC框架支持这个能力,策略由业务层调用这些能力就能达到。比如:你自己设置一个gflags变量FLAGS_per_tagged_task_group_numbers = "20:40:40",在validator里面 |
当前每个tagged task group数量是平均分配,但现实中需要对不同的task group指定不同的worker数量
可以增加一个FLAGS_per_tagged_task_group_numbers = "20:40:40",指定不同task group的数量
The text was updated successfully, but these errors were encountered: