kinghao007 opened a new issue, #5318: URL: https://github.com/apache/linkis/issues/5318
### Search before asking - [x] I searched the [issues](https://github.com/apache/linkis/issues) and found no similar issues. ### Linkis Component linkis-computation-governance ### What happened 对于并发引擎插件(如Shell、JDBC等),单个EC可以执行多个任务(比如10个)。但在没有EC可以复用的情况下会创建EC。 **问题场景:** 用户一次性提交30个任务,此时没有EC可以复用,系统会同时启动30个EC。 **实际需求:** 实际上只需要启动3个EC就能满足用户并发30的要求(每个EC可以处理10个并发任务)。 ### What you expected to happen 系统应该根据引擎的并发能力智能创建EC数量: - 检测引擎的单EC并发能力(如JDBC EC支持10个并发) - 根据任务总数和单EC并发能力计算最优EC数量 - 避免过度创建EC造成资源浪费 **期望行为:** - 提交30个任务时,系统创建3个EC(30/10=3) - 每个EC处理10个并发任务 - 节约资源,提高资源利用率 ### How to reproduce 1. 配置Shell或JDBC引擎,设置单EC并发数为10 2. 确保当前没有可复用的EC实例 3. 一次性提交30个任务 4. 观察系统会创建30个EC而不是3个 ### Anything else 建议在EngineConnManager中增加智能EC创建逻辑: 1. 获取引擎类型的并发配置 2. 计算当前任务队列长度 3. 根据公式 `需要EC数 = ceil(任务数 / 单EC并发数)` 创建EC 4. 实现EC创建的并发控制,避免瞬时大量创建 ### Are you willing to submit a PR? - [ ] Yes I am willing to submit a PR! ### Linkis Version 1.8.0 ### Java Version OpenJDK 1.8.0 ### Additional Information 这个问题在高并发场景下尤为明显,会造成: - 资源浪费(创建过多EC) - 启动时间增加(30个EC启动时间 >> 3个EC启动时间) - 可能导致资源不足(如果资源池有限) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
