study/paper

MapReduce: Simplified Data Processing on Large Clusters by Jeffrey Dean, Sanjay Ghemawat;

22promenade 2024. 5. 30. 10:38

들어가기에 앞서

  • 개인적인 공부 용도로 기록한 것입니다. 상업적인 용도가 아닙니다.
  • 오역이 있을 수 있습니다.
  • 모호하거나 이해가 되지 않는 부분은 초록색으로 표시하였습니다.
  • chat-GPT4o을 사용한 부분이 있으며 사용처에 보라색으로 표시하였습니다.
    • 상세한 예시를 chat-GPT4o를 통해 생성한 뒤, 이를 기반으로 작성했습니다.
    • 기초 지식이 없어 해석이 어려운 부분은 chat-GPT4o를 참고하여 작성했습니다.

Abstract (요약)

MapReduce is a programming model and an associated implementation for processing and generating large data sets. Users specify a map function that processes a key/value pair to generate a set of intermediate key/value pairs, and a reduce function that merges all intermediate values associated with the same intermediate key. Many real world tasks are expressible in this model, as shown in the paper.

맵리듀스는 프로그래밍 모델이자 대용량 데이터 세트를 처리하거나 생성하는 것과 관련된 구현체입니다. 사용자들은 두 개의 함수를 명세할 수 있습니다. 맵 함수는 키/값 쌍으로 중간 키/값 쌍을 생성합니다. 리듀스 함수는 같은 중간 키와 해당하는 모든 중간 값들을 합칩니다. 현실의 많은 일들이 논문에서 서술하는 모델로 표현될 수 있습니다.

Programs written in this functional style are automatically parallelized and executed on a large cluster of commodity machines. The run-time system takes care of the details of partitioning the input data, scheduling the program’s execution across a set of machines, handling machine failures, and managing the required inter-machine communication. This allows programmers without any experience with parallel and distributed systems to easily utilize the resources of a large distributed system.

함수형 방식으로 쓰인 프로그램은 자동으로 수평확장되고 대규모 상업 기기 클러스터에서 구동됩니다. 런타임 시스템은 입력을 어떻게 쪼개는지, 기기 집합 간에 프로그램 실행을 어떻게 할당할 것인지, 기기의 실패를 어떻게 다룰 것인지, 기기 사이 필요한 소통을 어떻게 조율할 것인지에 대해 관여합니다. 따라서 프로그래머들이 수평적 분산 시스템이라는 사실을 몰라도 쉽게 대규모 분산 시스템을 사용할 수 있습니다.

Our implementation of MapReduce runs on a large cluster of commodity machines and is highly scalable: a typical MapReduce computation processes many terabytes of data on thousands of machines. Programmers find the system easy to use: hundreds of MapReduce programs have been implemented and upwards of one thousand MapReduce jobs are executed on Google’s clusters every day.

맵리듀스 구현은 대규모 상업 기기 클러스터에서 운영되며 높은 확장성이 있습니다.: 일반적으로 맵리듀스 연산은 수 천 개의 기기에서 수 테라바이트 규모의 데이터를 처리합니다. 프로그래머들은 시스템이 사용하기 편하다고 말합니다.: 수 백 개의 맵리듀스 프로그램이 구현되었고 천 개 이상의 맵리듀스 잡이 구글의 클러스터에서 매일 구동됩니다.

1 Introduction (소개)

Over the past five years, the authors and many others at Google have implemented hundreds of special-purpose computations that process large amounts of raw data, such as crawled documents, web request logs, etc., to compute various kinds of derived data, such as inverted indices, various representations of the graph structure of web documents, summaries of the number of pages crawled per host, the set of most frequent queries in a given day, etc. Most such computations are conceptually straightforward. However, the input data is usually large and the computations have to be distributed across hundreds or thousands of machines in order to finish in a reasonable amount of time. The issues of how to parallelize the computation, distribute the data, and handle failures conspire to obscure the original simple computation with large amounts of complex code to deal with these issues.

지난 5년 동안, 논문의 저자와 구글의 개발자들은 수 백 개의 특수 목적 연산들을 구현했습니다. 특수 목적 연산은 대용량 원시 자료로 다양한 파생 데이터를 계산하는 데 사용했습니다. 대용량 원시 자료의 예시로 크롤링된 문서, 웹 요청 로그 등이 있고 파생 데이터의 예시로 역색인, 다양한 웹 문서의 그래프 구조 표현, 호스트당 크롤링된 페이지의 수의 요약, 주어진 날짜에 빈도 수가 높았던 쿼리들이 있습니다. 대부분의 이런 연산들은 개념적으로 직관적입니다. 하지만 입력이 대부분 크고 종료까지 상당한 시간이 걸립니다. 어떻게 계산을 병렬적으로 수행할 건지, 데이터를 분산할 건지, 실패를 어떻게 처리할 것인지 같은 문제들은 본래의 간단한 연산을 복잡하게 만들어서 본래의 문제를 해결하기 어렵게 만듭니다.

As a reaction to this complexity, we designed a new abstraction that allows us to express the simple computations we were trying to perform but hides the messy details of parallelization, fault-tolerance, data distribution and load balancing in a library. Our abstraction is inspired by the map and reduce primitives present in Lisp and many other functional languages. We realized that most of our computations involved applying a map operation to each logical “record” in our input in order to compute a set of intermediate key/value pairs, and then applying a reduce operation to all the values that shared the same key, in order to combine the derived data appropriately. Our use of a functional model with user-specified map and reduce operations allows us to parallelize large computations easily and to use re-execution as the primary mechanism for fault tolerance.

이런 복잡성이 있었기 때문에 우리는 새로운 추상화를 설계했습니다. 추상화는 우리가 구현하려고 시도했던 간단한 연산을 할 수 있게 하면서 병렬, 장애 허용, 데이터 분산, 부하 분산등의 복잡한 구현은 감춥니다. 우리의 추상화는 Lisp나 다른 함수 언어에서 나타내어지는 맵과 리듀스 요소에서 영감을 받았습니다. 우리는 연산의 대부분이 어떤 상호작용과 연관되어 있다는 사실을 알게 되었습니다. 그건 바로 입력의 각 논리적인 "레코드"에 중간 키/값을 계산하기 위해 맵 연산을 적용한 뒤, 같은 키를 공유하는 모든 값들에 리듀스 연산을 적용함으로써 중간 파생 데이터를 적절하게 결합하게 하는 것입니다. 우리의 함수 모델은 유저가 설정한 맵과 리듀스 연산으로 큰 규모의 연산을 병렬로 수행하거나 장애 허용에 핵심적인 원리인 재시도를 할 수 있게 합니다.

The major contributions of this work are a simple and powerful interface that enables automatic parallelization and distribution of large-scale computations, combined with an implementation of this interface that achieves high performance on large clusters of commodity PCs.

이 작업의 가장 큰 기여는 간단하지만 강력한 인터페이스입니다. 인터페이스는 자동 병렬과 큰 규모의 연산 분산을 가능하게 하고 상용 PC의 대용량 클러스터에서 높은 성능을 달성하는 인터페이스 구현체와 결합됩니다.

Section 2 describes the basic programming model and gives several examples. Section 3 describes an implementation of the MapReduce interface tailored towards our cluster-based computing environment. Section 4 describes several refinements of the programming model that we have found useful. Section 5 has performance measurements of our implementation for a variety of tasks. Section 6 explores the use of MapReduce within Google including our experiences in using it as the basis for a rewrite of our production indexing system. Section 7 discusses related and future work.

2장은 기본 프로그래밍 모델과 몇 가지 예제에 대해 서술합니다. 3장은 맵리듀스 인터페이스의 구현에 대해 서술합니다. 맵리듀스 인터페이스 구현은 클러스터 기반의 연산 환경에 최적화되어 있습니다. 4장은 몇 가지 우리가 유용하다고 생각하는 프로그래밍 모델들을 골라 소개합니다. 5장은 다양한 일에 대한 우리의 성능 측정 방식 구현에 대해 서술합니다. 6장은 구글에서 운용되는 인덱스 시스템을 맵리듀스 기반으로 다시 쓰게 되면서 겪었던 경험을 토대로 맵리듀스의 쓰임에 대해 서술합니다. 7장은 향후 연구에 대해서 논의합니다.

2 Programming Model (프로그래밍 모델)

The computation takes a set of input key/value pairs, and produces a set of output key/value pairs. The user of the MapReduce library expresses the computation as two functions: Map and Reduce.
Map, written by the user, takes an input pair and produces a set of intermediate key/value pairs. The MapReduce library groups together all intermediate values associated with the same intermediate key I and passes them to the Reduce function.

연산은 입력 집합을 가지고 출력 집합을 만듭니다. 맵리듀스 라이브러리를 사용자는 두 개의 함수를 표현할 수 있습니다. : 맵과 리듀스

사용자에 의해 작성된 맵 함수는 입력 쌍 집합을 가지고 중간 키/값 쌍 집합을 생산합니다. 맵리듀스 라이브러리는 같은 중간 키(I)를 가지는 모든 중간 값들을 모아 리듀스 함수에 보냅니다.

The Reduce function, also written by the user, accepts an intermediate key I and a set of values for that key. It merges together these values to form a possibly smaller set of values. Typically just zero or one output value is produced per Reduce invocation. The intermediate values are supplied to the user’s reduce function via an iterator. This allows us to handle lists of values that are too large to fit in memory.

사용자에 의해 작성된 리듀스 함수는 중간 키(I)와 중간 키에 대응하는 값 집합을 받습니다. 리듀스 함수는 이 값을 합쳐서 더 작은 집합의 값으로 만들 수 있습니다. 일반적으로 0, 1 개의 결과 값이 리듀스 호출마다 생산됩니다. 중간 값은 반복자를 통해서 사용자의 리듀스 함수에 공급됩니다. 그렇기 때문에 값 리스트가 메모리보다 커도 다룰 수 있습니다.

2.1 Example

Consider the problem of counting the number of occurrences of each word in a large collection of documents. The user would write code similar to the following pseudo-code:

대용량 문서에 존재하는 단어를 세는 문제가 있다고 가정합시다. 개발자는 아래의 의사 코드와 비슷하게 코드를 작성할 것입니다.

map(String key, String value): 
  // key: document name
  // value: document contents 
  for each word w in value:
    EmitIntermediate(w, "1");

reduce(String key, Iterator values): 
  // key: a word
  // values: a list of counts
  int result = 0;
  for each v in values:
    result += ParseInt(v);
  Emit(AsString(result));

 

The map function emits each word plus an associated count of occurrences (just ‘1’ in this simple example). The reduce function sums together all counts emitted for a particular word.

맵 함수는 각 단어와 단어의 출현에 대응하는 값을 (여기서는 단순히 '1') 출력합니다. 리듀스 함수는 특정 단어의 출력된 모든 숫자들을 다 더합니다.

In addition, the user writes code to fill in a mapreduce specification object with the names of the input and output files, and optional tuning parameters. The user then invokes the MapReduce function, passing it the specification object. The user’s code is linked together with the MapReduce library (implemented in C++). Appendix A contains the full program text for this example.

또한, 유저는 맵리듀스 명세 객체를 채우는 코드를 작성합니다. 명세 객체는 입력/출력 파일의 이름, 부가적인 성능 개선 파라미터 코드로 채웁니다. 유저는 맵리듀스 함수를 호출해서 명세 객체를 전달합니다. 유저의 코드는 (C++로 구현된) 맵리듀스 라이브러리로 묶이게 됩니다. 별첨 A가 이 예제의 전체 프로그램을 담고 있습니다.

2.2 Types

Even though the previous pseudo-code is written in terms of string inputs and outputs, conceptually the map and reduce functions supplied by the user have *associated types:

직전 의사 코드가 문자열 입력 / 출력으로 작성되었지만, 유저에 의해 작성된 맵리듀스 함수는 개념적으로 특정 타입과 연관될 수 있습니다.

map    (k1,v1)       → list(k2,v2)
reduce (k2,list(v2)) → list(v2)

*위 예시처럼 map함수는 list(k2, v2) 타입과 연관되고 reduce 함수는 list(v2)와 연관된다는 의미

I.e., the input keys and values are drawn from a different domain than the output keys and values. Furthermore, the intermediate keys and values are from the same domain as the output keys and values. Our C++ implementation passes strings to and from the user-defined functions and leaves it to the user code to convert between strings and appropriate types.

예시의 입력 키/값의 도메인(데이터 타입이나 형식)은 출력 키/값의 도메인과는 다릅니다. 중간 키와 값의 도메인은 출력 키와 같은 도메인을 가집니다. C++ 구현은 문자열을 사용자 정의 함수에 넘기고 받으며 사용자의 코드가 문자열과 적절한 타입 간의 변경의 책임을 가지게 합니다.

더보기

이 부분 잘 이해가 되지 않아서 chat-GPT4o의 도움을 받아 이해했다.

단어 빈도 계산 프로그램의 입력 데이터 형식이 다음과 같다고 생각하자.

- 입력 키 : 파일의 라인 번호 (정수형)

