[ https://issues.apache.org/jira/browse/FLINK-18695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17184089#comment-17184089 ]
Yun Gao commented on FLINK-18695: --------------------------------- Hi [~chesnay] I also agree with you that there are both cases in the implementation of SSLHandler. I mentioned the PERFER_DIRECT flag in the test since it seems to have some impact on the overall direct memory used, but it did should not be the barrier for the current issue and we could consider it separately. For enabling heap buffer, another possible option from my side might be we keep PERFER_DIRECT = true unchanged and allocates 0 heap arenas. In this case the heap buffer would be allocated directly from the process's memory without cache (Since cache cause more memory consumption). This method did changes the footprint for the heap memory, but since the actually used amount of heap memory seems to be limited (several hundreds KB) according to the current tests, I'm not sure if it is acceptable. > Allow NettyBufferPool to allocate heap buffers > ---------------------------------------------- > > Key: FLINK-18695 > URL: https://issues.apache.org/jira/browse/FLINK-18695 > Project: Flink > Issue Type: Improvement > Components: Runtime / Network > Reporter: Chesnay Schepler > Assignee: Yun Gao > Priority: Major > Fix For: 1.12.0 > > > in 4.1.43 netty made a change to their SslHandler to always use heap buffers > for JDK SSLEngine implementations, to avoid an additional memory copy. > However, our {{NettyBufferPool}} forbids heap buffer allocations. > We will either have to allow heap buffer allocations, or create a custom > SslHandler implementation that does not use heap buffers (although this seems > ill-adviced?). > /cc [~sewen] [~uce] [~NicoK] [~zjwang] [~pnowojski] -- This message was sent by Atlassian Jira (v8.3.4#803005)