KR102201651B1 - Probability-based data stream partitioning method considering task locality and downstream status - Google Patents

Probability-based data stream partitioning method considering task locality and downstream status Download PDF

Info

Publication number
KR102201651B1
KR102201651B1 KR1020200012975A KR20200012975A KR102201651B1 KR 102201651 B1 KR102201651 B1 KR 102201651B1 KR 1020200012975 A KR1020200012975 A KR 1020200012975A KR 20200012975 A KR20200012975 A KR 20200012975A KR 102201651 B1 KR102201651 B1 KR 102201651B1
Authority
KR
South Korea
Prior art keywords
downstream
probability
locality
upstream
proximity
Prior art date
Application number
KR1020200012975A
Other languages
Korean (ko)
Inventor
손시운
문양세
Original Assignee
강원대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 강원대학교산학협력단 filed Critical 강원대학교산학협력단
Priority to KR1020200012975A priority Critical patent/KR102201651B1/en
Application granted granted Critical
Publication of KR102201651B1 publication Critical patent/KR102201651B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/101Server selection for load balancing based on network conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/278Data partitioning, e.g. horizontal or vertical partitioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/0864Round trip delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1021Server selection for load balancing based on client or server locations

Abstract

The present invention relates to a data stream partitioning method in a distributed stream processing engine which comprises: a downstream exploration step in which each upstream periodically explores task locality and downstream status of candidate downstreams; a probability calculation step in which each upstream calculates a probability weight that each downstream is selected based on exploration required time with the candidate downstreams; and a downstream selection step in which if message transmission is required, each upstream probabilistically selects the downstream to transmit a message based on the probability weight. According to the present invention, by partitioning a data stream in consideration of the task locality and downstream status, throughput performance of a distributed stream processing system is maximized, and delay time can be reduced.

Description

태스크 지역성과 다운스트림 상태를 고려한 확률 기반의 데이터 스트림 파티셔닝 방법 및 이를 기록한 기록매체 {Probability-based data stream partitioning method considering task locality and downstream status}Probability-based data stream partitioning method considering task locality and downstream status}

본 발명은 분산 스트림 처리 엔진에서의 데이터 스트림 파티셔닝 방법에 관한 것이다. The present invention relates to a data stream partitioning method in a distributed stream processing engine.

데이터 스트림의 실시간 처리를 목적으로 여러 분산 스트림 처리 엔진이 개발되었다. 분산 스트림 처리 엔진(distributed stream processing engine, 이하 'DSPE'라 함)은 분산 환경에서 무한한 데이터 스트림을 실시간으로 처리하는 방식의 시스템을 일컫는다. DSPE에서 데이터 스트림은 응용이 미리 배포된 이후에 처리될 수 있으며, 응용은 파일 시스템, 큐잉 시스템, 데이터 스토리지 등에 적재된 데이터를 다시 읽지 않는 한 이전에 발생된 데이터를 처리할 수 없다. 대표적인 DSPE로는 Apache Storm, Apache Spark Streaming, Apache Flink, Apache Samza, Apache S4 등이 사용되고 있다. 이들은 주어진 잡(job)을 분산된 서버에 태스크 단위로 배치시키며, 실시간으로 발생되는 데이터 스트림을 높은 처리량과 낮은 지연 시간을 목표로 처리한다.Several distributed stream processing engines have been developed for real-time processing of data streams. The distributed stream processing engine (hereinafter referred to as'DSPE') refers to a system that processes infinite data streams in real time in a distributed environment. In DSPE, data streams can be processed after the application is deployed in advance, and the application cannot process previously generated data unless the data loaded in the file system, queuing system, data storage, etc. is read again. Representative DSPEs include Apache Storm, Apache Spark Streaming, Apache Flink, Apache Samza, and Apache S4. They deploy a given job on a distributed server as a task unit, and process data streams generated in real time with the goal of high throughput and low latency.

DSPE에 배치되는 응용은 DAG(directed acyclic graph)로 정의된다. 이 그래프에서 노드는 processing operator(PO)이며, 간선을 통해 데이터 스트림을 전송한다. 각 PO는 다수의 instance(POI)를 복제하여 분산된 서버에 배치한다. 따라서, DSPE 응용에서 POI는 실제 작업을 수행하는 단위이다. 그리고, 복제된 POI는 전달받은 메시지를 처리하여 이를 다음 POI에게 전달하는데, 메시지를 전달하는 POI를 업스트림(upstream), 메시지를 전달받는 POI를 다운스트림(downstream)이라 한다. 만약 다운스트림이 다수일 경우, 간선은 메시지에 따라 수시로 바뀐다. 따라서, DSPE에서는 송신자 POI가 데이터를 전송할 수신자 POI의 선택을 위한 스트림 파티셔닝(partitioning)이 필요하다.Applications deployed in DSPE are defined as a directed acyclic graph (DAG). In this graph, the node is the processing operator (PO), which transmits the data stream through the trunk. Each PO duplicates multiple instances (POIs) and deploys them in distributed servers. Therefore, in DSPE application, POI is a unit that performs actual work. In addition, the duplicated POI processes the received message and delivers it to the next POI. The POI that delivers the message is called upstream, and the POI that receives the message is called downstream. If there are multiple downstreams, the trunk line changes from time to time according to the message. Accordingly, in DSPE, stream partitioning is required to select a receiver POI to which the sender POI will transmit data.

대다수의 DSPE는 다양한 스트림 파티셔닝들을 제공한다. 이들 중, 스트림의 값에 상관없이 메시지를 분배하는 논-키 스트림 파티셔닝에는 Storm의 Shuffle 그룹핑과 Local-or-Shuffle 그룹핑, Flink의 Random 파티셔닝과 Rebalancing, Rescaling이 있다. 논-키 스트림 파티셔닝에서 Storm의 Shuffle 그룹핑, Flink의 Random 파티셔닝, Rebalancing은 각 다운스트림의 로드 밸런싱을 위해 스트림을 고르게 분배한다. 반면에 Storm의 Local-or-Shuffle 그룹핑, Flink의 Rescaling은 태스크 지역성을 고려하여 성능을 크게 향상시킨다. 이와 같이 논-키 스트림 파티셔닝에서는 시스템의 부하 상태를 고려한 파티셔닝이 필요하다.Most DSPEs provide a variety of stream partitioning. Among these, non-key stream partitioning that distributes messages regardless of the stream value includes Storm's Shuffle grouping and Local-or-Shuffle grouping, and Flink's Random partitioning, Rebalancing, and Rescaling. In non-key stream partitioning, Storm's Shuffle Grouping, Flink's Random Partitioning, and Rebalancing distribute streams evenly for load balancing of each downstream. On the other hand, Storm's Local-or-Shuffle grouping and Flink's Rescaling significantly improve performance in consideration of task locality. As described above, in non-key stream partitioning, partitioning in consideration of the load state of the system is required.

분산 엔진에서 분배 메커니즘은 시스템의 전체 성능에 큰 영향을 미칠 수 있다. 이는 잡을 처리하면서 필요한 모든 I/O 중 데이터 복사를 위한 네트워크 통신 비용이 가장 크기 때문이다. 이러한 통신 비용은 서로 다른 머신, 서로 다른 랙, 더 나아가 지리적으로 멀리 떨어진 서로 다른 데이터 센터에 데이터와 태스크가 분산 배치된다면 문제는 더욱 커질 것이다. In a distributed engine, the distribution mechanism can have a big impact on the overall performance of the system. This is because the network communication cost for data copying is the highest among all the I/O required while processing the job. The cost of these communications will become even more problematic if data and tasks are distributed across different machines, different racks, and even geographically distant data centers.

이를 해결하기 위해, 분산 처리 엔진에서 지역성을 고려한 연구가 활발하다. 지역성(locality)은 특정 대상의 파티셔닝에서 데이터와 태스크의 물리적 위치를 고려하여 공간적으로 가깝게 배치하는 개념이다. In order to solve this problem, researches considering locality in distributed processing engines are active. Locality is a concept in which data and tasks are spaced close together in the partitioning of a specific target in consideration of the physical location of data and tasks.

DSPE의 지역성은 데이터 스트림을 태스크의 물리적인 위치에 따라 분배하는 태스크 지역성이다. 이러한 태스크 지역성을 도입한 스트림 파티셔닝 기법을 LSP(locality-aware stream partitioning)이라 부른다. DSPE's locality is task locality that distributes the data stream according to the physical location of the task. A stream partitioning technique that introduces task locality is called locality-aware stream partitioning (LSP).

대표적인 DSPE인 Apache Storm과 Apache Flink는 다양한 스트림 파티셔닝을 제공한다. 특히, 이들은 스트림 파티셔닝에 태스크 지역성을 도입하기 위해, Storm은 Local-or-Shuffle 그룹핑을, Flink는 Rescaling 파티셔닝을 제공한다. 이러한 기존 LSP의 공통점은 업스트림이 같은 프로세스 내에서 동작하는 다운스트림에게만 메시지를 전송하므로, 네트워크 통신이 필요하지 않아 낮은 지연 시간을 보인다.Representative DSPEs, Apache Storm and Apache Flink, provide various stream partitioning. In particular, to introduce task locality to stream partitioning, Storm provides Local-or-Shuffle grouping, and Flink provides Rescaling partitioning. The common point of these existing LSPs is that since the upstream transmits messages only to the downstream operating in the same process, network communication is not required, and thus low latency is shown.

하지만, 기존 LSP들은 다운스트림 상태(downstream status)를 고려하지 않는다는 문제가 있다. 기존 LSP에서 업스트림은 오로지 같은 프로세스에 존재하는 다운스트림에게만 메시지를 전송한다. 즉, 후보 다운스트림 중, 업스트림과 같은 프로세스에서 다운스트림이 동작하면 해당 다운스트림에게만 메시지를 전송하고, 반대로 다운스트림이 업스트림과 같은 프로세스에서 동작하지 않는다면 임의로 다운스트림을 선택하여 메시지를 전송한다. However, there is a problem that the existing LSPs do not consider the downstream status. In the existing LSP, the upstream transmits messages only to downstream that exist in the same process. That is, if a downstream of the candidate downstream operates in the same process as the upstream, a message is transmitted only to the corresponding downstream stream. Conversely, if the downstream does not operate in the same process as the upstream, a message is randomly selected and transmitted.

이렇게 다운스트림 배치에 따라 다운스트림 선택 방법이 두 형태로 나뉘는 LSP를 binary LSP라 부른다. Binary LSP는 데이터 스트림을 다루는 DSPE의 특징을 제대로 활용하지 못한다는 문제가 있다. DSPE에서는 데이터 단위가 매우 작기 때문에(예를 들어, Twitter 메시지 크기는 1KB 이하), 네트워크 통신 비용이 상대적으로 매우 작다. 이러한 DSPE에서 업스트림이 같은 프로세스의 다운스트림에게만 메시지를 전송하면, 해당 다운스트림은 높은 부하를 가지며, 다른 프로세스의 유휴 다운스트림은 활용도가 현저히 감소하게 된다. 즉, DSPE에서는 업스트림의 모든 메시지를 동일 프로세스의 다운스트림에게만 전송하는 것이 꼭 최선이 아닐 수가 있다.The LSP in which the downstream selection method is divided into two types according to the downstream arrangement is called binary LSP. Binary LSP has a problem that it does not properly utilize the characteristics of DSPE dealing with data streams. In DSPE, because the data unit is very small (for example, Twitter message size is less than 1KB), the network communication cost is relatively very small. In this DSPE, if an upstream sends a message only to a downstream of the same process, the downstream has a high load, and the idle downstream of another process is significantly reduced in utilization. In other words, in DSPE, it may not necessarily be best to send all upstream messages only to downstream in the same process.

Binary LSP에서 이러한 다운스트림 간의 부하 불균형을 해결하는 수동적인 방법은 프로세스와 POI의 병렬성을 제어하는 것이다. 즉, binary LSP에서 부하 불균형이 발생하지 않도록 DSPE 응용 개발자가 잡을 배치하기 전에 프로세스의 수, 업스트림의 수, 다운스트림의 수를 조절한다. 병렬성 제어를 논의하기 위해, DSPE 응용을 태스크 지역성 관점에서 네 가지 use case로 분류한다. 표 1은 이들 네 가지를 나타내며, 표에서

Figure 112020011486680-pat00001
는 업스트림의 수,
Figure 112020011486680-pat00002
는 다운스트림의 수,
Figure 112020011486680-pat00003
는 프로세스의 수이다. In Binary LSP, a passive way to resolve this downstream load imbalance is to control the parallelism of the process and POI. In other words, the DSPE application developer adjusts the number of processes, the number of upstream, and the number of downstream before deploying the job to avoid load imbalance in binary LSP. To discuss parallelism control, DSPE applications are classified into four use cases in terms of task locality. Table 1 shows these four, and in the table
Figure 112020011486680-pat00001
Is the number of upstream,
Figure 112020011486680-pat00002
Is the number of downstream,
Figure 112020011486680-pat00003
Is the number of processes.