- 입력 값 : 파일의 각 라인에 해당하는 텍스트 (문자열)

1: "hello world"
2: "hello mapreduce"

 

입력 데이터는 map 함수 연산을 거치게 되면 중간 데이터가 되고 중간 데이터 형식은 다음과 같다.

- 중간 키 : 단어 (문자열)

- 중간 값 : 숫자 1 (정수형)

"hello" -> 1
"world" -> 1
"hello" -> 1
"mapreduce" -> 1

중간 데이터는 리듀스 함수에 의해 출력 데이터가 되고 출력 데이터 형식은 다음과 같다.

- 출력 키 : 단어 (문자열)

- 출력 값 : 빈도 (정수형)

"hello" -> 2
"world" -> 1
"mapreduce" -> 1

입력 데이터와 출력 데이터의 도메인이 다르다는 뜻은

입력 키 : 파일의 라인 번호 (정수형) / 입력 값 : 파일의 각 라인 (문자열)

출력 키 : 단어 (문자열) / 출력 값 : 단어의 빈도 (정수형)

이기 때문에 다르다는 의미이고,

 

중간 데이터와 출력 데이터의 도메인이 같다는 뜻은

중간 키와 출력 키: 단어 (문자열) / 중간 값과 출력 값: 단어의 빈도 (정수형)

이기 때문에 같다는 의미이다.

 

맵 함수는 입력 값을 특정 로직에 따라 정리해서 어떤 중간 값을 만들기 때문에, 입력 값과 중간 값의 문제 사안이 다르고 (같을 수도 있지만) 리듀스 함수는 중간 값을 이름 그대로 소비하여 최종 값을 만드는 것이기 때문에 입력 값과 출력 값의 문제 사안이 같다.

2.3 More Examples

Here are a few simple examples of interesting programs that can be easily expressed as MapReduce computations.

 맵리듀스 연산을 간단하게 설명할 수 있는 몇 가지 흥미로운 프로그램들을 소개합니다.

Distributed Grep: The map function emits a line if it matches a supplied pattern. The reduce function is an identity function that just copies the supplied intermediate data to the output.

분산 그랩: 맵 함수는 입력 패턴이 일치하는 줄을 출력합니다. 리듀스 함수는 단순히 *항등 함수입니다. 중간 입력 데이터를 출력으로 복사합니다.

*항등 함수 : f(x) = x

Count of URL Access Frequency: The map function processes logs of web page requests and outputs ⟨URL, 1⟩. The reduce function adds together all values for the same URL and emits a ⟨URL, total count⟩ pair.

 URL 접근 빈도 횟수: 맵 함수는 웹 페이지의 요청 로그를 <URL, 1> 쌍으로 출력합니다. 리듀스 함수는 같은 URL을 가진 모든 값들을 더해서 <URL, 총 횟수> 쌍으로 출력합니다.

*Reverse Web-Link Graph: The map function outputs ⟨target, source⟩ pairs for each link to a target URL found in a page named source. The reduce function concatenates the list of all source URLs associated with a given target URL and emits the pair: ⟨target, list(source)⟩

역 웹-링크 그래프: 맵 함수는 <타겟, 소스> 쌍을 출력합니다. 타겟, 소스 간의 관계는 소스 페이지에 타겟 URL이 발견되는 경우입니다. 리듀스 함수는 타겟 URL을 키로 하는 모든 소스 값을 합치고 쌍으로 출력합니다. : <타겟, 리스트(소스)> 

 

*reverse : 소스에서 타겟으로 향하는 것을 그래프로 봤을 때 정방향이라고 하면 위 프로그램은 타겟을 기준으로 타겟이 사용된 소스들을 분석하는 것이기 때문에 역이라는 단어를 사용한 것 같다. (소스 -> 타겟 : 정방향, 타겟 -> 소스 : 역방향)

Term-Vector per Host: A term vector summarizes the most important words that occur in a document or a set of documents as a list of ⟨word, frequency⟩ pairs. The map function emits a ⟨hostname, term vector⟩ pair for each input document (where the hostname is extracted from the URL of the document). The reduce function is passed all per-document term vectors for a given host. It adds these term vectors together, throwing away infrequent terms, and then emits a final ⟨hostname, term vector⟩ pair.

호스트 단위의 용어 백터: 용어 백터는 문서나 문서 집합에 나타난 가장 중요한 단어들의 출현을 <단어, 빈도수> 쌍의 리스트로 요약한 것입니다. 맵 함수는 <호스트 이름, 용어 백터> 쌍을 입력 문서마다 출력합니다. (호스트 이름은 문서의 URL에서 출력합니다.) 리듀스 함수는 호스트를 위해 문서 당 할당된 용어 백터를 전달받습니다. 리듀스 함수는 모든 용어 백터들을 합치고 자주 호출되지 않은 용어를 제외해서 <호스트 이름, 용어 백터> 쌍으로 출력합니다.

더보기

모호한 부분이 있어서 chat-GPT4o의 도움을 받아 예시를 만들고 이해했다.

 

입력 데이터

문서 1 ("http://example.com/doc1") : The quick brown fox jumps over the lazy dog. The quick brown fox is fast.

문서 2 ("http://example.com/doc2") : The lazy dog lies in the sun. The dog is lazy but lovable.

문서 3 ("http://another.com/doc3") : A swift white cat runs across the yard. The cat is swift and graceful.

 

중간 데이터

맵 함수는 문서에서 URL을 추출해서 키로 만들고 용어 백터를 값으로 가진다.

 

"https://example.com/" : {'the': 2, 'quick': 2, 'brown': 2, 'fox': 2, 'jumps': 1, 'over': 1, 'lazy': 1, 'dog.': 1, 'is': 1, 'fast.': 1}

 

"https://example.com/" :

{'the': 3, 'lazy': 2, 'dog': 2, 'lies': 1, 'in': 1, 'sun.': 1, 'is': 1, 'but': 1, 'lovable.': 1}

 

"https://another.com/" : 

{'a': 1, 'swift': 2, 'white': 1, 'cat': 2, 'runs': 1, 'across': 1, 'the': 2, 'yard.': 1, 'is': 1, 'and': 1, 'graceful.': 1}

 

결과 데이터

리듀스 함수는 키 값을 기준으로 백터를 합치고 빈도수가 낮은 용어를 제외한 뒤 출력한다.

 

"https://example.com/" :

{'the': 5, 'lazy': 3, 'dog': 2, 'is': 2, 'quick': 2, 'brown': 2, 'fox': 2, 'but': 1, 'lovable.': 1, 'jumps': 1, 'over': 1, 'lies': 1, 'in': 1, 'sun.': 1, 'fast.': 1}

 

"https://another.com/" : 

{'swift': 2, 'cat': 2, 'the': 2, 'a': 1, 'white': 1, 'runs': 1, 'across': 1, 'yard.': 1, 'is': 1, 'and': 1, 'graceful.': 1}

 

백터 이야기가 나와서 어려워 보이지 사실 단어 세기와 비슷하다.

Inverted Index: The map function parses each document, and emits a sequence of ⟨word, document ID⟩ pairs. The reduce function accepts all pairs for a given word, sorts the corresponding document IDs and emits a ⟨word,list(document ID)⟩pair. The set of all output pairs forms a simple inverted index. It is easy to augment this computation to keep track of word positions.

역 색인: 맵 함수는 각 문서를 파싱하고 <단어, 문서 식별자> 쌍을 출력합니다. 리듀스 함수는 <단어, 문서 식별자> 쌍에서 주어진 단어를 기준으로 문서 식별자를 정렬해서 <단어, 리스트 (문서 식별자)> 쌍을 출력합니다. 모든 출력 쌍은 간단한 역 색인 형태를 가집니다. 이 연산을 확장시키면 단어의 위치를 추적하는 것은 쉽습니다.

Distributed Sort: The map function extracts the key from each record, and emits a ⟨key, record⟩ pair. The reduce function emits all pairs unchanged. This computation depends on the partitioning facilities described in Section 4.1 and the ordering properties described in Section 4.2.

분산 정렬: 맵 함수는 각 레코드마다 키를 추출합니다. 그런 뒤 <키, 레코드> 쌍으로 출력합니다. 리듀스 함수는 변하지 않은 모든 쌍을 출력합니다. 이 연산은 4.1 장의 파티셔닝 기능, 4.2 장의 정렬 기능과 연관되어 있습니다.

3 Implementation (구현)

Many different implementations of the MapReduce interface are possible. The right choice depends on the environment. For example, one implementation may be suitable for a small shared-memory machine, another for a large NUMA multi-processor, and yet another for an even larger collection of networked machines.

맵리듀스 인터페이스는 다양한 구현이 가능합니다. 올바른 선택은 환경에 따라 달려있습니다. 예를 들어, 한 구현은 작은 메모리 공유 기기에 적합합니다. 어떤 구현은 NUMA 다중-프로세서에 적합합니다, 또 다른 구현은 네트워크로 연결된 기기에 적합합니다.

This section describes an implementation targeted to the computing environment in wide use at Google:
large clusters of commodity PCs connected together with switched Ethernet [4]. In our environment: (1) Machines are typically dual-processor x86 processors running Linux, with 2-4 GB of memory per machine.
(2) Commodity networking hardware is used – typically either 100 megabits/second or 1 gigabit/second at the machine level, but averaging considerably less in overall bisection bandwidth.
(3) A cluster consists of hundreds or thousands of machines, and therefore machine failures are common.
(4) Storage is provided by inexpensive IDE disks attached directly to individual machines. A distributed file system [8] developed in-house is used to manage the data stored on these disks. The file system uses replication to provide availability and reliability on top of unreliable hardware.
(5) Users submit jobs to a scheduling system. Each job consists of a set of tasks, and is mapped by the scheduler to a set of available machines within a cluster. 

이번 장은 구글에서 자주 쓰이는 컴퓨팅 환경을 목표로 한 구현에 대해 설명합니다. : switched Ethernet으로 연결된 상용 PC 클러스터

우리의 환경에서는: (1) 기기는 일반적으로 듀얼 x86 프로세서, 리눅스, 2-4GB가 할당되어 있습니다. (2) 상용 네트워크 하드웨어가 쓰였습니다. - 일반적으로 기기 레벨에서 100 메가비트/초 또는 1 기가비트/초이지만 전체 네트워크의 분할 대역폭을 평균하면 개별 기기의 속도보다 느립니다. (3) 클러스터는 100개 또는 1000개의 기기로 이루어져 있습니다. 그리고 기기의 실패는 매우 일반적입니다. (4) 저장기기로는 비싸지 않은 IDE 디스크를 각 기기에 직접 연결했습니다. 파일 시스템은 복제를 사용해서 가용성과 신뢰성을 제공했습니다, 신뢰할 수 없는 하드웨어 위에서. (5) 사용자는 잡을 스케쥴링 시스템에 제출합니다. 각 잡은 태스크의 집합으로 이루어져 있고 잡은 스캐쥴러에 의해 클러스터에서 사용가능한 기기에 할당되었습니다.

3.1 Execution Overview (실행 개요)

The Map invocations are distributed across multiple machines by automatically partitioning the input data into a set of M splits. The input splits can be processed in parallel by different machines. Reduce invocations are distributed by partitioning the intermediate key space into R pieces using a partitioning function (e.g., hash(key) mod R). The number of partitions (R) and the partitioning function are specified by the user.
Figure 1 shows the overall flow of a MapReduce operation in our implementation. When the user program calls the MapReduce function, the following sequence of actions occurs (the numbered labels in Figure 1 correspond to the numbers in the list below):

맵 호출은 입력 값을 M개의 조각으로 자동으로 나눔으로써 여러 기기에 분산됩니다. 입력 조각들은 각기 다른 기기에서 병렬로 처리될 수 있습니다. 파티션 함수가 중간 키 공간을 R 개의 조각으로 나누면 리듀스 호출은 여러 기기에 분산됩니다. (예를 들면 hash(key) mod R 같은). 파티션의 개수와 파티션 함수는 사용자에 의해 결정됩니다. 그림 1은 맵리듀스 연산 구현의 전체적인 흐름을 나타냅니다. 사용자 프로그램이 맵리듀스 함수를 호출하면, 하기의 절차가 진행됩니다. (그림 1의 숫자 표시는 아래 리스트에 대응됩니다.)

그림 1: 실행 개요
1. The MapReduce library in the user program first splits the input files into M pieces of typically 16 megabytes to 64 megabytes (MB) per piece (controllable by the user via an optional parameter). It then starts up many copies of the program on a cluster of machines.

1. 사용자 프로그램에 존재하는 맵리듀스 라이브러리는 먼저 입력 파일을 M개의 조각으로 쪼갭니다. 하나의 조각은 보통 16메가바이트에서 64메가바이트 정도 합니다. (사용자가 부가적인 파라미터로 조절할 수 있습니다.) 그러고 나서 클러스터 기기에 프로그램의 복사본을 시작합니다.

2. One of the copies of the program is special – the master. The rest are workers that are assigned work by the master. There are M map tasks and R reduce tasks to assign. The master picks idle workers and assigns each one a map task or a reduce task.

