Skip to content

Commit

Permalink
[apache#1383] [DOCS] Improve Netty's documentation (apache#1384)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Improve Netty's documentation. (Add the parameter `rss.rpc.server.type` and change all "Netty" to uppercase.)

### Why are the changes needed?

For [apache#1383](apache#1383)

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

No need to be tested.
  • Loading branch information
rickyma authored Dec 19, 2023
1 parent 56490d4 commit b7962b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/client_guide/client_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ 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.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.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. |
Expand Down
8 changes: 4 additions & 4 deletions docs/server_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ This document will introduce how to deploy Uniffle shuffle servers.
| rss.coordinator.quorum | - | Coordinator quorum |
| rss.rpc.server.port | - | RPC port for Shuffle server, if set zero, grpc server start on random port. |
| rss.jetty.http.port | - | Http port for Shuffle server |
| rss.server.netty.port | -1 | Netty port for Shuffle server, if set zero, netty server start on random port. |
| rss.server.netty.epoll.enable | false | If enable epoll model with netty server. |
| rss.server.netty.port | -1 | Netty port for Shuffle server, if set zero, Netty server start on random port. |
| rss.server.netty.epoll.enable | false | If enable epoll model with Netty server. |
| rss.server.netty.accept.thread | 10 | Accept thread count in netty. |
| rss.server.netty.worker.thread | 100 | Worker thread count in netty. |
| rss.server.netty.connect.backlog | 0 | For netty server, requested maximum length of the queue of incoming connections. |
| rss.server.netty.connect.backlog | 0 | For Netty server, requested maximum length of the queue of incoming connections. |
| rss.server.netty.connect.timeout | 5000 | Timeout for connection in netty. |
| rss.server.netty.receive.buf | 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. |
| rss.server.netty.send.buf | 0 | Send buffer size (SO_SNDBUF). |
Expand Down Expand Up @@ -132,7 +132,7 @@ For HADOOP FS, the conf value of `rss.server.single.buffer.flush.threshold` shou
Finally, to improve the speed of writing to HDFS for a single partition, the value of `rss.server.max.concurrency.of.per-partition.write` and `rss.server.flush.hdfs.threadPool.size` could be increased to 50 or 100.

### Netty
In version 0.0.8, we introduced Netty. Enabling netty on ShuffleServer can significantly reduce GC time in high-throughput scenarios. We can enable netty through the parameter `rss.server.netty.port`. Note: After enabling netty, the ShuffleServer The node will be automatically tagged with `grpc_netty`, that is, the node can only be assigned to clients of `spark.rss.client.type=GRPC_NETTY`.
In version 0.8.0, we introduced Netty. Enabling Netty on ShuffleServer can significantly reduce GC time in high-throughput scenarios. We can enable Netty through the parameters `rss.server.netty.port` and `rss.rpc.server.type`. Note: After setting the parameter `rss.rpc.server.type` to `GRPC_NETTY`, ShuffleServer will be tagged with `GRPC_NETTY`, that is, the node can only be assigned to clients with `spark.rss.client.type=GRPC_NETTY`.

When enabling Netty, we should also consider memory related configuration, the following is an example.

Expand Down

0 comments on commit b7962b1

Please sign in to comment.