표 1은 태스크 지역성에 의해 분류한 DSPE 응용의 네 가지 use case를 나타낸 것이다. Table 1 shows the four use cases of DSPE applications classified by task locality.

Use casesUse cases DescriptionDescription Best localityBest locality locality and load balancing are maximized, if

Figure 112020011486680-pat00004
.locality and load balancing are maximized, if
Figure 112020011486680-pat00004
. Strong localityStrong locality locality is maximized but load balancing is not, if
Figure 112020011486680-pat00005
.
locality is maximized but load balancing is not, if
Figure 112020011486680-pat00005
.
Weak localityWeak locality only partial locality is guaranteed, if
Figure 112020011486680-pat00006
.
only partial locality is guaranteed, if
Figure 112020011486680-pat00006
.
Worst localityWorst locality no node guarantees locality, if
Figure 112020011486680-pat00007
.
no node guarantees locality, if
Figure 112020011486680-pat00007
.

표 1에서 best locality와 strong locality는 지역성을 최대한 고려하여, 모든 업스트림은 자신과 같은 프로세스에 다운스트림이 존재한다. 반면에, weak locality와 worst locality는 지역성이 일부만 고려되거나 전혀 고려되지 않아, 일부 또는 모든 업스트림은 자신과 같은 프로세스에 다운스트림이 존재하지 않는다. 즉, weak locality와 worst locality는 binary LSP를 적용해도 네트워크 통신이 발생하므로 처리 성능이 하락한다. 따라서, 이러한 DSPE의 use case에 따라, DSPE 응용 개발자는 best locality 또는 strong locality로 병렬성을 제어하여 binary LSP의 성능을 높일 수 있다.In Table 1, best locality and strong locality consider locality as much as possible, and all upstreams have downstream in the same process as themselves. On the other hand, in weak locality and worst locality, locality is partially or not considered, so some or all upstreams do not have downstream in the same process. In other words, for weak locality and worst locality, network communication occurs even when binary LSP is applied, so processing performance decreases. Therefore, according to the DSPE use case, the DSPE application developer can increase the performance of the binary LSP by controlling parallelism with best locality or strong locality.

하지만, 이러한 use case는 다음의 세 가지 이유로 인해 매우 제한적이다. However, this use case is very limited due to the following three reasons.

첫째, 태스크 지역성의 이점을 보기 위해 병렬성을 기반으로 DSPE 응용을 극단적으로 분류하고 있다. First, to see the benefits of task locality, DSPE applications are categorized extremely based on parallelism.

둘째, DSPE가 잡을 분산 노드에 분배할 때 모든 태스크를 가능한 균등하게 할당한다는 가정이 필요하다. 현재 이러한 가정은 Storm에서만 충족되며, Flink 등의 다른 DSPE에서는 충족되지 않아 병렬성 제어로 best locality 또는 strong locality의 환경을 구성할 수 없다. Second, when DSPE distributes jobs to distributed nodes, it is necessary to assume that all tasks are allocated as evenly as possible. Currently, this assumption is satisfied only in Storm and not in other DSPEs such as Flink, so the environment of best locality or strong locality cannot be configured with parallelism control.

셋째, 태스크 지역성을 위해 DSPE 응용 개발자는 다수의 PO로 구성된 복잡한 잡에서 각 PO의 병렬성을 제어해야 하는 어려움이 있다. Third, for task locality, DSPE application developers have a difficulty in controlling the parallelism of each PO in a complex job composed of multiple POs.

이러한 세 가지 이유로 DSPE에서 best locality 또는 strong locality의 환경을 구성하기에는 실질적으로 어려운 작업이다.For these three reasons, it is practically difficult to configure the best locality or strong locality environment in DSPE.

또한, 실제에서는 best locality로 구성한 응용에서도 다양한 다운스트림 상태에 의해 LSP의 성능이 하락한다. 이에 다양한 사전 실험을 통해, LSP 성능에 영향을 미치는 다운스트림 상태 여섯 가지를 다음과 같이 정리한다. 그 다음, 사전 실험을 통해 best locality 환경에서 각 다운스트림 상태가 기존 binary LSP에 미치는 영향을 보인다.Also, in practice, even in an application configured with best locality, the performance of the LSP decreases due to various downstream conditions. Accordingly, through various preliminary experiments, six downstream states that affect LSP performance are summarized as follows. Then, through preliminary experiments, we show the effect of each downstream state on the existing binary LSP in the best locality environment.

표 2는 다운스트림 상태를 기반으로 분류한 DSPE 응용의 워크로드를 나타낸 것이다. Table 2 shows the workload of DSPE applications classified based on downstream state.

Downstream statusDownstream status Low load jobLow load job High load jobHigh load job TATA HW: 12 cores

Figure 112020011486680-pat00008
8 nodes
Network: 1 Gbps bandwidth
Job: 2 POs
Figure 112020011486680-pat00009
8 parallelism in 8 processes
Message: 100 bytes every 1 ms intervalHW: 12 cores
Figure 112020011486680-pat00008
Figure 112020011486680-pat00008
8 nodes
Network: 1 Gbps bandwidth
Job: 2 POs
Figure 112020011486680-pat00009
Figure 112020011486680-pat00009
8 parallelism in 8 processes
Message: 100 bytes every 1 ms interval 8 POs
Figure 112020011486680-pat00010
80 parallelism in 80 processes
8 POs
Figure 112020011486680-pat00010
80 parallelism in 80 processes
MJMJ 8 jobs8 jobs NCNC 100 Mbps bandwidth100 Mbps bandwidth OPOP With the sorting process* With the sorting process * FSFS 10 bytes message every 5 ms interval10 bytes message every 5 ms interval HSHS 1 core per each node1 core per each node

표 2에서 각 다운스트림 상태(Downstream status)를 나타내는 약자는 다음과 같다. In Table 2, the abbreviations indicating each downstream status are as follows.

TA: Vertical, horizontal, and hierarchical task allocation in a job.TA: Vertical, horizontal, and hierarchical task allocation in a job.

MJ: Multiple job assignment in a distributed stream processing engine.MJ: Multiple job assignment in a distributed stream processing engine.

NC: Network capacity in a hierarchical cluster.NC: Network capacity in a hierarchical cluster.

OP: Other CPU- and memory-bounded processes in a cluster.OP: Other CPU- and memory-bounded processes in a cluster.

FS: Fluctuation of message size and occurrence interval of data stream.FS: Fluctuation of message size and occurrence interval of data stream.

HS: Heterogeneity of resources among servers in a cluster. HS: Heterogeneity of resources among servers in a cluster.

사전 실험을 위해, 여섯 가지 다운스트림 상태에 따라 부하가 적은 경우(low load case)와 부하가 많은 경우(high load case)를 가정한다. For the preliminary experiment, a low load case and a high load case are assumed according to the six downstream states.

표 2는 각 다운스트림 상태로 부하를 분류한 실험 환경을 나타낸다. Table 2 shows the experimental environment in which the load is classified into each downstream state.

첫째, TA에서 high load case는 DSPE에 복잡한 잡이 배정된 경우를 나타내며, low load case는 상대적으로 단순한 잡이 배정된 경우를 나타낸다. First, in TA, the high load case represents a case where a complex job is assigned to DSPE, and the low load case represents a case where a relatively simple job is assigned.

둘째, MJ에서 high load case는 DSPE에 많은 잡이 배정된 경우를 나타내며, low load case는 상대적으로 적은 잡이 배정된 경우를 나타낸다. Second, in the MJ, the high load case represents the case where many jobs are assigned to DSPE, and the low load case represents the case where relatively few jobs are assigned.

셋째, NC에서 high load case는 DSPE를 1 Gbps 대역폭 네트워크에서 구동한 경우를 나타내며, low load case는 DSPE를 100 Mbps 대역폭 네트워크에서 구동한 경우를 각각 나타낸다. Third, in NC, the high load case represents the case that DSPE is operated in the 1 Gbps bandwidth network, and the low load case represents the case where the DSPE is operated in the 100 Mbps bandwidth network, respectively.

넷째, OP에서 high load case는 DSPE에 잡 외에도 시스템 자원을 많이 사용하는 정렬 프로세스를 함께 실행한 경우를 나타내며, low load case는 DSPE에 잡만 실행한 단순한 경우를 나타낸다. Fourth, in the OP, the high load case represents a case in which DSPE executes the sorting process that uses a lot of system resources in addition to the job, and the low load case represents a simple case in which only the job is executed in DSPE.

다섯째, FS에서 high load case는 네트워크 전송 버퍼를 천천히 채우도록 작은 메시지를 드물게 생성한 경우를 나타내며, low load case는 네트워크 전송 버퍼를 빠르게 채우도록 큰 메시지를 빠르게 생성한 경우를 나타낸다. Fifth, in FS, the high load case represents a case in which a small message is rarely generated to fill the network transmission buffer slowly, and the low load case represents a case where a large message is quickly generated to quickly fill the network transmission buffer.

여섯째, HS에서 high load case는 각 노드에 12개의 CPU 코어가 동작하는 클러스터에서 DSPE를 구동한 경우를 나타내며, low load case는 각 노드에 1개의 CPU 코어만 동작하는 클러스터에서 DSPE를 구동한 경우를 나타낸다.Sixth, in HS, the high load case refers to the case of running DSPE in a cluster in which 12 CPU cores are operated in each node, and the low load case refers to the case of running DSPE in a cluster in which only one CPU core is operated in each node. Show.

도 1은 Binary LSP에서 다운스트림이 미치는 영향을 도시한 그래프이다. 1 is a graph showing the effect of a downstream in a binary LSP.

도 1은 사전 실험을 통해 best locality에서 각 다운스트림 상태가 binary LSP의 처리 성능에 미치는 영향을 보여준다. 실험에 사용된 binary LSP는 Storm의 Local-or-Shuffle 그룹핑이다. 실험에서는 각 다운스트림 상태에 따라 low load case와 high load case에서 측정한 초당 메시지 전송량과 메시지 당 평균 지연 시간을 비교한다. 1 shows the effect of each downstream state on the processing performance of a binary LSP in best locality through a prior experiment. The binary LSP used in the experiment is Storm's Local-or-Shuffle grouping. In the experiment, the message transmission per second measured in the low and high load cases and the average delay time per message are compared according to each downstream state.

도 1의 실험 결과를 분석하면 다음과 같다. Analyzing the experimental results of FIG. 1 are as follows.

먼저, TA, MJ, OP에서는 예상할 수 있듯이 각 상태의 부하가 높으면 성능도 낮아진다. NC에서는 binary LSP가 best locality에서 네트워크 통신이 발생하지 않음에도 불구하고, 네트워크 대역폭에 낮을수록(즉, high load case에서) 처리 성능이 낮아진다. 이러한 결과는 DSPE가 스트림 전송 외에도 고장 감내 등의 기능을 위해 노드 간의 통신이 발생하고, 이로 인해 간접적으로 스트림 처리 성능에 영향을 줄 수 있음을 의미한다. First, as can be expected in TA, MJ, and OP, if the load in each state is high, the performance will also decrease. In NC, although the binary LSP does not cause network communication at the best locality, the lower the network bandwidth (ie, in the high load case), the lower the processing performance. These results imply that DSPE generates communication between nodes for functions such as fault tolerance in addition to stream transmission, which may indirectly affect stream processing performance.

FS에서는 더 적은 메시지(high load case)가 높은 지연 시간을 보이는데, 이는 메시지가 적을수록 전송 버퍼에서 대기하는 시간이 길어지기 때문이다. HS에서는 더 적은 자원을 사용할수록(high load case) 지연 시간이 소폭 감소하지만 처리량이 크게 감소한다. In the FS, fewer messages (high load case) show a high delay time, because the fewer messages, the longer the waiting time in the transmission buffer. In HS, the lower the resource is used (high load case), the smaller the latency is, but the throughput is greatly reduced.

이러한 실험 결과를 통해 주목해야할 점은 다운스트림의 여러 가지 상태가 binary LSP의 성능에 큰 영향을 미친다는 점이다. 따라서, DSPE에서 LSP는 지역성 외에도 다운스트림 상태를 고려해야함을 알 수 있다. It should be noted from these experimental results that various downstream states have a great influence on the performance of the binary LSP. Therefore, it can be seen that in DSPE, the LSP must consider downstream conditions in addition to locality.

대한민국 등록특허 10-0876560Korean Patent Registration 10-0876560

본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 태스크 지역성(localty)과 다운스트림 상태를 함께 고려하여, 매 메시지마다 확률적으로 다운스트림을 선택하는 스토캐스틱(Stochastic) LSP(locality-aware stream partitioning)를 제공하는데 그 목적이 있다.The present invention has been devised to solve the above problems, and considers both a task localty and a downstream state, and a stochastic locality-aware stream (LSP) for selecting a downstream probabilistically for each message. The purpose is to provide partitioning).

본 발명의 목적은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 통상의 기술자에게 명확하게 이해될 수 있을 것이다.The object of the present invention is not limited to the above-mentioned object, and other objects not mentioned will be clearly understood by those skilled in the art from the following description.