2. 프로그램의 복사본 중 하나는 특별한데 - 그건 마스터입니다. 나머지는 워커이며 마스터에게 일을 할당받습니다. M개의 맵 태스크와 R개의 리듀스 태스크가 할당될 수 있습니다. 마스터는 유휴 상태 워커를 골라 맵 테스크나 리듀스 태스크를 할당합니다.

3. A worker who is assigned a map task reads the contents of the corresponding input split. It parses key/value pairs out of the input data and passes each pair to the user-defined Map function. The intermediate key/value pairs produced by the Map function are buffered in memory.

3. 맵 태스크를 할당받은 워커는 쪼개진 입력에 대응하는 내용을 읽습니다. 키/값 쌍을 입력 값으로부터 파싱해 내고, 사용자가 정의한 맵 함수에 키/값 쌍을 전달합니다. 맵 함수에 의해 만들어진 중간 키/값 쌍은 메모리에 버퍼링 됩니다.

4. Periodically, the buffered pairs are written to local disk, partitioned into R regions by the partitioning function. The locations of these buffered pairs on the local disk are passed back to the master, who is responsible for forwarding these locations to the reduce workers.

4. 주기적으로, 버퍼링 된 쌍들은 로컬 디스크에 저장됩니다. 로컬 디스크는 분할 함수에 의해서 R개의 지역으로 쪼개져 있습니다. 로컬 디스크에 저장된 버퍼링 된 쌍들의 위치는 마스터에게 넘겨지게 되고 마스터는 이 위치를 리듀스 워커들에게 전달할 의무가 있습니다.

5. When a reduce worker is notified by the master about these locations, it uses remote procedure calls to read the buffered data from the local disks of the map workers. When a reduce worker has read all intermediate data, it sorts it by the intermediate keys so that all occurrences of the same key are grouped together. The sorting is needed because typically many different keys map to the same reduce task. If the amount of intermediate data is too large to fit in memory, an external sort is used.

5. 리듀스 워커가 마스터에 의해서 이 위치를 알게 된다면, 리듀스 워커는 원격 프로시져 호출을 사용해서 맵 워커 로컬 디스크에 있는 임시 저장된 데이터를 읽습니다. 리듀스 워커가 모든 중간 값들을 읽으면, 중간 값을 이용해서 그것들을 정렬합니다. 그래야지 모든 동일 키를 같이 묶을 수 있습니다.  일반적으로 많은 각기 다른 키가 같은 리듀스 태스크에 할당되기 때문에 정렬이 필요합니다. 만약에 중간 값이 메모리에 위치하기에는 큰 경우, 외부 정렬이 필요합니다.

6. The reduce worker iterates over the sorted intermediate data and for each unique intermediate key encountered, it passes the key and the corresponding set of intermediate values to the user’s Reduce function. The output of the Reduce function is appended to a final output file for this reduce partition.

6. 리듀스 워커는 정렬된 중간 데이터를 순회하며 각각의 고유한 중간 값들에 대해서 사용자 리듀스 함수에 키와 키에 대응하는 중간 값들을 보냅니다. 리듀스 함수의 출력 값은 리듀스 분할의 최종 출력 파일에 더해집니다.

7. When all map tasks and reduce tasks have been completed, the master wakes up the user program. At this point, the MapReduce call in the user program returns back to the user code.

7. 모든 맵 태스크와 리듀스 태스크가 완료되면, 마스터는 다시 사용자 프로그램을 깨웁니다. 이 시점에서 맵리듀스 호출이 사용자 코드로 돌아가게 됩니다.

After successful completion, the output of the mapreduce execution is available in the R output files (one per reduce task, with file names as specified by the user). Typically, users do not need to combine these R output files into one file – they often pass these files as input to another MapReduce call, or use them from another distributed application that is able to deal with input that is partitioned into multiple files.

성공적인 완료 후에, 맵리듀스 실행의 출력은 R개의 파일로 존재합니다. (리듀스 태스크 당 하나, 사용자가 명시한 파일 이름으로) 일반적으로 사용자는 R 개의 출력 파일을 하나로 합칠 필요가 없습니다. - 사용자는 일반적으로 이 파일들을 다른 맵리듀스 호출에 사용하거나 입력을 여러 개의 파일로 쪼개는 분산 애플리케이션에 사용하기 때문입니다.

3.2 Master Data Structures (마스터 데이터 구조)

The master keeps several data structures. For each map task and reduce task, it stores the state (idle, in-progress, or completed), and the identity of the worker machine (for non-idle tasks).

마스터는 몇 개의 데이터 구조를 유지한다. 각각의 맵 태스크와 리듀스 태스크에 대해서, 그것들의 상태를 저장한다. (유휴 상태, 실행 중인 상태, 완료된 상태), 그리고 워커 기기의 식별자 (유휴 상태가 아닌 태스크에 대해서)

The master is the conduit through which the location of intermediate file regions is propagated from map tasks to reduce tasks. Therefore, for each completed map task, the master stores the locations and sizes of the 
R intermediate file regions produced by the map task. Updates to this location and size information are received as map tasks are completed. The information is pushed incrementally to workers that have in-progress reduce tasks.

마스터는 터널 같은 존재이다. 중간 파일들이 위치하고 있는 장소가 맵 태스크에서 리듀스 태스크로 퍼지게 한다. 그래서 각각의 완료된 맵 태스크에 대해서 마스터는 맵 태스크가 만들어낸 R개의 중간 파일 지역의 위치와 사이즈를 저장한다. 맵 태스크가 완료될 때마다 위치와 크기 정보를 받아 업데이트한다. 정보들은 점진적으로 리듀스 작업을 진행하고 있는 워커들에게 전해진다.

3.3 Fault Tolerance (장애 허용 시스템)

Since the MapReduce library is designed to help process very large amounts of data using hundreds or thousands of machines, the library must tolerate machine failures gracefully.

맵리듀스 라이브러리는 많은 양의 데이터를 수 백, 수 천의 기기에서 구동되도록 도와주는 것을 목표로 작성되었기 때문에 기기의 실패를 허용해야 한다.

Worker Failure
The master pings every worker periodically. If no response is received from a worker in a certain amount of time, the master marks the worker as failed. Any map tasks completed by the worker are reset back to their initial idle state, and therefore become eligible for scheduling on other workers. Similarly, any map task or reduce task in progress on a failed worker is also reset to idle and becomes eligible for rescheduling.

워커 실패

마스터는 모든 워커에 주기적으로 핑을 날린다. 만약에 특정 시간 동안 워커에게로부터 응답이 오지 않는 경우, 마스터는 워커가 실패했다고 마킹한다. 워커에 의해 완료된 맵 태스크는 초기 유휴 상태로 돌아가게 된다. 그래서 다른 워커에게 할당되는 것이 가능해진다. 비슷하게 맵 테스크나 리듀스 태스크가 실패하게 된다면 역시 초기 유휴 상태로 돌아가게 되어 재스케쥴링이 가능하게 된다.

Completed map tasks are re-executed on a failure because their output is stored on the local disk(s) of the failed machine and is therefore inaccessible. Completed reduce tasks do not need to be re-executed since their output is stored in a global file system.

완료된 맵 태스크는 실패 시 다시 실행되게 된다. 왜냐하면 출력이 실패된 기기의 로컬 디스크에 있기 때문에 접근이 불가능하기 때문이다. 완료된 리듀스 태스크는 다시 재실행할 필요가 없는데 출력 값이 글로벌 파일 시스템에 저장되어 있기 때문이다.

When a map task is executed first by worker A and then later executed by worker B (because A failed), all workers executing reduce tasks are notified of the re-execution. Any reduce task that has not already read the data from worker A will read the data from worker B.

워커 A에 의해 맵 태스크가 실행되고 워커 B에 의해 나중에 실행된다면 (A가 실패해서), 리듀스 태스크를 실행하고 있는 모든 워커들은 재실행에 대해 연락을 받게 된다. 워커 A의 데이터를 읽지 못하고 있는 모든 리듀스 태스크는 워커 B의 데이터를 읽을 것이다.

MapReduce is resilient to large-scale worker failures. For example, during one MapReduce operation, network maintenance on a running cluster was causing groups of 80 machines at a time to become unreachable for several minutes. The MapReduce master simply re-executed the work done by the unreachable worker machines, and continued to make forward progress, eventually completing the MapReduce operation.

맵리듀스는 대용량 규모의 워커 실패를 견딜 수 있다. (탄력적이다.) 예를 들면, 하나의 맵리듀스 명령이 실행되는 동안에, 네트워크 유지보수가 80개의 기기를 한 순간에 몇 분 동안 도달하지 못하게 만들었다고 하자. 맵리듀스 마스터는 도달할 수 없는 워커 기기에 의해 수행된 작업에 대해서 단순히 재실행하고 실행을 계속 앞으로 나아가게 한다. 결국에는 맵리듀스 명령을 완료하게 된다.

Master Failure
It is easy to make the master write periodic checkpoints of the master data structures described above. If the master task dies, a new copy can be started from the last checkpointed state. However, given that there is only a single master, its failure is unlikely; therefore our current implementation aborts the MapReduce computation if the master fails. Clients can check for this condition and retry the MapReduce operation if they desire.

마스터 실패

마스터에게 위에서 설명한 마스터의 데이터 구조의 체크포인트를 주기적으로 만들게 하는 것은 쉽다. 만약에 마스터 태스크가 종료될 경우, 가장 최근의 상태에서 새로운 복사본이 시작될 수 있다. 하지만 만약에 마스터가 하나라면 실패할 확률은 적다; 그래서 현재 우리의 구현은 마스터가 실패할 경우에 맵리듀스 연산을 취소시켜 버린다. 사용자는 이 상태를 확인하고 그들이 원할 경우에 맵리듀스 연산을 다시 시도할 수 있다.

Semantics in the Presence of Failures
When the user-supplied map and reduce operators are deterministic functions of their input values, our distributed implementation produces the same output as would have been produced by a non-faulting sequential execution of the entire program.

실패 상태의 의미

사용자가 만든 맵, 리듀스 함수가 사용자의 입력에 대해서 결정적인 함수라면, 분산 시스템의 구현은 똑같은 출력을 나타낸다. 이때 출력은 전체 프로그램을 오류 없이 순차적으로 실행시킨 것의 출력과 같다.

We rely on atomic commits of map and reduce task outputs to achieve this property. Each in-progress task writes its output to private temporary files. A reduce task produces one such file, and a map task produces R such files (one per reduce task). When a map task completes, the worker sends a message to the master and includes the names of the R temporary files in the message. If the master receives a completion message for an already completed map task, it ignores the message. Otherwise, it records the names of R files in a master data structure.

맵과 리듀스 테스트 출력의 원자적인 커밋이 이 특성을 만족시킨다. 각각의 진행 중인 태스크는 자신의 출력을 비공개 임시 파일에 쓴다. 리듀스 태스크는 이런 파일을 하나 만들고, 맵 태스크는 이런 파일을 R개 만든다. (각 하나는 리듀스 태스크에 대응한다.) 만약에 맵 테스크가 완료되면, 워커는 마스터에게 메시지를 보내고 메시지 안에는 R개의 임시 파일 이름을 포함시킨다. 만약에 마스터가 이미 완료된 맵 테스크에 대한 완료 메시지를 받는다면 메시지를 무시한다. 그렇지 않다면 마스터는 R개의 파일 이름을 마스터 데이터 구조에 기록한다.

When a reduce task completes, the reduce worker atomically renames its temporary output file to the final output file. If the same reduce task is executed on multiple machines, multiple rename calls will be executed for the same final output file. We rely on the atomic rename operation provided by the underlying file system to guarantee that the final file system state contains just the data produced by one execution of the reduce task.

리듀스 테스크가 끝나면 리듀스 워커는 원자적으로 리듀스 워커의 출력 파일 이름을 최종 파일 이름으로 변경한다. 만약에 같은 리듀스 테스크가 여러 기기에서 실행된다면, 동일한 최종 출력 파일에 대해서 여러 개의 파일 이름 변경 호출이 실행된다. 파일 시스템에서 제공하는 원자적인 파일 이름 변경은 파일 시스템의 최종 상태가 하나의 리듀스 테스크 실행만을 포함함을 보장한다.

더보기

이 예시는 chatGPT4o를 사용해서 생성했다.

이 문단에서 말하고자 하는 바는 파일 시스템은 동일한 이름을 허용하지 않으니 파일 이름 변경이 원자적으로 이루어지면 최종적으로 남는 출력은 하나라는 뜻이다.

 

예를 들어서

워커 1, 워커 2가 있다고 해보자.

# 워커 1이 실행한 명령어
mv temp_output_worker1.txt final_output.txt

# 거의 동시에 워커 2가 실행한 명령어
mv temp_output_worker2.txt final_output.txt

 

워커 2의 명령이 늦게 실행되었다면 워커 1의 명령이 반영되고 워커 2의 명령이 반영되어 최종적으로 워커 2가 만든 출력이 반영된다. 결과적으로 최종 상태가 하나의 리듀스 태스크 실행만을 포함한다.

