share/hadoop/mapreduce/
路径下提供了TestDFSIO工具,专门用于测试HDFS的吞吐量hadoop jar /opt/module/hadoop-2.7.7/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.7.7-tests.jar TestDFSIO -write -nrFiles 10 -fileSize 128MB
write
指测试写性能,nrFiles
测试文件个数,fileSize
每个测试文件的大小
19/05/02 11:44:26 INFO fs.TestDFSIO: TestDFSIO.1.8
19/05/02 11:44:26 INFO fs.TestDFSIO: nrFiles = 10
19/05/02 11:44:26 INFO fs.TestDFSIO: nrBytes (MB) = 128.0
19/05/02 11:44:26 INFO fs.TestDFSIO: bufferSize = 1000000
19/05/02 11:44:26 INFO fs.TestDFSIO: baseDir = /benchmarks/TestDFSIO
19/05/02 11:44:28 INFO fs.TestDFSIO: creating control file: 134217728 bytes, 10 files
19/05/02 11:44:30 INFO fs.TestDFSIO: created control files for: 10 files
19/05/02 11:44:30 INFO client.RMProxy: Connecting to ResourceManager at hadoop103/192.168.1.103:8032
19/05/02 11:44:31 INFO client.RMProxy: Connecting to ResourceManager at hadoop103/192.168.1.103:8032
19/05/02 11:44:32 INFO mapred.FileInputFormat: Total input paths to process : 10
19/05/02 11:44:32 INFO mapreduce.JobSubmitter: number of splits:10
19/05/02 11:44:33 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1556766549220_0003
19/05/02 11:44:34 INFO impl.YarnClientImpl: Submitted application application_1556766549220_0003
19/05/02 11:44:34 INFO mapreduce.Job: The url to track the job: http://hadoop103:8088/proxy/application_1556766549220_0003/
19/05/02 11:44:34 INFO mapreduce.Job: Running job: job_1556766549220_0003
19/05/02 11:44:47 INFO mapreduce.Job: Job job_1556766549220_0003 running in uber mode : false
19/05/02 11:44:47 INFO mapreduce.Job: map 0% reduce 0%
19/05/02 11:45:05 INFO mapreduce.Job: map 13% reduce 0%
19/05/02 11:45:06 INFO mapreduce.Job: map 27% reduce 0%
19/05/02 11:45:08 INFO mapreduce.Job: map 43% reduce 0%
19/05/02 11:45:09 INFO mapreduce.Job: map 60% reduce 0%
19/05/02 11:45:10 INFO mapreduce.Job: map 73% reduce 0%
19/05/02 11:45:15 INFO mapreduce.Job: map 77% reduce 0%
19/05/02 11:45:18 INFO mapreduce.Job: map 87% reduce 0%
19/05/02 11:45:19 INFO mapreduce.Job: map 100% reduce 0%
19/05/02 11:45:21 INFO mapreduce.Job: map 100% reduce 100%
19/05/02 11:45:22 INFO mapreduce.Job: Job job_1556766549220_0003 completed successfully
19/05/02 11:45:22 INFO mapreduce.Job: Counters: 51
File System Counters
FILE: Number of bytes read=856
FILE: Number of bytes written=1304826
FILE: Number of read operations=0
FILE: Number of large read operations=0
FILE: Number of write operations=0
HDFS: Number of bytes read=2350
HDFS: Number of bytes written=1342177359
HDFS: Number of read operations=43
HDFS: Number of large read operations=0
HDFS: Number of write operations=12
Job Counters
Killed map tasks=1
Launched map tasks=10
Launched reduce tasks=1
Data-local map tasks=8
Rack-local map tasks=2
Total time spent by all maps in occupied slots (ms)=263635
Total time spent by all reduces in occupied slots (ms)=9698
Total time spent by all map tasks (ms)=263635
Total time spent by all reduce tasks (ms)=9698
Total vcore-milliseconds taken by all map tasks=263635
Total vcore-milliseconds taken by all reduce tasks=9698
Total megabyte-milliseconds taken by all map tasks=269962240
Total megabyte-milliseconds taken by all reduce tasks=9930752
Map-Reduce Framework
Map input records=10
Map output records=50
Map output bytes=750
Map output materialized bytes=910
Input split bytes=1230
Combine input records=0
Combine output records=0
Reduce input groups=5
Reduce shuffle bytes=910
Reduce input records=50
Reduce output records=5
Spilled Records=100
Shuffled Maps =10
Failed Shuffles=0
Merged Map outputs=10
GC time elapsed (ms)=17343
CPU time spent (ms)=96930
Physical memory (bytes) snapshot=2821341184
Virtual memory (bytes) snapshot=23273218048
Total committed heap usage (bytes)=2075656192
Shuffle Errors
BAD_ID=0
CONNECTION=0
IO_ERROR=0
WRONG_LENGTH=0
WRONG_MAP=0
WRONG_REDUCE=0
File Input Format Counters
Bytes Read=1120
File Output Format Counters
Bytes Written=79
19/05/02 11:45:23 INFO fs.TestDFSIO: ----- TestDFSIO ----- : write
19/05/02 11:45:23 INFO fs.TestDFSIO: Date & time: Thu May 02 11:45:23 CST 2019
19/05/02 11:45:23 INFO fs.TestDFSIO: Number of files: 10
19/05/02 11:45:23 INFO fs.TestDFSIO: Total MBytes processed: 1280.0
19/05/02 11:45:23 INFO fs.TestDFSIO: Throughput mb/sec: 10.69751115716984
19/05/02 11:45:23 INFO fs.TestDFSIO: Average IO rate mb/sec: 14.91699504852295
19/05/02 11:45:23 INFO fs.TestDFSIO: IO rate std deviation: 11.160882132355928
19/05/02 11:45:23 INFO fs.TestDFSIO: Test exec time sec: 52.315
hadoop jar /opt/module/hadoop-2.7.7/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.7.7-tests.jar TestDFSIO -read -nrFiles 10 -fileSize 128MB
read
指测试读性能,nrFiles
测试文件个数,fileSize
每个测试文件的大小
19/05/02 11:55:42 INFO fs.TestDFSIO: TestDFSIO.1.8
19/05/02 11:55:42 INFO fs.TestDFSIO: nrFiles = 10
19/05/02 11:55:42 INFO fs.TestDFSIO: nrBytes (MB) = 128.0
19/05/02 11:55:42 INFO fs.TestDFSIO: bufferSize = 1000000
19/05/02 11:55:42 INFO fs.TestDFSIO: baseDir = /benchmarks/TestDFSIO
19/05/02 11:55:45 INFO fs.TestDFSIO: creating control file: 134217728 bytes, 10 files
19/05/02 11:55:47 INFO fs.TestDFSIO: created control files for: 10 files
19/05/02 11:55:47 INFO client.RMProxy: Connecting to ResourceManager at hadoop103/192.168.1.103:8032
19/05/02 11:55:48 INFO client.RMProxy: Connecting to ResourceManager at hadoop103/192.168.1.103:8032
19/05/02 11:55:49 INFO mapred.FileInputFormat: Total input paths to process : 10
19/05/02 11:55:49 INFO mapreduce.JobSubmitter: number of splits:10
19/05/02 11:55:49 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1556766549220_0004
19/05/02 11:55:50 INFO impl.YarnClientImpl: Submitted application application_1556766549220_0004
19/05/02 11:55:50 INFO mapreduce.Job: The url to track the job: http://hadoop103:8088/proxy/application_1556766549220_0004/
19/05/02 11:55:50 INFO mapreduce.Job: Running job: job_1556766549220_0004
19/05/02 11:56:04 INFO mapreduce.Job: Job job_1556766549220_0004 running in uber mode : false
19/05/02 11:56:04 INFO mapreduce.Job: map 0% reduce 0%
19/05/02 11:56:24 INFO mapreduce.Job: map 7% reduce 0%
19/05/02 11:56:27 INFO mapreduce.Job: map 23% reduce 0%
19/05/02 11:56:28 INFO mapreduce.Job: map 63% reduce 0%
19/05/02 11:56:29 INFO mapreduce.Job: map 73% reduce 0%
19/05/02 11:56:30 INFO mapreduce.Job: map 77% reduce 0%
19/05/02 11:56:31 INFO mapreduce.Job: map 87% reduce 0%
19/05/02 11:56:32 INFO mapreduce.Job: map 100% reduce 0%
19/05/02 11:56:35 INFO mapreduce.Job: map 100% reduce 100%
19/05/02 11:56:36 INFO mapreduce.Job: Job job_1556766549220_0004 completed successfully
19/05/02 11:56:36 INFO mapreduce.Job: Counters: 51
File System Counters
FILE: Number of bytes read=852
FILE: Number of bytes written=1304796
FILE: Number of read operations=0
FILE: Number of large read operations=0
FILE: Number of write operations=0
HDFS: Number of bytes read=1342179630
HDFS: Number of bytes written=78
HDFS: Number of read operations=53
HDFS: Number of large read operations=0
HDFS: Number of write operations=2
Job Counters
Killed map tasks=1
Launched map tasks=10
Launched reduce tasks=1
Data-local map tasks=8
Rack-local map tasks=2
Total time spent by all maps in occupied slots (ms)=233690
Total time spent by all reduces in occupied slots (ms)=7215
Total time spent by all map tasks (ms)=233690
Total time spent by all reduce tasks (ms)=7215
Total vcore-milliseconds taken by all map tasks=233690
Total vcore-milliseconds taken by all reduce tasks=7215
Total megabyte-milliseconds taken by all map tasks=239298560
Total megabyte-milliseconds taken by all reduce tasks=7388160
Map-Reduce Framework
Map input records=10
Map output records=50
Map output bytes=746
Map output materialized bytes=906
Input split bytes=1230
Combine input records=0
Combine output records=0
Reduce input groups=5
Reduce shuffle bytes=906
Reduce input records=50
Reduce output records=5
Spilled Records=100
Shuffled Maps =10
Failed Shuffles=0
Merged Map outputs=10
GC time elapsed (ms)=6473
CPU time spent (ms)=57610
Physical memory (bytes) snapshot=2841436160
Virtual memory (bytes) snapshot=23226683392
Total committed heap usage (bytes)=2070413312
Shuffle Errors
BAD_ID=0
CONNECTION=0
IO_ERROR=0
WRONG_LENGTH=0
WRONG_MAP=0
WRONG_REDUCE=0
File Input Format Counters
Bytes Read=1120
File Output Format Counters
Bytes Written=78
19/05/02 11:56:36 INFO fs.TestDFSIO: ----- TestDFSIO ----- : read
19/05/02 11:56:36 INFO fs.TestDFSIO: Date & time: Thu May 02 11:56:36 CST 2019
19/05/02 11:56:36 INFO fs.TestDFSIO: Number of files: 10
19/05/02 11:56:36 INFO fs.TestDFSIO: Total MBytes processed: 1280.0
19/05/02 11:56:36 INFO fs.TestDFSIO: Throughput mb/sec: 16.001000062503905
19/05/02 11:56:36 INFO fs.TestDFSIO: Average IO rate mb/sec: 17.202795028686523
19/05/02 11:56:36 INFO fs.TestDFSIO: IO rate std deviation: 4.881590515873911
19/05/02 11:56:36 INFO fs.TestDFSIO: Test exec time sec: 49.116
hadoop jar /opt/module/hadoop-2.7.7/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.7.7-tests.jar TestDFSIO -clean