이와 같은 목적을 달성하기 위한 본 발명의 분산 스트림 처리 엔진에서의 데이터 스트림 파티셔닝 방법에 있어서, 각 업스트림이 주기적으로 후보 다운스트림들의 태스크 지역성 및 다운스트림 상태를 탐사하는 다운스트림 탐사 단계, 각 업스트림이 후보 다운스트림들과의 탐사 소요 시간을 기반으로 각 다운스트림이 선택될 확률 가중치를 계산하는 확률 계산 단계 및 메시지 전송이 필요한 경우, 각 업스트림이 확률 가중치를 기반으로 메시지를 전송할 다운스트림을 확률적으로 선택하는 다운스트림 선택 단계를 포함한다. In the data stream partitioning method in the distributed stream processing engine of the present invention for achieving the above object, each upstream periodically searches for task locality and downstream state of candidate downstreams, and each upstream is a candidate Probability calculation step that calculates the probability weight for each downstream to be selected based on the time required for exploration with downstream and when message transmission is required, each upstream probably selects the downstream to transmit the message based on the probability weight And a downstream selection step.

본 발명의 일 실시예에서 상기 다운스트림 탐사 단계 및 상기 확률 계산 단계는 미리 정해진 인터벌 내에서 한 번만 실행되며, 이때, 다운스트림 탐사를 수행한 후 인터벌 시간이 지나면, 다운스트림 탐사를 다시 수행하고 인터벌을 갱신할 수 있다. In an embodiment of the present invention, the downstream detection step and the probability calculation step are executed only once within a predetermined interval, and in this case, after performing the downstream detection, after an interval time elapses, the downstream search is performed again and the interval Can be updated.

상기 다운스트림 탐사 단계에서, 각 업스트림은 각 후보 다운스트림과의 RTT(round-trip time)를 측정하고, 측정한 RTT를 기반으로 각 후보 다운스트림과의 근접도를 계산할 수 있다. In the downstream detection step, each upstream may measure a round-trip time (RTT) with each candidate downstream, and calculate a proximity to each candidate downstream based on the measured RTT.

상기 확률 계산 단계에서, 각 업스트림은 근접도를 내림차순으로 정렬하고, 정렬된 근접도를 정규화하고, 이를 통해 각 다운스트림이 선택될 확률 가중치를 계산할 수 있다. In the probability calculation step, each upstream sorts the proximity in descending order, normalizes the sorted proximity, and through this, a probability weight at which each downstream is selected may be calculated.

상기 다운스트림 선택 단계에서, 각 업스트림은 랜덤 넘버를 생성하고, 생성된 랜덤 넘버와 각 다운스트림들의 확률 가중치에 의한 확률 범위를 비교하여, 랜덤 넘버를 포함하는 확률 범위를 갖는 다운스트림을 선택할 수 있다. In the downstream selection step, each upstream may generate a random number, compare the generated random number with a probability range based on a probability weight of each downstream, and select a downstream having a probability range including the random number. .

본 발명의 일 실시예에서 근접도의 크기에 따라 가중치를 부여하는 근접도 가중치 부여 과정과, 상기 다운스트림 탐사 단계 및 상기 확률 계산 단계와 상기 다운스트림 선택 단계를 서로 다른 쓰레드에서 동작시키는 다중 쓰레드 모델 도입 과정을 포함하는 최적화 단계를 더 포함할 수 있다. In an embodiment of the present invention, a multi-threaded model in which a proximity weighting process in which a weight is assigned according to the size of the proximity, and the downstream exploration step, the probability calculation step, and the downstream selection step are operated in different threads. It may further include an optimization step including the introduction process.

본 발명에 의하면, 태스크 지역성과 다운스트림 상태를 함께 고려하여 데이터 스트림 파티셔닝을 함으로써, 분산 스트림 처리 시스템의 처리량 성능을 극대화하고, 지연 시간을 감소시킬 수 있는 효과가 있다. According to the present invention, data stream partitioning is performed in consideration of both task locality and downstream state, thereby maximizing throughput performance of a distributed stream processing system and reducing delay time.

도 1은 Binary LSP에서 다운스트림이 미치는 영향을 도시한 그래프이다.
도 2는 본 발명의 일 실시예에 따른 데이터 스트림 파티셔닝 방법을 보여주는 흐름도이다.
도 3은 본 발명의 스토캐스틱 LSP(Stochastic LSP)의 동작 절차를 나타낸 것이다.
도 4는 업스트림에서 스토캐스틱 LSP(Stochastic LSP)가 동작하는 알고리즘을 나타낸다.
도 5는 in-P2P 모델을 통한 근접도 계산 알고리즘이다.
도 6은 본 발명의 일 실시예에 따른 RTT 탐사 및 근접도를 계산하는 예제 1을 나타낸 것이다.
도 7은 본 발명의 일 실시예에 따른 계산 스테이지에서 근접도를 확률 가중치로 변환하는 알고리즘이다.
도 8은 본 발명의 일 실시예에 따른 확률 계산 예제 2를 나타낸 것이다.
도 9는 본 발명의 일 실시예에 따른 선택 스테이지에서 확률 기반 다운스트림 선택 알고리즘이다.
도 10은 본 발명의 일 실시예에 따른 확률 기반 다운스트림 선택 예제 3이다.
도 11은 본 발명의 일 실시예에 따른 최적화에서 Weighted closeness 예제 4를 나타낸 것이다.
도 12는 본 발명의 실험에 의한 Binary LSP와 optimized SLSP의 성능을 비교한 그래프이다.
1 is a graph showing the effect of a downstream in a binary LSP.
2 is a flowchart showing a data stream partitioning method according to an embodiment of the present invention.
Figure 3 shows the operation procedure of the stochastic LSP (Stochastic LSP) of the present invention.
4 shows an algorithm in which a stochastic LSP operates in an upstream.
5 is an algorithm for calculating proximity through an in-P2P model.
6 shows Example 1 of calculating RTT exploration and proximity according to an embodiment of the present invention.
7 is an algorithm for converting a proximity degree into a probability weight in a calculation stage according to an embodiment of the present invention.
8 shows a probability calculation example 2 according to an embodiment of the present invention.
9 is a probability-based downstream selection algorithm in a selection stage according to an embodiment of the present invention.
10 is an example 3 of probability-based downstream selection according to an embodiment of the present invention.
11 shows Example 4 of weighted closeness in optimization according to an embodiment of the present invention.
12 is a graph comparing the performance of binary LSP and optimized SLSP according to the experiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.In the present invention, various modifications may be made and various embodiments may be provided, and specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit the present invention to a specific embodiment, it is to be understood to include all changes, equivalents, and substitutes included in the spirit and scope of the present invention.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In the present application, terms such as "comprise" or "have" are intended to designate the presence of features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, but one or more other features. It is to be understood that the presence or addition of elements or numbers, steps, actions, components, parts, or combinations thereof, does not preclude in advance.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 갖고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 갖는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs. Terms as defined in a commonly used dictionary should be interpreted as having a meaning consistent with the meaning in the context of the related technology, and should not be interpreted as an ideal or excessively formal meaning unless explicitly defined in this application. Does not.

또한, 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조 부호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.In addition, in the description with reference to the accompanying drawings, the same reference numerals are assigned to the same components regardless of the reference numerals, and redundant descriptions thereof will be omitted. In describing the present invention, when it is determined that a detailed description of related known technologies may unnecessarily obscure the subject matter of the present invention, a detailed description thereof will be omitted.

본 발명은 태스크 지역성과 다운스트림 상태를 고려한 확률 기반의 데이터 스트림 파티셔닝 방법에 대한 것이다. The present invention relates to a probability-based data stream partitioning method in consideration of task locality and downstream state.

본 발명에서 데이터 스트림 파티셔닝 방법을 수행하는 주체는 컴퓨터를 포함하는 단말 장치라고 할 수 있으며, 또는 컴퓨터 등의 단말 장치를 전반적으로 제어하는 제어부나 프로세서(processor)일 수 있다. 즉, 본 발명의 데이터 스트림 환경에서 데이터 스트림 파티셔닝 방법은 일종의 소프트웨어인 알고리즘으로 구성되며, 소프트웨어 알고리즘은 컴퓨터 등의 단말 장치의 제어부 또는 프로세서(processor)에서 실행될 수 있다. In the present invention, the subject performing the data stream partitioning method may be referred to as a terminal device including a computer, or may be a control unit or a processor that generally controls a terminal device such as a computer. That is, in the data stream environment of the present invention, the data stream partitioning method is composed of an algorithm that is a kind of software, and the software algorithm may be executed in a controller or a processor of a terminal device such as a computer.

즉, 본 발명에서 데이터 스트림 파티셔닝 방법을 수행하는 주체는 컴퓨터를 전반적으로 제어하는 제어부 또는 제어 명령 신호 및 일련의 프로그램을 처리하는 중앙처리장치(CPU, Central Processing Unit)일 수 있다. 즉, 본 발명의 데이터 스트림 파티셔닝 방법은 일종의 소프트웨어인 알고리즘 또는 로직으로 구성되며, 소프트웨어 알고리즘은 컴퓨터의 제어부 또는 중앙처리장치에서 실행될 수 있다.That is, the subject performing the data stream partitioning method in the present invention may be a control unit for overall control of a computer or a central processing unit (CPU) that processes a control command signal and a series of programs. That is, the data stream partitioning method of the present invention is composed of an algorithm or logic, which is a kind of software, and the software algorithm can be executed by a control unit of a computer or a central processing unit.

도 2는 본 발명의 일 실시예에 따른 데이터 스트림 파티셔닝 방법을 보여주는 흐름도이다. 2 is a flowchart showing a data stream partitioning method according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 분산 스트림 처리 엔진에서의 데이터 스트림 파티셔닝 방법은 다음과 같다. Referring to FIG. 2, a data stream partitioning method in the distributed stream processing engine of the present invention is as follows.

먼저, 각 업스트림이 주기적으로 후보 다운스트림들의 태스크 지역성 및 다운스트림 상태를 탐사하는 다운스트림 탐사 단계(S110)를 수행한다. First, each upstream performs a downstream exploration step (S110) in which each upstream periodically discovers task locality and downstream state of candidate downstreams.

그리고, 각 업스트림이 후보 다운스트림들과의 탐사 소요 시간을 기반으로 각 다운스트림이 선택될 확률 가중치를 계산하는 확률 계산 단계(S120)를 수행한다. Then, a probability calculation step (S120) of calculating a probability weight for each downstream to be selected is performed based on the time required for discovery of each upstream with the candidate downstream.

메시지 전송이 필요한 경우, 각 업스트림이 확률 가중치를 기반으로 메시지를 전송할 다운스트림을 확률적으로 선택하는 다운스트림 선택 단계(S130)를 수행한다. When message transmission is required, each upstream performs a downstream selection step (S130) of probabilistically selecting a downstream to transmit a message based on a probability weight.

본 발명의 일 실시예에서 다운스트림 탐사 단계(S110) 및 확률 계산 단계(S120)는 미리 정해진 인터벌(interval) 내에서 한 번만 실행될 수 있다. 이때, 다운스트림 탐사를 수행한 후 인터벌 시간이 지나면, 다운스트림 탐사를 다시 수행하고 인터벌을 갱신할 수 있다. In an embodiment of the present invention, the downstream exploration step (S110) and the probability calculation step (S120) may be performed only once within a predetermined interval. In this case, after an interval time elapses after performing a downstream search, the downstream search may be performed again and the interval may be updated.

다운스트림 탐사 단계(S110)에서, 각 업스트림은 각 후보 다운스트림과의 RTT(round-trip time)를 측정하고, 측정한 RTT를 기반으로 각 후보 다운스트림과의 근접도를 계산할 수 있다. In the downstream exploration step S110, each upstream may measure a round-trip time (RTT) with each candidate downstream, and calculate proximity to each candidate downstream based on the measured RTT.

그리고, 확률 계산 단계(S120)에서, 각 업스트림은 근접도를 내림차순으로 정렬하고, 정렬된 근접도를 정규화하고, 이를 통해 각 다운스트림이 선택될 확률 가중치를 계산할 수 있다. In the probability calculation step S120, each upstream sorts the proximity in descending order, normalizes the sorted proximity, and through this, a probability weight at which each downstream is selected may be calculated.

그리고, 다운스트림 선택 단계(S130)에서, 각 업스트림은 랜덤 넘버를 생성하고, 생성된 랜덤 넘버와 각 다운스트림들의 확률 가중치에 의한 확률 범위를 비교하여, 랜덤 넘버를 포함하는 확률 범위를 갖는 다운스트림을 선택할 수 있다. And, in the downstream selection step (S130), each upstream generates a random number, and compares the generated random number with a probability range based on probability weights of each downstream, and a downstream stream having a probability range including the random number. You can choose.