The vast majority of our map and reduce operators are deterministic, and the fact that our semantics are equiv- alent to a sequential execution in this case makes it very easy for programmers to reason about their program’s behavior. When the map and/or reduce operators are non-deterministic, we provide weaker but still reasonable semantics. In the presence of non-deterministic operators, the output of a particular reduce task R1 is equivalent to the output for R1 produced by a sequential execution of the non-deterministic program. However, the output for a different reduce task R2 may correspond to the output for R2 produced by a different sequential execution of the non-deterministic program.

거의 대부분의 맵, 리듀스 연산이 결정적이고, 우리의 의미론이 순차 실행과 동일하다는 사실은 프로그래머가 프로그램의 행동에 대해서 이해하기 쉽게 만든다. 맵, 리듀스 연산이 결정적이지 않다면, 우리는 약하지만 여전히 합당한 의미론을 제공할 것이다. 비결정적인 연산에서, 특정 리듀스 태스크 R1의 출력은 비결정적인 프로그램의 연속적인 실행과 같다. 반면 또 다른 데스크인 R2의 출력 값은 비결정적인 프로그램의 다른 연속적인 실행에서 제공된 출력 값에 대응된다.

더보기

이 부분 조금 이해가 안 돼서 chatGPT4o를 이용한 예시를 들어보겠다.

 

비결정론적인 연산자로 현재 시간을 출력한다고 가정하자.

 

첫 번째 순차 실행에서,

R1: "10:00 AM" 

R2: "10:05 AM"

 

두 번째 순차 실행에서,

R1: "10:01 AM" 

R2: "10:06 AM"

 

을 출력한다면 

R1: "10:00 AM" (첫 번째 순차 실행과 일치) 

R2: "10:06 AM" (두 번째 순차 실행과 일치)

 

가 최종 값으로 출력될 수 있다는 뜻이다.

R1, R2 모두 어떤 순차 실행의 결과 값을 따르지만 순차 실행 자체가 동일하지 않을 수 있기 때문에 다른 순차 실행의 결과를 가질 수 있다는 뜻이다.

 

여전히 합당한 의미론을 제공한다는 의미는 각 태스크가 결국에는 하나의 순차적인 실행 결과를 따르기 때문에 (그것이 다른 순차 실행을 따르더라도) 출력 값에 있어서 예측 가능하다는 의미이다.

*Consider map task M and reduce tasks R1 and R2. Let e(Ri) be the execution of Ri that committed (there is exactly one such execution). The weaker semantics arise because e(R1) may have read the output produced by one execution of M and e(R2) may have read the output produced by a different execution of M.

맵 태스크 M, 리듀스 태스크 R1, R2가 있다고 합시다. 또 e를 리듀스 Ri의 커밋된 실행이라고 합시다.(커밋된 실행은 오직 하나만 있다.) 약한 의미론이 적용되는데, e(R1)은 하나의 M의 실행의 출력을 읽고, e(R2)는 M의 다른 실행의 출력을 읽기 때문이다.

 

*약한 의미론은 매 실행마다 똑같은 결과 값을 보장하지는 않지만 예측 가능한 범위에서 동작함을 의미한다. 위의 예시에서 각각의 리듀스 태스크가 각기 다른 맵 태스크의 출력 값을 가질 수 있지만 맵 태스크의 출력 값 자체는 여러 연속적인 실행의 결괏값 중 하나라는 의미를 가진다.

3.4 Locality (지역성)

Network bandwidth is a relatively scarce resource in our computing environment. We conserve network bandwidth by taking advantage of the fact that the input data (managed by GFS [8]) is stored on the local disks of the machines that make up our cluster. GFS divides each file into 64 MB blocks, and stores several copies of each block (typically 3 copies) on different machines. The MapReduce master takes the location information of the input files into account and attempts to schedule a map task on a machine that contains a replica of the corresponding input data. Failing that, it attempts to schedule a map task near a replica of that task’s input data (e.g., on a worker machine that is on the same network switch as the machine containing the data). When running large MapReduce operations on a significant fraction of the workers in a cluster, most input data is read locally and consumes no network bandwidth.

네트워크 대역폭은 컴퓨터 환경에서 상대적으로 부족한 자원입니다. 우리는 네트워크 대역폭을 보호해야 했습니다. 왜냐하면 클러스터를 이루는 기기의 로컬 디스크에 입력 데이터가 저장된다는(GFS에 의해 관리되는) 단점이 있기 때문입니다. GFS는 파일을 64MB 블록으로 나눕니다. 그리고 각 블록의 복사본을(주로 3개) 다른 기기에 저장합니다. 맵리듀스 마스터는 입력 파일의 위치 정보를 계정에 놓고 맵 태스크를 입력 데이터의 복사본을 포함하는 기기에 할당합니다. 실패 시에 마스터는 근처에 있는 복사본이 존재하는 기기에 할당을 시도합니다. () 클러스터에서 넓게 분산된 워커들 위에 맵리듀스 명령이 실행될 때, 대부분의 입력 데이터는 지역적으로 읽히기 때문에 네트워크 대역폭의 소비가 없습니다.

3.5 Task Granularity (테스크 세분성)

We subdivide the map phase into M pieces and the reduce phase into R pieces, as described above. Ideally, M and R should be much larger than the number of worker machines. Having each worker perform many different tasks improves dynamic load balancing, and also speeds up recovery when a worker fails: the many map tasks it has completed can be spread out across all the other worker machines.

우리는 맵 단계를 M개의 조각으로, 리듀스 단계를 R개의 조각으로 나누었다. 이상적으로, M과 R의 수는 워커 기기보다 많아야 한다. 많은 다른 태스크에서 워커가 동작하는 것이 동적 부하 분산을 증가시키고 워커가 실패했을 때의 복구가 빠르다: 완료된 많은 맵 태스크가 모든 다른 워커 기기에 분산될 수 있기 때문입니다.

There are practical bounds on how large M and R can be in our implementation, since the master must make O(M + R) scheduling decisions and keeps O(M ∗ R) state in memory as described above. (The constant factors for memory usage are small however: the O(M ∗ R) piece of the state consists of approximately one byte of data per map task/reduce task pair.)

우리의 구현에서 M과 R은 개수에 실질적인 한계가 있다. 때문에, 마스터는 O(M + R) 스캐쥴링 결정을 내려야 한다. 또한 O(M * R) 메모리 상태를 유지해야 한다. (하지만 메모리 사용에 대한 상수 인자는 작다: O(M * R) 상태 조각은 거의 맵 / 리듀스 테스크 쌍 당 1 바이트로 구성되어 있기 때문이다.)

Furthermore, R is often constrained by users because the output of each reduce task ends up in a separate output file. In practice, we tend to choose M so that each individual task is roughly 16 MB to 64 MB of input data (so that the locality optimization described above is most effective), and we make R a small multiple of the number of worker machines we expect to use. We often perform MapReduce computations with M = 200,000 and R = 5,000, using 2,000 worker machines.

더 나아가서, R은 사용자에 의해서 제한되는데 각각의 리듀스 태스크가 결국에는 각각의 출력 파일을 만들기 때문이다. 실전에서는, 우리가 M을 주로 선택한다. 그래야 각각의 태스크가 16MB 에서 64MB의 입력 데이터가 되기 때문이다. (그래야 상기에 설명했던 지역적 최적화가 좀 더 효과적이다.) 그리고 R은 사용하려는 작업자 기기 수의 작은 배수로 설정합니다. 주로 우리는 맵리듀스 연산을 M = 200,000 , R = 5,000 , 2,000 개의 워커 기기로 실행합니다.

3.6 Backup Tasks (테스크 백업)

One of the common causes that lengthens the total time taken for a MapReduce operation is a “straggler”: a machine that takes an unusually long time to complete one of the last few map or reduce tasks in the computation. Stragglers can arise for a whole host of reasons. For example, a machine with a bad disk may experience frequent correctable errors that slow its read performance from 30 MB/s to 1 MB/s. The cluster scheduling system may have scheduled other tasks on the machine, causing it to execute the MapReduce code more slowly due to competition for CPU, memory, local disk, or network bandwidth. A recent problem we experienced was a bug in machine initialization code that caused processor caches to be disabled: computations on affected machines slowed down by over a factor of one hundred.

전체 소요 시간에 영향을 주는 흔한 요소 중 하나는 "낙오자"에 의해서 맵리듀스 연산이 실행될 때 입니다.: 낙오자는 몇몇의 맵 또는 태스크 작업 계산에 있어서 유달리 완료가 오래 걸리는 기기를 의미합니다. 많은 이유로 낙오자는 발생합니다. 예를 들면, 디스크에 손상이 있는 기기는 수정 가능한 에러를 나타내고 30MB/s에서 1MB/s로 성능이 떨어집니다. 클러스터 스캐쥴링 시스템이 다른 태스크를 기기에 할당하면 맵리듀스 코드가 더 느려지는데 이건 태스크 간 CPU, 메모리, 로컬 디스크, 네트워크 대역폭 경쟁이 있기 때문입니다. 우리가 최근에 겪었던 건 기기 초기와 코드가 프로세서 캐시를 비활성화시킨 것입니다. : 버그의 영향이 있던 기기에서의 연산은 100배 정도 느리게 실행되었습니다.

We have a general mechanism to alleviate the problem of stragglers. When a MapReduce operation is close to completion, the master schedules backup executions of the remaining in-progress tasks. The task is marked as completed whenever either the primary or the backup execution completes. We have tuned this mechanism so that it typically increases the computational resources used by the operation by no more than a few percent. We have found that this significantly reduces the time to complete large MapReduce operations. As an example, the sort program described in Section 5.3 takes 44% longer to complete when the backup task mechanism is disabled. 

우리는 "낙오자" 문제를 해결하기 위한 일반적인 메커니즘을 생각했습니다. 맵리듀스 연산이 거의 끝날 즈음에, 마스터는 남아 있는 진행 테스크들의 백업 실행을 스캐쥴링합니다. 태스크는 본래의 실행이나 백업 실행이 완료되는 순간에 완료 상태로 됩니다. 우리는 이 메커니즘을 튜닝해서 이 연산에 의해 사용되는 리소스의 비율이 얼마 되지 않도록 설정했습니다. 우리는 이것이 대용량 맵리듀스 연산을 완료하는데 엄청난 시간을 줄여준다는 사실을 발견했습니다. 예를 들면, 5.3 장에서 설명할 정렬 프로그램은 백업 태스크 기술이 비활성화되어 있다면 44% 정도 느리게 실행됩니다.

 

4 Refinements (부가적인 요소)

Although the basic functionality provided by simply writing Map and Reduce functions is sufficient for most needs, we have found a few extensions useful. These are described in this section.

Map과 Reduce 함수의 기본 기능으로도 대부분의 수요를 만족하지만, 우리는 이번 장에서 더 많은 확장에 대해서 설명하려고 합니다.

4.1 Partitioning Function (파티셔닝 함수)

The users of MapReduce specify the number of reduce tasks/output files that they desire (R). Data gets partitioned across these tasks using a partitioning function on the intermediate key. A default partitioning function is provided that uses hashing (e.g. “hash(key) mod R”). This tends to result in fairly well-balanced partitions. In some cases, however, it is useful to partition data by some other function of the key. For example, sometimes the output keys are URLs, and we want all entries for a single host to end up in the same output file. To support situations like this, the user of the MapReduce library can provide a special partitioning function. For example, using “hash(Hostname(urlkey)) mod R” as the partitioning function causes all URLs from the same host to end up in the same output file.

맵리듀스 사용자들은 원하는 리듀스 작업/출력 파일의 수를 명세합니다. 데이터는 중간 값을 입력으로 받는 파티션 함수를 통해서 파티셔닝 됩니다. 기본적인 파티셔닝 함수는 해싱을 사용합니다. (예를 들어, hash(key) mod R). 이건 꽤 균등한 파티션을 만듭니다. 하지만 몇몇 상황에서 다른 키의 함수로 데이터를 파티션 하는 게 유용합니다. 예를 들면, 출력 키가 URL이라면, 우리는 하나의 호스트를 가지는 모든 목록이 같은 출력 파일이 되기를 원합니다. 이러한 상황을 만들기 위해서는, 맵리듀스 라이브러리의 사용자가 특별한 파티션 함수를 제공할 수 있습니다. 예를 들면 "hash(Hostname(urlkey)) mod R 파티셔닝 함수를 사용하면 같은 호스트에서 오는 모든 URL들이 같은 출력 파일을 가지게 됩니다.

4.2 Ordering Guarantees (정렬 보장)

We guarantee that within a given partition, the intermediate key/value pairs are processed in increasing key order. This ordering guarantee makes it easy to generate a sorted output file per partition, which is useful when the output file format needs to support efficient random access lookups by key, or users of the output find it convenient to have the data sorted.

