KR102195886B1 - Distributed processing system and operating method thereof - Google Patents
Distributed processing system and operating method thereof Download PDFInfo
- Publication number
- KR102195886B1 KR102195886B1 KR1020190074053A KR20190074053A KR102195886B1 KR 102195886 B1 KR102195886 B1 KR 102195886B1 KR 1020190074053 A KR1020190074053 A KR 1020190074053A KR 20190074053 A KR20190074053 A KR 20190074053A KR 102195886 B1 KR102195886 B1 KR 102195886B1
- Authority
- KR
- South Korea
- Prior art keywords
- threads
- tasks
- divisions
- initial
- garbage collection
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Abstract
본 발명은 분산 처리 시스템 및 이의 동작 방법에 관한 것이다. 본 발명의 실시예에 따른 분산 처리 시스템은 마스터 및 적어도 하나의 워커 노드를 포함할 수 있다. 마스터는 복수의 단계(stage)들을 포함하는 작업(job)에서의 사용 함수들 각각에 대한 메모리 부하 가중치에 기초하여 분할 수 및 스레드 수를 생성한다. 마스터는 복수의 단계들 각각의 데이터를 분할 수만큼의 태스크들로 분할하고, 태스크들을 스레드 수만큼 병렬로 출력할 수 있다. 워커 노드는 출력된 태스크들을 실행하고, 태스크들을 실행하는 동안의 가비지 컬렉션 시간을 측정한다. 마스터는 가비지 컬렉션 시간에 기초하여 스레드 수를 조절할 수 있다.The present invention relates to a distributed processing system and a method of operation thereof. The distributed processing system according to an embodiment of the present invention may include a master and at least one worker node. The master generates the number of divisions and the number of threads based on a memory load weight for each of the functions used in a job including a plurality of stages. The master may divide the data of each of the plurality of steps into tasks equal to the number of divisions, and output the tasks in parallel by the number of threads. The worker node executes the printed tasks and measures the garbage collection time while executing the tasks. The master can adjust the number of threads based on the garbage collection time.
Description
본 발명은 컴퓨팅 장치에 관한 것으로써, 좀 더 상세하게는 분산 처리 시스템 및 이의 동작 방법에 관한 것이다.The present invention relates to a computing device, and more particularly, to a distributed processing system and a method of operating the same.
최근, 인-메모리 프로세싱 패러다임이 아파치 스파크(Apache Spark)와 같은 빅데이터 분석 프레임워크에 채택되고 있다. 머신러닝 등 많은 데이터 분석 알고리즘은 중간 계산 값을 재사용하는 반복 알고리즘(iterative algorithm) 패턴을 갖는다. 재사용되는 데이터는 디스크 대신 메모리에 저장될 수 있고, 데이터 분석의 처리량과 응답시간이 개선될 수 있다. 많은 빅데이터 분석 프레임워크들은 데이터 흐름(dataflow)기반의 실행 모델에 기반하는데, 예를 들어 아파치 스파크는 사용자의 프로그램을 비 순환 방향 그래프(Directed acyclic graph; DAG)로 표현하고, DAG 스케줄러가 계산의 결과값을 필요로 하는 함수를 실행할 때까지 연산을 늦추는 방식(lazy execution)으로 전체 프로그램 연산을 최적화할 수 있다.Recently, an in-memory processing paradigm has been adopted in big data analytics frameworks such as Apache Spark. Many data analysis algorithms, such as machine learning, have an iterative algorithm pattern that reuses intermediate computed values. Reusable data can be stored in memory instead of disk, and throughput and response time of data analysis can be improved. Many big data analysis frameworks are based on dataflow-based execution models. For example, Apache Spark represents a user's program as a directed acyclic graph (DAG), and the DAG scheduler The entire program operation can be optimized by lazy execution until the function that requires the result value is executed.
그러나, 이러한 인-메모리 데이터 분석 프레임워크는 시스템의 메모리가 부족한 경우 성능이 크게 저하 될 수 있다. 스파크의 경우 연산 도중 사용 가능한 메모리가 부족한 경우 디스크로의 대량의 데이터 스필 및 가비지 컬렉션이 실행되어 인-메모리 연산의 성능 이점을 얻을 수 없다. 따라서, 메모리 사용에 있어 정밀한 최적화가 필요하다.However, such an in-memory data analysis framework can significantly degrade performance when the system's memory is insufficient. In the case of Spark, if there is not enough available memory during an operation, a large amount of data spill and garbage collection to disk is executed, and the performance benefits of in-memory operations cannot be obtained. Therefore, precise optimization is required for memory usage.
본 발명은 상술된 기술적 과제를 해결하기 위한 것으로써, 본 발명의 목적은 태스크를 실행하는 동안의 워커 노드들의 성능 저하 또는 워커 노드의 메모리 사용의 효율성을 개선하도록, 태스크를 스케줄링하는 분산 처리 시스템 및 이의 동작 방법을 제공하는 데 있다.The present invention is to solve the above-described technical problem, and an object of the present invention is a distributed processing system for scheduling a task so as to improve the efficiency of memory use of worker nodes or performance degradation of worker nodes during task execution, and It is to provide a method of operation.
본 발명의 실시 예에 따른 분산 처리 시스템은 마스터 및 적어도 하나의 워커 노드를 포함한다. 복수의 단계(stage)들을 포함하는 작업(job)에서의 사용 함수들 각각에 대한 메모리 부하 가중치에 기초하여 분할 수 및 스레드 수를 생성하고, 복수의 단계들 각각의 데이터를 분할 수만큼의 태스크들로 분할하고, 태스크들을 상기 스레드 수만큼 병렬로 출력한다. 적어도 하나의 워커 노드는 출력된 태스크들을 실행하고, 태스크들을 실행하는 동안의 가비지 컬렉션 시간을 측정한다. 마스터는 가비지 컬렉션 시간에 기초하여 스레드 수를 조절한다.A distributed processing system according to an embodiment of the present invention includes a master and at least one worker node. The number of divisions and the number of threads are generated based on the memory load weight for each of the functions used in a job including a plurality of stages, and the data of each of the plurality of stages are divided into tasks And outputs tasks in parallel by the number of threads. At least one worker node executes the output tasks and measures the garbage collection time while executing the tasks. The master adjusts the number of threads based on the garbage collection time.
마스터는 메모리 부하 가중치에 기초하여 복수의 단계들에서 사용 함수들에 의하여 변경되는 데이터의 최대 크기를 계산하고, 최대 크기에 기초하여 분할 수 및 스레드 수를 예측하는 분석 모듈을 포함할 수 있다. The master may include an analysis module that calculates the maximum size of data changed by the use functions in a plurality of steps based on the memory load weight, and predicts the number of divisions and the number of threads based on the maximum size.
일례로, 분석 모듈은 데이터의 최대 크기 및 적어도 하나의 워커 노드의 사용 가능한 메모리 크기에 기초하여 초기 분할 수 및 초기 스레드 수를 계산하고, 초기 분할 수 및 초기 스레드 수 중 적어도 하나를 변경하여 분할 수 및 스레드 수를 결정하는 파라미터 생성기를 포함할 수 있다. 초기 스레드 수는 적어도 하나의 워커 노드에 포함된 코어의 개수에 의존할 수 있다. 초기 분할 수는 초기 스레드 수 및 데이터의 최대 크기의 곱에 사용 가능한 메모리 크기를 나눈 값에 의존할 수 있다. For example, the analysis module calculates the initial number of divisions and the number of threads based on the maximum size of data and the available memory size of at least one worker node, and changes the number of divisions by changing at least one of the initial number of divisions and the number of initial threads. And a parameter generator for determining the number of threads. The initial number of threads may depend on the number of cores included in at least one worker node. The initial number of partitions may depend on the product of the number of initial threads and the maximum size of data divided by the size of available memory.
일례로, 파라미터 생성기는 초기 분할 수 및 초기 스레드 수에 대응되는 태스크들의 예측 실행 시간을 계산하고, 초기 분할 수 및 초기 스레드 수 중 적어도 하나를 변경할 때의 예측 실행 시간의 감소율에 기초하여 분할 수 및 스레드 수를 결정할 수 있다. 파라미터 생성기는 예측 실행 시간의 감소율이 기준 비율보다 작을 때까지 초기 분할 수 및 초기 스레드 수 중 적어도 하나를 변경하여, 분할 수 및 상기 스레드 수를 결정할 수 있다.As an example, the parameter generator calculates the predicted execution time of tasks corresponding to the initial number of divisions and the number of initial threads, and the number of divisions based on the reduction rate of the predicted execution time when at least one of the initial number of divisions and the number of initial threads is changed, and You can decide the number of threads. The parameter generator may determine the number of divisions and the number of threads by changing at least one of the number of initial divisions and the number of initial threads until the reduction rate of the prediction execution time is less than the reference ratio.
일례로, 마스터는 태스크들 중 상기 스레드 수만큼의 태스크들을 적어도 하나의 워커 노드로 출력하고, 출력된 태스크들을 실행하는 동안의 가비지 컬렉션 시간들에 기초하여 스레드 수를 조절하는 태스크 스케줄러를 포함할 수 있다. As an example, the master may include a task scheduler that outputs tasks as many as the number of threads among tasks to at least one worker node and adjusts the number of threads based on garbage collection times while executing the output tasks. have.
일례로, 태스크 스케줄러는 출력된 태스크들 각각의 실행 시간들에 대한 가비지 컬렉션 시간들의 비율이 기준 비율보다 큰 경우, 스레드 수를 감소시킬 수 있다. 태스크 스케줄러는 출력된 상기 태스크들 각각의 실행 시간들에 대한 가비지 컬렉션 시간들의 비율이 기준 비율보다 작은 경우, 스레드 수를 증가시킬 수 있다. 태스크 스케줄러는 가비지 컬렉션 시간들에 대한 출력된 태스크들 이전에 측정된 가비지 컬렉션 시간들의 비율이 기준 비율보다 큰 경우, 스레드 수를 감소시킬 수 있다.For example, the task scheduler may reduce the number of threads when a ratio of garbage collection times to execution times of each of the output tasks is greater than a reference ratio. The task scheduler may increase the number of threads when a ratio of garbage collection times to execution times of each of the output tasks is smaller than a reference ratio. The task scheduler may reduce the number of threads when a ratio of garbage collection times measured before output tasks to garbage collection times is greater than a reference ratio.
일례로, 적어도 하나의 워커 노드는, 마스터로부터 수신된 태스크들을 실행하는 실행기, 및 가비지 컬렉션 시간 및 태스크들 각각의 실행 시간을 측정하는 타이머를 포함할 수 있다. 적어도 하나의 워커 노드는 가비지 컬렉션 시간 및 태스크들 각각의 실행 시간을 마스터로 송신하고, 마스터는 가비지 컬렉션 시간 및 실행 시간을 비교하여, 스레드 수를 조절할 수 있다.For example, at least one worker node may include an executor that executes tasks received from a master, and a timer that measures garbage collection time and execution time of each of the tasks. The at least one worker node transmits the garbage collection time and the execution time of each of the tasks to the master, and the master may adjust the number of threads by comparing the garbage collection time and the execution time.
본 발명의 실시 예에 따른 분산 처리 시스템의 동작 방법은, 작업(job)에 대응되는 데이터의 분할 수 및 스레드 수를 생성하는 단계, 분할 수 에 기초하여 데이터를 복수의 태스크들로 분할하는 단계, 복수의 태스크들 중 스레드 수만큼의 태스크들을 워커 노드로 출력하는 단계, 워커 노드가 태스크들을 실행하는 동안의 가비지 컬렉션 시간 및 실행 시간을 측정하는 단계, 및 가비지 컬렉션 시간 및 실행 시간에 기초하여 스레드 수를 조절하는 단계를 포함한다.A method of operating a distributed processing system according to an embodiment of the present invention includes generating a number of divisions and a number of threads of data corresponding to a job, dividing data into a plurality of tasks based on the number of divisions, Outputting as many tasks as the number of threads among a plurality of tasks to a worker node, measuring the garbage collection time and execution time while the worker node is executing the tasks, and the number of threads based on the garbage collection time and execution time It includes the step of adjusting.
분산 처리 시스템의 동작 방법은 작업의 사용 함수에 기초하여, 상기 작업을 복수의 단계들(stage)로 분할하는 단계를 더 포함할 수 있다. 분할 수는 복수의 단계들 각각에 대응되는 값들을 포함하고, 스레드 수는 복수의 단계들 각각에 대응되는 값들을 포함한다.The method of operating the distributed processing system may further include dividing the job into a plurality of stages based on a function of using the job. The number of divisions includes values corresponding to each of the plurality of steps, and the number of threads includes values corresponding to each of the plurality of steps.
일례로, 분할 수 및 스레드 수를 생성하는 단계는, 작업의 사용 함수들 각각의 메모리 부하 가중치를 검색하는 단계, 메모리 부하 가중치에 기초하여 사용 함수들에 의하여 변경되는 데이터의 최대 크기를 계산하는 단계, 최대 크기 및 워커 노드의 사용 가능한 메모리 크기에 기초하여 초기 분할 수 및 초기 스레드 수를 계산하는 단계, 및 초기 분할 수 및 초기 스레드 수에 대응되는 태스크들의 예측 실행 시간에 기초하여, 초기 분할 수 및 초기 스레드 수를 조절하는 단계를 포함할 수 있다.As an example, generating the number of divisions and the number of threads may include searching for a memory load weight of each of the working functions, calculating a maximum size of data changed by the use functions based on the memory load weight. , Calculating an initial number of partitions and an initial number of threads based on the maximum size and the available memory size of the worker node, and based on the estimated execution time of tasks corresponding to the initial number of partitions and the number of initial threads, the number of initial partitions, and It may include adjusting the initial number of threads.
일례로, 초기 분할 수 및 초기 스레드 수를 조절하는 단계는, 초기 분할 수 및 초기 스레드 수 중 적어도 하나를 변경할 때의 예측 실행 시간의 감소율을 계산하는 단계, 및 감소율이 기준 비율보다 작을 때까지 초기 분할 수 및 초기 스레드 수 중 적어도 하나를 변경하는 단계를 포함할 수 있다.As an example, adjusting the initial number of partitions and the number of initial threads may include calculating a reduction rate of the predicted execution time when at least one of the initial number of partitions and the number of initial threads is changed, and initial until the reduction rate is less than the reference ratio. It may include changing at least one of the number of divisions and the number of initial threads.
일례로, 스레드 수를 조절하는 단계는, 실행 시간에 대한 가비지 컬렉션 시간의 비율이 기준 비율보다 큰 경우, 스레드 수를 감소시키는 단계를 포함할 수 있다. 스레드 수를 조절하는 단계는 실행 시간에 대한 가비지 컬렉션 시간의 비율이 기준 비율보다 작은 경우, 스레드 수를 증가시키는 단계를 포함할 수 있다. 스레드 수를 조절하는 단계는, 워커 노드가 작업을 실행하는 동안 수행될 수 있다.For example, adjusting the number of threads may include reducing the number of threads when the ratio of the garbage collection time to the execution time is greater than the reference ratio. Adjusting the number of threads may include increasing the number of threads when the ratio of the garbage collection time to the execution time is less than the reference ratio. The step of adjusting the number of threads may be performed while a worker node is executing a task.
본 발명의 실시 예에 따르면, 사용 함수별 메모리 부하 가중치를 관리함으로써, 작업의 스케줄링의 신속성 및 정확성이 개선될 수 있다.According to an embodiment of the present invention, by managing the memory load weight for each used function, the speed and accuracy of task scheduling can be improved.
본 발명의 실시 예에 따르면, 가비지 컬렉션을 고려하여, 스레드 수를 조절함으로써, 태스크를 실행하는 동안의 워커 노드들의 성능 저하 및 워커 노드의 메모리 사용의 효율성이 개선될 수 있다.According to an embodiment of the present invention, by adjusting the number of threads in consideration of garbage collection, the performance of worker nodes during task execution and the efficiency of memory use of the worker nodes can be improved.
도 1은 본 발명의 실시예에 따른 분산 처리 시스템의 블록도이다.
도 2는 도 1의 분산 처리 시스템의 동작을 구체적으로 설명하기 위한 도면이다.
도 3 내지 도 6은 분할 수 및 스레드 수에 따른 워커 노드의 동작을 설명하기 위한 도면이다.
도 7은 도 1의 분석 모듈을 구체화한 예시적인 블록도이다.
도 8은 도 7의 분석 모듈이 MAF를 검색하는 동작을 설명하기 위한 그래프이다.
도 9는 도 7의 분석 모듈이 스레드 수 및 분할 수를 결정하는 동작을 설명하기 위한 그래프이다.
도 10은 도 1의 분산 처리 시스템이 태스크들을 스케줄링하는 동작을 설명하기 위한 그래프이다.
도 11은 도 1의 분산 처리 시스템의 동작 방법의 예시적인 순서도이다.
도 12는 도 11의 S110 단계를 구체화한 순서도이다.
도 13은 도 11의 S150 단계를 구체화한 순서도이다.1 is a block diagram of a distributed processing system according to an embodiment of the present invention.
FIG. 2 is a diagram specifically illustrating an operation of the distributed processing system of FIG. 1.
3 to 6 are diagrams for explaining an operation of a worker node according to the number of divisions and the number of threads.
7 is an exemplary block diagram embodied in the analysis module of FIG. 1.
FIG. 8 is a graph for explaining an operation of the analysis module of FIG. 7 searching for a MAF.
9 is a graph for explaining an operation of determining the number of threads and the number of divisions by the analysis module of FIG. 7.
FIG. 10 is a graph illustrating an operation of scheduling tasks by the distributed processing system of FIG. 1.
11 is an exemplary flow chart of a method of operating the distributed processing system of FIG. 1.
12 is a flow chart illustrating step S110 of FIG. 11.
13 is a flowchart illustrating step S150 of FIG. 11.
아래에서는, 본 발명의 기술 분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있을 정도로, 본 발명의 실시 예들이 명확하고 상세하게 기재된다.In the following, embodiments of the present invention are described clearly and in detail to the extent that a person having ordinary knowledge in the technical field of the present invention can easily implement the present invention.
도 1은 본 발명의 실시예에 따른 분산 처리 시스템의 블록도이다. 도 1을 참조하면, 분산 처리 시스템(1000)은 마스터(1100) 및 복수의 워커 노드들(1200~1400)을 포함할 수 있다. 분산 처리 시스템(1000)은 인-메모리 프로세싱을 이용하여 빅데이터를 분석하기 위하여, 중간 계산 값을 재사용하는 반복 알고리즘(iterative algorithm)을 사용할 수 있다. 예시적으로, 분산 처리 시스템(1000)이 아파치 스파크(Apache Spark) 환경에서 수행되는 것으로 설명된다.1 is a block diagram of a distributed processing system according to an embodiment of the present invention. Referring to FIG. 1, the
마스터(1100)는 복수의 워커 노드들(1200~1400)이 작업(job)을 실행하도록, 작업을 스케줄링할 수 있다. 마스터(1100)는 작업(job)에 대응되는 데이터를 태스크들로 분할하고, 복수의 워커 노드들(1200~1400)에 태스크들을 할당할 수 있다. 이를 위하여, 마스터(1100)는 분석 모듈(1110), 비 순환 방향 그래프(Directed acyclic graph) 스케줄러 (이하, DAG 스케줄러(1120)), 및 태스크 스케줄러(1130)를 포함할 수 있다.The
분석 모듈(1110)은 작업을 실행하기 전에, 작업에 대응되는 데이터를 분할하는 개수 (이하, 분할 수) 및 분할된 데이터를 병렬로 출력하는 개수 (이하, 스레드 수)를 계산할 수 있다. 아파치 스파크 환경에서, 작업에 포함된 동작들에서 빅데이터를 저장하기 위한 분산 자료구조인 RDD(Resilient Distributed Dataset)가 사용될 수 있다. RDD는 프로그래머가 작업에서의 중간 데이터를 복수의 워커 노드들(1200~1400) 각각에 포함된 실행기 메모리(미도시)에 캐시할 수 있도록 하는 아파치 스파크의 기본 데이터 구조이다. 분석 모듈(1110)은 단일 RDD를 태스크들로 분할하는 개수인 분할 수, 및 분할된 태스크들을 복수의 워커 노드들(1200~1400)에 병렬로 출력하는 개수인 스레드 수를 미리 계산할 수 있다.Before executing the job, the
분석 모듈(1110)은 작업에 포함된 단계(stage)에서 사용되는 함수들 각각의 메모리 부하 가중치(Memory amplification factor; MAF)에 기초하여 분할 수 및 스레드 수를 예측할 수 있다. MAF는 사용 함수에 입력되는 데이터의 크기에 대한 출력 데이터의 크기의 비율로 정의될 수 있다. 하나의 작업은 적어도 하나의 단계(stage)를 포함할 수 있다. 작업은 셔플(shuffle)을 기준으로 복수의 단계들로 분할될 수 있다. 여기에서, 셔플은 워커 노드들(1200~1400) 사이에서 중간 데이터를 교환 또는 공유하는 동작을 의미할 수 있다. 사용 함수에 입력되는 RDD의 크기는 사용 함수로부터 출력되는 RDD의 크기와 다를 수 있다. 분석 모듈(1110)은 사용 함수의 MAF를 고려하여, 분할 수 및 스레드 수를 계산할 수 있다. 이러한 계산에 대한 구체적인 내용은 후술된다.The
DAG 스케줄러(1120)는 작업을 복수의 단계들로 분할하고, 분할 수에 기초하여 단계들 각각의 RDD를 복수의 태스크들로 분할한다. 작업은 비 순환 방향 그래프(Directed acyclic graph; DAG)로 표현될 수 있다. 즉, 작업에 포함된 단계들은 하나의 방향성을 갖고, 순환되지 않을 수 있다. DAG 스케줄러(1120)는 셔플을 유발하는 사용 함수를 기준으로, 작업을 복수의 단계들로 분할할 수 있다. DAG 스케줄러(1120)는 분할 수만큼 단계들 각각의 RDD를 태스크들로 분할할 수 있다.The
태스크 스케줄러(1130)는 분할된 복수의 태스크들을 복수의 워커 노드들(1200~1400)로 출력할 수 있다. 태스크 스케줄러(1130)는 스레드 수에 기초하여 병렬로 태스크들(TG1~TGn)을 출력할 수 있다. 병렬로 출력되는 태스크들(TG1~TGn)의 개수는 스레드 수와 같을 수 있다. 스레드 수가 많을수록, 병렬로 출력되는 태스크들(TG1~TGn)의 개수가 증가한다. 스레드 수가 너무 많은 경우, 복수의 워커 노드들(1200~1400)의 메모리 공간이 부족하여 성능이 저하될 수 있다. 또한, 스레드 수가 너무 적은 경우, 복수의 워커 노드들(1200~1400)의 메모리 공간이 충분히 활용되지 않아 최적의 성능을 갖지 못할 수 있다.The
태스크 스케줄러(1130)는 복수의 워커 노드들(1200~1400)로부터 가비지 컬렉션 시간들(Gt1~Gtn) 및 실행 시간들(Et1~Etn)을 수신할 수 있다. 가비지 컬렉션은 복수의 워커 노드들(1200~1400)의 메모리 공간이 태스크들(TG1~TGn)을 로드하기에 부족한 경우, 사용되지 않는 데이터가 점유하는 메모리 공간을 회수하는 동작을 의미한다. 가비지 컬렉션 시간들(Gt1~Gtn)은 태스크들(TG1~TGn)을 처리하는 실행 시간들(Et1~Etn) 동안 가비지 컬렉션을 수행하는 시간으로 이해될 것이다. The
태스크 스케줄러(1130)는 가비지 컬렉션 시간들(Gt1~Gtn) 및 실행 시간들(Et1~Etn)에 기초하여, 스레드 수를 조절할 수 있다. 예를 들어, 실행 시간들(Et1~Etn)에 대한 가비지 컬렉션 시간들(Gt1~Gtn)의 비율이 기준 비율보다 큰 경우, 복수의 워커 노드들(1200~1400) 중 적어도 하나는 태스크들(TG1~TGn)을 저장하기에 메모리 공간이 부족한 것일 수 있다. 이 경우, 태스크 스케줄러(1130)는 스레드 수를 감소시켜, 병렬로 출력되는 태스크들(TG1~TGn)의 크기를 감소시킬 수 있다. 또한, 실행 시간들(Et1~Etn)에 대한 가비지 컬렉션 시간들(Gt1~Gtn)의 비율이 기준 비율보다 작은 경우, 복수의 워커 노드들(1200~1400)이 태스크들(TG1~TGn)을 저장하기에 메모리 공간이 여유있는 것일 수 있다. 이 경우, 태스크 스케줄러(1130)는 스레드 수를 증가시킬 수 있다. 따라서, 복수의 워커 노드들(1200~1400)의 태스크 처리 능력에 맞는 태스크 스케줄링이 수행될 수 있다. 여기에서, 기준 비율은 태스크들을 저장 및 실행하기에 충분한 메모리 공간이 확보된 것으로 판단되는 상한을 의미할 수 있다.The
복수의 워커 노드들(1200~1400)은 복수의 실행기들(1210~1410) 및 복수의 타이머들(1220~1420)을 포함할 수 있다. 복수의 실행기들(1210~1410)은 마스터(1100)로부터 출력된 태스크들(TG1~TGn)을 실행 및 처리할 수 있다. 도시되지 않았으나, 복수의 실행기들(1210~1410)은 태스크들(TG1~TGn)을 저장하기 위한 실행기 메모리(미도시)를 포함할 수 있다. 복수의 실행기들(1210~1410)에 의하여 실행 및 처리된 결과는 마스터(1100)에 제공될 수 있다.The plurality of
복수의 타이머들(1220~1420)은 태스크들(TG1~TGn)을 실행하는 동안, 실행 시간들(Et1~Etn) 및 가비지 컬렉션 시간들(Gt1~Gtn)을 측정할 수 있다. 복수의 타이머들(1220~1420) 각각은 복수의 워커 노드들(1200~1400) 중 대응되는 워커 노드에 대한 실행 시간 및 가비지 컬렉션 시간을 측정할 수 있다. 측정된 실행 시간들(Et1~Etn) 및 가비지 컬렉션 시간들(Gt1~Gtn)은 마스터(1100)로 제공되어, 스레드 수를 조절하는데 사용될 수 있다.The plurality of
마스터(1100) 및 복수의 워커 노드들(1200~1400) 각각은 임베디드 컴퓨터, 데스크탑 및 서버 등을 포함할 수 있으나, 이에 제한되지 않는다. 마스터(1100) 및 복수의 워커 노드들(1200~1400) 각각은 CPU를 포함하는 다양한 종류의 전자 장치로 구현될 수 있다. 마스터(1100) 및 복수의 워커 노드들(1200~1400) 각각은 명령어를 수신하고 수신된 명령어에 기초하여 동작할 수 있다. Each of the
마스터(1100) 및 복수의 워커 노드들(1200~1400) 각각에 포함된 구성들은 소프트웨어, 또는 하드웨어, 또는 이의 조합의 형태로 구현될 수 있다. 예시적으로, 소프트웨어는 기계 코드, 펌웨어, 임베디드 코드, 및 애플리케이션 소프트웨어일 수 있다. 예를 들어, 하드웨어는 전기 회로, 전자 회로, 프로세서, 컴퓨터, 집적 회로, 집적 회로 코어들, 또는 이의 조합을 포함할 수 있다.Components included in each of the
마스터(1100) 및 복수의 워커 노드들(1200~1400)은 네트워크를 통하여 태스크들(TG1~TGn), 실행 시간들(Et1~Etn), 및 가비지 컬렉션 시간들(Gt1~Gtn)을 송신 및 수신할 수 있다. 마스터(1100) 및 복수의 워커 노드들(1200~1400)은 유선 또는 무선으로 데이터를 주고 받을 수 있다.The
도 2는 도 1의 분산 처리 시스템의 동작을 구체적으로 설명하기 위한 도면이다. 도 2를 참조하면, 분산 처리 시스템(1000)은 분석 모듈(1110), DAG 스케줄러(1120), 태스크 스케줄러(1130), 및 제1 및 제2 워커 노드들(1200, 1300)을 포함하며, 각각 도 1의 분석 모듈(1110), DAG 스케줄러(1120), 태스크 스케줄러(1130), 및 제1 및 제2 워커 노드들(1200, 1300)에 대응된다.FIG. 2 is a diagram specifically illustrating an operation of the distributed processing system of FIG. 1. 2, the distributed
사용자 프로그램(user program)이 도 1의 마스터(1100)에 제공됨에 따라, 새로운 작업이 생성될 수 있다. 작업이 생성되는 경우, DAG 스케줄러(1120)에 의하여 RDD 의존성 그래프가 생성될 수 있다. RDD 의존성 그래프는 입력 RDD(RDD0)가 사용 함수들(f1, f2)에 의하여 출력 RDD들(RDD1, RDD2)로 변형되는 과정을 나타낼 수 있다. 일례로, 입력 RDD(RDD0)는 제1 함수(f1)에 의하여 제1 출력 RDD(RDD1)로 변형되고, 제1 출력 RDD(RDD1)는 제2 함수(f2)에 의하여 제2 출력 RDD(RDD2)로 변형될 수 있다. 이러한 RDD 의존성 그래프는 도 1의 마스터(1100)의 메모리(미도시)에 저장되고 분석 모듈(1110)에 의하여 관리될 수 있다.As a user program is provided to the
DAG 스케줄러(1120)는 작업을 복수의 단계들로 분할할 수 있다. DAG 스케줄러(1120)는 셔플을 경계로 작업을 복수의 단계들로 분할할 수 있다. 예를 들어, 제1 함수(f1)가 map() 함수이고, 제2 함수(f2)가 sortByKey() 함수인 경우, 제1 함수(f1)는 셔플과 무관하고, 제2 함수(f2)는 셔플과 관련된 함수일 수 있다. 이 경우, 제2 함수(f2)를 기준으로, 작업은 제1 단계 및 제2 단계로 구분될 수 있다.The
분석 모듈(1110)은 작업에 대응되는 RDD 의존성 그래프로부터 단계들 각각의 분할 수 및 스레드 수를 예측할 수 있다. 분석 모듈(1110)은 RDD 의존성 그래프에서의 사용 함수들(f1, f2) 각각의 MAF를 검색할 수 있다. 이러한 MAF는 분석 모듈(1110)에 의하여 관리될 수 있다. 일례로, MAF는 선형 회귀 분석을 통하여 미리 마스터(1100)의 메모리(미도시)에 저장될 수 있다. 분석 모듈(1110)은 제1 및 제2 워커 노드들(1200, 1300)의 사용 가능한 메모리의 크기에 기초하여 RDD를 몇 개의 태스크들로 분할하고, 몇 개의 태스크들을 병렬로 출력해야 하는지 결정할 수 있다. 이에 대한 구체적인 내용은 도 7 이하에서 후술된다.The
DAG 스케줄러(1120)는 분석 모듈(1110)로부터 예측된 분할 수에 기초하여 단계들 각각의 RDD들(RDD0~RDD2)를 복수의 태스크들(T00~T03, T10~T13, T20~T23)로 분할한다. 도 2는 예시적으로, 분할 수가 4인 것으로 가정한다. The
태스크 스케줄러(1130)는 분석 모듈(1110)로부터 예측된 스레드 수에 기초하여 태스크들(TG1, TG2)을 병렬로 제1 및 제2 워커 노드들(1200, 1300)에 출력할 수 있다. 도 2는 예시적으로, 스레드 수가 2인 것으로 가정한다. 제1 워커 노드(1200)는 2개의 태스크들(T00, T01)을 수신하고, 제2 워커 노드(1300)는 2개의 태스크들(T02, T03)를 수신할 수 있다. The
제1 및 제2 워커 노드들(1200, 1300)은 제1 및 제2 실행기들(1210, 1310)을 포함할 수 있다. 예시적으로, 제1 및 제2 실행기들(1210) 각각은 2개의 코어들을 갖는 CPU를 포함하는 것으로 가정한다. 이 경우, 코어들 각각에 하나의 태스크가 할당될 수 있고, 코어들 각각은 분할된 태스크를 실행할 수 있다. 제1 및 제2 워커 노드들(1200, 1300)은 태스크를 실행하는 동안, 실행 시간 및 가비지 컬렉션 시간을 측정할 수 있고, 태스크 스캐줄러(1130)는 실행 시간 및 가비지 컬렉션 시간에 기초하여 스레드 수를 조절할 수 있다.The first and
도 3 내지 도 6은 분할 수 및 스레드 수에 따른 워커 노드의 동작을 설명하기 위한 도면이다. 도 3 내지 도 6은 분할 수 및 스레드 수가 워커 노드(1200)에 최적화되지 않은 경우의 동작을 설명하는 도면이다. 여기에서, 워커 노드(1200)는 도 1의 복수의 워커 노드들(1200~1400)을 모두 포함할 수 있으나, 예시적으로 하나의 워커 노드(1200)를 도시한 것으로 이해될 것이다.3 to 6 are diagrams for explaining an operation of a worker node according to the number of divisions and the number of threads. 3 to 6 are diagrams illustrating operations when the number of divisions and the number of threads are not optimized for the
도 3 내지 도 6을 참조하면, 작업은 셔플을 기준으로 제1 단계 및 제2 단계로 구분될 수 있다. 워커 노드(1200)는 실행기 메모리(1215) 및 로컬 디스크(1230)를 포함할 수 있다. 실행기 메모리(1215)는 도 1의 실행기들(1210~1410) 각각에 포함되며, 워커 노드(1200)의 주 메모리로 이해될 것이다. 로컬 디스크(1230)는 워커 노드(1200)의 보조 메모리로 이해될 것이다.3 to 6, the operation may be divided into a first step and a second step based on the shuffle. The
본 발명의 인-메모리 프로세싱을 이용하여 빅데이터를 분석하기 위한 분산 처리 시스템(도 1, 1000)은 중간 계산 값을 재사용하는 반복 알고리즘(iterative algorithm)을 사용할 수 있다. 재사용되는 데이터는 로컬 디스크(1230) 대신에 실행기 메모리(1215)에 저장되고, 도 2의 CPU 코어에 의하여 실행될 수 있다. 따라서, 데이터 분석의 처리량과 응답 시간이 개선될 수 있다. The distributed processing system (FIGS. 1, 1000) for analyzing big data using the in-memory processing of the present invention may use an iterative algorithm that reuses intermediate calculation values. The reused data is stored in the
도 3은 분할 수(NP)가 작아서, 실행기 메모리(1215)의 사용 가능한 크기에 비하여 태스크들의 크기가 큰 경우의 동작을 설명하기 위한 도면이다. 도 3을 참조하면, 예시적으로 분할 수(NP)는 2이고, 스레드 수(NT)는 2인 것으로 가정한다. 하나의 RDD는 2개의 태스크들(T20, T21)로 분할되고, 2개의 태스크들(T20, T21)은 병렬로 워커 노드(1200)에 출력될 수 있다. 2개의 태스크들(T20, T21) 전체의 크기는 실행기 메모리(1215)의 사용 가능한 크기보다 클 수 있다. 이 경우, 데이터 스필(data spill) 및 가비지 컬렉션이 발생할 수 있다. 3 is a diagram for explaining an operation when the number of divisions (NP) is small and the size of tasks is larger than the usable size of the
데이터 스필은 실행기 메모리(1215)의 사용 가능한 공간이 부족하여 데이터의 일부를 직렬화(serialize)하여 로컬 디스크(1230)에 저장하는 동작을 의미한다. 로컬 디스크(1230)에 저장된 데이터가 다시 필요한 경우, 데이터가 역직렬화(de-serialize)되어 실행기 메모리(1215)에 로드될 수 있다. 가비지 컬렉션은 상술한 바와 같이, 실행기 메모리(1215)의 사용 가능한 공간이 부족하여 사용되지 않는 데이터가 점유하는 메모리 공간을 회수하는 동작을 의미한다. 데이터 스필이 발생하는 동안, 가비지 컬렉션이 함께 발생한다.The data spill refers to an operation of serializing a part of data and storing it in the
태스크들(T20, T21)의 크기가 실행기 메모리(1215)의 사용 가능한 공간보다 크므로, 태스크들(T20, T21)에 포함된 데이터의 일부가 실행기 메모리(1215)에서 로컬 디스크(1230)로 옮겨질 수 있다. 그리고, 태스크들(T20, T21)에 포함된 나머지 데이터가 실행기 메모리(1215)에 저장될 수 있다. 이에 따라, 태스크들(T20, T21)을 실행하기 위하여 데이터 스필 및 가비지 컬렉션이 발생되고, 인-메모리 프로세싱에 따른 성능 개선의 효과가 감소한다. Since the sizes of the tasks T20 and T21 are larger than the usable space of the
데이터 스필이 워커 노드(1200)의 성능을 저하시키나, 데이터 스필 동안 발생하는 가비지 컬렉션이 데이터 스필보다 더 큰 성능 저하를 발생시킨다. 따라서, 워커 노드(1200)는 태스크들을 실행하는 동안의 가비지 컬렉션 시간을 측정하여 도 1의 마스터(1100)에 피드백함으로써, 최적화된 태스크 스케줄링이 수행될 수 있다.The data spill degrades the performance of the
도 4는 분할 수(NP)가 커서, 셔플 동작이 과도하게 발생하는 경우의 동작을 설명하기 위한 도면이다. 도 4를 참조하면, 예시적으로 분할 수(NP)는 도 3의 분할 수(NP)보다 많은 a이고, 스레드 수(NT)는 2인 것으로 가정한다. 하나의 RDD는 a개의 태스크들(T20~T2a)로 분할되고, 2개의 태스크들(T20, T21)은 병렬로 워커 노드(1200)에 출력될 수 있다. 하나의 태스크의 크기는 도 3의 태스크의 크기보다 작을 수 있다. 2개의 태스크들(T20, T21)의 크기는 실행기 메모리(1215)의 사용 가능한 크기보다 작을 수 있다. 이 경우, 태스크들(T20, T21)이 실행되는 동안 데이터 스필 및 가비지 컬렉션이 발생하지 않을 수 있다.4 is a diagram for explaining an operation when the number of divisions NP is large and the shuffle operation occurs excessively. Referring to FIG. 4, as an example, it is assumed that the number of divisions (NP) is a larger than the number of divisions (NP) of FIG. 3 and the number of threads NT is 2. One RDD may be divided into a number of tasks T20 to T2a, and two tasks T20 and T21 may be output to the
다만, 분할 수(NP)가 클수록, 셔플 동작에 많은 부하가 발생된다. 이로 인하여, 도 1의 마스터(1100)의 스케줄링에 오버헤드가 증가할 수 있다. 즉, 분할 수(NP)가 너무 적어도 성능이 감소하고, 너무 많아도 성능이 감소하므로, 적정한 분할 수(NP)가 요구된다. However, the larger the number of divisions NP, the more load is generated in the shuffle operation. Due to this, overhead may increase in scheduling of the
도 5는 스레드 수(NT)가 작아서, 실행기 메모리(1215)의 사용 가능한 크기에 비하여 실행하는 데이터 양이 작은 경우의 동작을 설명하기 위한 도면이다. 도 5를 참조하면, 예시적으로 분할 수(NP)는 4이고, 스레드 수(NT)는 1인 것으로 가정한다. 하나의 RDD는 4개의 태스크들(T20~T23)로 분할되고, 하나의 태스크(T20)가 워커 노드(1200)에 출력될 수 있다. 하나의 태스크(T20)의 크기는 실행기 메모리(1215)의 사용 가능한 크기보다 작을 수 있다. 이 경우, 태스크들(T20, T21)이 실행되는 동안 데이터 스필 및 가비지 컬렉션이 발생하지 않을 수 있다.5 is a view for explaining an operation when the number of threads NT is small and the amount of data to be executed is small compared to the usable size of the
다만, 워커 노드(1200)는 복수의 태스크들을 병렬로 처리할 수 있음에도, 하나의 태스크(T20)만을 처리하므로, 효율적인 태스크 처리를 수행하지 못할 수 있고, 전체의 태스크들을 처리하는데 소모되는 시간이 증가할 수 있다. 즉, 워커 노드(1200)의 성능이 제대로 활용되지 못할 수 있다.However, although the
도 6은 스레드 수(NT)가 커서, 실행기 메모리(1215)의 사용 가능한 크기에 비하여 태스크들의 크기가 큰 경우의 동작을 설명하기 위한 도면이다. 도 6을 참조하면, 예시적으로 분할 수(NP)는 4이고, 스레드 수(NT)는 4인 것으로 가정한다. 하나의 RDD는 4개의 태스크들(T20~T23)로 분할되고, 4개의 태스크들(T20~T23)은 병렬로 워커 노드(1200)에 출력될 수 있다. 4개의 태스크들(T20~T23) 전체의 크기는 실행기 메모리(1215)의 사용 가능한 크기보다 클 수 있다. 이 경우, 데이터 스필(data spill) 및 가비지 컬렉션이 발생할 수 있다.FIG. 6 is a diagram for describing an operation when the number of threads NT is large and the size of tasks is larger than the usable size of the
태스크들(T20~T23)의 크기가 실행기 메모리(1215)의 사용 가능한 공간보다 크므로, 태스크들(T20~T23)에 포함된 데이터의 일부가 실행기 메모리(1215)에서 로컬 디스크(1230)로 옮겨질 수 있다. 그리고, 태스크들(T20~T23)에 포함된 나머지 데이터가 실행기 메모리(1215)에 저장될 수 있다. 이에 따라, 태스크들(T20~T23)을 실행하기 위하여 데이터 스필 및 가비지 컬렉션이 발생되고, 인-메모리 프로세싱에 따른 성능 개선의 효과가 감소한다. 즉, 스레드 수(NT)가 너무 적은 경우 워크 노드(1200)의 성능이 활용되지 못하고, 너무 많은 경우 성능이 감소하므로, 적정한 스레드 수(NT)가 요구된다.Since the size of the tasks T20 to T23 is larger than the available space of the
도 7은 도 1의 분석 모듈을 구체화한 예시적인 블록도이다. 분석 모듈(1110)에 포함된 구성들은 소프트웨어, 또는 하드웨어, 또는 이의 조합의 형태로 구현될 수 있다. 예시적으로, 소프트웨어는 기계 코드, 펌웨어, 임베디드 코드, 및 애플리케이션 소프트웨어일 수 있다. 예를 들어, 하드웨어는 전기 회로, 전자 회로, 프로세서, 컴퓨터, 집적 회로, 집적 회로 코어들, 또는 이의 조합을 포함할 수 있다. 7 is an exemplary block diagram embodied in the analysis module of FIG. 1. Components included in the
도 7을 참조하면, 분석 모듈(1110)은 파라미터 생성기(1111) 및 파라미터 관리기(1114)를 포함할 수 있다. 파라미터 생성기(1111)는 작업에 대응되는 RDD 의존성 그래프로부터 단계들 각각의 분할 수(NP) 및 스레드 수(NT)를 예측할 수 있다. 이를 위하여, 파라미터 생성기(1111)는 초기 파라미터 계산기(1112) 및 파라미터 검색기(1113)를 포함할 수 있다.Referring to FIG. 7, the
초기 파라미터 계산기(1112)는 단계들 각각의 MAF에 기초하여 초기 분할 수 및 초기 스레드 수를 계산할 수 있다. 도 2에 도시된 작업을 참조하여 설명하면, 초기 파라미터 계산기(1112)는 RDD 의존성 그래프로부터 사용 함수들(f1, f2)을 추출하고, 사용 함수들(f1, f2) 각각의 MAF를 검색할 수 있다. 이러한 MAF는 분석 모듈(1110)에 의하여 관리될 수 있다. 일례로, MAF는 도 8에서 후술될 선형 회귀 분석을 통하여 미리 마스터(도 1, 1100)의 메모리(미도시)에 저장될 수 있다. The
일례로, 초기 파라미터 계산기(1112)는 검색된 MAF에 기초하여 단계들 각각에 대응되는 RDD들 중 가장 큰 크기를 갖는 RDD를 예측할 수 있다. 도 2에서 설명한 바와 같이, 사용 함수들(f1, f2)의 MAF에 따라 출력 RDD들(RDD1, RDD2)의 크기는 변화한다.For example, the
수학식 1을 참조하면, RDD의 최대 크기(RDDM)는 입력 데이터(일례로, 도 2의 입력RDD(RDD0))의 크기에 사용 함수들 각각의 MAF들을 곱하여 계산될 수 있다. 예를 들어, 하나의 단계에 2개의 사용 함수가 존재하고, 제1 사용 함수의 MAF가 1보다 크고, 제2 사용 함수의 MAF가 1보다 작은 경우, RDD의 최대 크기(RDDM)는 제1 사용 함수로부터 출력된 RDD의 크기와 같을 수 있다. Referring to
그리고, 수학식 2와 같이, 초기 파라미터 계산기(1112)는 워커 노드들(도 1의 1200~1400)의 사용 가능한 실행기 메모리(도 3 내지 도 6의 1215)의 크기(Execution memory) 및 RDD의 최대 크기(RDDM)에 기초하여 초기 분할 수(NP(i)) 및 초기 스레드 수(NT(i))를 계산할 수 있다. 사용 가능한 실행기 메모리의 크기는 분석 모듈(1110)에 의하여 관리될 수 있으며, 미리 마스터(도 1, 1100)의 메모리(미도시)에 저장될 수 있다. 일례로, 초기 스레드 수(NT(i))는 워커 노드들에 포함된 코어들의 개수와 같을 수 있다. 이 경우, 수학식 2를 통하여, 초기 분할 수(NP(i))도 계산될 수 있다. 초기 스레드 수(NT(i)) 및 초기 분할 수(NP(i))는 단계들마다 생성된다.And, as shown in
파라미터 검색기(1113)는 초기 파라미터 계산기(1112)로부터 계산된 초기 스레드 수(NT(i)) 및 초기 분할 수(NP(i))를 예측 실행 시간을 감소시키도록 조절할 수 있다. 여기에서, 예측 실행 시간은 초기 스레드 수(NT(i)) 및 초기 분할 수(NP(i))를 기준으로, 워커 노드들이 태스크들을 실행하는데 걸리는 예측 시간으로 정의된다.The
수학식 3을 참조하면, 예측 실행 시간(ExecTime)은 RDD의 최대 크기(RDDM)를 분할 수(NP)로 나눈 크기, 데이터 스필에 따른 성능 저하 비용(ak), 및 분할 수(NP)를 스레드 수(NT)로 나눈 크기의 곱들에 비례할 수 있다. 여기에서, 데이터 스필에 따른 성능 저하 비용(ak)은 수학식 4와 같을 수 있다.Referring to
수학식 4를 참조하면, 앞서 계산된 RDD의 최대 크기(RDDM), 분할 수(NP) (초기 분할 수(NP(i)), 스레드 수(NT) (초기 스레드 수(NT(i)), 및 사용 가능한 실행기 메모리의 크기(Execution memory)로부터 데이터 스필에 따른 성능 저하 비용(ak)이 계산될 수 있다.Referring to
파라미터 검색기(1113)는 수학식 3과 같은 비례 관계로부터, 예측 실행 시간(ExecTime)을 감소시키도록 초기 스레드 수(NT(i)) 및 초기 분할 수(NP(i))를 조절할 수 있다. 일례로, 파라미터 검색기(1113)는 도 9에서 설명될 경사 검색(Gradient Search)을 이용하여 스레드 수(NT) 및 분할 수(NP)를 결정할 수 있다.The
파라미터 관리기(1114)는 파라미터 생성기(1111)로부터 최종 결정된 단계별 스레드 수(NT) 및 분할 수(NP)를 관리한다. 일례로, 최종 결정된 단계별 스레드 수(NT) 및 분할 수(NP)는 룩업 테이블 형태로, 마스터(도 1, 1100)의 메모리(미도시)에 저장되고, 파라미터 관리기(1114)에 의하여 수정, 변경 등과 같이 관리될 수 있다. 일례로, 최종 결정된 단계별 스레드 수(NT) 및 분할 수(NP)는 RDD 의존성 그래프에 주석 첨가(Annotate)되어, RDD 의존성 그래프와 함께 관리될 수 있다.The
도 8은 도 7의 분석 모듈이 MAF를 검색하는 동작을 설명하기 위한 그래프이다. 도 8은 사용 함수별 MAF를 예시적으로 나타낸다. 예시적으로, 6개의 사용 함수들이 도시되나, 이에 제한되지 않고 다양한 사용 함수들이 더 추가될 수 있다. 도 8의 그래프들의 가로축은 사용 함수에 입력되는 RDD의 크기로 정의되고, 세로축은 사용 함수로부터 출력되는 RDD의 크기로 정의된다. 설명의 편의상, 도 1 및 도 7의 도면 부호를 참조하여 도 8이 설명된다.FIG. 8 is a graph for explaining an operation of the analysis module of FIG. 7 searching for a MAF. 8 exemplarily shows MAF for each use function. By way of example, six usage functions are shown, but various usage functions may be further added without being limited thereto. The horizontal axis of the graphs of FIG. 8 is defined as the size of RDD input to the use function, and the vertical axis is defined as the size of RDD output from the use function. For convenience of explanation, FIG. 8 is described with reference to reference numerals of FIGS. 1 and 7.
도 8을 참조하면, 사용 함수들 각각의 입력 RDD 크기 및 출력 RDD 크기가 수집될 수 있다. 마스터(1000)는 선형 회귀 분석을 통하여 입력 RDD의 크기에 따른 출력 RDD의 크기의 패턴을 분석할 수 있다. 이에 따라, 사용 함수들 각각의 입력 RDD 크기에 대한 출력 RDD 크기를 1차 함수로 나타낼 수 있다. 이러한 1차 함수의 기울기는 사용 함수의 메모리 부하 가중치, 즉 MAF일 수 있다. 예를 들어, Zip() 함수, MapValue() 함수의 기울기는 1보다 크므로, 대체적으로 RDD의 크기를 증가시키는 사용 함수로 이해될 것이다. 예를 들어, SortByKey() 함수의 기울기는 1로 표현되므로, 대체적으로 RDD의 크기를 거의 변화시키지 않는 사용 함수로 이해될 것이다. Join() 함수, GroupByKey() 함수, 및 Filter() 함수의 기울기는 1보다 작으므로, 대체적으로 RDD의 크기를 감소시키는 사용 함수로 이해될 것이다.Referring to FIG. 8, an input RDD size and an output RDD size of each of the use functions may be collected. The
초기 스레드 수(NT(i)) 및 초기 분할 수(NP(i))는 작업에 포함된 단계들 각각의 RDD의 최대 크기(RDDM)를 이용하여 계산될 수 있다. 그리고, 수학식 1과 같이, RDD의 최대 크기(RDDM)는 단계들 각각에 포함된 사용 함수들의 MAF로부터 계산될 수 있다. 도 7의 초기 파라미터 계산기(1112)는 단계들 각각에 포함된 사용 함수들의 MAF를 검색하고, MAF에 기초하여 단계들 각각의 RDD의 최대 크기(RDDM)를 계산할 수 있다.The initial number of threads (NT(i)) and the number of initial divisions (NP(i)) may be calculated using the maximum size (RDDM) of the RDD of each of the steps included in the job. And, as shown in
도 9는 도 7의 분석 모듈이 스레드 수 및 분할 수를 결정하는 동작을 설명하기 위한 그래프이다. 도 9는 초기 스레드 수(NT(i)) 및 초기 분할 수(NP(i))로부터 경사 검색(Gradient Search)을 이용하여 최종 스레드 수(NT(k)) 및 최종 분할 수(NP(k))를 생성하는 과정을 설명하기 위한 도면이다. 도 9의 그래프의 가로축은 분할 수(NP)로 정의되고, 세로축은 스레드 수(NT)로 정의된다. 설명의 편의상 도 1 및 도 7의 도면 부호를 참조하여 도 9가 설명된다.9 is a graph for explaining an operation of determining the number of threads and the number of divisions by the analysis module of FIG. 7. 9 shows a final number of threads (NT(k)) and a final number of divisions (NP(k) using a gradient search from the initial number of threads (NT(i)) and the initial number of divisions (NP(i)). ) Is a diagram for explaining the process of generating. The horizontal axis of the graph of FIG. 9 is defined as the number of divisions (NP), and the vertical axis is defined as the number of threads (NT). For convenience of explanation, FIG. 9 is described with reference to reference numerals of FIGS. 1 and 7.
분석 모듈(1110)은 초기 분할 수(NP(i)) 및 초기 스레드 수(NT(i)) 중 적어도 하나를 +1 또는 -1한 8개의 경우의 수를 검색할 수 있다. 그리고, 8개의 경우의 수들 각각의 예측 실행 시간이 초기 분할 수(NP(i)) 및 초기 스레드 수(NT(i))에 대응되는 예측 실행 시간과 비교될 수 있다. 비교 결과, 예측 실행 시간의 감소율이 가장 높은 분할 수 및 스레드 수가 선택될 수 있다. 일례로, 초기 분할 수(NP(i))보다 1 큰 분할 수가 제1 중간 분할 수(NP(i+1))로 선택되고, 초기 스레드 수(NT(i))와 같은 스레드 수가 제1 중간 스레드 수(NT(i+1))로 선택될 수 있다.The
분석 모듈(1110)은 특정 조건을 만족할 때까지, 8개의 경우의 수를 계속적으로 검색할 수 있다. 일례로, 특정 조건은 8개의 경우의 수들 모두 예측 실행 시간의 감소율이 기준 비율(일례로, 20%)를 넘지 않는 경우일 수 있다. 일례로, 특정 조건은 8개의 경우의 수들의 데이터 스필에 따른 성능 저하 비용(수학식 4의 ak)이 차이가 없는 경우일 수 있다. 분석 모듈(1110)은 제2 중간 분할 수(NP(i+2)) 및 제2 중간 스레드 수(NT(i+2)) 등을 거쳐 특정 조건을 만족하는 분할 수 및 스레드 수를 최종 분할 수(NP(k)) 및 최종 스레드 수(NP(k))로 결정할 수 있다. 최종 분할 수(NP(k)) 및 최종 스레드 수(NP(k))는 단계에 대응되는 RDD를 분할하고, 워커 노드들로 출력할 때, 이용된다.The
도 10은 도 1의 분산 처리 시스템이 태스크들을 스케줄링하는 동작을 설명하기 위한 그래프이다. 도 10은 도 7 내지 도 9를 통하여 분석 모듈(1110)로부터 예측된 분할 수(NP) 및 스레드 수(NT)에 기초하여 태스크들이 스케줄링되어 워커 노드들로 출력되고, 가비지 컬렉션 시간에 기초하여 스레드 수(NT)를 조절하는 동작을 설명하기 위한 도면이다. 도 10의 그래프의 가로축은 시간으로 정의되고, 세로축은 스레드로 정의된다. 설명의 편의상 도 1의 도면 부호를 참조하여 도 10이 설명된다.10 is a graph for explaining an operation of scheduling tasks by the distributed processing system of FIG. 1. 10 shows tasks are scheduled based on the number of divisions (NP) and the number of threads (NT) predicted from the
도 10을 참조하면, 예시적으로, 분석 모듈(1110)은 제1 단계의 분할 수(NP)를 10으로 예측하고, 스레드 수(NT)를 4로 예측한 것으로 가정한다. 또한, 분석 모듈(1110)은 제2 단계의 분할 수(NP)를 14로 예측하고, 스레드 수(NT)를 5로 예측한 것으로 가정한다. 이 경우, DAG 스케줄러(1120)는 제1 단계에 대응되는 RDD를 10개의 태스크들(T0~T9)로 분할하고, 제2 단계에 대응되는 RDD를 14개의 태스크들(T0~T13)로 분할한다.Referring to FIG. 10, as an example, it is assumed that the
태스크 스케줄러(1130)는 제1 단계의 스레드 수(NT)와 같은 4개의 태스크들(T0~T3)을 워커 노드들(1200~1400)로 출력할 수 있다. 워커 노드들(1200~1400)은 4개의 태스크들(T0~T3)의 실행 시간을 측정할 수 있다. 그리고, 워커 노드들(1200~1400)은 태스크들(T0~T3)에 의하여 가비지 컬렉션이 발생한 경우, 가비지 컬렉션 시간을 측정할 수 있다. 측정된 실행 시간 및 가비지 컬렉션 시간은 태스크 스케줄러(1130)로 제공된다.The
가비지 컬렉션이 발생하지 않았거나, 실행 시간에 대한 가비지 컬렉션 시간의 비율이 기준 비율보다 작은 경우, 태스크 스케줄러(1130)는 스레드 수(NT)를 증가시킬 수 있다. 여기에서, 기준 비율은 태스크들을 저장 및 실행하기에 충분한 메모리 공간이 확보된 것으로 판단되는 상한을 의미할 수 있다. 예시적으로, 4개의 태스크들(T0~T3)에 의하여, 가비지 컬렉션이 발생되지 않은 경우, 태스크 스케줄러는 스레드 수(NT)를 증가시킬 수 있다. 스레드 수(NT)는 2배로 증가될 수 있으나, 이에 제한되지 않고, 기설정된 개수가 스레드 수(NT)에 더하여질 수도 있다.When garbage collection has not occurred or the ratio of the garbage collection time to the execution time is smaller than the reference ratio, the
스레드 수(NT)가 증가된 결과, 병렬로 출력되는 태스크들의 개수가 증가할 수 있다. 태스크가 실행 완료된 순서대로 추가적인 태스크들이 워커 노드들(1200~1400)로 출력될 수 있다. 4개의 태스크들(T0~T3) 모두 가비지 컬렉션에 의한 성능 저하가 발생되지 않은 것으로 판단된 제1 시간(t1) 이후에, 일례로, 스레드 수(NT)가 2배인 8로 조절될 수 있다. 최대 8개의 태스크들이 병렬로 출력 가능하므로, 제1 시간(t1) 기준으로 이미 출력된 3개의 태스크들(T4~T6)과 병렬로, 3개의 나머지 태스크들(T7~T9)이 더 출력될 수 있다.As a result of an increase in the number of threads NT, the number of tasks output in parallel may increase. Additional tasks may be output to the
이후에, 태스크 스케줄러(1130)는 제2 단계의 스레드 수(NT)와 같은 5개의 태스크들(T0~T4)을 워커 노드들(1200~1400)로 출력할 수 있다. 워커 노드들(1200~1400)은 5개의 태스크들(T0~T4)의 실행 시간 및 가비지 컬렉션 시간을 측정할 수 있다. 예시적으로, 제2 단계에서, 5개의 태스크들(T0~T4)에 의하여 가비지 컬렉션이 발생된 것으로 가정한다. 태스크 스케줄러(1130)는 가비지 컬렉션에 의하여 워커 노드들(1200~1400)의 성능 저하가 발생된 것으로 판단할 수 있다. 이에 따라, 태스크 스케줄러(1130)는 스레드 수(NT)를 감소시킬 수 있다. 일례로, 스레드 수(NT)는 -1로 감소될 수 있으나, 이에 제한되지 않는다.Thereafter, the
스레드 수(NT)가 4로 감소된 결과, 5개의 태스크들(T0~T4) 모두 실행된 제2 시간(t2) 이후에, 태스크 9(T9)가 출력되지 않을 수 있다. 즉, 태스크 4(T4)에 뒤이어 태스크 9(T9)가 마스터(1100)로부터 출력되지 않고, 4개의 병렬성이 유지될 수 있다. 그리고, 4개의 태스크들(T5~T8)의 실행 시간 및 가비지 컬렉션 시간이 다시 측정될 수 있다. 4개의 태스크들(T5~T8)에 의하여 가비지 컬렉션이 발생되고, 성능 저하가 발생된 것으로 판단되는 경우, 스레드 수(NT)는 다시 감소할 수 있다. As a result of the number of threads NT being reduced to 4, the task 9 (T9) may not be output after the second time t2 in which all of the five tasks T0 to T4 have been executed. That is, after the task 4 (T4), the task 9 (T9) is not output from the
스레드 수(NT)가 3으로 감소된 결과, 4개의 태스크들(T5~T8) 모두 실행된 제3 시간(t3) 이후에, 태스크 12(T12)가 출력되지 않을 수 있다. 즉, 태스크 8(T8)에 뒤이어 태스크 12(T12)가 마스터(1100)로부터 출력되지 않고, 3개의 병렬성이 유지될 수 있다. As a result of the number of threads NT being reduced to 3, the task 12 (T12) may not be output after the third time (t3) in which all four tasks T5 to T8 have been executed. That is, the task 12 (T12) is not output from the
즉, 태스크 스케줄러(1130)는 워커 노드들(1200~1400)에서 발생되는 가비지 컬렉션 유무 또는 시간에 기초하여 스레드 수를 런 타임 중에 계속적으로 최적화할 수 있다. 따라서, 분산 처리 시스템(1000)의 태스크 처리 속도가 증가하고, 워커 노드들(1200~1400)의 메모리 부하에 따른 성능 저하가 감소할 수 있다.That is, the
도 11은 도 1의 분산 처리 시스템의 동작 방법의 예시적인 순서도이다. 도 11의 동작 방법은 분산 처리 시스템(1000)의 마스터(1100) 또는 워커 노드들(1200~1400)에 의하여 수행될 수 있다. 설명의 편의상, 도 1의 도면 부호를 참조하여 도 11이 설명된다.11 is an exemplary flow chart of a method of operating the distributed processing system of FIG. 1. The operation method of FIG. 11 may be performed by the
S110 단계에서, 마스터(1100)의 분석 모듈(1110)은 분할 수 및 스레드 수를 예측한다. 분석 모듈(1110)은 작업(job)에 포함되는 단계(stage)들 각각에 대한 분할 수 및 스레드 수를 예측할 수 있다. 분석 모듈(1110)은 단계들 각각의 사용 함수들의 MAF에 기초하여 분할 수 및 스레드 수를 예측할 수 있다. 일례로, 분석 모듈(1110)은 도 7에서 설명한 바와 같이, 사용 함수들 각각의 MAF에 기초하여 단계에 대응되는 데이터의 최대 크기를 계산하고, 이러한 최대 크기 및 워커 노드들(1200~1400)의 사용 가능한 메모리의 크기에 기초하여 초기 분할 수 및 초기 스레드 수를 계산할 수 있다. 그리고, 분석 모듈(1110)은 워커 노드들(1200~1400)의 예측 실행 시간에 기초하여 초기 분할 수 및 초기 스레드 수를 조절함으로써, 분할 수 및 스레드 수를 결정할 수 있다.In step S110, the
S120 단계에서, DAG 스케줄러(1120)는 S110 단계에서 결정된 분할 수에 기초하여 데이터(RDD)를 태스크들로 분할할 수 있다. 분할되는 태스크들의 개수는 분할 수와 같을 수 있다.In step S120, the
S130 단계에서, 태스크 스케줄러(1130)는 분할된 태스크들 중 적어도 일부를 워커 노드들(1200~1400)로 출력할 수 있다. 태스크 스케줄러(1130)는 S110 단계에서 결정된 스레드 수만큼 병렬성을 갖도록 태스크들 중 적어도 일부를 출력할 수 있다. 출력된 태스크들은 워커 노드들(1200~1400)에서 실행된다.In step S130, the
S140 단계에서, 워커 노드들(1200~1400)은 S130 단계에서 출력된 태스크들을 실행하는 동안 실행 시간 및 가비지 컬렉션 시간을 측정할 수 있다. 태스크의 크기가 워커 노드들(1200~1400)에 포함된 실행기 메모리의 사용 가능한 크기보다 큰 경우, 데이터 스필 및 가비지 컬렉션이 발생할 수 있다. 워커 노드들(1200~1400)은 가비지 컬렉션이 발생한 경우, 가비지 컬렉션을 수행한 시간을 측정할 수 있다. 워커 노드들(1200~1400)은 측정된 실행 시간 및 가비지 컬렉션 시간을 태스크 스케줄러(1130)로 제공할 수 있다. In step S140, the
S150 단계에서, 태스크 스케줄러(1130)는 실행 시간 및 가비지 컬렉션 시간에 기초하여 스레드 수를 조절할 수 있다. 일례로, 실행 시간에 대한 가비지 컬렉션 시간의 비율이 기준 비율보다 큰 경우, 태스크 스케줄러(1130)는 스레드 수를 감소시켜, 병렬로 출력되는 태스크들의 크기를 감소시킬 수 있다. 일례로, 실행 시간들에 대한 가비지 컬렉션 시간들의 비율이 기준 비율보다 작은 경우, 태스크 스케줄러(1130)는 스레드 수를 증가시킬 수 있다.In step S150, the
S160 단계에서, 마스터(1100)는 작업이 완료되었는지 판단하고, 작업이 완료되지 않은 경우, 남은 태스크들을 출력하기 위하여 S130 단계로 돌아갈 수 있다. S130 단계에서, 태스크 스케줄러(1130)는 S150 단계에서 조절된 스레드 수만큼 병렬성을 갖도록 태스크들 중 적어도 일부를 출력할 수 있다. S130 내지 S150 단계는 작업이 완료될 때까지 반복될 수 있다.In step S160, the
도 12는 도 11의 S110 단계를 구체화한 순서도이다. 도 12의 S111 내지 S114 단계들은 도 1의 분석 모듈(1110)에 의하여 수행될 수 있다. 설명의 편의상, 도 1의 도면 부호를 참조하여, 도 12가 설명된다.12 is a flowchart illustrating step S110 of FIG. 11. Steps S111 to S114 of FIG. 12 may be performed by the
S111 단계에서, 분석 모듈(1110)은 단계들 각각의 사용 함수들에 대응되는 MAF를 검색할 수 있다. 도 8에서 설명한 바와 같이, 분석 모듈(1110)은 선형 회귀 분석을 통하여 사용 함수들 각각의 MAF를 관리할 수 있다. 사용자 프로그램이 마스터(1100)에 제공됨에 따라, 작업이 생성될 수 있고, DAG 스케줄러(1120)는 작업에 대한 RDD 의존성 그래프를 생성할 수 있다. 분석 모듈(1110)은 RDD 의존성 그래프로부터 사용 함수들을 추출하고, 사용 함수들 각각의 MAF를 검색할 수 있다.In step S111, the
S112 단계에서, 분석 모듈(1110)은 검색된 MAF에 기초하여 단계들 각각에 대응되는 최대 데이터 크기, 즉 RDD의 최대 크기를 계산할 수 있다. MAF는 사용 함수의 입력 데이터의 크기에 대한 출력 데이터의 크기의 비율을 나타내므로, 입력 데이터의 크기에 MAF를 적용함으로써, RDD의 최대 크기가 계산될 수 있다. RDD의 최대 크기는 상술된 수학식 1과 같이 계산될 수 있다.In step S112, the
S113 단계에서, 분석 모듈(1110)은 S112 단계에서 계산된 RDD의 최대 크기에 기초하여 초기 분할 수 및 초기 스레드 수를 계산할 수 있다. 상술된 수학식 2와 같이, 분석 모듈(1110)은 워커 노드들(1200~1400)의 사용 가능한 실행기 메모리의 크기 및 RDD의 최대 크기에 기초하여 단계들 각각의 초기 분할 수 및 초기 스레드 수를 계산할 수 있다.In step S113, the
S114 단계에서, 분석 모듈(1110)은 초기 분할 수 및 초기 스레드 수를 조절할 수 있다. 상술된 수학식 3, 수학식 4, 및 도 9와 같이, 분석 모듈(1110)은 예측 실행 시간이 감소하도록, 경사 검색을 이용하여 초기 분할 수 및 초기 스레드 수를 조절할 수 있다. 일례로, 분석 모듈(1110)은 예측 실행 시간의 감소율이 기준 비율을 넘지 않을 때까지 분할 수 및 스레드 수 중 적어도 하나를 조절할 수 있다. 이러한 조절 결과, 분석 모듈(1110)은 최종 분할 수 및 최종 스레드 수를 결정할 수 있다. 결정된 최종 분할 수 및 최종 스레드 수는 도 11의 S120 단계 및 S130 단계를 수행하는데 이용된다.In step S114, the
도 13은 도 11의 S150 단계를 구체화한 순서도이다. 도 13의 S151 내지 S155 단계들은 도 1의 태스크 스케줄러(1130)에 의하여 수행될 수 있다. 설명의 편의상, 도 1의 도면 부호를 참조하여 도 13이 설명된다.13 is a flowchart illustrating step S150 of FIG. 11. Steps S151 to S155 of FIG. 13 may be performed by the
S151 단계에서, 태스크 스케줄러(1130)는 워커 노드들(1200~1400)로부터 가비지 컬렉션 시간 및 실행 시간을 수신한다.In step S151, the
S152 단계에서, 태스크 스케줄러(1130)는 실행 시간에 대한 가비지 컬렉션 시간의 비율을 제1 비율과 비교할 수 있다. 여기에서, 제1 비율은 태스크들을 저장 및 실행하기에 충분한 메모리 공간이 확보되지 못하여, 실행시간 대비 가비지 컬렉션 시간이 길다고 인정되는 하한을 의미할 수 있다. In step S152, the
실행 시간에 대한 가비지 컬렉션 시간의 비율이 제1 비율보다 큰 경우, 태스크 스케줄러(1130)는 가비지 컬렉션에 의하여 워커 노드들(1200~1400)의 성능 저하가 발생된 것으로 판단할 수 있다. 따라서, S155 단계가 진행된다. 실행 시간에 대한 가비지 컬렉션 시간의 비율이 제1 비율보다 크지 않은 경우, S153 단계가 진행된다.When the ratio of the garbage collection time to the execution time is greater than the first ratio, the
S153 단계에서, 태스크 스케줄러(1130)는 이전 가비지 컬렉션 시간에 대한 현재 가비지 컬렉션 시간의 비율을 제2 비율과 비교할 수 있다. 여기에서, 제2 비율은 직전 태스크들이 실행될 때와 비교하여 비정상적으로 가비지 컬렉션 시간이 길어졌다고 인정되는 하한을 의미할 수 있다. In step S153, the
이전 가비지 컬렉션 시간에 대한 현재 가비지 컬렉션 시간의 비율이 제2 비율보다 큰 경우, 태스크 스케줄러(1130)는 직전 동작과 비교하여 가비지 컬렉션이 과도하게 발생하여 워커 노드들(1200~1400)의 성능 저하가 발생된 것으로 판단할 수 있다. 따라서, S155 단계가 진행된다. 이전 가비지 컬렉션 시간에 대한 현재 가비지 컬렉션 시간의 비율이 제2 비율보다 크지 않은 경우, 태스크 스케줄러(1130)는 워커 노드들(1200~1400)에 충분한 메모리 공간이 존재하는 것으로 판단할 수 있다. 따라서, S154 단계가 진행된다.When the ratio of the current garbage collection time to the previous garbage collection time is greater than the second ratio, the
S154 단계에서, 태스크 스케줄러(1130)는 스레드 수를 증가시킨다. 즉, 태스크 스케줄러(1130)는 병렬로 출력되는 태스크들의 개수를 증가시켜, 작업의 처리 동작 시간을 감소시킬 수 있다. In step S154, the
S155 단계에서, 태스크 스케줄러(1130)는 스레드 수를 감소시킨다. 즉, 태스크 스케줄러(1130)는 병렬로 출력되는 태스크들의 개수를 감소시켜, 워커 노드들(1200~1400)의 성능 저하를 개선할 수 있다. In step S155, the
상술된 내용은 본 발명을 실시하기 위한 구체적인 실시 예들이다. 본 발명은 상술된 실시 예들뿐만 아니라, 단순하게 설계 변경되거나 용이하게 변경할 수 있는 실시 예들 또한 포함할 것이다. 또한, 본 발명은 실시 예들을 이용하여 용이하게 변형하여 실시할 수 있는 기술들도 포함될 것이다. 따라서, 본 발명의 범위는 상술된 실시 예들에 국한되어 정해져서는 안되며 후술하는 특허청구범위뿐만 아니라 이 발명의 특허청구범위와 균등한 것들에 의해 정해져야 할 것이다.The above-described contents are specific examples for carrying out the present invention. The present invention will include not only the above-described embodiments, but also embodiments that can be simply changed or easily changed. In addition, the present invention will also include techniques that can be easily modified and implemented using the embodiments. Therefore, the scope of the present invention is limited to the above-described embodiments and should not be defined, and should be determined by the claims and equivalents of the present invention as well as the claims to be described later.
1000: 분산 처리 시스템 1100: 마스터
1110: 분석 모듈 1120: DAG 스케줄러
1130: 태스크 스케줄러 1200, 1300, 1400: 워커 노드
1210, 1310, 1410: 실행기 1215: 실행기 메모리
1230: 로컬 디스크1000: distributed processing system 1100: master
1110: analysis module 1120: DAG scheduler
1130:
1210, 1310, 1410: Launcher 1215: Launcher memory
1230: local disk
Claims (20)
상기 출력된 태스크들을 실행하고, 상기 태스크들을 실행하는 동안의 가비지 컬렉션 시간을 측정하는 적어도 하나의 워커 노드를 포함하되,
상기 마스터는 상기 가비지 컬렉션 시간에 기초하여 상기 스레드 수를 조절하는 분산 처리 시스템.The number of divisions and the number of threads of each of the plurality of steps are generated based on a memory load weight for each of the functions used in a job including a plurality of stages, and each of the plurality of stages is A master for dividing data into tasks by the number of divisions and outputting the tasks in parallel by the number of threads; And
At least one worker node that executes the output tasks and measures a garbage collection time during execution of the tasks,
The master is a distributed processing system that adjusts the number of threads based on the garbage collection time.
상기 마스터는,
상기 메모리 부하 가중치에 기초하여 상기 복수의 단계들에서 상기 사용 함수들에 의하여 변경되는 데이터의 최대 크기를 계산하고, 상기 최대 크기에 기초하여 상기 분할 수 및 상기 스레드 수를 예측하는 분석 모듈을 포함하는 분산 처리 시스템.The method of claim 1,
The master,
Comprising an analysis module for calculating a maximum size of data changed by the use functions in the plurality of steps based on the memory load weight, and predicting the number of divisions and the number of threads based on the maximum size Distributed processing system.
상기 분석 모듈은,
상기 데이터의 상기 최대 크기 및 상기 적어도 하나의 워커 노드의 사용 가능한 메모리 크기에 기초하여 초기 분할 수 및 초기 스레드 수를 계산하고, 상기 초기 분할 수 및 상기 초기 스레드 수 중 적어도 하나를 변경하여 상기 분할 수 및 상기 스레드 수를 결정하는 파라미터 생성기를 포함하는 분산 처리 시스템.The method of claim 2,
The analysis module,
An initial number of divisions and an initial number of threads are calculated based on the maximum size of the data and the available memory size of the at least one worker node, and the number of divisions by changing at least one of the initial number of divisions and the number of initial threads And a parameter generator for determining the number of threads.
상기 초기 스레드 수는 상기 적어도 하나의 워커 노드에 포함된 코어의 개수에 의존하는 분산 처리 시스템.The method of claim 3,
The initial number of threads depends on the number of cores included in the at least one worker node.
상기 초기 분할 수는 상기 초기 스레드 수 및 상기 데이터의 상기 최대 크기의 곱에 상기 사용 가능한 메모리 크기를 나눈 값에 의존하는 분산 처리 시스템.The method of claim 3,
The initial partition number is dependent on a product of the initial number of threads and the maximum size of the data divided by the usable memory size.
상기 파라미터 생성기는,
상기 초기 분할 수 및 상기 초기 스레드 수에 대응되는 태스크들의 예측 실행 시간을 계산하고, 상기 초기 분할 수 및 상기 초기 스레드 수 중 적어도 하나를 변경할 때의 상기 예측 실행 시간의 감소율에 기초하여 상기 분할 수 및 상기 스레드 수를 결정하는 분산 처리 시스템.The method of claim 3,
The parameter generator,
The number of divisions is calculated based on a reduction rate of the predicted execution time when the initial number of divisions and the predicted execution time of tasks corresponding to the number of initial threads are calculated, and at least one of the initial number of divisions and the number of initial threads is changed, and Distributed processing system for determining the number of threads.
상기 파라미터 생성기는,
상기 예측 실행 시간의 상기 감소율이 기준 비율보다 작을 때까지 상기 초기 분할 수 및 상기 초기 스레드 수 중 적어도 하나를 변경하여, 상기 분할 수 및 상기 스레드 수를 결정하는 분산 처리 시스템.The method of claim 6,
The parameter generator,
A distributed processing system configured to determine the number of divisions and the number of threads by changing at least one of the initial number of divisions and the number of initial threads until the reduction rate of the prediction execution time is less than a reference ratio.
상기 마스터는,
상기 태스크들 중 상기 스레드 수만큼의 태스크들을 상기 적어도 하나의 워커 노드로 출력하고, 상기 출력된 태스크들을 실행하는 동안의 가비지 컬렉션 시간들에 기초하여 상기 스레드 수를 조절하는 태스크 스케줄러를 포함하는 분산 처리 시스템.The method of claim 1,
The master,
Distributed processing including a task scheduler that outputs tasks as many as the number of threads among the tasks to the at least one worker node and adjusts the number of threads based on garbage collection times during execution of the output tasks system.
상기 태스크 스케줄러는,
상기 출력된 태스크들 각각의 실행 시간들에 대한 상기 가비지 컬렉션 시간들의 비율이 기준 비율보다 큰 경우, 상기 스레드 수를 감소시키는 분산 처리 시스템.The method of claim 8,
The task scheduler,
When a ratio of the garbage collection times to execution times of each of the output tasks is greater than a reference ratio, the number of threads is reduced.
상기 태스크 스케줄러는,
상기 출력된 태스크들 각각의 실행 시간들에 대한 상기 가비지 컬렉션 시간들의 비율이 기준 비율보다 작은 경우, 상기 스레드 수를 증가시키는 분산 처리 시스템.The method of claim 8,
The task scheduler,
A distributed processing system that increases the number of threads when the ratio of the garbage collection times to execution times of each of the output tasks is less than a reference ratio.
상기 태스크 스케줄러는,
상기 가비지 컬렉션 시간들에 대한 상기 출력된 태스크들 이전에 측정된 가비지 컬렉션 시간들의 비율이 기준 비율보다 큰 경우, 상기 스레드 수를 감소시키는 분산 처리 시스템.The method of claim 8,
The task scheduler,
When a ratio of garbage collection times measured before the output tasks to the garbage collection times is larger than a reference ratio, the number of threads is reduced.
상기 적어도 하나의 워커 노드는,
상기 마스터로부터 수신된 상기 태스크들을 실행하는 실행기; 및
상기 가비지 컬렉션 시간 및 상기 태스크들 각각의 실행 시간을 측정하는 타이머를 포함하는 분산 처리 시스템.The method of claim 1,
The at least one worker node,
An executor executing the tasks received from the master; And
Distributed processing system comprising a timer for measuring the garbage collection time and the execution time of each of the tasks.
상기 적어도 하나의 워커 노드는 상기 가비지 컬렉션 시간 및 상기 태스크들 각각의 실행 시간을 상기 마스터로 송신하고,
상기 마스터는 상기 가비지 컬렉션 시간 및 상기 실행 시간을 비교하여, 상기 스레드 수를 조절하는 분산 처리 시스템.The method of claim 1,
The at least one worker node transmits the garbage collection time and the execution time of each of the tasks to the master,
The master is a distributed processing system for adjusting the number of threads by comparing the garbage collection time and the execution time.
상기 마스터가 작업(job)의 사용 함수들 각각의 메모리 부하 가중치에 기초하여 상기 작업에 대응되는 데이터의 분할 수 및 스레드 수를 생성하는 단계;
상기 마스터가 상기 분할 수 에 기초하여 상기 데이터를 복수의 태스크들로 분할하는 단계;
상기 마스터가 상기 복수의 태스크들 중 상기 스레드 수만큼의 태스크들을 상기 워커 노드로 출력하는 단계;
상기 워커 노드가 상기 태스크들을 실행하는 동안의 가비지 컬렉션 시간 및 실행 시간을 측정하는 단계; 및
상기 마스터가 상기 가비지 컬렉션 시간 및 상기 실행 시간에 기초하여 상기 스레드 수를 조절하는 단계를 포함하는 동작 방법.In the method of operating a distributed processing system including a master and worker nodes,
Generating, by the master, the number of divisions and the number of threads of data corresponding to the job based on the memory load weights of each of the use functions of the job;
Dividing the data into a plurality of tasks based on the number of divisions by the master;
Outputting, by the master, tasks as many as the number of threads among the plurality of tasks to the worker node;
Measuring a garbage collection time and an execution time while the worker node executes the tasks; And
And adjusting, by the master, the number of threads based on the garbage collection time and the execution time.
상기 데이터의 분할 수 및 스레드 수를 생성하는 단계 이전에, 상기 마스터가 상기 작업의 상기 사용 함수들에 기초하여, 상기 작업을 복수의 단계들(stage)로 분할하는 단계를 더 포함하고,
상기 분할 수는 상기 복수의 단계들 각각에 대응되는 값들을 포함하고, 상기 스레드 수는 상기 복수의 단계들 각각에 대응되는 값들을 포함하는 동작 방법.The method of claim 14,
Before the step of generating the number of divisions and the number of threads of the data, the master further comprises dividing the job into a plurality of stages based on the usage functions of the job,
The number of divisions includes values corresponding to each of the plurality of steps, and the number of threads includes values corresponding to each of the plurality of steps.
상기 분할 수 및 상기 스레드 수를 생성하는 단계는,
상기 작업의 상기 사용 함수들 각각의 메모리 부하 가중치를 검색하는 단계;
상기 메모리 부하 가중치에 기초하여 상기 사용 함수들에 의하여 변경되는 상기 데이터의 최대 크기를 계산하는 단계;
상기 최대 크기 및 상기 워커 노드의 사용 가능한 메모리 크기에 기초하여 초기 분할 수 및 초기 스레드 수를 계산하는 단계; 및
상기 초기 분할 수 및 상기 초기 스레드 수에 대응되는 태스크들의 예측 실행 시간에 기초하여, 상기 초기 분할 수 및 상기 초기 스레드 수를 조절하는 단계를 포함하는 동작 방법.The method of claim 14,
The step of generating the number of divisions and the number of threads,
Retrieving a memory load weight of each of the use functions of the task;
Calculating a maximum size of the data changed by the use functions based on the memory load weight;
Calculating an initial number of partitions and an initial number of threads based on the maximum size and the available memory size of the worker node; And
And adjusting the initial number of divisions and the number of initial threads based on the initial number of divisions and a predicted execution time of tasks corresponding to the number of initial threads.
상기 초기 분할 수 및 상기 초기 스레드 수를 조절하는 단계는,
상기 초기 분할 수 및 상기 초기 스레드 수 중 적어도 하나를 변경할 때의 상기 예측 실행 시간의 감소율을 계산하는 단계; 및
상기 감소율이 기준 비율보다 작을 때까지 상기 초기 분할 수 및 상기 초기 스레드 수 중 적어도 하나를 변경하는 단계를 포함하는 동작 방법.The method of claim 16,
Adjusting the initial number of divisions and the number of initial threads,
Calculating a reduction rate of the prediction execution time when at least one of the initial number of divisions and the number of initial threads is changed; And
And changing at least one of the initial number of divisions and the number of initial threads until the reduction rate is less than a reference ratio.
상기 스레드 수를 조절하는 단계는,
상기 실행 시간에 대한 상기 가비지 컬렉션 시간의 비율이 기준 비율보다 큰 경우, 상기 스레드 수를 감소시키는 단계를 포함하는 동작 방법.The method of claim 14,
The step of adjusting the number of threads,
And if the ratio of the garbage collection time to the execution time is greater than a reference ratio, reducing the number of threads.
상기 스레드 수를 조절하는 단계는,
상기 실행 시간에 대한 상기 가비지 컬렉션 시간의 비율이 기준 비율보다 작은 경우, 상기 스레드 수를 증가시키는 단계를 포함하는 동작 방법.The method of claim 14,
The step of adjusting the number of threads,
And if the ratio of the garbage collection time to the execution time is less than a reference ratio, increasing the number of threads.
상기 스레드 수를 조절하는 단계는, 상기 워커 노드가 상기 작업을 실행하는 동안 수행되는 동작 방법.
The method of claim 14,
The step of adjusting the number of threads may be performed while the worker node is executing the task.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020180149376 | 2018-11-28 | ||
KR20180149376 | 2018-11-28 |
Publications (3)
Publication Number | Publication Date |
---|---|
KR20200063962A KR20200063962A (en) | 2020-06-05 |
KR102195886B1 true KR102195886B1 (en) | 2020-12-29 |
KR102195886B9 KR102195886B9 (en) | 2022-01-24 |
Family
ID=71089238
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020190074053A KR102195886B1 (en) | 2018-11-28 | 2019-06-21 | Distributed processing system and operating method thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102195886B1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112035523A (en) * | 2020-08-25 | 2020-12-04 | 上海达梦数据库有限公司 | Method, device and equipment for determining parallelism and storage medium |
KR102250950B1 (en) * | 2020-09-21 | 2021-05-12 | (주)시큐레이어 | Method and device for automatically optimizing process execution environment based on machine learning in distributed deployment environment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101013073B1 (en) | 2007-12-17 | 2011-02-14 | 한국전자통신연구원 | Apparatus for Task Distribution and Parallel Processing System and Method there of |
KR101823129B1 (en) | 2016-11-24 | 2018-03-09 | 주식회사 실크로드소프트 | Computer program, method and apparatus for distributing resource of processor |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2746941A1 (en) * | 2012-12-20 | 2014-06-25 | Thomson Licensing | Device and method for optimization of data processing in a MapReduce framework |
-
2019
- 2019-06-21 KR KR1020190074053A patent/KR102195886B1/en active IP Right Grant
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101013073B1 (en) | 2007-12-17 | 2011-02-14 | 한국전자통신연구원 | Apparatus for Task Distribution and Parallel Processing System and Method there of |
KR101823129B1 (en) | 2016-11-24 | 2018-03-09 | 주식회사 실크로드소프트 | Computer program, method and apparatus for distributing resource of processor |
Non-Patent Citations (2)
Title |
---|
이재욱 외 3명. '고성능 데이터 분석을 위한 HW 및 SW 기반 메모리 관리 기술 동향'. 정보과학회지 제36권 제10호, 2018.10., pp.45-54. |
이재욱 외 4명. '인-메모리 빅데이터 프로세싱 성능 최적화 연구 동향'. 정보과학회지 제35권 제10호, 2017.10., pp.52-57. |
Also Published As
Publication number | Publication date |
---|---|
KR102195886B9 (en) | 2022-01-24 |
KR20200063962A (en) | 2020-06-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Alipourfard et al. | {CherryPick}: Adaptively unearthing the best cloud configurations for big data analytics | |
CA2963088C (en) | Apparatus and method for scheduling distributed workflow tasks | |
US9785468B2 (en) | Finding resource bottlenecks with low-frequency sampled data | |
US20200175361A1 (en) | Partitioning of deep learning inference with dynamic offloading | |
US20160048413A1 (en) | Parallel computer system, management apparatus, and control method for parallel computer system | |
JP6953800B2 (en) | Systems, controllers, methods, and programs for running simulation jobs | |
US20120331474A1 (en) | Real time system task configuration optimization system for multi-core processors, and method and program | |
US9268609B2 (en) | Application thread to cache assignment | |
CN108205469B (en) | MapReduce-based resource allocation method and server | |
US8869148B2 (en) | Concurrency identification for processing of multistage workflows | |
KR102195886B1 (en) | Distributed processing system and operating method thereof | |
KR20200091790A (en) | Platform for concurrent execution of gpu operations | |
KR101852610B1 (en) | Method for using resources using ai learning based realtime analyzing system and managemnet server using the same | |
Adyanthaya et al. | Robustness analysis of multiprocessor schedules | |
JP2017117242A (en) | Method and system for recommending application parameter setting and system specification setting in distributed computation | |
JP5470177B2 (en) | Trace system | |
Obaida et al. | Simulation of HPC job scheduling and large-scale parallel workloads | |
Marinho et al. | LABAREDA: a predictive and elastic load balancing service for cloud-replicated databases | |
CN113452546A (en) | Dynamic quality of service management for deep learning training communications | |
Radulescu et al. | LLB: A fast and effective scheduling algorithm for distributed-memory systems | |
Foroni et al. | Moira: A goal-oriented incremental machine learning approach to dynamic resource cost estimation in distributed stream processing systems | |
CN110362387B (en) | Distributed task processing method, device, system and storage medium | |
Nasr et al. | Task scheduling algorithm for high performance heterogeneous distributed computing systems | |
Banicescu et al. | Towards the robustness of dynamic loop scheduling on large-scale heterogeneous distributed systems | |
KR102022972B1 (en) | Runtime management apparatus for heterogeneous multi-processing system and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
G170 | Publication of correction |