본 발명의 일 실시예에서 근접도의 크기에 따라 가중치를 부여하는 근접도 가중치 부여 과정과, 다운스트림 탐사 단계(S110) 및 확률 계산 단계(S120)와 다운스트림 선택 단계(S130)를 서로 다른 쓰레드(thread)에서 동작시키는 다중 쓰레드 모델 도입 과정을 포함하는 최적화 단계를 더 포함할 수 있다. In an embodiment of the present invention, a proximity weighting process in which a weight is assigned according to the size of the proximity, a downstream exploration step (S110), a probability calculation step (S120), and a downstream selection step (S130) are performed in different threads. It may further include an optimization step including a process of introducing a multithreaded model operated by (thread).

이하에서는 명세서에서 설명의 편의를 위하여 본 발명의 데이터 스트림 파티셔닝 방법을 스토캐스틱(Stochastic) LSP(locality-aware stream partitioning)로 명명하여 기술하기로 한다. Hereinafter, for convenience of description in the specification, the data stream partitioning method of the present invention will be referred to as stochastic locality-aware stream partitioning (LSP).

본 발명에서 제안하는 스토캐스틱(Stochastic) LSP(locality-aware stream partitioning)는 기본적으로 태스크 지역성을 고려하되 다운스트림 상태를 스트림 파티셔닝에 함께 활용한다. 즉, 스토캐스틱 LSP는 Storm의 Local-or-Shuffle 그룹핑, Flink의 Rescaling 파티셔닝 등 binary LSP와는 다르게 다운스트림을 업스트림과 동일한 프로세스에만 한정하지 않는다. 바람직한 DSPE는 후보 다운스트림의 태스크 지역성뿐 아니라 다운스트림 상태까지 고려하여 스트림을 분배해야 한다.The stochastic locality-aware stream partitioning (LSP) proposed in the present invention basically considers task locality, but utilizes the downstream state for stream partitioning. In other words, unlike binary LSPs such as Storm's Local-or-Shuffle grouping and Flink's Rescaling partitioning, the stochastic LSP does not limit the downstream to the same process as the upstream. A desirable DSPE should distribute the stream taking into account the downstream state as well as the task locality of the candidate downstream.

본 발명에서 제안하는 스토캐스틱 LSP(Stochastic LSP)는 후보 다운스트림들의 태스크 지역성 및 다운스트림 상태에 따라 확률적으로 다운스트림을 선택한다. The stochastic LSP (Stochastic LSP) proposed by the present invention selects a downstream probabilistically according to a task locality and a downstream state of candidate downstream.

스토캐스틱 LSP(Stochastic LSP)는 다음 세 단계를 거쳐 다운스트림을 선택한다.Stochastic LSP (Stochastic LSP) selects downstream through the following three steps.

(1) 탐사 스테이지(Probing stage): 업스트림은 주기적으로 후보 다운스트림들의 태스크 지역성 및 다운스트림 상태를 탐사(probe)한다. (1) Probing stage: The upstream periodically probes the task locality and downstream state of candidate downstream.

(2) 계산 스테이지(Computation stage): 업스트림은 후보 다운스트림들과의 탐사 소요 시간(round-trip time)을 기반으로 각 다운스트림이 선택될 확률 가중치를 계산한다. (2) Computation stage: The upstream calculates a probability weight for each downstream to be selected based on a round-trip time with candidate downstream.

(3) 선택 스테이지(Selection stage): 업스트림은 메시지 전송이 필요할 때, 확률에 따라 다운스트림을 선택한다. (3) Selection stage: When the upstream needs to transmit a message, the downstream is selected according to the probability.

결국, 탐사 스테이지(Probing stage)에서 어떻게 다운스트림을 탐사하는지, 계산 스테이지(Computation stage)에서 어떻게 확률 가중치를 계산하고 관리하는지, 선택 스테이지(Selection stage)에서 가중치 기반으로 어떤 다운스트림을 선택하는지가 스토캐스틱 LSP(Stochastic LSP)의 핵심이다.In the end, how to explore downstream in the probing stage, how to calculate and manage probability weights in the computation stage, and which downstream selections based on weights in the selection stage are stochastic. It is the core of the stochastic LSP (LSP).

도 3은 본 발명의 스토캐스틱 LSP(Stochastic LSP)의 동작 절차를 나타낸 것이다.Figure 3 shows the operation procedure of the stochastic LSP (Stochastic LSP) of the present invention.

도 3에서 ⓜ은 다운스트림으로의 전송을 대기하는 메시지이다. 먼저, 업스트림의 스토캐스틱 LSP(Stochastic LSP)는 탐사 스테이지(Probing stage)를 통해 다운스트림들을 주기적으로 탐사한다. In FIG. 3, ⓜ is a message waiting for transmission to the downstream. First, the upstream stochastic LSP (Stochastic LSP) periodically searches downstream through a probing stage.

다음으로, 계산 스테이지(Computation stage)에서 각 다운스트림의 탐사 시간을 기반으로 확률 가중치를 계산한다. Next, a probability weight is calculated based on the exploration time of each downstream in the computation stage.

마지막으로, 이러한 가중치를 기반으로 선택 스테이지(Selection stage)에서 메시지를 전송할 다운스트림을 확률적으로 선택한다. Finally, based on these weights, the downstream to which the message is to be transmitted is probabilistically selected in the selection stage.

탐사 스테이지(Probing stage)와 계산 스테이지(Computation stage)는 주어진 인터벌(interval) 내에서 한번만 실행되며, 인터벌이 지나면 다시 확률 가중치를 계산한다. 본 발명에서 주기적으로 확률 가중치를 업데이트하는 이유는 메시지를 지속적으로 처리하면서 다운스트림 상태가 계속 바뀌기 때문이다. 이 같은 과정을 통해, 각 업스트림은 모든 다운스트림들에 대한 확률 가중치를 유지하며, 메시지를 전송할 다운스트림을 실시간으로 선택한다.The probing stage and the computation stage are executed only once within a given interval, and the probability weight is calculated again after the interval. The reason why the probability weight is periodically updated in the present invention is that the downstream state is continuously changed while the message is continuously processed. Through this process, each upstream maintains probability weights for all downstream streams, and selects a downstream stream to transmit a message in real time.

도 4는 업스트림에서 스토캐스틱 LSP(Stochastic LSP)가 동작하는 알고리즘을 나타낸다. 4 shows an algorithm in which a stochastic LSP operates in an upstream.

도 4의 알고리즘은 업스트림이 다운스트림으로 메시지를 전송할 때 호출되며, 후보 다운스트림 중에서 지역성 및 다운스트림 상태를 고려하여 최적의 다운스트림을 선택하는 기능을 갖는다. The algorithm of FIG. 4 is called when the upstream transmits a message to the downstream, and has a function of selecting an optimal downstream from among candidate downstreams in consideration of locality and downstream conditions.

먼저, 라인 2-8은 주기적으로 다운스트림들을 탐사하고 각 다운스트림의 확률 가중치를 계산하는 탐사 스테이지(Probing stage) 및 계산 스테이지(Computation stage)이다. 이때, 인터벌은 다운스트림들의 태스크 지역성 및 부하 상태를 탐지하는 주기를 의미한다. 최근 탐사된 시간(lastTime) 이후 인터벌 시간이 지나면, 탐사를 다시 수행하고 인터벌을 갱신한다. First, lines 2-8 are a Probing stage and a Computation stage that periodically search downstream and calculate a probability weight of each downstream. In this case, the interval refers to a period in which the task locality and load state of downstream are detected. When the interval time elapses after the last time, the search is performed again and the interval is updated.

다음으로, 라인 10은 계산된 확률을 기반으로 다운스트림을 선택하는 선택 스테이지(Selection stage)이다. Next, line 10 is a selection stage that selects downstream based on the calculated probability.

이제 본 발명에서 탐사 스테이지, 계산 스테이지, 선택 스테이지에 대해 상세히 설명하면 다음과 같다. Now, in the present invention, the exploration stage, the calculation stage, and the selection stage will be described in detail as follows.

탐사 스테이지에서는 후보 다운스트림들의 태스크 지역성과 다운스트림 상태를 측정하기 위해 다운스트림들을 탐사한다. In the exploration stage, the downstreams are explored to measure the task locality and the downstream state of candidate downstreams.

탐사 스테이지에서 업스트림은 시시각각 변하는 후보 다운스트림들의 정확한 태스크 지역성과 상태를 알기 위해서 다운스트림들을 모니터링해야 한다. 하지만, 업스트림이 다운스트림들의 시스템 정보, 자원 상태, 부하 상태, 네트워킹 상태 등의 많은 정보를 모두 모니터링하는 것은 많은 네트워크 통신과 추가 대기시간을 요구하는 문제가 있다. 또한, 다운스트림의 많은 정보를 기반으로 확률 가중치를 계산하는 것은 복잡할 뿐만 아니라 정확도를 보장할 수도 없다. 따라서, 모니터링보다는 간단한 방법으로 다운스트림의 태스크 지역성과 상태를 파악할 필요가 있다.In the exploration stage, the upstream must monitor the downstream to know the exact task locality and status of the candidate downstreams that are constantly changing. However, when the upstream monitors all information such as system information, resource status, load status, and networking status of downstream, there is a problem that requires a lot of network communication and additional latency. In addition, calculating a probability weight based on a lot of information in the downstream is complex and cannot guarantee accuracy. Therefore, it is necessary to grasp downstream task locality and status in a simpler method than monitoring.

본 발명의 스토캐스틱 LSP(Stochastic LSP)는 복잡한 모니터링 대신 간단하고 효과적인 탐사(probing) 방법을 사용한다. 즉, 업스트림이 다운스트림들의 태스크 지역성과 상태를 알기 위해, 탐사는 각 다운스트림과의 RTT(round-trip time)를 측정한다. 이는 RTT가 부하 상태, 자원 상태, 네트워킹 상태 등을 반영하기 때문이다. 따라서, 다음 명제(Proposition) 1에 의해, 본 발명에서는 스토캐스틱 LSP(Stochastic LSP)의 가중치 계산에 RTT를 활용한다.The stochastic LSP (Stochastic LSP) of the present invention uses a simple and effective probing method instead of complex monitoring. That is, in order for the upstream to know the task locality and state of the downstream, the exploration measures the round-trip time (RTT) with each downstream. This is because RTT reflects load status, resource status, networking status, etc. Therefore, according to the following Proposition 1, in the present invention, RTT is used to calculate the weight of a stochastic LSP.

명제 1.Proposition 1.

RTT

Figure 112020011486680-pat00011
{distance between upstream and downstream, load amount/resource usage/network usage of a downstream}. RTT
Figure 112020011486680-pat00011
{distance between upstream and downstream, load amount/resource usage/network usage of a downstream}.

명제(Proposition) 1은 RTT는 업스트림과 다운스트림간의 거리(태스크 지역성)와 LSP의 성능에 영향을 미치는 부하 상태, 자원 상태, 네트워킹 상태 등 다운스트림 상태를 반영한다는 것이다. Proposition 1 is that RTT reflects the distance between upstream and downstream (task locality) and downstream states such as load state, resource state, and networking state that affect the performance of LSP.

기존의 LSP들은 업스트림이 같은 프로세스에 동작하는 다운스트림만 선택하는 Binary LSP로써 다른 프로세스의 지역성과 상태를 전혀 고려하지 않아, 같은 프로세스에 후보 다운스트림이 없다면 다른 프로세스의 모든 다운스트림들에게 같은 양의 스트림을 전송한다. Existing LSPs are binary LSPs in which the upstream selects only the downstream operating in the same process, and do not consider the locality and state of other processes at all. If there is no candidate downstream in the same process, the same amount of Transmit the stream.

본 발명의 명제 1에 따르면, RTT는 후보 다운스트림 각각의 태스크 지역성과 다운스트림 상태를 고려하므로, 각 다운스트림별로 더욱 정밀한 스트림 파티셔닝이 가능해진다.According to the proposition 1 of the present invention, since the RTT considers the task locality and the downstream state of each candidate downstream, more precise stream partitioning is possible for each downstream.

본 발명에서는 측정한 RTT를 기반으로 각 다운스트림의 근접도를 계산한다.In the present invention, the proximity of each downstream is calculated based on the measured RTT.

근접도(closeness)란 업스트림과 각 후보 다운스트림이 얼마나 가까운가를 의미한다. 근접도는 클러스터 구성으로 인한 정적인(static) 거리뿐만 아니라, 다운스트림 상태인 동적인(dynamic) 거리까지 반영한다. 근접도는 업스트림이 메시지마다 각 다운스트림을 선택하기 위한 가중치의 역할을 한다. 이러한 근접도를 앞서 측정한 RTT의 역수로 계산한다.Closeness refers to how close the upstream and each candidate downstream are. The proximity reflects not only the static distance due to the cluster configuration, but also the dynamic distance, which is a downstream state. Proximity serves as a weight for the upstream to select each downstream for each message. This proximity is calculated as the inverse of the previously measured RTT.