우리는 주어진 파티션에서 중간 키/값의 쌍들이 키 오름차순 기준으로 처리되는 것을 보장합니다. 이 정렬 보장은 파티션마다 정렬된 출력 결과 생성을 쉽게 합니다. 이것은 키를 가지고 출력 파일에 대해서 랜덤 액세스를 하게 되는 경우 효율적입니다. 또한 사용자가 결과물로 하여금 편리함을 느끼게 합니다.

4.3 Combiner Function (컴바이너 함수)

In some cases, there is significant repetition in the intermediate keys produced by each map task, and the user- specified Reduce function is commutative and associative. A good example of this is the word counting example in Section 2.1. Since word frequencies tend to follow a Zipf distribution, each map task will produce hundreds or thousands of records of the form <the, 1>. All of these counts will be sent over the network to a single reduce task and then added together by the Reduce function to produce one number. We allow the user to specify an optional Combiner function that does partial merging of this data before it is sent over the network.

몇몇 경우에 각각의 맵 태스크가 만들어낸 중간값의 큰 반복이 있고 유저가 정의한 리듀스 함수가 교환법칙과 결합법칙을 만족하는 경우가 있습니다. 한 가지 좋은 예제는 2.1장의 단어 세기입니다. 단어 빈도수는 지프의 법칙을 따르는 경향이 있기 때문에 각각의 맵 태스크는 몇 백, 몇 천의 <the, 1> 형태를 생산할 것입니다. 모든 것들은 네트워크를 통해 하나의 리듀스 태스크에 넘겨지게 되고 하나의 숫자로 합쳐지게 될 것입니다. 우리는 유저에게 선택적인 컴바이너 함수를 명세할 수 있게 했습니다. 이때 컴바이너 함수는 네트워크로 넘어가기 전에 부분적인 합을 하는 함수입니다.

The Combiner function is executed on each machine that performs a map task. Typically the same code is used to implement both the combiner and the reduce functions. The only difference between a reduce function and a combiner function is how the MapReduce library handles the output of the function. The output of a reduce function is written to the final output file. The output of a combiner function is written to an intermediate file that will be sent to a reduce task.

컴바이너 함수는 맵 태스크를 실행하는 함수에서 실행됩니다. 일반적으로 컴바이너 함수와 리듀스 함수가 같은 코드를 사용합니다. 리듀스 함수와 컴바이너 함수의 유일한 차이점은 맵리듀스 라이브러리가 함수의 출력값을 어떻게 다루는지입니다. 리듀스 함수의 출력값은 최종 출력 파일로 쓰입니다. 컴바이너 함수의 출력값은 중간 파일로 쓰여서 리듀스 태스크에 보내집니다.

Partial combining significantly speeds up certain classes of MapReduce operations. Appendix A contains an example that uses a combiner.

 부분 결합은 특정 맵리듀스 연산에서 엄청난 속도 향상을 만듭니다. 별첨 A가 컴바이너를 사용한 예제를 포함하고 있습니다.

4.4 Input and Output Types (입력과 출력 타입)

The MapReduce library provides support for reading input data in several different formats. For example, “text” mode input treats each line as a key/value pair: the key is the offset in the file and the value is the contents of the line. Another common supported format stores a sequence of key/value pairs sorted by key. Each input type implementation knows how to split itself into meaningful ranges for processing as separate map tasks (e.g. text mode’s range splitting ensures that range splits occur only at line boundaries). Users can add support for a new input type by providing an implementation of a simple reader interface, though most users just use one of a small number of predefined input types.

맵리듀스 라이브러리는 입력값을 여러 개의 다양한 형식으로 읽는 것을 지원합니다. 예를 들어 "텍스트" 모드 입력 값은 각 줄을 키/값으로 취급합니다: 키는 파일의 오프셋이고 값은 줄의 내용입니다. 또 다른 지원 형식은 키로 정렬된 키/값 쌍을 저장합니다. 각각의 입력 유형 구현은 어떻게 분리된 맵 태스크를 위해 입력을 쪼개는지 알고 있습니다. (예를 들어, 텍스트 모드는 줄 경계에서만 범위를 쪼갭니다.) 사용자는 간단한 읽기 인터페이스를 구현함으로써 새로운 입력 유형을 지원할 수 있습니다. 하지만 대부분의 사용자들은 이미 정의된 타입을 사용합니다.

A reader does not necessarily need to provide data read from a file. For example, it is easy to define a reader that reads records from a database, or from data structures mapped in memory.

리더는 항상 파일에서 읽을 필요는 없습니다. 예를 들어 리더가 데이터베이스에서 행을 읽도록 정의하거나 메모리에 정의된 자료구조를 읽게 정의하는 것은 쉽습니다.

In a similar fashion, we support a set of output types for producing data in different formats and it is easy for user code to add support for new output types.

비슷하게, 우리는 생산하는 데이터가 다른 출력 유형 형식을 생산하는 것을 지원합니다. 그리고 사용자의 코드는 새로운 출력 유형을 추가하는 것이 어렵지 않습니다.

4.5 Side-effects (부수 효과)

In some cases, users of MapReduce have found it convenient to produce auxiliary files as additional outputs from their map and/or reduce operators. We rely on the application writer to make such side-effects atomic and idempotent. Typically the application writes to a temporary file and atomically renames this file once it has been fully generated.

몇몇 경우에서 맵리듀스 사용자는 그들의 맵 그리고/또는 리듀스 연산자로부터 부가적인 출력값을 생산하는 것이 편리하다고 생각합니다. 애플리케이션을 만드는 사람이 이런 부수효과를 원자적이고 멱등성 있게 만들어야 합니다. 일반적으로 애플리케이션은 임시파일을 쓰고 그것이 완전히 생성될 때 원자적으로 임시 파일의 이름을 바꿉니다.

We do not provide support for atomic two-phase commits of multiple output files produced by a single task. Therefore, tasks that produce multiple output files with cross-file consistency requirements should be determistic. This restriction has never been an issue in practice.

우리는 하나의 태스크에서 생산된 여러 개의 출력 파일에 대한 원자적인 2단계 커밋을 지원하지 않습니다. 그래서 여러 개의 파일을 생성하는 파일 간 일관성이 필요한 태스크가 결정적이여야 합니다. 이 제한은 실제 문제가 된 적이 없습니다.

더보기

이 부분 이해가 안 가서 ChatGPT4o에게 예시를 물어보았다.

 

MapReduce 작업에서 단일 작업이 여러 개의 출력 파일을 생성할 때, 모든 파일을 한 번에 원자적으로 커밋하는 것을 지원하지 않기 때문에 일부 파일은 성공하고 일부 파일은 실패하는 경우가 있을 수 있다. 이때 작업이 결정적이라면 실패한 부분에서부터 다시 시도하더라도 항상 일관된 결과를 보장할 수 있다.

 

대부분의 작업은 동일한 입력에 있어서 동일한 출력을 생성하므로 문제가 된 적이 없다.

4.6 Skipping Bad Records (오류 레코드에 대한 생략)

Sometimes there are bugs in user code that cause the Map or Reduce functions to crash deterministically on certain records. Such bugs prevent a MapReduce operation from completing. The usual course of action is to fix the bug, but sometimes this is not feasible; perhaps the bug is in a third-party library for which source code is unavailable. Also, sometimes it is acceptable to ignore a few records, for example when doing statistical analysis on a large data set. We provide an optional mode of execution where the MapReduce library detects which records cause deterministic crashes and skips these records in order to make forward progress.

종종 유저 코드가 특정 레코드에 대해서 버그를 일으키는 경우가 있다. 이러한 버그는 맵리듀스 연산의 완료를 막는다. 보통 이런 경우에 버그를 고치지만, 버그를 못 고치는 경우가 있다. 예를 들어 버그가 제3의 라이브러리에 존재해서 접근 불가능한 경우가 있다. 그래서 때러는 이런 몇 개의 레코드들을 무시하는 것이 허용된다. 예를 들면 대용량 데이터에 대해서 분석을 진행하는 경우이다. 우리는 맵리듀스 라이브러리가 이런 결정적인 충돌에 대한 부가적인 모드를 지원해서 이런 레코드를 발견하는 경우 무시하고 작업을 진행하도록 하게 했다.

Each worker process installs a signal handler that catches segmentation violations and bus errors. Before invoking a user Map or Reduce operation, the MapReduce library stores the sequence number of the argument in a global variable. If the user code generates a signal, the signal handler sends a “last gasp” UDP packet that contains the sequence number to the MapReduce master. When the master has seen more than one failure on a particular record, it indicates that the record should be skipped when it issues the next re-execution of the corresponding Map or Reduce task.

각각의 워커 프로세스는 시그널 헨들러를 설치합니다. 이 시그널 핸들러는 세그멘테이션 위반과 버스 오류를 잡습니다. 맵, 리듀스 연산을 호출하기 전에 맵리듀스 라이브러리는 글로벌 변수 안에 있는 인자의 연속된 수를 저장합니다. 만약에 사용자의 코드가 시그널을 생성하는 경우, 시그널 핸들러는 시그널 숫자가 포함되어 있는 "최후의 숨" UDP 패킷을(아마 마지막을 극적으로 표현한 듯) 맵리듀스 마스터에게 보냅니다. 마스터가 특정 레코드에 대해서 1번 이상의 실패를 보게 된다면 마스터는 다음 맵 또는 리듀스 태스크의 재시작에 해당 레코드를 생략하도록 지시합니다.

4.7 Local Execution (지역 실행)

Debugging problems in Map or Reduce functions can be tricky, since the actual computation happens in a distributed system, often on several thousand machines, with work assignment decisions made dynamically by the master. To help facilitate debugging, profiling, and small-scale testing, we have developed an alternative implementation of the MapReduce library that sequentially executes all of the work for a MapReduce operation on the local machine. Controls are provided to the user so that the computation can be limited to particular map tasks. Users invoke their program with a special flag and can then easily use any debugging or testing tools they find useful (e.g. gdb).

맵 또는 리듀스 함수에서 나타나는 디버깅 문제는 다루기 난감할 수 있습니다. 실제 연산은 분산 시스템에서 일어나고 종종 몇 천 개의 기기에서 일어나며 작업 분배는 마스터에 의해 결정되기 때문입니다. 디버깅, 프로파일링, 작은 규모의 테스트를 용이하게 하기 위해서 맵리듀스의 구현 대신에 맵리듀스 연산의 모든 작업을 순차적으로 로컬 기기에서 실행시키는 방법을 개발했습니다. 제어권은 사용자에게 제공되어 특정 맵 태스크를 제한할 수 있습니다. 사용자는 그들의 프로그램을 특별한 플래그 값과 실행시키고 그들이 유용하다고 생각하는 디버깅이나 테스트 도구들을 쉽게 사용할 수 있습니다.

4.8 Status Information (상태 정보)

The master runs an internal HTTP server and exports a set of status pages for human consumption. The status pages show the progress of the computation, such as how many tasks have been completed, how many are in progress, bytes of input, bytes of intermediate data, bytes of output, processing rates, etc. The pages also contain links to the standard error and standard output files generated by each task. The user can use this data to predict how long the computation will take, and whether or not more resources should be added to the computation. These pages can also be used to figure out when the computation is much slower than expected.

마스터는 내부 HTTP 서버를 운영하고 사람들을 위해서 상태 페이지를 출력합니다. 상태 페이지는 얼마나 태스크가 진행되었는지, 입력 값의 크기는 얼마인지, 중간 값의 크기는 얼마인지, 출력의 크기는 얼마인지, 진척도는 얼마인지 등을 나타냅니다. 각 페이지는 각 태스크가 생성한 표준 에러나 표준 출력에 대한 링크를 가지고 있습니다. 사용자는 이 지표를 가지고 얼마나 연산이 걸릴 것인지, 연산에 얼마의 리소스가 필요한지 또는 필요하지 않은지에 대해 판단할 수 있습니다. 이 페이지는 예상보다 연산이 훨씬 지연될 때 해결하는 방법으로도 사용될 수 있습니다.

In addition, the top-level status page shows which workers have failed, and which map and reduce tasks they were processing when they failed. This information is useful when attempting to diagnose bugs in the user code.

 추가적으로, 최상위 상태 페이지는 어떤 워커가 실패했는지, 각각의 맵 그리고 리듀스 태스크가 실패했는지를 나타냅니다. 이러한 정보는 사용자 코드에서 버그를 진단하는 시도로써 유용하게 사용됩니다.

4.9 Counters (카운터들)

The MapReduce library provides a counter facility to count occurrences of various events. For example, user code may want to count total number of words processed or the number of German documents indexed, etc.

맵리듀스 라이브러리는 다양한 이벤트에 대한 카운터 기능을 제공합니다. 예를 들어 사용자의 코드는 총 처리된 단어의 개수나 독일 문서가 인덱싱 된 개수, 등등을 세고 싶을 수 있습니다.

To use this facility, user code creates a named counter object and then increments the counter appropriately in the Map and/or Reduce function. For example:

이런 기능을 사용하기 위해서, 사용자의 코드는 이름 있는 숫자 세기 오브젝트를 만듭니다. 그리고 맵 그리고/또는 리듀스 함수에서 카운터를 적절하게 증가시킵니다. 예를 들면:

Counter* uppercase;
  uppercase = GetCounter("uppercase");

