rickyma commented on code in PR #1893: URL: https://github.com/apache/incubator-uniffle/pull/1893#discussion_r1675621132
########## docs/server_guide.md: ########## @@ -145,20 +145,46 @@ Finally, to improve the speed of writing to HDFS for a single partition, the val ### 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 configurations, the following is an example. +When enabling Netty, we should also consider memory related configurations. + +#### Memory Configuration Principles + +- Reserve about `15%` of the machine's memory space (reserved space for OS slab, reserved, cache, buffer, kernel stack, etc.) +- Recommended ratio for heap and off-heap memory: `1:9` +- `rss.server.buffer.capacity` + `rss.server.read.buffer.capacity` + reserved = maximum off-heap + +Note: The reserved memory can be adjusted according to the actual situation, if the memory is relatively small, configuring 1g is completely sufficient. + +##### rss-env.sh + +Assuming the machine has 470g of memory. +The machine reserves 15% of memory space, about 70g, following the above principle (heap:off-heap=1:9): -#### rss-env.sh ``` -XMX_SIZE=20g -MAX_DIRECT_MEMORY_SIZE=120g +heap = (470 - 70) * 1 / 10 = 40g +off-heap = (470 - 70) * 9 / 10 = 360g +heap + off-heap = 400g ``` -#### server.conf + +So, `rss-env.sh` will be: + +``` +XMX_SIZE=40g +MAX_DIRECT_MEMORY_SIZE=360g +``` + +##### server.conf + +Generally, `rss.server.read.buffer.capacity` of 20g is enough, you can pay more attention to the metric `read_used_buffer_size`. Review Comment: I have added into the doc. ########## docs/server_guide.md: ########## @@ -145,20 +145,46 @@ Finally, to improve the speed of writing to HDFS for a single partition, the val ### 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 configurations, the following is an example. +When enabling Netty, we should also consider memory related configurations. + +#### Memory Configuration Principles + +- Reserve about `15%` of the machine's memory space (reserved space for OS slab, reserved, cache, buffer, kernel stack, etc.) +- Recommended ratio for heap and off-heap memory: `1:9` +- `rss.server.buffer.capacity` + `rss.server.read.buffer.capacity` + reserved = maximum off-heap + +Note: The reserved memory can be adjusted according to the actual situation, if the memory is relatively small, configuring 1g is completely sufficient. + +##### rss-env.sh + +Assuming the machine has 470g of memory. +The machine reserves 15% of memory space, about 70g, following the above principle (heap:off-heap=1:9): -#### rss-env.sh ``` -XMX_SIZE=20g -MAX_DIRECT_MEMORY_SIZE=120g +heap = (470 - 70) * 1 / 10 = 40g +off-heap = (470 - 70) * 9 / 10 = 360g +heap + off-heap = 400g ``` -#### server.conf + +So, `rss-env.sh` will be: + +``` +XMX_SIZE=40g +MAX_DIRECT_MEMORY_SIZE=360g +``` + +##### server.conf + +Generally, `rss.server.read.buffer.capacity` of 20g is enough, you can pay more attention to the metric `read_used_buffer_size`. Review Comment: I have added this into the doc. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