본 발명에서는 근접도를 프로세스 수준에서 계산하기 위해, in-Process to Process RTT 측정 모델(이하 'in-P2P 모델'이라 함)을 제시한다. 쉽게 말해, in-P2P 모델은 TCP/IP 소켓 연결을 통해 프로세스 내에서 다른 프로세스로의 RTT를 측정하는 방식이다. In the present invention, in order to calculate the proximity at the process level, an in-Process to Process RTT measurement model (hereinafter referred to as'in-P2P model') is presented. In simple terms, the in-P2P model is a method of measuring RTT from a process to another process through a TCP/IP socket connection.

도 5는 in-P2P 모델을 통한 근접도 계산 알고리즘이다. 5 is an algorithm for calculating proximity through an in-P2P model.

본 발명에서 제시한 in-P2P 모델의 핵심은 소켓 연결 요청 후에 연결까지 대기하는 블로킹 소켓 I/O 모델(blocking socket I/O model)의 활용이다. 여기서 소켓은 TCP/IP를 이용하여 특정 서버의 IP(Internet Protocol)와 포트를 기반으로 데이터를 통신하는 인터페이스이다. The core of the in-P2P model presented in the present invention is the utilization of a blocking socket I/O model that waits for a connection after a socket connection request. Here, the socket is an interface that communicates data based on the IP (Internet Protocol) and port of a specific server using TCP/IP.

DSPE에서 각 태스크는 프로세스에 포함되며, 프로세스마다 할당된 포트를 통해 스트림을 전송한다. 따라서, 후보 다운스트림들의 각 프로세스에게 할당된 포트에 소켓을 연결하여 다운스트림들의 RTT를 측정할 수 있다. 이 소켓은 실제 스트림 전송과 같은 포트이므로, RTT 측정을 위한 별도의 포트를 생성하는 것보다 정확도가 매우 높다. 이때, 실제 스트림 통신의 성능에 영향을 미치지 않도록, 메시지는 전송하지 않고 연결만 요청한다(라인 6). In DSPE, each task is contained in a process, and the stream is transmitted through a port assigned to each process. Accordingly, the RTT of downstream can be measured by connecting a socket to a port allocated to each process of the candidate downstream. Since this socket is the same port as the actual stream transmission, the accuracy is much higher than creating a separate port for RTT measurement. At this time, so as not to affect the performance of the actual stream communication, a connection is requested without transmitting a message (line 6).

In-P2P 모델은 연결의 요청 전과 연결 후의 시간 차이를 RTT라 정의한다(라인 8). 그런데, 멀티태스킹 환경에서 통신 I/O는 다른 쓰레드로의 문맥 전환이 발생할 수 있다. 만약 in-P2P에서 RTT 측정 중에 문맥 전환이 일어나면 RTT 측정 오차가 발생한다. 따라서, in-P2P에서는 블로킹(blocking) 소켓을 통해, 문맥 전환으로 인한 RTT 측정 오차를 없앤다(라인 4).In the In-P2P model, the time difference before and after a connection request is defined as RTT (line 8). However, in a multitasking environment, communication I/O may cause a context switch to another thread. If the context switch occurs during RTT measurement in in-P2P, an RTT measurement error occurs. Therefore, in in-P2P, RTT measurement error due to context switching is eliminated through a blocking socket (line 4).

본 발명에서 제안하는 스토캐스틱 LSP(Stochastic LSP)는 측정한 RTT를 기반으로 근접도를 계산한다. The stochastic LSP (Stochastic LSP) proposed in the present invention calculates proximity based on the measured RTT.

Figure 112020011486680-pat00012
(1)
Figure 112020011486680-pat00012
(One)

식 (1)에서 근접도

Figure 112020011486680-pat00013
는 프로세스 수준에서의 RTT를 측정한다. 따라서, 근접도는 현재 업스트림에서 후보 다운스트림들이 포함된 i-번째 프로세스까지의 상대적으로 가까운 정도를 의미한다. 이때,
Figure 112020011486680-pat00014
는 프로세스를 구분하기 위한 프로세스 ID did와 근접도 prob의 쌍으로 이루어진다(라인 10).Proximity from equation (1)
Figure 112020011486680-pat00013
Measures RTT at the process level. Therefore, the proximity refers to a relatively close degree from the current upstream to the i-th process in which candidate downstreams are included. At this time,
Figure 112020011486680-pat00014
Consists of a pair of process ID did and proximity prob to identify the process (line 10).

도 6은 본 발명의 일 실시예에 따른 RTT 탐사 및 근접도를 계산하는 예제 1을 나타낸 것이다. 6 shows Example 1 of calculating RTT exploration and proximity according to an embodiment of the present invention.

도 6의 예제 1에서 보는 바와 같이, 세 개의 프로세스(Process)가 동작하는 클러스터를 가정한다. 이 프로세스들은 동일 노드 혹은 다른 노드에 배치될 수 있다. As shown in Example 1 of FIG. 6, it is assumed that a cluster in which three processes operate. These processes can be deployed on the same node or on different nodes.

프로세스 P1에는 업스트림 U1이 동작하며, 프로세스 P1, P2, P3에는 각각 후보 다운스트림 D1, D2, D3가 동작한다. 즉, 업스트림은 1개이며 다운스트림은 3개인 응용을 나타낸다. The process P 1 is the upstream operations U 1 is active and the process P 1, P 2, P 3, the respective candidate downstream D 1, D 2, D 3 . That is, one upstream and three downstream applications.

먼저, 도 6 (a)에서는 업스트림이 각 후보 다운스트림의 RTT를 측정한다. 이 예제에서 다운스트림 D1은 태스크 지역성에 따라 스스로의 RTT가 가장 작으며, 그 다음은 다운스트림 D3, 다운스트림 D2 순으로 RTT가 작다. First, in Figure 6 (a), the upstream measures the RTT of each candidate downstream. In this example, downstream D 1 has the smallest RTT according to task locality, followed by downstream D 3 and downstream D 2 in the order of lower RTT.

다음으로, 도 6 (b)에서는 RTT를 기반으로 각 후보 다운스트림의 근접도를 계산한다(식 (1)). 이때, 각 다운스트림 ID와 RTT 역수를 close[i]에 저장함을 알 수 있다. 이러한 과정에 의해, 다운스트림 D1, D2, D3의 근접도는 각각

Figure 112020011486680-pat00015
,
Figure 112020011486680-pat00016
,
Figure 112020011486680-pat00017
로 계산된다. 본 발명에서는 이렇게 계산된 근접도를 사용하여 다운스트림의 확률 가중치를 선택한다.Next, in FIG. 6 (b), the proximity of each candidate downstream is calculated based on the RTT (Equation (1)). At this time, it can be seen that each downstream ID and RTT reciprocal are stored in close [ i ]. By this process, the proximity of downstream D 1 , D 2 and D 3 is respectively
Figure 112020011486680-pat00015
,
Figure 112020011486680-pat00016
,
Figure 112020011486680-pat00017
Is calculated as In the present invention, the probability weight of the downstream is selected using the calculated proximity.

이제 본 발명에서 후보 다운스트림들의 근접도를 기반으로 확률 가중치를 계산하는 계산 스테이지(Computation stage)를 설명한다. Now, in the present invention, a computation stage for calculating a probability weight based on the proximity of candidate downstreams will be described.

먼저, 이 후의 선택 스테이지(Selection stage)를 위해, 업스트림에 등록된 다운스트림들을 근접도 순으로 미리 정렬한다. 계산 스테이지(Computation stage) 한 번에 여러 번의 선택 스테이지(Selection stage)가 수행되는 구조이기 때문에, 계산 스테이지(Computation stage)에서 식 (2)와 같이 다운스트림들을 근접도의 내림차순으로 정렬한다. First, for a subsequent selection stage, downstream streams registered in the upstream are pre-ordered in order of proximity. Computation stage Since it is a structure in which several selection stages are performed at a time, downstream are sorted in descending order of proximity as shown in Equation (2) in the computation stage.

Figure 112020011486680-pat00018
; (2)
Figure 112020011486680-pat00018
; (2)

이러한 정렬 연산은 계산 스테이지(Computation stage)에서만 수행되고, 실제 업스트림에 대한 다운스트림의 수가 최대 수백 개 수준이므로, 선택 스테이지(Selection stage)의 성능 분석에 있어서 이 정렬 과정을 무시할 수 있다. This sorting operation is performed only in the computation stage, and since the number of downstream to the actual upstream is at most several hundred, this sorting process can be ignored in the performance analysis of the selection stage.

더불어, 확률적 표현을 위해 근접도의 합이 1이 되도록 다음 식 (3)과 같이 정규화한다.In addition, for probabilistic expression, normalize as shown in the following equation (3) so that the sum of the proximity is 1.

Figure 112020011486680-pat00019
(3)
Figure 112020011486680-pat00019
(3)

도 7은 본 발명의 일 실시예에 따른 계산 스테이지에서 근접도를 확률 가중치로 변환하는 알고리즘이다. 7 is an algorithm for converting a proximity degree into a probability weight in a calculation stage according to an embodiment of the present invention.

도 7의 알고리즘에서, 라인 2는 근접도를 내림차순으로 정렬하고(식 (3)), 라인 3은 이를 정규화한다(식 (3)). 따라서, 알고리즘의 결과인 nclose는 각 다운스트림이 선택될 확률을 포함한다. 즉, nclose[i]. probdownstreams[nclose[i].did]가 선택될 확률이다. 이러한 과정을 통해, 각 다운스트림의 태스크 지역성과 상태를 기반으로 스트림을 분배할 확률을 계산할 수 있다.In the algorithm of Fig. 7, line 2 sorts the proximity in descending order (equation (3)), and line 3 normalizes it (equation (3)). Thus, nclose, which is the result of the algorithm, contains the probability that each downstream will be selected. That is, nclose [ i ] . prob is the probability that downstreams [ nclose [ i ] .did ] will be selected. Through this process, the probability of distributing the stream can be calculated based on the task locality and state of each downstream.

도 8은 본 발명의 일 실시예에 따른 확률 계산 예제 2를 나타낸 것이다. 8 shows a probability calculation example 2 according to an embodiment of the present invention.

도 8은 앞서 예제 1에서 구한 근접도를 기반으로 계산 스테이지에서 확률 가중치를 계산하는 사례이다. 8 is an example of calculating a probability weight in a calculation stage based on the proximity obtained in Example 1 above.

도 8에서는 도 6의 예제 1에서 구한 근접도를 정렬한(식 (2)) 후에 정규화한다(식 (3)). 이러한 정렬에 의해, 다운스트림 D2와 D3의 근접도는 서로 인덱스가 바뀌나, did에 의해 해당 다운스트림의 식별이 가능하다. 이러한 과정에 의해, 다운스트림 D1, D2, D3의 정규화된 근접도는 각각 0.46, 0.23, 0.31로 계산된다. 본 발명에서 탐사 스테이지(Probing stage)와 계산 스테이지(Computation stage)는 미리 정해진 시간 인터벌마다 반복되며, 이렇게 계산된 근접도를 사용하여 다운스트림을 선택한다.In Fig. 8, the proximity obtained in Example 1 of Fig. 6 is aligned (Equation (2)) and then normalized (Equation (3)). Due to this sorting, the indexes of the proximity of the downstream D 2 and D 3 change with each other, but the corresponding downstream can be identified by did. By this process, the normalized proximity of downstream D 1 , D 2 , and D 3 is calculated as 0.46, 0.23, and 0.31, respectively. In the present invention, the probing stage and the computation stage are repeated at predetermined time intervals, and the downstream is selected using the calculated proximity.

이제 본 발명에서 근접도로 다운스트림을 효율적으로 선택하는 선택 스테이지(Selection stage)를 설명한다. In the present invention, a selection stage for efficiently selecting downstream with proximity will be described.

본 발명에서 제안하는 스토캐스틱 LSP(Stochastic LSP)는 앞서 구한 근접도 nclose로 다음에 메시지를 전송할 다운스트림을 선택한다. 개념적으로 간단히 설명하면, (0, 1] 사이의 랜덤 넘버를 생성하고, 이 숫자가 속하는 nclose 구간의 다운스트림을 선택한다.The stochastic LSP (Stochastic LSP) proposed in the present invention selects the downstream to which the next message is to be transmitted with the obtained proximity nclose. Briefly conceptually, a random number between (0, 1) is generated, and the downstream of the nclose section to which this number belongs is selected.

앞서 계산 스테이지(Computation stage)에서 근접도를 계산하는 과정이 모두 수행되었기 때문에, 선택 스테이지(Selection stage)는 매우 빠르게 다운스트림을 선택할 수 있다. 앞에서 구한 스토캐스틱 LSP(Stochastic LSP)의 근접도 nclose는 다음 명제 2를 자연스럽게 만족한다.Since the process of calculating the proximity degree is all performed in the computation stage previously, the selection stage can select the downstream very quickly. The proximity nclose of the stochastic LSP obtained earlier naturally satisfies the following proposition 2.

명제 2.

Figure 112020011486680-pat00020
Proposition 2.
Figure 112020011486680-pat00020

