[
https://issues.apache.org/jira/browse/FLINK-18646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17161865#comment-17161865
]
Jingsong Lee commented on FLINK-18646:
--------------------------------------
[https://stackoverflow.com/questions/2414105/why-is-it-bad-practice-to-call-system-gc]
Calling System.gc() multiple times seems to be costly. Although it's a hint, it
can lead to a meaningless rush of the JVM.
The codes look not so complicate, maybe [~TsReaper] you can try again benchmark
after trying w/o always calling GC.
> Managed memory released check can block RPC thread
> --------------------------------------------------
>
> Key: FLINK-18646
> URL: https://issues.apache.org/jira/browse/FLINK-18646
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Task
> Affects Versions: 1.11.0
> Reporter: Andrey Zagrebin
> Priority: Major
> Attachments: log1.png, log2.png
>
>
> UnsafeMemoryBudget#verifyEmpty, called on slot freeing, needs time to wait on
> GC of all allocated/released managed memory. If there are a lot of segments
> to GC then it can take time to finish the check. If slot freeing happens in
> RPC thread, the GC waiting can block it and TM risks to miss its heartbeat.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)