map(String name, String contents): 
	for each word w in contents:
		if (IsCapitalized(w)): 
        	uppercase->Increment(); 
        EmitIntermediate(w, "1");
The counter values from individual worker machines are periodically propagated to the master (piggybacked on the ping response). The master aggregates the counter values from successful map and reduce tasks and returns them to the user code when the MapReduce operation is completed. The current counter values are also displayed on the master status page so that a human can watch the progress of the live computation. When aggregating counter values, the master eliminates the effects of duplicate executions of the same map or reduce task to avoid double counting. (Duplicate executions can arise from our use of backup tasks and from re-execution of tasks due to failures.)

각각 워커의 카운터 값은 주기적으로 마스터에게 전파됩니다. (핑 응답에 실립니다.) 마스터는 성공한 맵 그리고 리듀스 태스크의 카운터 값을 합하고 맵리듀스 연산이 완료되면 사용자 코드에 되돌려줍니다. 현재 카운터 값은 마스터 상태 페이지에 표시되기 때문에 사람들은 실시간으로 연산을 볼 수 있습니다. 카운터 값을 합할 때, 맵 또는 리듀스의 재실행이 만들어낸 값은 배제하여 중복으로 수를 세지 않게 합니다. (중복 실행은 백업 태스크나 실패로 인해 테스크 재실행시에 일어날 수 있습니다.)

Some counter values are automatically maintained by the MapReduce library, such as the number of input key/value pairs processed and the number of output key/value pairs produced.

몇몇 카운터 값들은 맵리듀스 라이브러리에 의해 자동으로 유지됩니다. 예를 들면 처리된 입력의 키/값 쌍이나 출력된 키/값 쌍을 같은 경우입니다.

Users have found the counter facility useful for sanity checking the behavior of MapReduce operations. For example, in some MapReduce operations, the user code may want to ensure that the number of output pairs produced exactly equals the number of input pairs processed, or that the fraction of German documents pro cessed is within some tolerable fraction of the total number of documents processed.

사용자는 맵리듀스 연산 행위에 대한 무결성 확인 시에 카운터 기능이 유용하다는 것을 알 것입니다. 예를 들면 몇몇의 맵리듀스 연산에서 사용자의 코드가 입력으로 얼마를 넣으면 결과 쌍 값으로 얼마가 나오겠다고 확신하고 싶을 수도 있습니다. 혹은 독일 문서를 처리한 비율을 전체 문서 처리한 부분의 비율에 비교하면 허용가능한 수준인지를 알고 싶을 수도 있습니다.

5 Performance (성능)

In this section we measure the performance of MapReduce on two computations running on a large cluster of machines. One computation searches through approximately one terabyte of data looking for a particular pattern. The other computation sorts approximately one terabyte of data.

이번 세션에는 맵리듀스에서의 두 개의 연산 성능을 측정합니다. 하나의 연산은 거의 1 테라바이트의 데이터에서 특정 형태를 찾는 것이고 다른 연산은 약 1 테라바이트 데이터의 정렬입니다.

These two programs are representative of a large subset of the real programs written by users of MapReduce – one class of programs shuffles data from one representation to another, and another class extracts a small amount of interesting data from a large data set.

이 두 개의 프로그램은 맵리듀스 사용자가 만든 실제 프로그램의 큰 부분집합을 대표합니다. 하나는 데이터를 하나의 표현에서 다른 표현으로 재구성하고 또 다른 하나는 큰 데이터 집합에서 작은 흥미로운 데이터를 추출합니다.

5.1 Cluster Configuration (클러스터 구성)

All of the programs were executed on a cluster that consisted of approximately 1800 machines. Each machine had two 2 GHz Intel Xeon processors with Hyper-Threading enabled, 4GB of memory, two 160GB IDE disks, and a gigabit Ethernet link. The machines were arranged in a two-level tree-shaped switched network with approximately 100-200 Gbps of aggregate bandwidth available at the root. All of the machines were in the same hosting facility and therefore the round-trip time between any pair of machines was less than a millisecond.

모든 프로그램들은 약 1800개의 기기로 이루어진 클러스터에서 실행되었습니다. 각각의 기기는 하이퍼 쓰레딩이 가능한 두 개의 2 GHz Intel Xeon 프로세서, 4GB의 메모리, 두 개의 160GB IDE 디스크, 그리고 기가비트 이더넷 링크를 가지고 있었습니다. 이 기기들은 두 단계의 트리 모양 스위치드 네트워크 형태로 배열되었고 루트에는 약 100-200 Gbps 대역폭이 사용가능했습니다. 모든 기기들은 같은 호스팅 장소에 있었기 때문에 아무 두 기기간의 왕복 시간은 밀리초보다 작았습니다.

Out of the 4GB of memory, approximately 1-1.5GB was reserved by other tasks running on the cluster. The programs were executed on a weekend afternoon, when the CPUs, disks, and network were mostly idle.

4GB의 메모리 중 약 1-1.5GB는 다른 태스크를 위해 점유되었습니다. 그 프로그램들은 CPU, 디스크, 네트워크가 한가한 주말 오후에 실행되었습니다.

5.2 Grep

The grep program scans through 10^10 100-byte records, searching for a relatively rare three-character pattern (the pattern occurs in 92,337 records). The input is split into approximately 64MB pieces (M = 15000), and the entire output is placed in one file (R = 1).

그랩 프로그램은 10^10 개의 100 바이트 레코드들을 스캔했습니다. 또한 거의 없는 문자 패턴을 탐색했습니다. (해당 패턴은 92,337개 정도 존재). 입력값은 약 64MB 조각으로 쪼개졌고 최종 출력값은 하나의 파일로 출력되었습니다.

그림 2
Figure 2 shows the progress of the computation over time. The Y-axis shows the rate at which the input data is scanned. The rate gradually picks up as more machines are assigned to this MapReduce computation, and peaks at over 30 GB/s when 1764 workers have been assigned. As the map tasks finish, the rate starts dropping and hits zero about 80 seconds into the computation. The entire computation takes approximately 150 seconds from start to finish. This includes about a minute of startup overhead. The overhead is due to the propagation of the program to all worker machines, and delays interacting with GFS to open the set of 1000 input files and to get the information needed for the locality optimization.

그림 2는 시간에 따른 연산의 진척도를 나타냅니다. Y축은 입력값이 스캔된 비율을 나타냅니다. 비율은 맵리듀스 연산이 기기에 배정될 때마다 올라갔습니다. 그리고 1764개의 워커가 배정받았을 때 30 GB/s 이상 올라갔습니다. 맵 태스크가 종료될 쯤에 비율은 떨어지기 시작해서 80초쯤에 0에 다다랐습니다. 전체 연산은 시작부터 끝까지 150초 정도 걸렸습니다. 이 시간은 시작 부하 시간을 포함합니다. 이 부하는 모든 워커 기기에 프로그램을 전차하고, 로컬 최적화를 위해 GFS와 통신하면서 1000개의 파일을 열게 하기 때문에 발생합니다.

5.3 Sort (정렬)

The sort program sorts 10^10 100-byte records (approximately 1 terabyte of data). This program is modeled after the TeraSort benchmark [10].

정렬 프로그램은 10^10개의 100byte 레코드들을 정렬합니다. (약 1 테라바이트의 데이터입니다.) 이 프로그램은 TeraSort 벤치마크를 모델로 합니다.

The sorting program consists of less than 50 lines of user code. A three-line Map function extracts a 10-byte sorting key from a text line and emits the key and the original text line as the intermediate key/value pair. We used a built-in Identity function as the Reduce operator. This functions passes the intermediate key/value pair unchanged as the output key/value pair. The final sorted output is written to a set of 2-way replicated GFS files (i.e., 2 terabytes are written as the output of the program).

정렬 프로그램은 50줄 내의 사용자 코드로 이루어져 있습니다. 3 줄의 맵 함수는 10바이트의 정렬 키를 줄에서 추출하고 키와 원본 줄을 중간 키/값 쌍으로 출력합니다. 우리는 리듀스 연산에 포함되어 있는 항등 함수를 사용했습니다. 이 함수는 중간 키/값 쌍을 바꾸지 않고 그대로 출력합니다. 최종 정렬된 출력값은 2개의 복제본으로 쓰입니다. (2 테라바이트가 쓰이게 됩니다.)

As before, the input data is split into 64MB pieces (M = 15000). We partition the sorted output into 4000 files (R = 4000). The partitioning function uses the initial bytes of the key to segregate it into one of R pieces.
Our partitioning function for this benchmark has built-in knowledge of the distribution of keys. In a general sorting program, we would add a prepass MapReduce operation that would collect a sample of the keys and use the distribution of the sampled keys to compute split-points for the final sorting pass.

처음에 입력값은 64MB 조각으로 잘립니다. (M=15000). 우리는 출력 파일을 4000개의 정렬된 출력으로 나누었습니다. 파티션 함수는 R개의 조각으로 분리하기 위해서 키의 초기 바이트를 이용했습니다. 이 밴치마크를 위한 우리의 파티션 함수는 키분산의 기본 지식을 가지고 있습니다. 우리는 사전 처리 단계를 추가했는데 사전 처리 단계란 일반적인 정렬 프로그램에서 키들의 샘플을 모으고 샘플 키들의 분산을 이용해서 분할 지점을 계산하는 연산입니다.

더보기

분할 지점을 왜 계산하지? 의문이 풀리지 않아서 ChatGPT4o에게 물어봤다.

 

키의 분포를 알면 데이터를 균등하게 분할할 수 있어, 각 파티션이 비슷한 크기를 가지게 되어 전체 작업의 효율성이 향상됩니다. 정렬된 데이터를 여러 파일로 나눌 때도 각 파일이 정렬된 상태를 유지할 수 있게 됩니다. 이러한 이유로 키의 분포를 파악하는 것이 중요합니다.

그림 3: 정렬 프로그램 실행 유형에 따른 데이터 전달률
Figure 3 (a) shows the progress of a normal execution of the sort program. The top-left graph shows the rate at which input is read. The rate peaks at about 13 GB/s and dies off fairly quickly since all map tasks finish before 200 seconds have elapsed. Note that the input rate is less than for grep. This is because the sort map tasks spend about half their time and I/O bandwidth writing intermediate output to their local disks. The corresponding intermediate output for grep had negligible size.

그림 3 (a)는 정렬 프로그램의 일반적인 실행 진행도를 나타냅니다. 좌상단 그래프는 입력을 읽은 비율을 나타냅니다. 수치는 약 13 GB/s 를 최고점으로 하고 200초가 지났을 무렵 모든 맵 태스크가 종료될 때 급격히 떨어집니다. 이 비율이 grep 프로그램에 비해 낮은 수치인 것은 주목할만합니다. 왜냐하면 정렬 맵 태스크가 절반 정도의 시간을 소비하고 I/O 대역폭은 로컬 디스크에 중간 값을 쓰는 데 사용되기 때문입니다. grep 프로그램에 대응되는 중간 출력값은 무시할만한 크기를 가집니다.

The middle-left graph shows the rate at which data is sent over the network from the map tasks to the reduce tasks. This shuffling starts as soon as the first map task completes. The first hump in the graph is for
the first batch of approximately 1700 reduce tasks (the entire MapReduce was assigned about 1700 machines, and each machine executes at most one reduce task at a time). Roughly 300 seconds into the computation, some of these first batch of reduce tasks finish and we start shuffling data for the remaining reduce tasks. All of the shuffling is done about 600 seconds into the computation.

좌중단 그래프는 맵 태스크에서 리듀스 태스크로 얼마만큼의 데이터가 네트워크를 통해 보내어졌는지에 대한 비율을 나타냅니다. 첫 번째로 그래프가 뛴 순간은 첫 배치인 약 1700개의 리듀스 테스크 때문입니다. (전체 맵리듀스는 1700개의 기기에 할당되고 각각의 기기는 한 번에 하나의 리듀스 태스크를 실행합니다.) 연산에는 거의 300초가 사용되고, 리듀스 태스크의 몇몇 배치는 종료되어 남아 있는 리듀스 태스크에 대한 데이터 셔플링을 시작합니다. 모든 셔플링은 약 600초 정도 걸렸습니다.

The bottom-left graph shows the rate at which sorted data is written to the final output files by the reduce tasks. There is a delay between the end of the first shuffling period and the start of the writing period because the machines are busy sorting the intermediate data. The writes continue at a rate of about 2-4 GB/s for a while. All of the writes finish about 850 seconds into the computation. Including startup overhead, the entire computation takes 891 seconds. This is similar to the current best reported result of 1057 seconds for the TeraSort benchmark [18].

좌하단의 그래프는 리듀스 테스크에 의해 최종 출력파일에 쓰인 정렬된 데이터의 비율입니다. 이건 첫 번째 셔플링 기간과 첫 번째 쓰기 기간에 약간의 지연이 있습니다. 왜냐면 기기가 중간값을 정렬하는데 바쁘기 때문입니다. 쓰기는 2-4 GB/s의 비율을 한동안 유지합니다. 모든 쓰기는 850초 정도 걸립니다. 시작 부하를 포함하면 전체 연산 시간은 891초 걸립니다. 비슷하게 현재 보고된 TeraSort benchmark의 최고 시간은 1057초 정도인데 이와 비슷합니다.