본 발명에서 식 (3)의 근접도 정렬을 통해 명제 2를 보장하며, 이에 따라 선택 스테이지(Selection stage)는 (0, 1] 범위의 랜덤 넘버를 근접도 nclose와 순차적으로 비교하면서 확률적으로 다운스트림을 선택할 수 있다. 다음 식 (4)는 이러한 다운스트림 선택 과정의 재귀식을 나타낸다. In the present invention, proposition 2 is guaranteed through the proximity alignment of Equation (3), and accordingly, the selection stage sequentially compares the random number in the range (0, 1) with the proximity nclose, and down probabilistically. Stream can be selected The following equation (4) represents the recursive equation of this downstream selection process.

Figure 112020011486680-pat00021
(4)
Figure 112020011486680-pat00021
(4)

식 (4)에 의해, 메시지를 보내기 위해 선택되는 다운스트림은 select(0, a random number of (0, 1])가 된다.By equation (4), the downstream selected to send a message becomes select(0, a random number of (0, 1)).

도 9는 본 발명의 일 실시예에 따른 선택 스테이지에서 확률 기반 다운스트림 선택 알고리즘이다. 9 is a probability-based downstream selection algorithm in a selection stage according to an embodiment of the present invention.

도 9는 식 (4)를 반복 기능으로 구현한 선택 스테이지(Selection stage)의 알고리즘이다. 9 is an algorithm of a selection stage in which Equation (4) is implemented as an iterative function.

도 9의 알고리즘에서 라인 2는 (0, 1] 사이의 랜덤 넘버 r을 생성한다. In the algorithm of Fig. 9, line 2 generates a random number r between (0, 1).

그리고, 라인 3-9는 후보 다운스트림들의 확률 범위에 r이 포함될 경우, 해당 다운스트림을 선택한다. 이는 다운스트림들의 확률을 순차적으로 비교하며, 명제 2에 의해 많은 경우에 앞 부분에서 선택이 이루어진다. In addition, when r is included in the probability range of candidate downstreams, lines 3-9 select a corresponding downstream. This sequentially compares the probabilities of the downstream streams, and in many cases the selection is made in the front part by Proposition 2.

라인 10은 선택된 다운스트림을 반환한다. 이러한 간단하면서 효율적인 과정은 업스트림이 메시지를 보낼 때에 동작하여, 다운스트림들의 태스크 지역성과 상태를 기반으로 확률적으로 스트림을 분배한다.Line 10 returns the selected downstream. This simple and efficient process works when the upstream sends a message, and distributes the stream probabilistically based on the task locality and state of the downstream.

도 10은 본 발명의 일 실시예에 따른 확률 기반 다운스트림 선택 예제 3이다.10 is an example 3 of probability-based downstream selection according to an embodiment of the present invention.

도 10에서 예제 3은 예제 2에 이어서 도 8에 대한 선택 스테이지(Selection stage) 과정을 보여주는 예제이다. In FIG. 10, Example 3 is an example showing a selection stage process of FIG. 8 following Example 2.

예제 2에서 각 다운스트림의 근접도는 각각 0.46, 0.23, 0.31로 계산되었는데, 이해를 위해 근접도 nclose를 도 10에서 보는 바와 같이 한 축에 나타낸다. In Example 2, the proximity of each downstream was calculated as 0.46, 0.23, and 0.31, respectively. For understanding, the proximity nclose is shown on one axis as shown in FIG. 10.

도 10에서 랜덤 넘버 r이 0.40이면 다운스트림 D1이 선택되고, r이 0.70이면 다운스트림 D3이 선택된다. 본 발명의 선택 스테이지에서는 앞서 근접도를 정렬하였기 때문에 그 순서에 따라 매우 빠르게 다운스트림을 선택할 수 있다.In FIG. 10, if the random number r is 0.40, downstream D 1 is selected, and if r is 0.70, downstream D 3 is selected. In the selection stage of the present invention, since the proximity is arranged beforehand, the downstream can be selected very quickly according to the order.

이제 본 발명에서는 앞서 설계한 스토캐스틱 LSP(Stochastic LSP) 중, process-level SLSP(Stochastic LSP)를 최적화한 optimized SLSP를 제시한다. 최적화 전략은 (1) 웨이티드 클로즈니스(weighted closeness), (2) 다중 쓰레드 모델(parallel thread model)이다. Now, the present invention proposes an optimized SLSP that optimizes a process-level Stochastic LSP (Stochastic LSP) among the previously designed stochastic LSPs. The optimization strategies are (1) weighted closeness and (2) parallel thread model.

표 3은 스토캐스틱 LSP(Stochastic LSP)의 최적화 전략을 요약한 것이다. Table 3 summarizes the optimization strategy of Stochastic LSP.

Optimization strategyOptimization strategy ExplanationExplanation Weighted closenessWeighted closeness 근접도에 가중치를 부여하여 지역성의 비중을 높인다.Increase the weight of locality by giving weight to proximity. Parallel thread modelParallel thread model Probing stage, Computation stage를 Selection stage와 병렬로 처리하여 스트림 파티셔닝의 성능을 높인다.Probing stage and Computation stage are processed in parallel with the selection stage to improve the performance of stream partitioning.

표 3은 이들 두 가지 최적화 전략을 요약한 것이며, 이러한 최적화를 통해, 본 발명에서는 DSPE에서 스토캐스틱 LSP(Stochastic LSP)의 성능을 극대화시킨다. Table 3 summarizes these two optimization strategies, and through these optimizations, the present invention maximizes the performance of Stochastic LSP (Stochastic LSP) in DSPE.

이제 본 발명의 최적화에 대해 상세히 설명하기로 한다. Now, the optimization of the present invention will be described in detail.

첫째, 웨이티드 클로즈니스(weighted closeness)는 근접도에 대해 그 크기에 따라 가중치를 반영하는 것이다. 앞에서 정의한 각 다운스트림의 근접도는 RTT의 역수이다. RTT는 태스크 지역성과 다운스트림 상태를 반영하지만, 고성능 네트워크 장비에서는 각 다운스트림의 RTT 차이가 작을 수 있다. 이러한 이유로 다운스트림들의 확률이 차이가 작아 변별력이 떨어지고, 결국 다운스트림의 태스크 지역성과 상태를 최대한 활용하지 못한다. First, weighted closeness reflects the weight according to the size of the proximity. The proximity of each downstream defined above is the inverse of RTT. RTT reflects task locality and downstream status, but in high-performance network equipment, the difference in RTT of each downstream may be small. For this reason, the difference in the probability of the downstream is small, and the discrimination power is deteriorated, and as a result, the task locality and state of the downstream cannot be fully utilized.

이를 해결하기 위해, 본 발명에서는 근접도에 가중치를 부여하여 태스크 지역성의 비중을 높이는 전략을 사용한다. 즉, Weighted closeness(이하, wclose)는 근접도 sclose에 가중치 함수

Figure 112020011486680-pat00022
를 적용하여 얻은 가중치 부여 근접도이다. 즉,
Figure 112020011486680-pat00023
이다. 여기서,
Figure 112020011486680-pat00024
는 각 다운스트림의 확률 가중치에 근접도를 얼마나 반영할 것인지 결정하는 가중치 계수이다.In order to solve this problem, the present invention uses a strategy of increasing the weight of task locality by giving weight to proximity. In other words, Weighted closeness (hereinafter, wclose) is a weight function for proximity sclose.
Figure 112020011486680-pat00022
It is the weighted proximity obtained by applying. In other words,
Figure 112020011486680-pat00023
to be. here,
Figure 112020011486680-pat00024
Is a weight coefficient that determines how close to each downstream probability weight is to be reflected.

본 발명에서 제안하는 optimized SLSP는 가중치 함수로 n-power 함수를 사용한다. 이는 순서에 상관없이 각 근접도를 미리 정의된 지수만큼 제곱하는 방법이다. 즉,

Figure 112020011486680-pat00025
이다. 따라서, 가중치가 부여된 근접도는 태스크 지역성의 비중이 높아질 뿐만 아니라 기존 가중치의 순서 또한 보장된다. 이 함수에서 지수는 사용자가 변경할 수 있는데, 지수가 0에 가까울수록 다운스트림의 부하가 균형을 이루는 Storm의 Shuffle 그룹핑을 모방한다. 그리고, 지수가 클수록 태스크 지역성을 최대한 고려하는 Storm의 Local-or-Shuffle 그룹핑을 모방한다. 이를 통해 사용자는 태스크 지역성의 정도를 조절할 수 있다. 본 발명에서 이러한 가중치 함수를 도 9의 알고리즘에서 라인 2의 정렬 전에 수행한다.The optimized SLSP proposed in the present invention uses an n-power function as a weight function. This is a method of squaring each proximity by a predefined index regardless of the order. In other words,
Figure 112020011486680-pat00025
to be. Therefore, the weighted proximity not only increases the weight of task locality, but also guarantees the order of the existing weights. In this function, the exponent can be changed by the user, which mimics Storm's Shuffle grouping, which balances the downstream load as the exponent approaches zero. And, as the index increases, it mimics Storm's Local-or-Shuffle grouping, which considers task locality as much as possible. Through this, the user can adjust the degree of task locality. In the present invention, this weighting function is performed before the alignment of line 2 in the algorithm of FIG. 9.

도 11은 본 발명의 일 실시예에 따른 최적화에서 Weighted closeness 예제 4를 나타낸 것이다. 11 shows Example 4 of weighted closeness in optimization according to an embodiment of the present invention.

도 11의 예제 4는 예제 1에 이어서 그림 5에 대한 근접도의 가중치 적용을 보여주는 것으로서, 예제 1에서 계산된 근접도에 가중치 함수를 적용하는 예제이다. Example 4 of FIG. 11 shows the application of the weight of the proximity to Figure 5 following Example 1, and is an example of applying a weight function to the proximity calculated in Example 1.

예제 1에서는 다운스트림 D1, D2, D3의 근접도가 각각

Figure 112020011486680-pat00026
,
Figure 112020011486680-pat00027
,
Figure 112020011486680-pat00028
로 계산되었다. In Example 1, the proximity of downstream D 1 , D 2 and D 3
Figure 112020011486680-pat00026
,
Figure 112020011486680-pat00027
,
Figure 112020011486680-pat00028
Was calculated as

도 11은 지수 2의 n-power 함수가 적용되는 과정을 보여준다. 11 shows a process in which the n-power function of exponent 2 is applied.

먼저, 도 11 (a)에서는 각 다운스트림의 근접도를 제곱하여 wclose를 계산한다. First, in FIG. 11 (a), wclose is calculated by squaring the proximity of each downstream.

다음으로, 도 11 (b)에서는 각 wclose를 정렬 및 정규화하여 다운스트림 선택 확률을 계산한다. 그 결과, 다운스트림 D1, D2, D3의 확률 가중치는 0.59, 0.15, 0.26으로 각각 계산된다. 이러한 결과를 통해 예제 2에 비해 각 다운스트림의 확률 가중치에 대한 변별력이 더욱 커진 것을 알 수 있다. 따라서, 본 발명에서 근접도에 가중치를 부여함으로써 선택 확률에 태스크 지역성과 다운스트림 상태의 비중을 높일 수 있다.Next, in FIG. 11 (b), the downstream selection probability is calculated by sorting and normalizing each wclose. As a result, the probability weights of downstream D 1 , D 2 , and D 3 are calculated as 0.59, 0.15, and 0.26, respectively. From these results, it can be seen that the discrimination power of each downstream probability weight is greater than that of Example 2. Therefore, in the present invention, by assigning a weight to the proximity degree, the weight of the task locality and the downstream state to the selection probability can be increased.

둘째, 다중 쓰레드 모델(parallel thread model)은 단일 쓰레드에서 메시지를 전송할 때에만 근접도를 계산해야 하는 문제를 해결한다. 앞에서 제시한 스토캐스틱 LSP(Stochastic LSP)는 단일 쓰레드 모델에서 동작한다. 즉, 하나의 쓰레드에서 메시지를 전송할 때, RTT 측정 주기가 지났다면 다운스트림들의 확률을 다시 계산한 후에 다운스트림을 선택한다. 여기에서, 메시지의 생성 주기 messaging interval과 RTT 측정 주기 probing interval에 따라 두 가지 상황을 고려할 수 있는데, 이를 구분하여 설명하면 다음과 같다.Second, the parallel thread model solves the problem of calculating proximity only when sending messages from a single thread. Stochastic LSP (Stochastic LSP) presented earlier operates in a single thread model. That is, when a message is transmitted from a single thread, if the RTT measurement period has passed, the probability of the downstream is recalculated and the downstream is selected. Here, two situations can be considered according to the message generation period, the messaging interval and the RTT measurement period, the probing interval, which will be described separately as follows.

Case 1) messaging interval << probing interval: 메시지가 빈번하게 발생하는 경우이다. 이 때는 probing interval 내에 입력된 메시지는 탐사 없이 다운스트림을 선택할 수 있다. 하지만, 그 외의 메시지는 다운스트림 탐사 및 근접도 재계산이 필요하므로, 해당 메시지는 다운스트림 탐사 및 근접도 재계산 시간만큼 대기해야 한다. 이러한 편차는 다운스트림의 수가 증가할수록 더욱 커지므로, 메시지들의 전송 시간이 불공평한 문제가 발생한다.Case 1) messaging interval << probing interval: This is the case where messages occur frequently. In this case, the message input within the probing interval can be selected downstream without scanning. However, since other messages require downstream discovery and proximity recalculation, the corresponding message must wait for the downstream discovery and proximity recalculation time. Since this deviation increases as the number of downstreams increases, the problem of unfair transmission time of messages arises.

