attilapiros commented on a change in pull request #23278: [SPARK-24920][Core]
Allow sharing Netty's memory pool allocators
URL: https://github.com/apache/spark/pull/23278#discussion_r244830713
##########
File path:
common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java
##########
@@ -265,6 +265,16 @@ public boolean saslServerAlwaysEncrypt() {
return conf.getBoolean("spark.network.sasl.serverAlwaysEncrypt", false);
}
+ /**
+ * Flag indicating whether to share the pooled ByteBuf allocators between
the different Netty
+ * channels. If enabled then only two pooled ByteBuf allocators are created:
one where caching
+ * is allowed (for transport servers) and one where not (for transport
clients).
+ * When disabled a new allocator is created for each transport servers and
clients.
+ */
+ public Boolean sharedByteBufAllocators() {
+ return conf.getBoolean("spark.network.sharedByteBufAllocators.enabled",
true);
Review comment:
@srowen I understand your concern fully but I would prefer to keep
`spark.network.sharedByteBufAllocators.enabled` at least for a short time for
safety reasons.
Regarding `spark.network.sharedByteBufAllocators.io.preferDirectBufs`
unfortunately I cannot use`spark.network.io.preferDirectBufs` as it does not
exists this way but there are separate parameters with the
`.io.preferDirectBufs` suffix for each modules, like
`spark.shuffle.io.preferDirectBufs`, `spark.files.io.preferDirectBufs` and
`spark.rpc.io.preferDirectBufs`.
For details see the
[getConfKey](https://github.com/apache/spark/blob/2f328e842948e97ab53a0d8003fd2e9b54bcfd3b/common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java#L78)
method which concatenates the suffix via the initialisation of the key
[SPARK_NETWORK_IO_PREFERDIRECTBUFS_KEY](https://github.com/apache/spark/blob/2f328e842948e97ab53a0d8003fd2e9b54bcfd3b/common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java#L54).
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]