A few things to note: the input rate is higher than the shuffle rate and the output rate because of our locality optimization – most data is read from a local disk and bypasses our relatively bandwidth constrained network. The shuffle rate is higher than the output rate because the output phase writes two copies of the sorted data (we make two replicas of the output for reliability and availability reasons). We write two replicas because that is the mechanism for reliability and availability provided by our underlying file system. Network bandwidth requirements for writing data would be reduced if the underlying file system used erasure coding [14] rather than replication.

몇 가지 주목할 점: 입력 비율은 셔플 비율과 출력 비율보다 높은데 이건 로컬 최적화 때문입니다. 대부분의 데이터는 로컬 디스크에서 읽히고 우리의 제한된 네트워크를 그냥 지나칩니다. 셔플 비율은 출력 비율보다 높은데 이건 출력 단계에서 두 개의 정렬된 데이터를 쓰기 때문입니다. (우리는 출력본에 있어서 신뢰성과 가용성을 이유로 두 개의 복재본을 만듭니다.) 우리는 두 개의 복제본을 쓰는데 그 이유는 기저에 있는 파일 시스템이 제공하는 신뢰성과 가용성 메커니즘 때문입니다. 데이터를 쓰기 위한 네트워크 대역폭은 에러 방지 코딩을 한 파일 시스템의 경우에 더 줄어들 것입니다.

 

 5.4 Effect of Backup Tasks (백업 태스크의 효과)

In Figure 3 (b), we show an execution of the sort program with backup tasks disabled. The execution flow is similar to that shown in Figure 3 (a), except that there is a very long tail where hardly any write activity occurs. After 960 seconds, all except 5 of the reduce tasks are completed. However these last few stragglers don’t finish until 300 seconds later. The entire computation takes 1283 seconds, an increase of 44% in elapsed time.

그림 3(b)에서 우리는 백업 태스크가 비활성화되었을 때의 정렬 프로그램의 실행을 보여줍니다. 이 실행 흐름은 그림 3(a)과 비슷합니다. 한 가지 점이 다른데 거의 쓰기 활동이 없는 긴 꼬리가 있습니다. (Done 선 위치를 보면 알 수 있다.) 5개의 리듀스 태스크를 제외하면 960초 이후에 모든 태스크가 완료됩니다. 하지만 몇 개의 낙오자들이 300초 이후에도 끝내지 못하고 있습니다. 최종 연산은 1283초 걸리며 이건 44%나 초과된 것입니다.

5.5 Machine Failures (기기 실패)

In Figure 3 (c), we show an execution of the sort program where we intentionally killed 200 out of 1746 worker processes several minutes into the computation. The underlying cluster scheduler immediately restarted new worker processes on these machines (since only the processes were killed, the machines were still functioning properly).

그림 3 (c)는 우리가 의도적으로 1746개의 워커 중 200개를 종료시킨 것입니다. 클러스터 스캐쥴러는 이들의 기기에 즉시 새로운 워커 프로세스를 실행시킵니다. (프로세스만 종료시킨 것이기 때문에 기기는 여전히 정상 작동한 상황입니다.)

The worker deaths show up as a negative input rate since some previously completed map work disappears (since the corresponding map workers were killed) and needs to be redone. The re-execution of this map work happens relatively quickly. The entire computation finishes in 933 seconds including startup overhead (just an increase of 5% over the normal execution time).

워커의 죽음은 입력 비율에 음수로 표기되었는데 이전에 완료된 맵의 작업이 없어졌기 때문입니다. (대응되는 맵 워커가 종료되어서) 그리고 다시 실행되어야 합니다. 이 맵 작업의 재시작은 빠르게 진행되었습니다. 전체 연산은 시작 부하를 포함해서 933초 안에 종료되었습니다. (일반적인 실행 시간에 비해 5% 밖에 상승하지 않았습니다.)

 

6 Experience (경험)

We wrote the first version of the MapReduce library in February of 2003, and made significant enhancements to it in August of 2003, including the locality optimization, dynamic load balancing of task execution across worker machines, etc. Since that time, we have been pleasantly surprised at how broadly applicable the MapReduce library has been for the kinds of problems we work on. It has been used across a wide range of domains within Google, including:
- large-scale machine learning problems,
- clustering problems for the Google News and Froogle products, extraction of data used to produce reports of popular queries (e.g. Google Zeitgeist),
- extraction of properties of web pages for new experiments and products (e.g. extraction of geographical locations from a large corpus of web pages for localized search), and
- large-scale graph computations.

우리는 맵리듀스 라이브러리의 첫 버전을 2003년 2월에 작성했습니다. 그리고 2003년 8월에 엄청난 발전이 있었습니다. 로컬 최적화, 워커 기기간 태스크 실행 동적 부하 분산, 등등. 당시에는 맵리듀스 라이브러리가 이렇게 다양한 종류의 문제에 적용되어서 사용되는 것이 매우 놀라웠습니다. 맵리듀스는 구글에서 넓은 범위의 문제에 사용되었습니다.

- 큰 규모의 머신러닝 문제

- 구글 뉴스 그리고 프로글 프로덕트의 클러스터링 문제, 인기 검색어 리포트를 작성하기 위해 데이터를 추출

- 새로운 경험과 상품을 위한 웹페이지의 특성 추출 (현지화된 검색을 위한 웹페이지에서의 지리적 위치 추출)

- 큰 규모의 그래프 연산

그림 4: 시간에 따른 맵리듀스 프로그램 증가량
Figure 4 shows the significant growth in the number of separate MapReduce programs checked into our primary source code management system over time, from 0 in early 2003 to almost 900 separate instances as of late September 2004. MapReduce has been so successful because it makes it possible to write a simple program and run it efficiently on a thousand machines in the course of half an hour, greatly speeding up the development and prototyping cycle. Furthermore, it allows programmers who have no experience with distributed and/or parallel systems to exploit large amounts of resources easily.

그림 4는 우리의 소스 코드 관리 시스템이 확인한 개별 맵리듀스 프로그램의 성장세입니다. 2003년대 초 0에서부터 2004년 9월 말 900개의 개별 인스턴스로 성장했습니다. 맵리듀스는 매우 성공적이었는데 프로그램 작성이 간단했고 천 개의 기기에서 30분 동안 효율적으로 돌아갔기 때문에 개발과 프로토타입 주기가 빨라졌습니다. 더 나아가서 분산 그리고/또는 병렬 시스템을 프로그래머가 몰라도 쉽게 대용량의 리소스를 처리할 수 있게 했습니다.

테이블 1: 2004년 8월 맵리듀스 작업의 실행
At the end of each job, the MapReduce library logs statistics about the computational resources used by the job. In Table 1, we show some statistics for a subset of MapReduce jobs run at Google in August 2004.

각각의 잡이 끝나면, 맵리듀스 라이브러리는 잡이 사용한 컴퓨터 리소스에 대한 통계를 로깅했습니다. 테이블 1은 2004년 8월에 구글에서 실행되었던 맵리듀스 작업 일부의 몇몇 통계입니다.

6.1 Large-Scale Indexing (큰 규모 인덱싱)

One of our most significant uses of MapReduce to date has been a complete rewrite of the production indexing system that produces the data structures used for the Google web search service. The indexing system takes as input a large set of documents that have been retrieved by our crawling system, stored as a set of GFS files. The raw contents for these documents are more than 20 terabytes of data. The indexing process runs as a sequence of five to ten MapReduce operations. Using MapReduce (instead of the ad-hoc distributed passes in the prior version of the indexing system) has provided several benefits:
- The indexing code is simpler, smaller, and easier to understand, because the code that deals with fault tolerance, distribution and parallelization is hidden within the MapReduce library. For example, the size of one phase of the computation dropped from approximately 3800 lines of C++ code to approximately 700 lines when expressed using MapReduce.
- The performance of the MapReduce library is good enough that we can keep conceptually unrelated computations separate, instead of mixing them together to avoid extra passes over the data. This makes it easy to change the indexing process. For example, one change that took a few months to make in our old indexing system took only a few days to implement in the new system.
- The indexing process has become much easier to operate, because most of the problems caused by machine failures, slow machines, and networking hiccups are dealt with automatically by the MapReduce library without operator intervention. Furthermore, it is easy to improve the performance of the indexing process by adding new machines to the indexing cluster.

현재까지도 가장 중요한 맵리듀스의 쓰임은 인덱싱 시스템의 재작성입니다. 인덱싱 시스템은 구글 웹 검색 서비스에 사용되는 데이터 구조를 제공합니다. 인덱싱 시스템은 우리의 크롤링 시스템으로부터 얻어진 큰 규모의 문서 입력을 GFS 파일에 저장합니다. 이 문서들의 원시 데이터는 20 테라바이트가 넘습니다. 인덱싱 프로세스는 5에서 10개의 맵리듀스 연산의 절차를 진행합니다. 맵리듀스를 사용하는 것은 이전 시스템에 비해서 몇 가지 이점이 있습니다.

 - 인덱싱 코드가 간단하고, 작아졌고, 이해하기 쉬워졌습니다. 왜냐하면 코드가 내결함성이나 분산, 병렬 처리를 맵리듀스 라이브러리에 감춰주었기 때문입니다. 예를 들면 약 3800 줄의 C++ 코드가 맵리듀스를 사용하고 700 줄로 줄었습니다.

- 맵리듀스 라이브러리의 성능이 충분히 좋았습니다. 우리는 개념적으로 연관 없는 연산을 섞는 대신 분리해서 추가적인 데이터 절차를 생략했습니다. 이건 인덱싱 프로세스를 변화시키기 쉽게 만들었습니다. 예를 들어, 기존 시스템에서는 하나의 변화가 몇 개월이 걸렸었는데 새로운 시스템에서는 몇일만에 변화를 적용할 수 있었습니다.

- 인덱싱 프로세스는 실행하기 매우 쉬워졌습니다. 왜냐하면 기기 결함, 느린 기기, 네트워크 장애로부터 기인한 대부분의 문제가 실행하는 사람의 개입 없이 알아서 처리되었기 때문입니다. 더 나아가서 단순히 인덱싱 클러스터에 새로운 기기를 더함으로써 성능을 쉽게 향상할 수 있었습니다.

7 Related Work (관련 작업)

Many systems have provided restricted programming models and used the restrictions to parallelize the computation automatically. For example, an associative function can be computed over all prefixes of an N element array in log N time on N processors using parallel prefix computations [6, 9, 13]. MapReduce can be considered a simplification and distillation of some of these models based on our experience with large real-world computations. More significantly, we provide a fault-tolerant implementation that scales to thousands of processors. In contrast, most of the parallel processing systems have only been implemented on smaller scales and leave the details of handling machine failures to the programmer. 

 많은 시스템들이 제한된 프로그래밍 모델을 제공하고 이런 제한을 자동화된 병렬 계산에 사용합니다. 예를 들어서, N 개의 원소가 있는 배열의 모든 접두사에 대한 연결 함수가 N개의 프로세서에서 log N 시간에 병렬 계산될 수 있습니다. 맵리듀스는 대규모 실세계 연산에 기반한 이러한 몇몇 모델들에 대한 단순화된 형태로 여길 수 있습니다. 더 중요한 건 우리는 천 개 규모의 프로세서에 대해서 내결함성을 제공합니다. 대부분은 병렬 처리 시스템이 소규모로만 구현되었고 프로그래머에게 결함을 다루도록 한 것과 대조적입니다.

Bulk Synchronous Programming [17] and some MPI primitives [11] provide higher-level abstractions that make it easier for programmers to write parallel programs. A key difference between these systems and MapReduce is that MapReduce exploits a restricted programming model to parallelize the user program automatically and to provide transparent fault-tolerance.

대용량 동기화 프로그래밍이나 메시지 전달 인터페이스는 고차원의 추상화를 제공해서 프로그래머가 병렬 프로그램을 작성하기 쉽게 합니다. 이러한 시스템과 맵리듀스가 다른 점은 맵리듀스는 제한된 프로그래밍 모델을 제공해서 사용자의 프로그램이 자동적으로 병렬 처리되게 하고 투명한 내결함성을 제공한다는 것입니다.

Our locality optimization draws its inspiration from techniques such as active disks [12, 15], where computation is pushed into processing elements that are close to local disks, to reduce the amount of data sent across I/O subsystems or the network. We run on commodity processors to which a small number of disks are directly connected instead of running directly on disk controller processors, but the general approach is similar.

우리의 로컬 최적화는 활성 디스크 같은 기술으로부터 영감을 가져왔습니다. 활성 디스크는 I/O 량을 줄이기 위해서 가까운 로컬 디스크에 연산이 맡겨진 곳입니다. 우리는 디스크 컨트롤러 프로세서를 사용하는 대신에 디스크와 바로 연결된 상업용 프로세서를 사용했습니다. 하지만 일반적인 접근은 비슷합니다.