Case 2) messaging interval >> probing interval: 메시지가 드물게 발생하는 경우이다. 이 때는 입력된 모든 메시지에 대한 다운스트림 탐사 및 근접도 재계산이 필요하다. 따라서, 메시지를 전송할 때마다 다운스트림 탐사 및 근접도 계산 시간이 소요되어 지연 시간이 길어지는 심각한 문제가 발생한다.Case 2) messaging interval >> probing interval: This is a case where a message occurs rarely. In this case, downstream scanning and proximity recalculation of all input messages are required. Therefore, each time a message is transmitted, it takes time for downstream discovery and proximity calculation, resulting in a serious problem of lengthening the delay time.

이러한 단일 쓰레드의 문제를 해결하기 위해, 본 발명의 스토캐스틱 LSP(Stochastic LSP)는 다중 쓰레드 모델을 도입한다. In order to solve such a single thread problem, the stochastic LSP (Stochastic LSP) of the present invention introduces a multithreaded model.

본 발명의 다중 쓰레드 모델(Parallel thread model)은 탐사 스테이지(Probing stage) 및 계산 스테이지(Computation stage)를 선택 스테이지(Selection stage)와 서로 다른 쓰레드에서 동작시키는 방법이다. 즉, 한 쓰레드에서는 탐사 스테이지(Probing stage)와 계산 스테이지(Computation stage)가 동작하며 다른 쓰레드에서는 선택 스테이지(Selection stage)가 동작한다. 다중 쓰레드 모델에서는 스트림 파티셔닝과 다운스트림의 탐사가 완전히 독립적으로 동작한다. 따라서, 메시지가 없어도 주기적으로 다운스트림의 확률을 계산할 수 있다. 여기서 주기는 단일 쓰레드 모델의 probing interval을 사용한다. Case 1에서는 probing interval 마다 문맥 전환이 발생하는 오버헤드가 있을 수 있지만, 실제 환경에서는 다운스트림 선택이 빠르게 수행되고 메시지가 전송된 후에 탐사하므로 매우 효율적이다. Case 2에서는 업스트림이 메시지가 없는 유휴 상태에서 탐사하므로 매우 효율적이다. 하지만, 두 쓰레드는 다운스트림의 확률 가중치를 서로 공유해야 하므로, 공유 영역에 대한 접근 제어가 필요하다.The parallel thread model of the present invention is a method of operating a probing stage and a computation stage in different threads from a selection stage. In other words, a probing stage and a computation stage operate in one thread, and a selection stage operates in another thread. In the multithreaded model, stream partitioning and downstream exploration operate completely independently. Therefore, even if there is no message, the probability of the downstream can be calculated periodically. Here, the period is the probing interval of the single thread model. In Case 1, there may be an overhead of context switching every probing interval, but in a real environment, downstream selection is quickly performed and the search is performed after the message is transmitted, so it is very efficient. In Case 2, it is very efficient because the upstream searches in an idle state without messages. However, since the two threads must share the probability weight of the downstream with each other, access control to the shared area is required.

본 발명에서 제안하는 optimized SLSP와 기존 DSPE의 binary LSP를 비교 및 평가하면 다음과 같다. The comparison and evaluation of the optimized SLSP proposed by the present invention and the binary LSP of the existing DSPE are as follows.

앞서 종래 기술에서는 DSPE 응용을 지역성에 따라 네 가지 use case로 분류하였다. 이를 요약하면, binary LSP는 best locality와 strong locality 상황에서 지역성을 최대한 고려할 수 있어 최적의 성능을 나타내나, weak locality와 worst locality 상황에서는 지역성을 일부 또는 전혀 고려할 수 없어 성능이 급격히 하락한다. In the prior art, DSPE applications were classified into four use cases according to locality. In summary, binary LSP shows optimal performance because it can consider locality as much as possible in best locality and strong locality situations, but in weak locality and worst locality situations, it cannot consider locality at all or partly, so the performance drops sharply.

본 발명에서는 이러한 use case에 따라 binary LSP와 optimized SLSP를 비교한다. 실험에 사용된 binary LSP는 Storm의 Local-or-Shuffle 그룹핑이다. 그리고 Storm에서 가장 일반적으로 사용되는 논-키 스트림 파티셔닝인 Shuffle 그룹핑의 성능도 함께 측정한다. Shuffle 그룹핑(이하 'shuffle SP'라 함)은 라운드-로빈 방식으로 후보 다운스트림에게 메시지를 전송하여 모든 다운스트림이 거의 같은 수의 메시지를 전달받지만, 지역성을 고려하지 않아 매우 많은 네트워크 통신이 필요하다. 본 실험은 메시지 발생 주기에 따른 평균 처리량과 평균 지연 시간을 측정한다. In the present invention, binary LSP and optimized SLSP are compared according to these use cases. The binary LSP used in the experiment is Storm's Local-or-Shuffle grouping. It also measures the performance of Shuffle grouping, which is the most commonly used non-key stream partitioning in Storm. Shuffle grouping (hereinafter referred to as'shuffle SP') transmits a message to a candidate downstream in a round-robin manner, so that almost the same number of messages are received by all downstream, but a lot of network communication is required because locality is not considered. . This experiment measures the average throughput and average delay time according to the message generation cycle.

표 4는 본 발명의 실험 환경의 벼열성 정도와 use case에 따른 토폴로지 구성을 나타낸다.Table 4 shows the topology configuration according to the degree of light heat resistance and use case of the experimental environment of the present invention.

Use casesUse cases Best localityBest locality Strong localityStrong locality Weak localityWeak locality Worst localityWorst locality Degree of parallelismDegree of parallelism # of workers: 8
# of upstreams: 8
# of downstreams: 8
# of workers: 8
# of upstreams: 8
# of downstreams: 8
# of workers: 8
# of upstreams: 4
# of downstreams: 8
# of workers: 8
# of upstreams: 4
# of downstreams: 8
# of workers: 8
# of upstreams: 8
# of downstreams: 4
# of workers: 8
# of upstreams: 8
# of downstreams: 4
# of workers: 8
# of upstreams: 4
# of downstreams: 4
# of workers: 8
# of upstreams: 4
# of downstreams: 4

도 12는 본 발명의 실험에 의한 Binary LSP와 optimized SLSP의 성능을 비교한 그래프이다. 도 12는 실험을 통한 shuffle SP, binary LSP, optimized SLSP의 성능 차이를 보여준다. 12 is a graph comparing the performance of binary LSP and optimized SLSP according to the experiment of the present invention. 12 shows the difference in performance of shuffle SP, binary LSP, and optimized SLSP through experiments.

먼저, 도 12 (a)는 best locality, strong locality, weak locality, worst locality 구성에서 세 스트림 파티셔닝 기법의 처리량을 비교한 것이다. First, FIG. 12 (a) compares the throughput of the three stream partitioning techniques in the configurations of best locality, strong locality, weak locality, and worst locality.

도 12 (a)를 보면, 모든 use case에서 optimized SLSP의 처리량은 shuffle SP와 binary LSP의 처리량과 유사하다. 이들의 차이는 ±5% 이내에서 우열을 가리기 힘들 정도로 차이가 없다. 이는 세 방법 모두 부하가 적게 걸려서 업스트림에서 생성된 메시지를 다운스트림에서 모두 처리할 수 있기 때문이다.Referring to Figure 12 (a), in all use cases, the throughput of optimized SLSP is similar to that of shuffle SP and binary LSP. There is no difference between them within ±5%, so that it is hard to hide the superiority and inferiority. This is because all three methods are less expensive, and messages generated in the upstream can be processed in the downstream.

하지만 도 12 (b)에서 보는 바와 같이, 세 스트림 파티셔닝 기법은 지연 시간에서 큰 차이가 나타난다. However, as shown in FIG. 12(b), the three stream partitioning schemes have a large difference in delay time.

첫째, best locality에서는 binary LSP가 네트워크 통신이 없고 모든 다운스트림은 동일한 수의 메시지를 처리하므로, binary LSP의 지연 시간이 이상적으로 낮게 측정된다. 이때, optimized SLSP도 업스트림과 같은 노드의 다운스트림에게 매우 높은 확률로 메시지를 전달하므로, binary LSP와 매우 유사한 지연 시간이 측정된다. 하지만, shuffle SP는 다운스트림의 지역성에 상관없이 네트워크를 통해 메시지를 분배하므로 지연 시간이 매우 높게 측정된다. 이들의 차이는 shuffle SP 대비 binary LSP와 optimized SLSP의 지연 시간이 최대 486% 감소되었다. First, in best locality, since the binary LSP has no network communication and all downstream processes the same number of messages, the latency of the binary LSP is ideally measured low. At this time, since the optimized SLSP also delivers a message with a very high probability to the downstream of the node such as the upstream, a delay time very similar to the binary LSP is measured. However, since shuffle SP distributes messages through the network regardless of the locality of the downstream, the delay time is measured very high. The difference between them is that the delay time of binary LSP and optimized SLSP is reduced by up to 486% compared to shuffle SP.

둘째, strong locality에서는 업스트림과 다른 노드의 일부 다운스트림은 작업을 수행하지 않아 부하 불균형이 발생하지만, binary LSP가 네트워크 통신은 없어 여전히 지연 시간이 이상적으로 낮게 측정된다. 이때, optimized SLSP도 여전히 같은 노드의 다운스트림에게 매우 높은 확률로 메시지를 전달하므로, binary LSP와 유사한 지연 시간이 측정된다. 반면에, shuffle SP는 여전히 매우 높은 지연 시간을 보인다. 이들의 차이는 shuffle SP 대비 binary LSP와 optimized LSP의 지연 시간이 최대 650% 감소되었다. 이렇듯 네트워크 통신이 발생하지 않는 best locality와 strong locality에서도 optimized SLSP는 이상적인 binary LSP와 거의 유사한 성능을 보였다.Second, in strong locality, load imbalance occurs because the upstream and some downstream of other nodes do not perform work, but the binary LSP does not have network communication, so the latency is still ideally measured. At this time, since the optimized SLSP still delivers a message to the downstream of the same node with a very high probability, a delay time similar to that of the binary LSP is measured. On the other hand, shuffle SP still shows very high latency. The difference between them is that the delay time of binary LSP and optimized LSP is reduced by up to 650% compared to shuffle SP. In this way, even in the best locality and strong locality where network communication does not occur, the optimized SLSP showed almost similar performance to the ideal binary LSP.

반면에, 네트워크 통신이 발생하는 보다 일반적인 상황인 weak locality와 worst locality에서는 optimized SLSP의 성능이 더욱 향상된다. On the other hand, in weak locality and worst locality, which are more common situations where network communication occurs, the performance of optimized SLSP is further improved.

셋째, weak locality에서는 binary LSP가 일부 업스트림이 같은 노드에 다운스트림이 없어 다른 노드의 다운스트림에게 네트워크를 통해 메시지를 전송한다. 따라서, binary LSP의 지연 시간은 best locality 또는 strong locality에서보다 높아져, shuffle SP에 가까워진다. 하지만, optimized SLSP는 업스트림과 다른 노드의 다운스트림에게 메시지를 전송할 때, 지역성과 다운스트림 상태를 고려하여 가장 최적의 다운스트림을 선택한다. 따라서, binary LSP보다 지연 시간이 덜 높아진다. weak locality에서, optimized SLSP는 shuffle SP 대비 최대 646%, binary LSP 대비 최대 208%까지 지연 시간을 감소시켰다. Third, in weak locality, the binary LSP transmits a message to the downstream of another node through the network because some upstream nodes do not have downstream. Therefore, the delay time of the binary LSP becomes higher than that of the best locality or strong locality, and becomes closer to the shuffle SP. However, the optimized SLSP selects the most optimal downstream in consideration of locality and downstream conditions when transmitting a message to an upstream and a downstream of another node. Therefore, the delay time is lower than that of a binary LSP. In weak locality, optimized SLSP reduced latency by up to 646% compared to shuffle SP and up to 208% compared to binary LSP.

