【发布时间】:2013-03-09 22:59:58
【问题描述】:
您好,我想更好地了解地图减少性能。
在 Hadoop 中实现的 MapReduce 算法的主要性能是什么?
是计算时间,如果有很多数据需要在一个节点处理,还是磁盘写入和读取时间?
当我运行一些 map reduce 程序时,我发现磁盘写入时间比磁盘读取时间要长。
我想知道磁盘写入的开销是否远大于计算时间(CPU 时间),需要在节点处处理大量数据。与 I/O 访问相比,CPU 时间是否微不足道?
下面的算法是每个reduce节点发生的事情: 我想知道与从 HDFS 读取输入然后处理将输出写入 HDFS 相比,执行此算法的 CPU 时间是否微不足道。
Input : R is a multiset of records sorted by the increasing order of their sizes; each record has been canonicalized by a global ordering O; a Jaccard similarity threshold t
Output : All pairs of records hx, yi, such that sim(x, y) > t
1 S <- null;
2 Ii <- null (1 <= i <= |U|);
3 for each x belongs to R do
4 p <- |x| - t * |x| + 1;
5 for i = 1 to p do
6 w <- x[i];
7 for each (y, j) belongs to Iw such
that |y|>= t*|x| do /* size filtering on |y| */
8 Calculate similarity s = (x intersection y) /* Similarity calculation*/
9 if similarity>t
S <- S U (x,y);
10 Iw <- Iw Union {(x, i)}; /* index the current prefix */;
11 return S
【问题讨论】:
标签: java performance hadoop mapreduce