NicoK commented on a change in pull request #6670: [FLINK-10301][network] extend StreamNetworkBenchmarkEnvironment to allow custom Configuration instances URL: https://github.com/apache/flink/pull/6670#discussion_r216595121
########## File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/benchmark/StreamNetworkBenchmarkEnvironment.java ########## @@ -179,12 +192,15 @@ private void generatePartitionIds() throws Exception { } private NetworkEnvironment createNettyNetworkEnvironment( - @SuppressWarnings("SameParameterValue") int bufferPoolSize) throws Exception { + @SuppressWarnings("SameParameterValue") int bufferPoolSize, Configuration config) throws Exception { + + int segmentSize = + checkedDownCast(MemorySize.parse(config.getString(TaskManagerOptions.MEMORY_SEGMENT_SIZE)).getBytes()); - final NetworkBufferPool bufferPool = new NetworkBufferPool(bufferPoolSize, BUFFER_SIZE); + final NetworkBufferPool bufferPool = new NetworkBufferPool(bufferPoolSize, segmentSize); final NettyConnectionManager nettyConnectionManager = new NettyConnectionManager( - new NettyConfig(LOCAL_ADDRESS, 0, BUFFER_SIZE, NUM_SLOTS_AND_THREADS, new Configuration())); Review comment: good catch - actually having 1 Netty thread per server/client might eventually become the bottleneck depending on the benchmark...I'll use the property from the `config` using `TaskManagerOptions.NUM_TASK_SLOTS` as is done in Flink ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services