Environment

Software

Uniffle 0.9.0, Hadoop 2.8.5, Spark 3.3.1

Hardware

Uniffle Cluster

Cluster TypeMemoryCPU CoresDisk Configuration for Every Shuffle ServerMax IO Read/Write SpeedQuantityNetwork Bandwidth
HDD250G9610 * 4T HDD150MB/s2 * Coordinator + 10 * Shuffle Server25GB/s
SSD250G961 * 6T NVME3GB/s2 * Coordinator + 10 * Shuffle Server25GB/s

Hadoop Yarn Cluster

2 * ResourceManager + 750 * NodeManager, every machine 12 * 4T HDD

Configuration

Spark's configuration:

spark.speculation false
spark.executor.instances 1400
spark.executor.cores 2
spark.executor.memory 20g
spark.executor.memoryOverhead 1024
spark.shuffle.manager org.apache.spark.shuffle.RssShuffleManager
spark.sql.shuffle.partitions 20000
spark.sql.files.maxPartitionBytes 107374182
spark.rss.storage.type MEMORY_LOCALFILE
spark.rss.writer.buffer.spill.size 1g
spark.rss.writer.buffer.size 16m
spark.rss.client.send.size.limit 32m
spark.rss.client.rpc.maxAttempts 50
spark.rss.resubmit.stage false
# Enable Netty mode
spark.rss.client.type GRPC_NETTY
spark.rss.client.netty.io.mode EPOLL

Shuffle Server's configuration:

rss.storage.type MEMORY_LOCALFILE
rss.server.buffer.capacity 140g
rss.server.read.buffer.capacity 20g
rss.rpc.executor.size 1000
# Enable Netty mode
rss.rpc.server.type GRPC_NETTY
rss.server.netty.epoll.enable true
rss.server.netty.port 17000
rss.server.netty.connect.backlog 128

TPC-DS(SF=40000)

We use spark-sql-perf to generate 10TB data.

We use the following special SQL to perform stress testing, it mainly focuses on shuffle, with no data skewness, and has no practical business implications:

select SUM(IFNULL(CAST(ss_sold_time_sk AS DECIMAL(10, 2)), 0) + IFNULL(CAST(ss_item_sk AS DECIMAL(10, 2)), 0) + IFNULL(CAST(ss_cdemo_sk AS DECIMAL(10, 2)), 0) + IFNULL(CAST(ss_hdemo_sk AS DECIMAL(10, 2)), 0) + IFNULL(CAST(ss_addr_sk AS DECIMAL(10, 2)), 0) + IFNULL(CAST(ss_store_sk AS DECIMAL(10, 2)), 0) + IFNULL(CAST(ss_promo_sk AS DECIMAL(10, 2)), 0) + IFNULL(CAST(ss_ticket_number AS DECIMAL(10, 2)), 0) + IFNULL(CAST(ss_quantity AS DECIMAL(10, 2)), 0) + IFNULL(ss_wholesale_cost, 0) + IFNULL(ss_list_price, 0) + IFNULL(ss_sales_price, 0) + IFNULL(ss_ext_discount_amt, 0) + IFNULL(ss_ext_sales_price, 0) + IFNULL(ss_ext_wholesale_cost, 0) + IFNULL(ss_ext_list_price, 0) + IFNULL(ss_ext_tax, 0) + IFNULL(ss_coupon_amt, 0) + IFNULL(ss_net_paid, 0) + IFNULL(ss_net_paid_inc_tax, 0) + IFNULL(ss_net_profit, 0)) as sum_all_fields from (select * from (select s.*,c.* from (select *,floor(rand(123)*82857000) as sr from store_sales) s join (select*,floor(rand(123)*82857000)as cr from customer)  c on s.sr=c.cr) sc DISTRIBUTE BY sc.ss_customer_sk,sc.ss_item_sk)

Read-Write Performance

Total: Read 10.7TiB, Write 6.4TiB

Concurrent TasksTypeSingle Shuffle Server Write SpeedSingle Shuffle Server Read SpeedTasks Total TimeE2E TimeNetty(SSD) SpeedupNetty(SSD) Total Task Time ReductionNotes
1400Netty(SSD)0.93GB/s1.56GB/s268.7h12min--
gRPC(SSD)0.75GB/s1.25GB/s330.4h15min123.02%18.67%
Netty(HDD)0.24GB/s0.4GB/s1024.4h46min381.12%73.77%
Spark ESS0.5GB/s0.82GB/s525.5h23min195.56%48.88%
Vanilla Spark--Failed---
2800Netty(SSD)1.02GB/s1.70GB/s450.7h11min--
gRPC(SSD)0.86GB/s1.44GB/s566.4h13min125.64%20.42%
Netty(HDD)0.24GB/s0.4GB/s2009.9h46min445.83%77.6%
Spark ESS0.5GB/s0.68GB/s672.3h23min149.19%32.96%
Vanilla Spark--Failed---
5600Netty(SSD)1.02GB/s1.70GB/s896.2h11min--
gRPC(SSD)0.80GB/s1.34GB/s1145.1h14min127.74%21.72%
Netty(HDD)0.22GB/s0.36GB/s4671.3h52min520.98%80.8%
Spark ESS--Failed---
Vanilla Spark--Failed---
11200Netty(SSD)0.86GB/s1.44GB/s1783.1h13min--
gRPC(SSD)0.62GB/s1.04GB/s2028.2h15min113.74%12.08%At a concurrency of 11,200, the Shuffle Server becomes very unstable in gRPC mode compared to Netty mode, with higher memory usage and CPU load. It is highly susceptible to encountering OOM issues and is not recommended for use.
Netty(HDD)0.20GB/s0.34GB/s8716.5h54min488.61%79.5%
Spark ESS--Failed---
Vanilla Spark--Failed---

Note:

  1. Read and write operations are essentially happening simultaneously.
  2. The calculation formula for Netty(SSD) Total Task Time Reduction is as follows:
Netty(SSD) Total Task Time Reduction = (Tasks Total Time - Tasks Total Time( Netty(SSD) )) / Tasks Total Time * 100%
  1. The calculation formula for Netty(SSD) Speedup is as follows:
Netty(SSD) Speedup = Tasks Total Time / Tasks Total Time( Netty(SSD) ) * 100%

Conclusion

We can draw the following conclusions:

  1. At 1400 concurrency, Vanilla Spark is already incapable of successfully completing tasks, and at 5600 concurrency, Spark ESS also fails to complete tasks. However, whether it is HDD or SSD, and whether it is gRPC mode or Netty mode, Uniffle can all run normally. Uniffle can significantly improve job stability in high-pressure scenarios.
  2. When comparing using SSDs, Netty mode brings about a 20% of total task time reduction compared to gRPC mode.
  3. When comparing with Netty mode turned on, SSD brings about an 80% of total task time reduction compared to HDD.
  4. Above 11200 concurrency, it is not recommended to use gRPC mode, as gRPC mode will cause the machine‘s load to be much higher than Netty mode, and the Shuffle Server’s process will consume more memory on the machine. Also, it is highly susceptible to encountering OOM issues. See https://github.com/apache/incubator-uniffle/issues/1651 for more details.