Our backup task mechanism is similar to the eager scheduling mechanism employed in the Charlotte System [3]. One of the shortcomings of simple eager scheduling is that if a given task causes repeated failures, the entire computation fails to complete. We fix some instances of this problem with our mechanism for skipping bad records.

우리의 백업 테스크 메커니즘은 샬롯 시스템에 있는 즉시 스케쥴링 메커니즘과 유사합니다. 즉시 스케쥴링 메커니즘의 단점은 테스크가 실패를 반복하면 전체 테스크가 완료에 실패하지만 우리는 그 문제를 고쳐서 불량 레코드를 생략하도록 했습니다.

The MapReduce implementation relies on an in-house cluster management system that is responsible for distributing and running user tasks on a large collection of shared machines. Though not the focus of this paper, the cluster management system is similar in spirit to other systems such as Condor [16].

맵리듀스 구현은 인하우스 클러스터 관리 시스템에 의존합니다. 이 시스템은 유저 테스크를 큰 규모의 공유 기기에 분산하고 실행할 책임이 있습니다. 이 논문에서는 다루지 않았지만 클러스터 관리 시스템은 Condor 와 비슷합니다.

The sorting facility that is a part of the MapReduce library is similar in operation to NOW-Sort [1]. Source machines (map workers) partition the data to be sorted and send it to one of R reduce workers. Each reduce worker sorts its data locally (in memory if possible). Of course NOW-Sort does not have the user-definable Map and Reduce functions that make our library widely applicable.

맵리듀스 라이브러리의 일부분인 정렬 기능은 NOW-정렬의 연산과 비슷합니다. 원천 기기는 (맵 워커) 데이터를 쪼개서 정렬된 상태로 만들고 R개의 리듀스 워커에 보냅니다. 각각의 리듀스 워커들은 데이터를 정렬합니다. 당연하게도 NOW-정렬은 우리의 애플리케이션처럼 사용자가 범용적으로 정의할 수 있는 맵리듀스 함수는 가지고 있지 안흣ㅂ다.

River [2] provides a programming model where processes communicate with each other by sending data over distributed queues. Like MapReduce, the River system tries to provide good average case performance even in the presence of non-uniformities introduced by heterogeneous hardware or system perturbations. River achieves this by careful scheduling of disk and network transfers to achieve balanced completion times. MapReduce has a different approach. By restricting the programming model, the MapReduce framework is able to partition the problem into a large number of fine-grained tasks. These tasks are dynamically scheduled on available workers so that faster workers process more tasks. The restricted programming model also allows us to schedule redundant executions of tasks near the end of the job which greatly reduces completion time in the presence of non-uniformities (such as slow or stuck workers).

River은 분산 큐 사이에서 소통하는 프로세스를 가진 프로그래밍 모델을 제공합니다. 맵리듀스 처럼, River 시스템은 이종간 하드웨어나 혼란스러운 시스템에서 나오는 비규격화에서도 좋은 평균 성능을 제공하려고 합니다. River은 디스크와 네트워크 전송에 대해 주의함으로써 이러한 구현을 가능하게 했습니다. 맵리듀스는 다른 접근법을 가지고 있습니다. 제한된 프로그래밍 모델에서 맵리듀스 프레임워크는 문제를 대규모의 작은 테스크로 쪼갤 수 있습니다. 이러한 테스크들은 동적으로 사용가능한 워커에서 스케쥴링되어 더 빠른 워커가 더 많은 테스크를 진행할 수 있게 합니다. 또한 재한된 프로그래밍 모델은 우리에게 테스크의 중복된 실행을 허용함으로써 느리거나 부진한 워커들이 만드는 지연을 효과적으로 줄입니다.

BAD-FS [5] has a very different programming model from MapReduce, and unlike MapReduce, is targeted to
the execution of jobs across a wide-area network. However, there are two fundamental similarities. (1) Both systems use redundant execution to recover from data loss caused by failures. (2) Both use locality-aware scheduling to reduce the amount of data sent across congested network links.

BAD-FS는 맵리듀스 프로그래밍 모델과는 매우 다릅니다. 맵리듀스와 다르게 넒은 규모의 네트워크에서 잡을 실행하는 것을 목표합니다. 하지만 두 개의 기초에서 유사성이 있는데 두 시스템 모두 중복된 실행으로 데이터 손실을 복구하고 지역적 스케쥴링을 사용해서 데이터가 네트워크를 통과하는 것을 줄입니다.

TACC [7] is a system designed to simplify construction of highly-available networked services. Like MapReduce, it relies on re-execution as a mechanism for implementing fault-tolerance.

TACC은 고가용성 네트워크 서비스를 쉽게 구축하도록 만들어진 시스템입니다. 맵리듀스와 비슷하게 내결함성 구현에 있어서 재실행에 의존합니다.

8 Conclusions (결론)

The MapReduce programming model has been successfully used at Google for many different purposes. We attribute this success to several reasons. First, the model is easy to use, even for programmers without experience with parallel and distributed systems, since it hides the details of parallelization, fault-tolerance, locality optimization, and load balancing. Second, a large variety of problems are easily expressible as MapReduce computations. For example, MapReduce is used for the generation of data for Google’s production web search service, for sorting, for data mining, for machine learning, and many other systems. Third, we have developed an implementation of MapReduce that scales to large clusters of machines comprising thousands of machines. The implementation makes efficient use of these machine resources and therefore is suitable for use on many of the large computational problems encountered at Google.

맵리듀스 프로그래밍 모델은 구글에서 다양한 목적으로 성공적으로 사용되었습니다. 우리는 이 성공을 몇 가지 이유에서 찾았습니다. 첫 번쨰로 모델이 사용하기 쉽습니다. 병렬 분산 시스템에 대한 경험이 없는 프로그래머도 사용할 수 있습니다. 우리의 모델은 병렬, 내결함성, 로컬 최적화, 부하 분산에 대한 구체적인 구현을 모두 감췄습니다. 두 번째로 많은 다양한 문제들이 간단하게 맵리듀스 연산으로 표현가능했습니다. 예를 들면 구글의 웹 검색 서비스가 만들어내는 데이터에 대해서 정렬, 데이터 마이닝, 머신 러닝, 그리고 다른 시스템에 사용이 가능했습니다. 세 번째로 우리는 천 개의 기기로 이루어진 대규모의 클러스터 규모에서 맵리듀스 구현을 개발했습니다. 이 구현은 기기 리소스의 효율적인 사용을 가능하게 하고 구글이 직면한 대용량 연산 문제에 대해 적합했습니다.

We have learned several things from this work. First, restricting the programming model makes it easy to par- allelize and distribute computations and to make such computations fault-tolerant. Second, network bandwidth is a scarce resource. A number of optimizations in our system are therefore targeted at reducing the amount of data sent across the network: the locality optimization allows us to read data from local disks, and writing a single copy of the intermediate data to local disk saves network bandwidth. Third, redundant execution can be used to reduce the impact of slow machines, and to handle machine failures and data loss.

우리는 우리의 작업을 통해서 몇 가지 교훈을 배웠다. 첫 번째로 프로그래밍 모델을 제한하는 것은 병렬, 분산 연산을 쉽게 만들고 내결함성을 만들게 한다. 두 번째는 네트워크 대역폭은 귀한 자원이라는 것이다. 우리의 시스템의 많은 최적화는 네트워크 상에 데이터가 돌아다니는 것을 줄이는 것이었다: 로컬리티 최적화는 우리에게 로컬 디스크에서 데이터를 읽게 했고 중간 데이터를 하나의 복사본을 로컬 디스크에 쓰는 것은 네트워크 비용을 절약하게 했다. 세 번째로 중복 연산은 느린 기기가 주는 영향을 약화시키고 기기의 실패나 데이터 손실에 대해 다룰 수 있게 한다는 것이다.

References (참고 자료)


[1] Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau, David E. Culler, Joseph M. Hellerstein, and David A. Patterson. High-performance sorting on networks of workstations. In Proceedings of the 1997 ACM SIGMOD In- ternational Conference on Management of Data, Tucson, Arizona, May 1997.

[2] Remzi H. Arpaci-Dusseau, Eric Anderson, Noah Treuhaft, David E. Culler, Joseph M. Hellerstein, David Patterson, and Kathy Yelick. Cluster I/O with River: Making the fast case common. In Proceedings of the Sixth Workshop on Input/Output in Parallel and Distributed Systems (IOPADS ’99), pages 10–22, Atlanta, Georgia, May 1999.

[3] Arash Baratloo, Mehmet Karaul, Zvi Kedem, and Peter Wyckoff. Charlotte: Metacomputing on the web. In Proceedings of the 9th International Conference on Parallel and Distributed Computing Systems, 1996.

[4] Luiz A. Barroso, Jeffrey Dean, and Urs Ho ̈lzle. Web search for a planet: The Google cluster architecture. IEEE Micro, 23(2):22–28, April 2003.

[5] John Bent, Douglas Thain, Andrea C.Arpaci-Dusseau, Remzi H. Arpaci-Dusseau, and Miron Livny. Explicit control in a batch-aware distributed file system. In Pro- ceedings of the 1st USENIX Symposium on Networked Systems Design and Implementation NSDI, March 2004.

[6] Guy E. Blelloch. Scans as primitive parallel operations. IEEE Transactions on Computers, C-38(11), November 1989.

[7] Armando Fox, Steven D. Gribble, Yatin Chawathe, Eric A. Brewer, and Paul Gauthier. Cluster-based scal- able network services. In Proceedings of the 16th ACM Symposium on Operating System Principles, pages 78– 91, Saint-Malo, France, 1997.

[8] Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung. The Google file system. In 19th Symposium on Operating Systems Principles, pages 29–43, Lake George, New York, 2003.


[9]  S. Gorlatch. Systematic efficient parallelization of scan and other list homomorphisms. In L. Bouge, P. Fraigniaud, A. Mignotte, and Y. Robert, editors, Euro-Par’96. Parallel Processing, Lecture Notes in Computer Science 1124, pages 401–408. Springer-Verlag, 1996.

[10]  Jim Gray. Sort benchmark home page. http://research.microsoft.com/barc/SortBenchmark/.

[11]  William Gropp, Ewing Lusk, and Anthony Skjellum. Using MPI: Portable Parallel Programming with the Message-Passing Interface. MIT Press, Cambridge, MA, 1999.

[12]  L. Huston, R. Sukthankar, R. Wickremesinghe, M. Satya- narayanan, G. R. Ganger, E. Riedel, and A. Ailamaki. Di- amond: A storage architecture for early discard in inter- active search. In Proceedings of the 2004 USENIX File and Storage Technologies FAST Conference, April 2004.

[13]  Richard E. Ladner and Michael J. Fischer. Parallel prefix computation. Journal of the ACM, 27(4):831–838, 1980.

[14]  Michael O. Rabin. Efficient dispersal of information for security, load balancing and fault tolerance. Journal of the ACM, 36(2):335–348, 1989.

[15]  Erik Riedel, Christos Faloutsos, Garth A. Gibson, and David Nagle. Active disks for large-scale data process- ing. IEEE Computer, pages 68–74, June 2001.

[16]  Douglas Thain, Todd Tannenbaum, and Miron Livny. Distributed computing in practice: The Condor experi- ence. Concurrency and Computation: Practice and Ex- perience, 2004.

[17]  L.G.Valiant.Abridgingmodelforparallelcomputation. Communications of the ACM, 33(8):103–111, 1997.

[18]  Jim Wyllie. Spsort: How to sort a terabyte quickly. http://alme1.almaden.ibm.com/cs/spsort.pdf.

Acknowledgements (감사 인사), 별첨 A 생략

느낀 점

사내 시스템에 스파크를 사용하고 있다. 맵리듀스는 스파크의 하위호환 또는 모태가 되는 기술 정도로만 알고 있었다. 맵리듀스를 사용하지는 않더라도 기본 지식은 알면 좋을 것 같아 관련 자료를 찾던 도중 인용 수가 1만회를 넘는 이 논문을 발견했다. 처음에는 동작 방식이 신기해서 금방 읽었던 것 같은데 뒤로 갈수록 쉬운 내용이 아닌지라 한 단원, 한 단원 읽어가면서 어느새 끝을 냈다.

 

논문을 간단하게 한 줄로 요약해 보자면 "맵리듀스는 사용자에게 제한된 모델을 제공함으로써 내결함성을 만족하는 병렬 분산 시스템을 관련 지식이 없더라도 간편하게 이용할 수 있게 한다." 정도로 요약할 수 있을 것 같다.

 

이번 논문은 번역이나 예시 참조에 있어서 ChatGPT4o 의 도움을 많이 빌렸다. 이전 논문과는 다르게 처음 접하는 기술이라 용어를 받아들이는데 있어서 능숙하지 못 한 부분도 있었고, 복잡한 내용을 간단한 문장 한 줄로 표현한 부분이 많아서 ChatGPT4o이 만들어 주는 구체적인 예시가 원할한 이해를 도왔다. 다음에 논문을 정돈하거나 이해할 때도 사용할 것 같다.