넷째, worst locality에서는 모든 업스트림이 네트워크를 통해야만 다운스트림에게 메시지를 전송하므로, binary LSP의 성능이 더욱 악화된다. Binary LSP는 shuffle SP와 동일한 방식으로 동작하여, 이 둘의 처리 시간이 매우 유사하다. Optimized SLSP도 지연 시간이 높아지지만, 다운스트림을 효율적으로 선택하여 binary LSP에 비해 지연 시간이 덜 높아진다. 성능 측정 결과, worst locality에서 optimized SLSP는 shuffle SP 대비 최대 183%, binary LSP 대비 최대 147%까지 지연 시간을 감소시켰다. 따라서, 제안하는 optimized SLSP는 기존 binary LSP에 비해 use cases에 상관없이 지연 시간 측면에서 높은 성능을 유지한다고 볼 수 있다.Fourth, in worst locality, since all upstreams transmit messages to downstream only through the network, the performance of the binary LSP is further deteriorated. Binary LSP operates in the same way as shuffle SP, so the processing times of the two are very similar. Optimized SLSP also has a higher latency, but it efficiently selects downstream, resulting in less latency than binary LSPs. As a result of the performance measurement, in worst locality, the optimized SLSP reduced the delay time by up to 183% compared to the shuffle SP and up to 147% compared to the binary LSP. Therefore, it can be seen that the proposed optimized SLSP maintains high performance in terms of latency regardless of use cases compared to the existing binary LSP.

이상에서 설명한 바와 같이, 본 발명은 분산 스트림 처리 시스템의 처리량 및 지연 시간의 성능을 극대화하는 Stochastic LSP(locality-aware stream partitioning)를 제시한다. As described above, the present invention proposes a stochastic locality-aware stream partitioning (LSP) that maximizes throughput and latency performance of a distributed stream processing system.

기존 분산 스트림 처리 시스템에서 제공하는 LSP는 업스트림과 동일한 프로세스에서 동작하는 다운스트림에게만 데이터 스트림을 전송하는 binary LSP이다. 이때, Binary LSP는 오로지 지역성만 고려하므로 같은 프로세스에서 동작하는 다운스트림의 부하를 높이고, 다른 프로세스에서 동작하는 유휴 다운스트림의 활용도를 감소시킨다. The LSP provided by the existing distributed stream processing system is a binary LSP that transmits data streams only to downstream operating in the same process as upstream. At this time, since the binary LSP only considers locality, it increases the load of the downstream operating in the same process and reduces the utilization of the idle downstream operating in another process.

본 발명에서 제안하는 스토캐스틱 LSP(Stochastic LSP)는 지역성뿐만 아니라 다운스트림 상태까지 고려하여 스트림을 분배한다. Stochstic LSP는 주기적으로 각 다운스트림의 RTT를 측정하는 탐사 스테이지(Probing stage), RTT를 기반으로 확률 모델을 계산하는 계산 스테이지(Computation stage), 확률 모델을 통해 빠르게 다운스트림을 선택하는 선택 스테이지(Selection stage)로 구성된다. 이러한 체계적인 방법과 더불어, 확률 모델에 가중치를 부여하는 weighted closeness, 확률 모델을 병렬적으로 계산하는 parallel thread model을 통해 스토캐스틱 LSP(Stochastic LSP)를 최적화한다. 본 발명에서 제안하는 Stochatic LSP는 기존 binary LSP에 비해 동일한 처리량을 보임과 동시에 최대 208%까지 지연 시간을 감소시켰다.The stochastic LSP (Stochastic LSP) proposed in the present invention distributes streams in consideration of not only locality but also downstream conditions. Stochstic LSP is a probing stage that periodically measures the RTT of each downstream, a computation stage that calculates a probability model based on the RTT, and a selection stage that quickly selects downstream through a probability model. stage). In addition to this systematic method, the stochastic LSP (Stochastic LSP) is optimized through the weighted closeness that weights the probability model and the parallel thread model that computes the probability model in parallel. The Stochatic LSP proposed in the present invention exhibits the same throughput compared to the conventional binary LSP, and at the same time reduces the delay time by up to 208%.

한편, 본 발명의 실시예에 따른 데이터 스트림 파티셔닝 방법은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현되는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다.Meanwhile, the data stream partitioning method according to an embodiment of the present invention may be implemented as a computer-readable code on a computer-readable recording medium. The computer-readable recording medium includes all types of recording devices that store data that can be read by a computer system.

예컨대, 컴퓨터가 읽을 수 있는 기록매체로는 롬(ROM), 램(RAM), 시디-롬(CD-ROM), 자기 테이프, 하드디스크, 플로피디스크, 이동식 저장장치, 비휘발성 메모리(Flash Memory), 광 데이터 저장장치 등이 포함된다.For example, computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, hard disk, floppy disk, removable storage device, and non-volatile memory. And optical data storage devices.

또한, 컴퓨터로 읽을 수 있는 기록매체는 컴퓨터 통신망으로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 읽을 수 있는 코드로서 저장되고 실행될 수 있다. In addition, the computer-readable recording medium can be distributed to a computer system connected through a computer communication network, and stored and executed as code that can be read in a distributed manner.

이상 본 발명을 몇 가지 바람직한 실시예를 사용하여 설명하였으나, 이들 실시예는 예시적인 것이며 한정적인 것이 아니다. 본 발명이 속하는 기술분야에서 통상의 지식을 지닌 자라면 본 발명의 사상과 첨부된 특허청구범위에 제시된 권리범위에서 벗어나지 않으면서 다양한 변화와 수정을 가할 수 있음을 이해할 것이다.The present invention has been described above using several preferred embodiments, but these embodiments are illustrative and not limiting. Those of ordinary skill in the art to which the present invention pertains will understand that various changes and modifications can be made without departing from the spirit of the present invention and the scope of the rights presented in the appended claims.

Claims (7)

분산 스트림 처리 엔진에서의 데이터 스트림 파티셔닝 방법에 있어서,
각 업스트림이 주기적으로 후보 다운스트림들의 태스크 지역성 및 다운스트림 상태를 탐사하는 다운스트림 탐사 단계;
각 업스트림이 후보 다운스트림들과의 탐사 소요 시간을 기반으로 각 다운스트림이 선택될 확률 가중치를 계산하는 확률 계산 단계; 및
메시지 전송이 필요한 경우, 각 업스트림이 확률 가중치를 기반으로 메시지를 전송할 다운스트림을 확률적으로 선택하는 다운스트림 선택 단계를 포함하며,
상기 다운스트림 탐사 단계에서, 각 업스트림은 각 후보 다운스트림과의 RTT(round-trip time)를 측정하고, 측정한 RTT를 기반으로 각 후보 다운스트림과의 근접도를 계산하고,
상기 확률 계산 단계에서, 각 업스트림은 근접도를 내림차순으로 정렬하고, 정렬된 근접도를 정규화하고, 이를 통해 각 다운스트림이 선택될 확률 가중치를 계산하고,
상기 다운스트림 선택 단계에서, 각 업스트림은 랜덤 넘버를 생성하고, 생성된 랜덤 넘버와 각 다운스트림들의 확률 가중치에 의한 확률 범위를 비교하여, 랜덤 넘버를 포함하는 확률 범위를 갖는 다운스트림을 선택하는 것을 특징으로 하는 데이터 스트림 파티셔닝 방법.
In the data stream partitioning method in a distributed stream processing engine,
A downstream discovery step in which each upstream periodically discovers task locality and downstream state of candidate downstreams;
A probability calculation step of calculating a probability weight at which each downstream stream is selected based on a time required for discovery of each upstream with the candidate downstream; And
When message transmission is required, each upstream includes a downstream selection step of probabilistically selecting a downstream to transmit a message based on a probability weight,
In the downstream exploration step, each upstream measures a round-trip time (RTT) with each candidate downstream, and calculates proximity to each candidate downstream based on the measured RTT,
In the probability calculation step, each upstream sorts the proximity in descending order, normalizes the sorted proximity, and calculates a probability weight at which each downstream is selected through this,
In the downstream selection step, each upstream generates a random number, compares the generated random number with a probability range based on a probability weight of each downstream, and selects a downstream stream having a probability range including the random number. Data stream partitioning method characterized by.
청구항 1에 있어서,
상기 다운스트림 탐사 단계 및 상기 확률 계산 단계는 미리 정해진 인터벌 내에서 한 번만 실행되며,
이때, 다운스트림 탐사를 수행한 후 인터벌 시간이 지나면, 다운스트림 탐사를 다시 수행하고 인터벌을 갱신하는 것을 특징으로 하는 데이터 스트림 파티셔닝 방법.
The method according to claim 1,
The downstream exploration step and the probability calculation step are executed only once within a predetermined interval,
At this time, when the interval time elapses after performing the downstream discovery, the downstream discovery is performed again and the interval is updated.
삭제delete 삭제delete 삭제delete 청구항 1에 있어서,
근접도의 크기에 따라 가중치를 부여하는 근접도 가중치 부여 과정과, 상기 다운스트림 탐사 단계 및 상기 확률 계산 단계와 상기 다운스트림 선택 단계를 서로 다른 쓰레드에서 동작시키는 다중 쓰레드 모델 도입 과정을 포함하는 최적화 단계를 더 포함하는 것을 특징으로 하는 데이터 스트림 파티셔닝 방법.
The method according to claim 1,
An optimization step including a proximity weighting process in which a weight is assigned according to the size of the proximity, and a multithreaded model introduction process in which the downstream exploration step, the probability calculation step, and the downstream selection step are operated in different threads. The data stream partitioning method further comprising a.
청구항 1, 청구항 2 및 청구항 6 중 어느 한 청구항의 방법을 컴퓨터로 실행시킬 수 있는 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium recording a program capable of executing the method of any one of claims 1, 2 and 6 by a computer.
KR1020200012975A 2020-02-04 2020-02-04 Probability-based data stream partitioning method considering task locality and downstream status KR102201651B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200012975A KR102201651B1 (en) 2020-02-04 2020-02-04 Probability-based data stream partitioning method considering task locality and downstream status

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200012975A KR102201651B1 (en) 2020-02-04 2020-02-04 Probability-based data stream partitioning method considering task locality and downstream status

Publications (1)

Publication Number Publication Date
KR102201651B1 true KR102201651B1 (en) 2021-01-11

Family

ID=74129003

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200012975A KR102201651B1 (en) 2020-02-04 2020-02-04 Probability-based data stream partitioning method considering task locality and downstream status

Country Status (1)

Country Link
KR (1) KR102201651B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816583A (en) * 2022-05-31 2022-07-29 以萨技术股份有限公司 Flink-based data automatic processing method and device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100553918B1 (en) * 1999-09-30 2006-02-24 인터내셔널 비지네스 머신즈 코포레이션 Method and apparatus for dynamic distribution of controlled and additional selective overlays in a streaming media
KR100876560B1 (en) 2006-12-05 2008-12-31 한국전자통신연구원 JAM symbol demapping method for cable downstream transmission and apparatus thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100553918B1 (en) * 1999-09-30 2006-02-24 인터내셔널 비지네스 머신즈 코포레이션 Method and apparatus for dynamic distribution of controlled and additional selective overlays in a streaming media
KR100876560B1 (en) 2006-12-05 2008-12-31 한국전자통신연구원 JAM symbol demapping method for cable downstream transmission and apparatus thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816583A (en) * 2022-05-31 2022-07-29 以萨技术股份有限公司 Flink-based data automatic processing method and device and electronic equipment
CN114816583B (en) * 2022-05-31 2024-03-19 以萨技术股份有限公司 Flink-based data automatic processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US8463971B2 (en) Approach for distributing interrupts from high-interrupt load devices
US7610425B2 (en) Approach for managing interrupt load distribution
US10055262B1 (en) Distributed load balancing with imperfect workload information
US9563423B1 (en) System and method for simultaneous shared access to data buffers by two threads, in a connection-oriented data proxy service
US7000141B1 (en) Data placement for fault tolerance
US7581052B1 (en) Approach for distributing multiple interrupts among multiple processors
US7752628B2 (en) Method and apparatus for reassigning objects to processing units
US9712427B1 (en) Dynamic server-driven path management for a connection-oriented transport using the SCSI block device model
JP2006338543A (en) Monitoring system and monitoring method
Yildirim et al. End-to-end data-flow parallelism for throughput optimization in high-speed networks
US9647905B1 (en) System and method for optimized management of statistics counters, supporting lock-free updates, and queries for any to-the-present time interval
US9232000B1 (en) Method and system for balancing load across target endpoints on a server and initiator endpoints accessing the server
US20050188191A1 (en) Resource discovery method and cluster manager apparatus
JP4265377B2 (en) Load balancing method, apparatus, system, and program
US9591099B1 (en) Server connection establishment over fibre channel using a block device access model
KR102201651B1 (en) Probability-based data stream partitioning method considering task locality and downstream status
Lu et al. An efficient load balancing algorithm for heterogeneous grid systems considering desirability of grid sites
KR20070032441A (en) Load balancing system based on fuzzy grouping and the load balancing method
US7647592B2 (en) Methods and systems for assigning objects to processing units
US10666723B2 (en) Data distribution system, data communication device and program for data distribution
US9237057B1 (en) Reassignment of a virtual connection from a busiest virtual connection or locality domain to a least busy virtual connection or locality domain
Datta A new task scheduling method for 2 level load balancing in homogeneous distributed system
Zhang et al. Txallo: Dynamic transaction allocation in sharded blockchain systems
US9473590B1 (en) Client connection establishment over fibre channel using a block device access model
US9270786B1 (en) System and method for proxying TCP connections over a SCSI-based transport

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant