sunwl1993 commented on issue #9817: URL: https://github.com/apache/seatunnel/issues/9817#issuecomment-3256708204
> > 这是master节点seatunnel.yaml的配置信息: > > seatunnel: > > engine: > > classloader-cache-mode: true > > history-job-expire-minutes: 5 > > backup-count: 0 > > queue-type: blockingqueue > > print-execution-info-interval: 60 > > print-job-metrics-info-interval: 60 > > slot-service: > > dynamic-slot: false > > slot-num: 50 > > checkpoint: > > interval: 10000 > > timeout: 60000 > > storage: > > type: localfile > > max-retained: 3 > > plugin-config: > > storage.type: localfile > > namespace: /opt/seatunnel/checkpoint/ > > telemetry: > > metric: > > enabled: false > > When you encounter a task card, can you try to print the heap memory usage of the master and worker to see the space of the young generation and old generation as well as the GC frequency? 在之前任务卡顿时Woker的gc日志截图,极为频繁,master相关截图缺失 <img width="1242" height="609" alt="Image" src="https://github.com/user-attachments/assets/749db081-da3b-4f96-8111-e00397cced0c" /> 不过任务卡顿定位到了一个可能性比较大的原因,咱们在TaskExecutionService.updateMetricsContextInImap、JobMaster.removeMetricsContext时在之前的版本用的Imap.tryLock这种方式、在最新的https://github.com/apache/seatunnel/pull内移除了锁使用了synchronized,由于我们的任务提交频率比较高(1分钟80+),猜测在并发较高的场景下锁竞争较为消耗性能造成了任务卡顿,我现在把updateMetrics和removeMetrics这俩个方法改成了将相关信息放到LinkedBlockingQueue内,然后开启异步线程消费这个队列进行具体的业务处理,这样任务卡顿问题有所缓解,代码修改及gc相关截图如下 <img width="1646" height="3210" alt="Image" src="https://github.com/user-attachments/assets/693900aa-8121-45c9-aa86-f4c74d47cc89" /> master_gc <img width="1407" height="251" alt="Image" src="https://github.com/user-attachments/assets/b177547e-b105-4f6e-835d-360933a2d9c3" /> <img width="1305" height="441" alt="Image" src="https://github.com/user-attachments/assets/2bda6472-b673-4eab-bf23-b0920a4f772e" /> worker_gc <img width="1430" height="384" alt="Image" src="https://github.com/user-attachments/assets/e830b320-6ad5-4398-b8b7-05f19a83e1e9" /> <img width="1158" height="549" alt="Image" src="https://github.com/user-attachments/assets/3de7c9d5-e537-486c-b35e-b75552a90fdd" /> -- 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]
