Skip to content

Commit

Permalink
[apache#1651] improvement(netty): Set Netty as the default server type
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyma committed Apr 17, 2024
1 parent 5ab625b commit 4d04254
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ public class RssBaseConf extends RssConf {
public static final ConfigOption<ServerType> RPC_SERVER_TYPE =
ConfigOptions.key("rss.rpc.server.type")
.enumType(ServerType.class)
.defaultValue(ServerType.GRPC)
.withDescription("Shuffle server type, default is grpc");
.defaultValue(ServerType.GRPC_NETTY)
.withDescription(
"Shuffle server type, supports GRPC_NETTY, GRPC. The default value is GRPC_NETTY. We recommend to use GRPC_NETTY for better stability and performance.");

public static final ConfigOption<Integer> RPC_SERVER_PORT =
ConfigOptions.key("rss.rpc.server.port")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ public class RssClientConf {
public static final ConfigOption<ClientType> RSS_CLIENT_TYPE =
ConfigOptions.key("rss.client.type")
.enumType(ClientType.class)
.defaultValue(ClientType.GRPC)
.withDescription("Supports GRPC, GRPC_NETTY");
.defaultValue(ClientType.GRPC_NETTY)
.withDescription(
"Supports GRPC_NETTY, GRPC. The default value is GRPC_NETTY. We recommend to use GRPC_NETTY for better stability and performance.");

public static final ConfigOption<Boolean> RSS_CLIENT_REMOTE_STORAGE_USE_LOCAL_CONF_ENABLED =
ConfigOptions.key("rss.client.remote.storage.useLocalConfAsDefault")
Expand Down
20 changes: 10 additions & 10 deletions docs/client_guide/client_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ spark.rss.data.replica.read 2
```

### Netty Setting
| Property Name | Default | Description |
|-----------------------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <client_type>.rss.client.type | GRPC | The default is GRPC, we can set it to GRPC_NETTY to enable the Netty on the client |
| <client_type>.rss.client.netty.io.mode | NIO | Netty EventLoopGroup backend, available options: NIO, EPOLL. |
| <client_type>.rss.client.netty.client.connection.timeout.ms | 600000 | Connection active timeout. |
| <client_type>.rss.client.netty.client.threads | 0 | Number of threads used in the client thread pool. Default is 0, Netty will use the number of (available logical cores * 2) as the number of threads. |
| <client_type>.rss.client.netty.client.prefer.direct.bufs | true | If true, we will prefer allocating off-heap byte buffers within Netty. |
| <client_type>.rss.client.netty.client.connections.per.peer | 2 | Suppose there are 100 executors, spark.rss.client.netty.client.connections.per.peer = 2, then each ShuffleServer will establish a total of (100 * 2) connections with multiple clients. |
| <client_type>.rss.client.netty.client.receive.buffer | 0 | Receive buffer size (SO_RCVBUF). Note: the optimal size for receive buffer and send buffer should be latency * network_bandwidth. Assuming latency = 1ms, network_bandwidth = 10Gbps, buffer size should be ~ 1.25MB. Default is 0, the operating system automatically estimates the receive buffer size based on default settings. |
| <client_type>.rss.client.netty.client.send.buffer | 0 | Send buffer size (SO_SNDBUF). |
| Property Name | Default | Description |
|-------------------------------------------------------------|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <client_type>.rss.client.type | GRPC_NETTY | Supports GRPC_NETTY, GRPC. The default value is GRPC_NETTY. We recommend to use GRPC_NETTY for better stability and performance. |
| <client_type>.rss.client.netty.io.mode | NIO | Netty EventLoopGroup backend, available options: NIO, EPOLL. |
| <client_type>.rss.client.netty.client.connection.timeout.ms | 600000 | Connection active timeout. |
| <client_type>.rss.client.netty.client.threads | 0 | Number of threads used in the client thread pool. Default is 0, Netty will use the number of (available logical cores * 2) as the number of threads. |
| <client_type>.rss.client.netty.client.prefer.direct.bufs | true | If true, we will prefer allocating off-heap byte buffers within Netty. |
| <client_type>.rss.client.netty.client.connections.per.peer | 2 | Suppose there are 100 executors, spark.rss.client.netty.client.connections.per.peer = 2, then each ShuffleServer will establish a total of (100 * 2) connections with multiple clients. |
| <client_type>.rss.client.netty.client.receive.buffer | 0 | Receive buffer size (SO_RCVBUF). Note: the optimal size for receive buffer and send buffer should be latency * network_bandwidth. Assuming latency = 1ms, network_bandwidth = 10Gbps, buffer size should be ~ 1.25MB. Default is 0, the operating system automatically estimates the receive buffer size based on default settings. |
| <client_type>.rss.client.netty.client.send.buffer | 0 | Send buffer size (SO_SNDBUF). |
Loading

0 comments on commit 4d04254

Please sign in to comment.