因此,我在集群上运行testdfsio,查看读写操作的吞吐量和平均io速率。我做4个测试:4个文件每个256 mb(总计1 gb)2个文件每个256 mb(总计512 mb)2个文件每个128 mb(总计256 mb)1个文件50 mb(总计50 mb)
我在单节点到5节点的hadoop集群上运行它们。对于256 mb的块大小,每个节点有不同的复制(单节点=1复制,2节点=2复制,依此类推)。
以下是1GB数据测试1节点的测试结果
----- TestDFSIO ----- : write
Date & time: Thu Jun 20 11:38:21 WIB 2019
Number of files: 4
Total MBytes processed: 1024.0
Throughput mb/sec: 8.503288381053611
Average IO rate mb/sec: 8.507380485534668
IO rate std deviation: 0.18595730311606032
Test exec time sec: 84.876
----- TestDFSIO ----- : read
Date & time: Thu Jun 20 11:39:52 WIB 2019
Number of files: 4
Total MBytes processed: 1024.0
Throughput mb/sec: 14.351786965662228
Average IO rate mb/sec: 14.422638893127441
IO rate std deviation: 1.0515649052955383
Test exec time sec: 61.371
2 node
----- TestDFSIO ----- : write
Date & time: Thu Jun 20 11:15:52 WIB 2019
Number of files: 4
Total MBytes processed: 1024.0
Throughput mb/sec: 2.557167936510315
Average IO rate mb/sec: 2.5574562549591064
IO rate std deviation: 0.027311795003682558
Test exec time sec: 150.506
----- TestDFSIO ----- : read
Date & time: Thu Jun 20 11:18:04 WIB 2019
Number of files: 4
Total MBytes processed: 1024.0
Throughput mb/sec: 9.567321617101587
Average IO rate mb/sec: 9.673456192016602
IO rate std deviation: 1.0593562755825534
Test exec time sec: 79.333
3 node
----- TestDFSIO ----- : write
Date & time: Thu Jun 20 10:42:47 WIB 2019
Number of files: 4
Total MBytes processed: 1024.0
Throughput mb/sec: 2.343067129788529
Average IO rate mb/sec: 2.3866918087005615
IO rate std deviation: 0.3233444726530288
Test exec time sec: 167.593
----- TestDFSIO ----- : read
Date & time: Thu Jun 20 10:47:33 WIB 2019
Number of files: 4
Total MBytes processed: 1024.0
Throughput mb/sec: 11.901164547546546
Average IO rate mb/sec: 12.255699157714844
IO rate std deviation: 2.2415787547598667
Test exec time sec: 69.29
4 node
----- TestDFSIO ----- : write
Date & time: Thu Jun 20 10:23:19 WIB 2019
Number of files: 4
Total MBytes processed: 1024.0
Throughput mb/sec: 1.6539390885245053
Average IO rate mb/sec: 1.6625666618347168
IO rate std deviation: 0.12093049037575003
Test exec time sec: 205.164
----- TestDFSIO ----- : read
Date & time: Thu Jun 20 10:25:23 WIB 2019
Number of files: 4
Total MBytes processed: 1024.0
Throughput mb/sec: 19.842653954966476
Average IO rate mb/sec: 20.02923583984375
IO rate std deviation: 1.9719328195872965
Test exec time sec: 57.25
5 node
----- TestDFSIO ----- : write
Date & time: Thu Jun 13 12:50:12 WIB 2019
Number of files: 4
Total MBytes processed: 1024.0
Throughput mb/sec: 1.5617159964556366
Average IO rate mb/sec: 1.573684573173523
IO rate std deviation: 0.14426118715726127
Test exec time sec: 219.959
----- TestDFSIO ----- : read
Date & time: Thu Jun 13 14:01:01 WIB 2019
Number of files: 4
Total MBytes processed: 1024.0
Throughput mb/sec: 18.00692844707827
Average IO rate mb/sec: 18.323461532592773
IO rate std deviation: 2.501963465819598
Test exec time sec: 64.316
我认为节点越多,工作就越并行,吞吐量就越大。为什么添加新节点后写操作会大幅下降?
1条答案
按热度按时间3npbholx1#
你的数据太小了。单个系统可以轻松处理1GB的数据。考虑到这是你使用的最大尺寸,你看到这些结果也就不足为奇了。
将这几个数量级提高到100gb-1tb,否则从这种类型的测试中获得性能结果没有任何意义。