WO2020184982A1 - 이종클러스터 시스템에서 실행되는 프로그램을 실행시키는 방법 및 컴퓨터 프로그램 - Google Patents
이종클러스터 시스템에서 실행되는 프로그램을 실행시키는 방법 및 컴퓨터 프로그램 Download PDFInfo
- Publication number
- WO2020184982A1 WO2020184982A1 PCT/KR2020/003396 KR2020003396W WO2020184982A1 WO 2020184982 A1 WO2020184982 A1 WO 2020184982A1 KR 2020003396 W KR2020003396 W KR 2020003396W WO 2020184982 A1 WO2020184982 A1 WO 2020184982A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- page
- program
- computing device
- node
- cluster system
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
Definitions
- the present invention relates to a method and software for executing software in a heterogeneous cluster system, and more specifically, in each of a plurality of computing devices included in a heterogeneous cluster system, received from a client node of a heterogeneous cluster system using a virtual memory. It relates to a method and a computer program for processing a plurality of work groups associated with a program.
- such a technique refers to a technique in which an application written as a target is divided into a plurality of computing devices as it is and executed on a single computing device.
- a host program issues a kernel execution command to a single virtual computing device, a task performed by the corresponding kernel is divided and executed by a plurality of real devices installed in the system.
- the command when an arbitrary command is input to an accelerator such as a GPU, the command can be divided into multiple GPU targets and executed. For example, when a work with 1000 work items (threads in the case of CUDA) is input, 250 work items are distributed to 4 GPUs and executed, theoretically, the total calculation time is about 4 times that of before distribution. The execution time can be shortened. More precisely, in the heterogeneous parallel programming model, synchronization between work groups (thread blocks in the case of CUDA) is impossible, and consistency does not need to be guaranteed except for special cases such as atomic operations during execution. In other words, even if work items (threads) belonging to different work groups (thread blocks) are allocated to different devices, they can be executed without problems in the allocated devices. Accordingly, distributing work items may be performed in units of work groups.
- the memory required for the computation can be very large. That is, the larger the data, the larger the computational amount.
- a program that requires such a large amount of data cannot be executed, and thus the utilization of heterogeneous clusters may be degraded. Accordingly, such unnecessary data communication and unnecessary occupancy of the device memory may be a cause that the computational performance cannot be improved as the number of devices is increased. In other words, it becomes a factor that hinders the performance scalability of heterogeneous systems.
- the present disclosure provides a method and a computer program for executing a program in a heterogeneous cluster system in order to solve the above object.
- a program written for a single virtual device may be distributed and executed by several computing devices or accelerators on heterogeneous clusters. In this case, only data required for the distributed job may be copied to the computing device or accelerator among the data loaded for the distributed job.
- the complexity of programming can be eliminated or minimized by providing the programmer with a single virtual device and a virtual single device memory that shares an address space.
- a memory access pattern of a work group or work item associated with a program is analyzed, so that the efficiency of distribution of calculation work and data distribution may be improved.
- the complexity of writing an application in a heterogeneous cluster system with multiple nodes equipped with multiple accelerators can be reduced. That is, since a programmer can write or execute a program for a single computing device or a single memory without considering a plurality of nodes and a plurality of accelerators, the productivity of the program can be very high and maintenance can be very easy.
- the present disclosure may be implemented in a variety of ways, including a method, apparatus, system, computer program, or computer readable storage medium storing instructions.
- a method of executing a program in a heterogeneous cluster system includes, in each of a plurality of computing devices included in the heterogeneous cluster system, a plurality of work groups associated with a program allocated from a client node of the heterogeneous cluster system. Receiving and processing a plurality of workgroups allocated by each of the plurality of computing devices, wherein pages accessed by the plurality of workgroups are stored in a virtual memory configured to provide a single memory address space on a heterogeneous cluster system. It is managed through the included virtual page.
- the processing of the plurality of assigned workgroups may include, in the first computing device among the plurality of computing devices, a page fault occurs while executing the plurality of workgroups allocated to the first computing device.
- the method includes retrieving information on the latest page associated with the virtual page where the page fault has occurred, and receiving data included in the latest page at the first computing device.
- a plurality of computing devices are included in each of a plurality of server nodes included in a heterogeneous cluster system.
- the step of fetching information on a recent page associated with a virtual page in which a page fault has occurred includes transmitting a request for information on the latest page of the virtual page in which the page fault has occurred to the owner node, and the latest information of the virtual page from the owner node.
- the step of receiving data included in a recent page includes information on a recent page received from an owner node indicating a page included in a memory of a different computing device in the first node. If so, executing a page fault handler provided by the first node.
- the step of receiving data included in the latest page from the first computing device is when the information on the latest page received from the owner node is not a page included in the memory of a different computing device in the first node. , Querying whether the client node has data contained in the latest page associated with the virtual page, and if the client node has data contained in the recent page associated with the virtual page, the data contained in the latest page associated with the virtual page from the client node And receiving.
- the receiving of the data included in the latest page by the first computing device includes, when the data included in the latest page associated with the virtual page is not included in the client node, the information on the latest page indicates. 2 receiving data included in a recent page associated with the virtual page from the computing device.
- information on the page of the first computing device, which has processed data included in the received recent page is transmitted by the first computing device to the owner node. It further comprises transmitting to.
- a plurality of work groups associated with a program are allocated to each of the plurality of computing devices based on a table representing a relationship between a plurality of work groups and a plurality of virtual pages accessed by the plurality of work groups. .
- a plurality of work groups associated with a program are calculated. It is assigned to each of the devices.
- data associated with the plurality of work groups is determined by the plurality of work groups before the work groups are processed by the plurality of computing devices.
- the data associated with the data may be pre-fetched to each of the plurality of computing devices.
- a computer program stored in a computer-readable recording medium is provided to execute a method of executing a program in a computer according to an embodiment of the present disclosure.
- a virtual single device may be divided and executed in a plurality of real devices mounted in a heterogeneous cluster system. Accordingly, the complexity of writing a program or application in a heterogeneous cluster system including multiple nodes equipped with a plurality of accelerators may be very low.
- the programmer since the programmer only needs to write programming for a single computing device and a single memory without considering a plurality of nodes and a plurality of accelerators, the productivity of the program can be very high and maintenance can be very easy. Also, since only the memory accessed by the computing device is used, a program requiring a memory beyond the memory of the computing device can be executed.
- Data communication and/or data communication between the host and the computing device may be reduced so that the overall amount of communication may be minimized, thereby minimizing communication overhead. That is, data distribution performance can be improved.
- FIG. 1 is a schematic diagram illustrating a configuration in which a plurality of server nodes including a plurality of computing devices are connected to execute a program using a virtual system in order to execute a program executed in a heterogeneous cluster system according to an embodiment of the present disclosure. .
- FIG. 2 is a block diagram illustrating an internal configuration of a client node and a server node according to an embodiment of the present disclosure.
- FIG. 3 is a flowchart illustrating a page fault processing method for executing a program executed in a heterogeneous cluster system according to an embodiment of the present disclosure.
- FIG. 4 is a diagram illustrating an example of allocating a plurality of work groups to each of a plurality of computing devices according to an embodiment of the present disclosure.
- FIG. 5 is a diagram illustrating an example of a table showing a relationship between a plurality of work groups and a plurality of virtual pages accessed by the plurality of work groups according to an embodiment of the present disclosure.
- FIG. 6 is a flowchart illustrating a method of handling a page fault in order to execute a program executed in a heterogeneous cluster system according to an embodiment of the present disclosure.
- FIG. 7 is a diagram illustrating an example of processing a page fault when a recent page associated with a virtual page in which a page fault has occurred is in the same node as a page in which a page fault has occurred, according to an embodiment of the present disclosure.
- FIG. 8 is a diagram illustrating an example of processing a page fault when a recent page associated with a virtual page in which a page fault has occurred exists in a virtual memory of a client node according to an embodiment of the present disclosure.
- FIG. 9 is a diagram illustrating an example of processing a page fault when a recent page associated with a virtual page in which a page fault has occurred is located in a node different from a page in which a page fault has occurred, according to an embodiment of the present disclosure.
- program may refer to a program targeting heterogeneous systems.
- the program may include a client program executed by a processor and a kernel executed by a computing device.
- the client program and kernel may be completely separated like OpenCL, or the kernel may be embedded in the middle of the client program such as CUDA, OpenMP 4.0, OpenACC, etc.
- the program may include the above client program and kernel.
- a'work-group' may refer to a set of work items.
- the kernel instance may refer to a thread executing the kernel.
- each kernel instance can be referred to as a work item.
- CUDA each kernel instance is referred to as a thread.
- a work group may be referred to as a thread-block.
- the work group may be divided into a plurality of calculation units included in the calculation device and executed.
- work items belonging to the work group may be divided into a plurality of processing elements (PEs) included in the calculation unit and executed again. That is, the work group can be executed simultaneously on a large number of PEs belonging to the computing device.
- PEs processing elements
- a'page' may refer to a unit that divides and manages a memory area into a specific size. For example, in a general operating system, it is managed in units of 4K bytes. According to this, if a 1024 KB memory area is allocated, it can be divided into 256 pages and managed.
- the'owner node' may refer to a node that manages at least some of a plurality of virtual pages included in a virtual memory.
- the owner node stores information about the virtual pages managed by the owner node and the most recent pages for those virtual pages (for example, the actual pages in memory contained in the computing device). Whenever it is modified, such information can be updated.
- Such information may be stored in the owner node in the form of a table.
- a'heterogeneous system' may include a system equipped with a CPU (eg, x86 CPU) for general-purpose calculation and a computing device or accelerator specialized for high-speed parallel processing.
- the computing device may include a Graphics Processing Unit (GPU), Intel Xeon Phi, FPGA, DSP, or the like.
- the'heterogeneous cluster system' may include a plurality of nodes (eg, computers) equipped with a computing device or accelerator (eg, a computing device such as a GPU or FPGA) connected through a network.
- Networks used in heterogeneous cluster systems may include Gigabit Ethernet, Infiniband, and the like.
- a heterogeneous cluster system there are a plurality of nodes, and each node may include one or more accelerators.
- communication between nodes is required to offload and execute a specific part of an application program.
- communication such as RDMA (Remote Direct Memory Access), MPI (Message Passing Interface), socket communication library, etc. Libraries can be used.
- programming in a'heterogeneous cluster system' in the present disclosure may generally use a master-slave model.
- the master-slave model can also be understood as a client-server model.
- the master-slave model assumes an environment composed of one host node (master; client) and one or more computation nodes (slave; server).
- a host program runs, and an instance of a parallel program, generally called a kernel, can be distributed to each computation node for execution and memory management.
- the compute node can execute the data received from the host node and the kernel instance using its own accelerator (compute device).
- Programming in a heterogeneous cluster system requires that the data to be performed by offloading be owned in the main memory or secondary storage of the corresponding node.
- Client nodes use inter-node communication libraries such as MPI, RDMA, and socket communication to distribute owned data to each compute node, and use programming models such as CUDA and OpenCL to handle offloaded computations for compute nodes. I can.
- being processed, received or transmitted by the computing device may include being processed, received, or transmitted by a CPU of a node in which the computing device is included.
- the corresponding page in the'page fault', when a processor or a computing device requests a specific page from a memory through an operating system and a corresponding page exists on the physical memory, the corresponding page may be accessed. However, if the corresponding page does not exist on the physical memory, the corresponding page must be requested from the virtual memory space, which may be referred to as a page fault.
- a'page fault handler' may load a corresponding page from a virtual memory onto a physical memory. Also, when loading a page onto the physical memory, if the space in the physical memory is insufficient, the page on the physical memory is loaded into the virtual memory, and the page to be accessed from the virtual memory can be loaded onto the physical memory. have.
- the page fault handler may mean a page fault mechanism provided by the operating system.
- the page fault handler may mean processing through an interrupt service routine (ISR).
- ISR interrupt service routine
- FIG. 1 illustrates a plurality of server nodes 150_1, including a plurality of computing devices 170_1, 170_m, in order to execute a program executed in the heterogeneous cluster system 130 according to an embodiment of the present disclosure.
- 150_n is a schematic diagram showing a configuration in which a program can be executed using the virtual system 100.
- the server nodes 150_1, ..., 150_n may refer to a computation node or a slave node.
- the plurality of computing devices 170_1, ..., 170_m may be included in each of the plurality of server nodes 150_1, ..., 150_n included in the heterogeneous cluster system 130.
- the plurality of computing devices 170_1, ..., 170_m may be included in at least some nodes of the plurality of server nodes 150_1, ..., 150_n.
- each of the plurality of server nodes 150_1, ..., 150_n may include at least some of the plurality of computing devices 170_1, ..., 170_m.
- the heterogeneous cluster system 130 may include a client node (not shown), a plurality of server nodes 150_1, ..., 150_n, and a network 140.
- each of the client node (not shown) and the plurality of server nodes 150_1, ..., 150_n is a processor 160, a plurality of computing devices 170_1, ..., 170_m, a plurality of computing device memory ( 175_1, ..., 175_m), an interconnection bus 180, a communication unit 185, and a main memory 190.
- the virtual system 100 may be configured to execute a program using a heterogeneous cluster system.
- the virtual system 100 may be controlled by a client node (not shown).
- the virtual system 100 is configured to communicate with a plurality of server nodes 150_1, ..., 150_n, and a plurality of computing devices 170_1 included in the plurality of server nodes 150_1, ..., 150_n , ..., 170_m) may be configured to control the operation.
- the virtual system 100 may distribute the entire task to all nodes included in the heterogeneous cluster system 130, and distribute and execute a workload from each node to a plurality of computing devices. And, when all the calculation work is completed, the distributed result can be collected again at the client node.
- the client processor 110 may be included in a client node (not shown). In addition, the client processor 110 may control the virtual computing device 115 and the virtual memory 120 for controlling the heterogeneous cluster system 130.
- the client processor 110 may be configured as a general-purpose processor for arithmetic processing such as, for example, a CPU (Central Processing Unit, central processing unit), and the client processor 110 is connected to the virtual computing device 115 The operation of the plurality of computing devices 170_1, ..., 170_m may be controlled.
- the client processor 110 may be connected to the virtual memory 120 and/or the main memory 190.
- the client processor 110 may be connected to a plurality of computing devices 170_1, ..., 170_m and/or the main memory 190 through a Peripheral Component Interconnect-Express (PCI-E) bus. It is possible to transmit and receive data for control of the computing devices 170_1, ..., 170_m of, and/or the main memory 190.
- PCI-E Peripheral Component Interconnect-Express
- the virtual computing device 115 may be controlled by the client processor 110. In addition, the virtual computing device 115 may divide and execute an application written as a target for a single computing device to a plurality of computing devices 170_1, ..., 170_m. In order to implement the virtual computing device 115, a technology provided by a virtual GPU (eg, NVIDIA's vGPU, etc.) may be used.
- a virtual GPU eg, NVIDIA's vGPU, etc.
- the virtual memory 120 may refer to an integrated virtual memory for providing a single memory address space on the heterogeneous cluster system 130 for implementation of the present invention. In the present disclosure, this may be referred to as Unified Memory for Heterogeneous-Accelerator Clusters (UMHC). According to an embodiment, the virtual memory 120 may be configured to allocate, manage, and/or operate all main memories in a heterogeneous cluster and memories of a plurality of computing devices in a single memory address space. For example, the virtual memory 120 may be implemented using a Unified memory of CUDA, OpenCL SVM of OpenCL, or the like. Here, the virtual memory 120 may refer to a virtual device memory. These virtual device memories share a single address space on the entire heterogeneous cluster, and the page fault mechanism provided by the operating system and/or the Interrupt Service Routine (ISR) for handling page faults provided by the computing device or accelerator. ) Can be used.
- ISR Interrupt Service Routine
- the Runtime system for Heterogeneous Accelerator Cluster (RHAC) 125 may refer to a runtime system for a heterogeneous accelerator cluster.
- the RHAC 125 may be configured to execute a program as if using a single computing device in the heterogeneous cluster system 130 using a plurality of computing devices 170_1, ..., 170_m.
- the RHAC 125 manages a plurality of computing devices 170_1, ..., 170_m as a virtual computing device 115, and includes each of the plurality of server nodes 150_1, ..., 150_n. It may refer to a runtime system for managing the main memory 190 and the computing device memories 175_1, ... 175_m as the virtual memory 120 having a single address.
- the RHAC 125 may perform page fault handling to provide a single address space, which will be described in more detail later with reference to FIGS. 7 to 9.
- the heterogeneous cluster system 130 may include a client node (not shown) connected through the network 140 and a plurality of server nodes 150_1, ..., 150_n.
- a client node (not shown) can use the heterogeneous cluster system 130 as a single computer.
- the network 140 may be configured to enable communication between a client node (not shown) included in the heterogeneous cluster system 130 and a plurality of server nodes 150_1, ..., 150_n.
- the network 140 is, for example, a wired network such as Ethernet, a wired home network (Power Line Communication), a telephone line communication device and RS-serial communication, a mobile communication network, a WLAN (Wireless LAN), It may consist of wireless networks such as Wi-Fi, Bluetooth and ZigBee, or a combination thereof.
- the communication method is not limited, and not only a communication method using a communication network (for example, a mobile communication network, wired Internet, wireless Internet, broadcasting network, satellite network, etc.) that the network 140 may include, but also a client node (not shown). ) And a plurality of server nodes 150_1, ..., 150_n, short-range wireless communication may also be included.
- the network 140 is a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), a broadband network (BBN), It may include any one or more of the networks, such as the Internet.
- the network 140 may include any one or more of a network topology including a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree or a hierarchical network, etc. Not limited.
- the plurality of server nodes 150_1, ..., 150_n may include a computing device configured to perform information processing, calculation, calculation, and/or communication on the heterogeneous cluster system 130.
- the plurality of server nodes 150_1, ..., 150_n may be configured in the form of a terminal such as a computer or a remote processing device.
- each of the plurality of server nodes (150_1, ..., 150_n) can independently perform information processing, etc., while cooperating with other plurality of server nodes (150_1, ..., 150_n) through parallel programming Information processing, etc. can be performed.
- Each of the plurality of server nodes 150_1, ..., 150_n may perform communication for a program operation and communication for handling a page fault through the network 140.
- the plurality of server nodes 150_1, ..., 150_n may correspond to any one of a transmission source, a destination, or a relay point of data. Alternatively, at least some of the plurality of server nodes 150_1, ..., 150_n may be performed as an owner node. As shown, each of the plurality of server nodes 150_1, ..., 150_n is a processor 160, a computing device (170_1, ..., 170_m), a computing device memory (175_1, ..., 175_m) , Interconnection Bus 180, main memory 190, and may include a communication unit 185. In addition, this configuration may be included in a client node (not shown).
- the processor 160 may be configured as a general-purpose processor for arithmetic processing such as, for example, a CPU (Central Processing Unit, central processing unit), and the processor 160 includes a plurality of computing devices 170_1, ..., 170_m), it is possible to control the operation of the plurality of computing devices 170_1, ..., 170_m.
- the main memory 190 may be connected to the processor 160.
- the processor 160 may be connected to a plurality of computing device memories 175_1, ..., 175_m and/or the main memory 190 through the interconnection bus 180, and the plurality of computing device memories 175_1 , ..., 175_m) and/or the main memory 190 may be controlled, and data for this may be transmitted and received.
- the plurality of computing devices 170_1, ..., 170_m may be configured as a processor specialized for calculation of a specific pattern.
- each of the plurality of computing devices 170_1, ..., 170_m may include a GPU, FPGA, DSP, Intel Xeon Phi, TPU, NPU, multi-core CPU, and the like.
- the computing device memories 175_1, ..., 175_m may be connected separately from the main memory 190 to each of the plurality of computing devices 170_1, ..., 170_m.
- Each of the plurality of computing devices 170_1, ..., 170_m includes one or more compute units (CU), and each of the computation units may further include one or more processing elements (PEs).
- CU compute units
- PEs processing elements
- All PEs of each of the plurality of computing devices 170_1, ..., 170_m share each computing device memory, and can read and write data from each computing device memory.
- Each of the components included in the plurality of computing devices 170_1, ..., 170_m may be physically classified or not physically classified but logically (for example, by software). May be.
- the main memory 190 or the computing device memories 175_1, ..., 175_m may actually refer to one physical memory chip, but a plurality of memory chips and other components are connected to provide a single memory address space. ), you can also point to that single memory address space.
- the plurality of computing device memories 175_1, ..., 175_m may be connected to the plurality of computing devices 170_1, ..., 170_m.
- the plurality of computing devices 170_1, ..., 170_m cannot directly access the main memory 190 connected to the processor 160, the plurality of computing devices 170_1, ..., 170_m ) Is a code that copies input data from the main memory 190 to a plurality of calculation device memories 175_1, ..., 175_m, and offloaded or distributed to a plurality of calculation devices 170_1, ..., 170_m Can run.
- Such offloaded or distributed code may be received from a client node (not shown) and may be stored in a computing device memory included in its own computing device.
- the plurality of calculation devices 170_1, ..., 170_m transmits the result data of processing the code to the processor from the plurality of calculation device memories 175_1, ..., 175_m. It can be copied to the main memory 190 of 160.
- the plurality of computing device memories 175_1, ..., 175_m may be connected to the main memory 190 through an interconnection bus 180.
- the interconnection bus 180 may be connected to the plurality of computing device memories 175_1, ..., 175_m, the communication unit 185, and the main memory 190 to perform communication.
- the interconnection bus 180 may be configured as a device for performing communication, such as, for example, a Peripheral Component Interconnect-Express (PCI-E) bus.
- PCI-E Peripheral Component Interconnect-Express
- the communication unit 185 is connected to the interconnection bus 180 and may transmit and receive data stored in the plurality of computing device memories 175_1, ..., 175_m and the main memory 190.
- the communication unit 185 may be included in each of the client node and the plurality of server nodes 150_1, ..., 150_n, and may transmit and receive data with other nodes.
- the communication unit 185 may connect, for example, a client node and a plurality of server nodes 150_1, ..., 150_n through Infiniband or Gigabit Ethernet.
- communication between nodes can be performed using various communication libraries and technologies such as RDMA and MPI.
- main memory 190 should be broadly interpreted to include any electronic component capable of storing electronic information.
- main memory 190 includes random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), programmable read-only memory (PROM), erase-programmable read It may refer to various types of processor-readable media such as dedicated memory (EPROM), electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage, registers, and the like.
- EPROM dedicated memory
- EEPROM electrically erasable PROM
- flash memory magnetic or optical data storage, registers, and the like.
- the main memory 190 is the processor 160 and/or the plurality of computing devices. It is said to be in electronic communication with (170_1, ..., 170_m).
- the main memory 190 may store any data and/or information associated with a program executed by the processor 160 and/or the plurality of computing devices 170_1, ..., 170_m.
- FIG. 2 is a block diagram illustrating an internal configuration of a client node 210 and a plurality of server nodes 220_1 and 220_2 according to an embodiment of the present disclosure.
- the client node 210 and the plurality of server nodes 220_1 and 220_2 may be included in a heterogeneous cluster system.
- FIG. 2 two or more server nodes are illustrated, but the present invention is not limited thereto, and a plurality of server nodes may be n (where n is a natural number of 1 or more).
- the client node 210 may refer to a host node or a master node.
- each of the plurality of server nodes 220_1 and 220_2 may be the same as each of the server nodes 150_1, ..., 150_n of FIG. 1.
- the internal configuration of the server nodes 150_1, ..., 150_n of FIG. 1 is included in the internal configuration of the plurality of server nodes 220_1 and 220_2, or the internal configuration of the plurality of server nodes 220_1 and 220_2 is shown in FIG. It may be included in the internal configuration of the server nodes 150_1, ..., 150_n of 1. Accordingly, in FIG. 2, a description of the same or similar configuration to that of FIG. 1 is omitted to avoid repetition.
- the plurality of computing devices include m number of computing devices in each node, but is not limited thereto, and each node may be configured to include a different number of computing devices.
- the calculation device runtime 240_0, 240_1, and 240_2 may refer to a runtime provided by a computing device manufacturer.
- the computing device runtimes 240_0, 240_1, and 240_2 may include the CUDA runtime.
- the RHACs 225_0, 225_1, and 225_2 may be implemented using computing device runtimes 240_0, 240_1, and 240_2.
- the virtual memory drivers 250_0, 250_1, 250_2 can implement the virtual memory 230 (for example, Unified Memory for Heterogeneous-Accelerator Clusters (UMHC)) using a plurality of computing device drivers 260_0, 260_1, 260_2. I can.
- UMHC Unified Memory for Heterogeneous-Accelerator Clusters
- Each of the computing device drivers 260_0, 260_1, and 260_2 may control a plurality of computing devices included in its own node.
- the computing device is an NVIDIA GPU
- the computing device drivers 260_0, 260_1, and 260_2 may include an NVIDIA GPU driver provided by NVIDIA.
- a page fault occurring in the main memory of a processor can be handled using a page fault mechanism of an operating system, or a page fault occurring in a computing device can be handled through an Interrupt Service Routine (ISR).
- ISR Interrupt Service Routine
- the virtual memory 230 may provide shared memory of a single address space to a heterogeneous cluster system.
- the virtual memory 230 is a memory in which both the client node 210 and the plurality of server nodes 220_1 and 220_2 of the heterogeneous cluster system can read and write to the same address, and the data can be shared by all nodes.
- each node may be implemented using an integrated memory (or shared memory) of a computing device driver provided by a computing device manufacturer.
- NVIDIA's CUDA provides shared memory under the name Unified Memory
- OpenCL provides the corresponding shared memory function under the name OpenCL SVM.
- a conventional virtual memory is a memory shared with a single address space only within one node, and a virtual memory may not be provided between a plurality of server nodes on a heterogeneous cluster system.
- the virtual memory 230 of the present disclosure may refer to a virtual memory provided between a plurality of server nodes on a heterogeneous cluster system.
- the virtual memory 230 may be configured to allocate, manage, and/or operate any memory included in a heterogeneous cluster system on a single address space.
- a page fault mechanism is implemented in a method of handling a page fault through an interrupt or a similar method.
- the page can be copied from the location or location of the page where the page fault has occurred (eg, main memory or computing device memory), and data stored in the page can be accessed.
- it may be implemented in a manner of migrating a recent page to a device that accessed the page most recently.
- multiple sets of the same page may exist at the same time on the system, but is not limited thereto. When the same page exists on multiple systems, it may be a case of read-only memory. In contrast, in the case of a page that has been written for memory consistency, a plurality of identical pages cannot exist.
- a program targeting the heterogeneous cluster system 130 is largely composed of a client program (or host program) executed in a processor of a client node and one or more kernels executed in a computing device.
- client program and the kernel may be completely separate (eg, in the case of OpenCL), or the kernel may be embedded in the middle of the client program (eg, in the case of CUDA, OpenMP 4.0, OpenACC). .
- both the client program and the kernel may be written using a typical high-level programming language such as, for example, C language.
- the client program can use the API provided by the parallel programming model to copy data from the main memory to the computing device memory, run the kernel on the computing device, and issue a command to copy the data from the computing device memory to the main memory.
- the runtime system which is software implementing the above-described API, is executed simultaneously with the client program, it is possible to control the computing device by receiving a command from the client program.
- Commands issued by the client program may include a write command, a kernel execution command, and a read command.
- the write command may copy data from the main memory to the memory of the computing device.
- the kernel execution command can execute the kernel on the computing device.
- the read command can copy data from the device memory to the main memory.
- the method 300 for executing a program in a heterogeneous cluster system receives a plurality of work groups associated with a program allocated from a client node of the heterogeneous cluster system in each of a plurality of computing devices included in the heterogeneous cluster system. It may be started with the step (S310). Then, a plurality of work groups allocated by each of the plurality of computing devices may be processed (S320). Pages accessed (read and/or written) by a plurality of work groups may be managed through virtual pages included in virtual memory configured to provide a single memory address space on a heterogeneous cluster system.
- a first device among the plurality of computing devices may determine whether a page fault has occurred.
- a page fault occurs while executing a plurality of work groups allocated to the first computing device, information on the latest page associated with the virtual page where the page fault has occurred may be called (S340). Then, data for the latest page may be received (S350). If a page fault does not occur, processing of a plurality of assigned work groups may be continued, or may be terminated when the processing is completed. For example, after processing the assigned work group, the first computing device may receive and process the next work group.
- data for a work group processed by the first computing device may be present or stored in another computing device or another node in the heterogeneous cluster system.
- the first computing device may receive data as input data as a result of processing the work group by another computing device in the heterogeneous cluster system. To this end, in order to receive such input data, the first computing device may have to find the latest node of a corresponding page. This process will be described in detail with reference to FIG. 6.
- each of the plurality of nodes may include a plurality of computing devices.
- each of the plurality of nodes is illustrated to include the same number of computing devices, but is not limited thereto, and each of the plurality of nodes may include a different number of computing devices.
- a heterogeneous cluster system it is possible to determine the optimal number of work groups allocated to each of the plurality of computing devices according to the characteristics and performance of the plurality of computing devices.
- a static analysis result during program compilation based on at least one of a static analysis result during program compilation, a runtime analysis result during execution of the program, or a program profile analysis result, a plurality of work groups associated with a program are calculated. Can be assigned to each of the devices.
- a static analysis technique during compilation may extract a pattern of a memory area accessed by a plurality of computing devices during compilation time of a program.
- data corresponding to a memory area accessed by each of a plurality of computing devices to execute a program may be used to pre-distribute data to each of a plurality of computing devices, and various analysis techniques may be used without being limited thereto.
- a work group may be distributed to each of the first computing device 410, the second computing device 420, and the second computing device 430 of node N of node 0.
- the plurality of computing devices are included in different nodes from each other, and may share a virtual memory having a single memory address space.
- work groups allocated to a plurality of computing devices may be divided into work items 440, as shown, and distributed to calculation units included in each of the plurality of computing devices or processing elements (PEs) to be processed. .
- PEs processing elements
- the work group input to the virtual computing device may be distributed and executed to a plurality of computing devices on a heterogeneous cluster system.
- the entire input work group may be evenly distributed to a plurality of calculation devices.
- workgroups may be distributed only to specific server nodes or specific computing devices.
- the work group may be distributed in a form in which the calculated device that has been executed first receives and processes the unprocessed work group. have.
- a plurality of work groups to be distributed may be allocated and executed in one computing device.
- FIG. 5 is a diagram illustrating an example of a table 500 representing a relationship between a plurality of work groups and a plurality of virtual pages accessed by the plurality of work groups according to an embodiment of the present disclosure.
- the plurality of virtual pages may refer to arbitrary pages included in a virtual memory provided in a heterogeneous cluster system.
- a plurality of work groups associated with a program are assigned to each of a plurality of computing devices. Can be assigned.
- the table 500 may represent pages accessed by each workgroup as a two-dimensional matrix (for example, a horizontal axis is a workgroup id and a vertical axis is a page id), as shown in FIG. 5.
- various techniques such as a conventional compiler analysis technique, a runtime analysis technique, a profiling technique and/or a sampling technique may be used.
- the static analysis technique may extract a pattern of a memory area accessed by a plurality of computing devices during compile time of a program.
- the runtime analysis technique may analyze a pattern of a memory area that accesses a plurality of computing devices during runtime of a program.
- the profiling technique may refer to a technique in which a plurality of work groups associated with a program execute an operation in a work group by a plurality of computing devices so as not to actually execute an operation in the work group, but to access only a memory area.
- the pattern of the memory area can be analyzed.
- the sampling technique is based on an access pattern of a memory area by some of a plurality of work groups analyzed by executing some of a plurality of work groups related to a program by a plurality of computing devices, and the memory area of the entire plurality of work groups The approach pattern of can be inferred.
- data eg, initial data
- data of a plurality of work groups and/or a plurality of work groups associated with a program may be pre-distributed to each of a plurality of computing devices.
- data of a plurality of work groups may be pre-fetched in a memory of a computing device in which the work group is to be executed before a page fault occurs.
- Information on the distribution of data of the plurality of work groups and/or the plurality of work groups may be included in the table 500 of FIG. 5.
- an optimal schedule for arithmetically executing the entire program in the heterogeneous cluster system may be calculated.
- the above-described optimal schedule may include a schedule configured to minimize page faults.
- such an optimal schedule may be extracted using ILP (integer linear programming) that can derive an optimal solution in one embodiment, and is not limited thereto, and in another embodiment, a solution close to optimal For this, it can be extracted heuristically with the Greedy algorithm. Information included in this optimal schedule may be included in the table 500.
- ILP integer linear programming
- the table 500 created using the above-described analysis and/or optimal schedule, as shown in FIG. 5, is a work that performs read and write operations on page _0.
- Group(wg)_0 reads to page_0 and reads to page_6(R), reads to group_1 and page_1(R), reads to page_6( R) It may include information configured to allocate work group_2 performing a task to one computing device 0.
- a work group_3 that reads and writes to page 2 (RW), a work group_4 that writes to page 2 (W), and page 2, page Workgroup 5, which performs a read (R) operation on page 3 and page 4, may be assigned to computing device 1.
- pages 0 to 2 may be managed by the owner node
- pages 3 to 5 may be managed by the owner node 1.
- the method 600 of handling a page fault may begin with a step S605 of generating a page fault in page p in the first computing device of the node n 610. Then, in step S610, the first computing device may transmit a page lock request of page p to the owner node 620. In this case, the first computing device of the node n 610 may transmit a request for information on the latest page of the page p in which the page fault occurred to the owner node 620 (S610).
- the first computing device may refer to an arbitrary computing device included in node n.
- page p may refer to an arbitrary virtual page included in a virtual memory operable in a heterogeneous cluster system including the node n 610, the client node and the owner node 620.
- the owner node may refer to a node that manages some pages among a plurality of pages included in the virtual memory. That is, the owner node may store information on a recent page for a page managed by the owner node. For example, the owner node 620 may store information about a recent page for page p among a plurality of virtual pages included in the virtual memory.
- the owner node 620 may verify whether the owner node 620 acquires a lock on the page p in step S615.
- an ACK corresponding to the acquisition of the page p lock may be transmitted to the node n 610, and the process may proceed to step S625. If it is not possible to acquire the lock on the page p, the process may proceed to step S620.
- the node n 610 or the computing device of the node n 610 may be added to the waiting list of page p included in the owner node 620.
- the first computing device of the node n may receive or read the latest page information for the page p from the owner node 620.
- step S630 it may be verified whether the latest page for page p exists in node n 610. That is, it may be determined whether the information on the latest page for page p indicates a page included in a memory of a computing device different from the first computing device of the node n 610.
- step S655 If the latest page for page p exists in the node n 610, the process may proceed to step S655. If the latest page for page p does not exist in the node n 610, the process may proceed to step S635.
- step S635 it may be verified whether the latest page for page p exists in the client node. That is, the node n (610) may inquire that the data included in the latest page for the page p is in the client node. If the latest page for page p exists in the client node, the process may proceed to step S645. If the latest page for page p does not exist in the client node, the process may proceed to step S640. Next, in step S640, the page p may be migrated from the computing device memory to the main memory.
- the node n 610 may read the latest page for the page p in the latest node 630.
- the node n 610 may receive data on the latest page for page p from the client node.
- the latest node 620 indicated by the latest page information or the latest page associated with the page p from the second computing device of the latest node 620 Data can be received.
- communication between the first computing device and the second computing device may be used for receiving such data.
- communication between the CPU of the node n 510 and the CPU of the latest node 630 may be used to receive such data.
- data may be received from the first computing device to the second computing device through the client node.
- the owner node 620 may write the latest page information for the page p, and may proceed to step S655.
- information on the page p, which has processed data included in the latest page by the first calculation device of the node n 610 May be transmitted to the owner node 620.
- node n 610 may call a page fault handler for page p.
- the node n 610 provides You can run the page fault handler.
- the owner node 620 may transmit a page unlock request for the page p (S660).
- step S665 the owner node 620 may unlock the page p and transmit an ACK to the first node in the waiting list for the page p (S670).
- virtual memory is implemented in a heterogeneous cluster system, so that a memory in which all nodes included in the heterogeneous cluster system share a single memory address space can be implemented, but is not limited thereto, Can be implemented.
- a plurality of computing devices included in each node using the virtual memory 120 retrieves data necessary for execution of a program into a plurality of computing device memories whenever necessary and programs (e.g., kernel programs ) Can be executed.
- data required for execution of the program may be managed in units of pages, but is not limited thereto and may be managed in units of larger memory.
- a page fault occurs on page p of node n (610)
- a lock is requested to the owner node 620 of page p for atomic page fault processing, and node n (610)
- ACK acknowledgment
- page information may be read from the owner node 620 and page data may be read from a node in which the latest page exists.
- the node n 610 in which a page fault occurs in page information held by the owner node 620 may be modified to a node holding the latest page.
- a page fault handler for example, a page fault handler function of the computing device provided by the computing device manufacturer can be called.
- the lock on the page fault can be released.
- a page information table for managing page information is located in each node, which may be generated when a memory in which a page fault occurs is allocated.
- the page information may include information on the latest node in which the page is located.
- one node may have all of the page information tables, but is not limited thereto, and the page information tables may be distributed across multiple nodes. For example, if one node has all page information in a centralized mode, communication may occur to one node to determine the location of the latest page whenever a page fault occurs, resulting in performance degradation.
- the page information table may be distributed and managed across multiple nodes. For example, when a page fault occurs, communication for checking the location of a recent page is distributed, so that performance degradation due to communication can be reduced.
- a page having a page information table may be referred to as an owner node.
- the owner node may manage page information tables of a certain number of server nodes among a plurality of server nodes.
- the latest location of the page may be referred to as the latest node.
- page faults processed by the heterogeneous cluster system 130 may include three cases.
- the three cases of page fault are: if the latest page associated with the virtual page on which the page fault occurred is on the same node as the page on which the page fault occurred, and if the latest page associated with the virtual page on which the page fault occurred exists in the virtual memory of the client node. And a case in which the latest page associated with the virtual page where the page fault has occurred is in a node different from the page where the page fault has occurred, which will be described later in more detail with reference to FIGS. 7 to 9, respectively.
- the virtual memory driver provides inter-node communication performed by the communication unit in the page fault mechanism.
- the communication unit for example, shared memory
- the page fault can be handled by sending it to the device's specific computing device memory.
- FIG. 7 is a diagram illustrating an example of processing a page fault when a recent page associated with a virtual page in which a page fault has occurred is in the same node as a page in which a page fault has occurred, according to an embodiment of the present disclosure.
- a page fault that has occurred when processing a program using a plurality of computing devices in one node is determined. It is similar to the handling method, and page faults can be handled by using the page fault mechanism provided by the operating system installed in each node and the page fault handler function provided by the computing device manufacturer (eg ISR, Interrupt Service Routine). .
- the first computing device may receive data included in the latest page included in the second computing device through the node main memory of the first computing device.
- FIG. 8 is a diagram illustrating an example of processing a page fault when a recent page associated with a virtual page in which a page fault has occurred exists in a virtual memory of a client node according to an embodiment of the present disclosure.
- data on the latest page of the page p stored in the virtual memory of the client node may be read. For example, as shown, if information about the latest page received from the owner node is not a page included in the memory of a different computing device in the server node, the data included in the latest page associated with the virtual page is sent to the client node. You can ask if there is.
- the first computing device may receive data included in the latest page associated with the virtual page from the client node through the server node main memory. .
- FIG. 9 is a diagram illustrating an example of processing a page fault when a recent page associated with a virtual page in which a page fault has occurred is located in a node different from a page in which a page fault has occurred, according to an embodiment of the present disclosure.
- the page p is migrated from the computing device memory of the latest node to the main memory of the latest node.
- node n (610) the latest page of the latest node for page p may be read.
- the first computing device is the data included in the latest page associated with the virtual page from the second computing device indicated by the information about the latest page. Can receive.
- data included in the second computing device may be moved or copied to the first computing device through a client node.
- the communication of data associated with a page fault may be performed through inter-node communication by a processor included in each server node without going through a client node.
- communication of data associated with a page fault may be performed through direct communication of computing device memories included in each server node.
- direct communication of computing device memories may be performed using a communication library between nodes including Remote Direct Memory Access (RDMA), Message Passing Interface (MPI), or a socket communication library.
- RDMA Remote Direct Memory Access
- MPI Message Passing Interface
- socket communication library a communication library between nodes including Remote Direct Memory Access (RDMA), Message Passing Interface (MPI), or a socket communication library.
- the above-described method of executing a program in a heterogeneous cluster system 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. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices.
- the computer-readable recording medium is distributed over a computer system connected through a network, so that computer-readable codes can be stored and executed in a distributed manner.
- functional programs, codes, and code segments for implementing the above-described embodiments can be easily inferred by programmers in the technical field to which the present invention belongs.
- the processing units used to perform the techniques include one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs). ), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, electronic devices, other electronic units designed to perform the functions described in this disclosure , Computer, or a combination thereof.
- the various exemplary logic blocks, modules, and circuits described in connection with the present disclosure may include a general purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or It may be implemented or performed in any combination of those designed to perform the functions described in.
- a general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine.
- the processor may also be implemented as a combination of computing devices, eg, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in connection with the DSP core, or any other configuration.
- the techniques include random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), PROM (on a computer-readable medium such as programmable read-only memory, erasable programmable read-only memory (EPROM), electrically erasable PROM (EEPROM), flash memory, compact disc (CD), magnetic or optical data storage device, etc. It can also be implemented as stored instructions.
- the instructions may be executable by one or more processors, and may cause the processor(s) to perform certain aspects of the functionality described in this disclosure.
- Computer-readable media includes both computer storage media and communication media, including any medium that facilitates transfer of a computer program from one place to another.
- Storage media may be any available media that can be accessed by a computer.
- such computer-readable medium may contain RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or desired program code in the form of instructions or data structures. It may include any other medium that may be used for transfer or storage to and accessible by a computer. Also, any connection is properly termed a computer-readable medium.
- Disks and discs as used herein include CDs, laser disks, optical disks, digital versatile discs (DVDs), floppy disks, and Blu-ray disks, where disks are usually magnetic It reproduces data optically, whereas discs reproduce data optically using a laser. Combinations of the above should also be included within the scope of computer-readable media.
- the software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other known type of storage medium.
- An exemplary storage medium may be coupled to a processor such that the processor can read information from or write information to the storage medium.
- the storage medium may be integrated into the processor.
- the processor and storage medium may also reside within the ASIC.
- the ASIC may exist in the user terminal.
- the processor and storage medium may exist as separate components in the user terminal.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
본 개시는 이종클러스터 시스템에서 프로그램을 실행시키는 방법에 관한 것이다. 이종클러스터 시스템에서 프로그램을 실행시키는 방법은, 이종클러스터 시스템에 포함된 복수의 계산 디바이스의 각각에서, 이종클러스터 시스템의 클라이언트 노드로부터 할당된 프로그램과 연관된 복수의 워크 그룹을 수신하는 단계 및 복수의 계산 디바이스의 각각에서 할당된 복수의 워크 그룹을 처리하는 단계를 포함하고, 복수의 워크 그룹에 의해 접근되는 페이지는 이종클러스터 시스템 상에서 단일 메모리 주소 공간을 제공하도록 구성된 가상 메모리에 포함된 가상 페이지를 통해 관리된다.
Description
본 발명은 이종 클러스터 시스템에서 소프트웨어를 실행시키는 방법 및 소프트웨어에 관한 것으로, 더 구체적으로, 이종클러스터 시스템에 포함된 복수의 계산 디바이스의 각각에서, 가상 메모리를 이용하여 이종클러스터 시스템의 클라이언트 노드로부터 수신된 프로그램과 연관된 복수의 워크 그룹을 처리하는 방법 및 컴퓨터 프로그램에 관한 것이다.
프로그래밍 복잡성 문제를 해결하기 위해서 복수의 가속기가 장착된 이종 시스템에서 애플리케이션에 단일한 가상 계산 디바이스 또는 가속기를 제공하는 기술에 대한 다양한 연구가 있어왔다. 즉, 이러한 기술은 단일한 계산 디바이스를 타겟으로 작성된 애플리케이션이 그대로 복수의 계산 디바이스로 나누어 실행하는 기술을 지칭한다. 이러한 종래의 기술에 따르면, 호스트 프로그램이 단일한 가상의 계산 디바이스에 커널 실행 명령을 내리면 해당 커널이 행하는 작업을 시스템에 장착된 복수의 실제 디바이스에 나누어 실행시킨다.
종래의 기술에 따르면, GPU 등과 같은 가속기에 임의의 명령(command)이 입력되면 해당 명령을 여러 GPU 대상으로 나누어 실행할 수 있다. 예를 들면, 1000개의 워크 아이템(work items; CUDA의 경우 thread)가 있는 워크가 입력되었을 때 GPU 4개로 각각 250개의 워크 아이템이 분배되어 실행되면 이론적으로는 전체 계산시간이 분배되기 전보다 4배 정도 실행 시간이 단축될 수 있다. 조금 더 정확히는, 이종 병렬 프로그래밍 모델에서 워크 그룹(work group; CUDA의 경우 스레드 블록) 사이에 동기화가 불가능하고 실행 중에 atomic operation 등의 특수한 경우를 제외하고는 일관성이 보장될 필요가 없다. 다시 말해서, 서로 다른 워크 그룹(스레드 블록)에 속한 워크 아이템(스레드)들이 서로 다른 디바이스에 할당되어도 할당된 디바이스에서 문제없이 실행될 수 있다. 이에 따라, 워크 아이템을 분배하는 것은 워크 그룹 단위로 이루어질 수 있다.
각 작업을 복수의 가속기의 각각에 분배하는 것과 함께 각 작업을 실행하기 위한 데이터를 복수의 가속기의 각각에 분배하는 것이 요구된다. 분배된 작업을 실행하기 위해서는 그 작업이 접근하는 데이터가 해당 가속기에 있어야 한다. 일반적으로 컴파일러 분석 등을 통해서 분배된 각 작업이 접근하는 데이터 영역을 분석하여 그 작업이 실행되기 전에 그 작업이 실행될 가속기로 데이터를 복사하도록 한다. 가장 쉽게는 모든 데이터를 각 계산 디바이스(가속기)에 복사하고 작업을 실행한 후에 결과를 모으는 방식도 있을 수 있다. 이 경우는 데이터를 복사하는 오버헤드가 클 수 있고, 결과를 취합할 때도 추가적인 오버헤드가 발생하므로 작업을 나누어서 얻는 이점보다 데이터를 복사하는 오버헤드가 커서 성능 향상이 미미하거나 없을 수도 있다.
종래의 가속기 분배 기술은 데이터 분배를 위해 불필요한 호스트-디바이스 통신이 많이 요구될 수 있다. 메모리 접근이 완벽하게 분석되지 못하는 커널의 경우는 모든 데이터를 중복하여 복사해야 하기 때문에 불필요한 통신이 많이 발생될 수 있다. 이러한 과도한 통신은 성능저하를 초래할 수 있다. 또한, 종래 기술에서의 계산 디바이스의 디바이스 메모리는 비효율적으로 사용된다는 단점도 있다. 이는 특정 계산 디바이스에 할당된 워크 아이템들이 전혀 사용하지 않을 불필요한 데이터들도 모두 복사되어 계산 디바이스의 디바이스 메모리를 차지하고 있기 때문이다. 이에 따라 해당 시스템에서 실행할 수 있는 애플리케이션의 최대 데이터 크기는 계산 디바이스 하나의 디바이스 메모리 크기를 넘지 못하게 되고 이는 매우 큰 프로그램을 실행할 수 없다는 것을 의미한다. 일반적으로 이종 클러스터를 사용할 정도로 대규모의 계산이 필요한 애플리케이션의 경우 그 계산에 필요한 메모리가 매우 클 수 있다. 즉, 데이터가 클수록 계산 량이 많아질 수 있다. 이러한 종래 기술 환경 하에서, 이렇게 큰 용량의 데이터를 요구하는 프로그램은 실행될 수 없으므로 이종클러스터의 활용도를 저하될 수 있다. 이에 따라, 이러한 불필요한 데이터 통신과 디바이스 메모리의 불필요한 점유가 디바이스 개수를 늘리는 만큼 계산 성능 개선을 가지고 오지 못하는 원인이 될 수 있다. 즉, 이종 시스템의 성능 확장성(scalability)을 저해하는 요소가 된다.
본 개시는 상기와 같은 목적을 해결하기 위한 이종클러스터 시스템에서 프로그램을 실행시키는 방법 및 컴퓨터 프로그램을 제공한다.
이종 클러스터 시스템에서 프로그램 또는 애플리케이션을 실행할 때 단일한 가상의 계산 디바이스를 프로그래머에게 제공하는데 있다. 나아가, 단일한 가상 디바이스를 대상으로 작성된 프로그램은 이종 클러스터상의 여러 계산 디바이스 또는 가속기로 분배되어 실행될 수 있다. 이때 분배되는 작업을 위해 불러오는 데이터 중에서, 분배된 작업에 반드시 요구되는 데이터만이 계산 디바이스 또는 가속기에 복사될 수 있다.
이종 클러스터 시스템에서 가상의 단일 디바이스와 주소 공간을 공유하는 가상의 단일 디바이스 메모리를 프로그래머에게 제공하여 프로그래밍의 복잡성을 없애거나 최소화할 수 있다. 또한, 프로그램과 연관된 워크 그룹 또는 워크 아이템의 메모리 접근 패턴이 분석되어 계산 작업 분배 및 데이터 분배의 효율성이 향상될 수 있다.
복수의 가속기가 장착된 여러 노드들이 있는 이종 클러스터 시스템에서 애플리케이션을 작성하는 복잡도가 낮아질 수 있다. 즉, 프로그래머는 복수의 노드, 복수의 가속기에 대한 고려없이 단일 계산 디바이스, 단일한 메모리에 대한 프로그램을 작성하거나 실행할 수 있기 때문에, 프로그램의 생산성이 매우 높아지고 유지보수도 매우 쉬워질 수 있다.
본 개시는 방법, 장치, 시스템, 컴퓨터 프로그램 또는 명령어들을 저장하는 컴퓨터 판독가능 저장 매체를 포함한 다양한 방식으로 구현될 수 있다.
본 개시의 일 실시예에 따른 이종클러스터 시스템에서 프로그램을 실행시키는 방법은, 이종클러스터 시스템에 포함된 복수의 계산 디바이스의 각각에서, 이종클러스터 시스템의 클라이언트 노드로부터 할당된 프로그램과 연관된 복수의 워크 그룹을 수신하는 단계 및 복수의 계산 디바이스의 각각에서 할당된 복수의 워크 그룹을 처리하는 단계를 포함하고, 복수의 워크 그룹에 의해 접근되는 페이지는 이종클러스터 시스템 상에서 단일 메모리 주소 공간을 제공하도록 구성된 가상 메모리에 포함된 가상 페이지를 통해 관리된다.
일 실시예에 따르면, 할당된 복수의 워크 그룹을 처리하는 단계는, 상기 복수의 계산 디바이스 중 제1 계산 디바이스에서, 제1 계산 디바이스에 할당된 복수의 워크 그룹을 실행하는 중에 페이지 폴트가 발생하는 경우, 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지에 대한 정보를 불러오는 단계 및 제1 계산 디바이스에서, 최근 페이지에 포함된 데이터를 수신하는 단계를 포함한다.
일 실시예에 따르면, 복수의 계산 디바이스는 이종클러스터 시스템에 포함된 복수의 서버 노드의 각각에 포함된다.
일 실시예에 따르면, 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지에 대한 정보를 불러오는 단계는, 페이지 폴트가 발생한 가상 페이지의 최근 페이지 정보 요청을 오너 노드에 송신하는 단계 및 오너 노드로부터 가상 페이지의 최근 페이지에 대한 정보를 수신하는 단계, 수신된 최근 페이지에 대한 정보가, 제1 계산 디바이스를 포함한 제1 노드 내에서, 제1 계산 디바이스와 상이한 계산 디바이스의 메모리에 포함된 페이지를 가리키는지 여부를 판정하는 단계를 포함한다.
일 실시예에 따르면, 제1 계산 디바이스에서, 최근 페이지에 포함된 데이터를 수신하는 단계는, 오너 노드로부터 수신된 최근 페이지에 대한 정보가 제1 노드 내의 상이한 계산 디바이스의 메모리에 포함된 페이지를 가리키는 경우, 제1 노드에서 제공되는 페이지 폴트 핸들러를 실행하는 단계를 포함한다.
일 실시예에 따르면, 제1 계산 디바이스에서 최근 페이지에 포함된 데이터를 수신하는 단계는, 오너 노드로부터 수신된 최근 페이지에 대한 정보가 제1 노드 내의 상이한 계산 디바이스의 메모리에 포함된 페이지가 아닌 경우, 가상 페이지와 연관된 최근 페이지에 포함된 데이터가 클라이언트 노드에 있는지 문의하는 단계 및 가상 페이지와 연관된 최근 페이지에 포함된 데이터가 클라이언트 노드에 있는 경우, 클라이언트 노드로부터 가상 페이지와 연관된 최근 페이지에 포함된 데이터를 수신하는 단계를 포함한다.
일 실시예에 따르면, 제1 계산 디바이스에서 최근 페이지에 포함된 데이터를 수신하는 단계는, 가상 페이지와 연관된 최근 페이지에 포함된 데이터가 클라이언트 노드에 포함되지 않은 경우, 최근 페이지에 대한 정보가 나타내는 제2 계산 디바이스로부터 가상 페이지와 연관된 최근 페이지에 포함된 데이터를 수신하는 단계를 포함한다.
일 실시예에 따르면, 오너 노드의 페이지 관리 테이블의 업데이트를 수행하기 위하여, 제1 계산 디바이스에 의해, 수신된 최근 페이지에 포함된 데이터를 처리한, 제1 계산 디바이스의 페이지에 대한 정보를 오너 노드로 송신하는 단계를 더 포함한다.
일 실시예에 따르면, 복수의 워크 그룹과 복수의 워크 그룹이 접근하는 복수의 가상 페이지 사이의 관계를 나타내는 테이블을 기초로, 프로그램과 연관된 복수의 워크 그룹은 상기 복수의 계산 디바이스의 각각에 할당된다.
일 실시예에 따르면, 프로그램의 컴파일 동안의 static 분석 결과, 프로그램의 실행 시의 Runtime 분석 결과 또는 프로그램의 프로파일(profile) 분석 결과 중 적어도 하나를 기초로, 프로그램과 연관된 복수의 워크 그룹은 복수의 계산 디바이스의 각각에 할당된다.
일 실시예에 따르면, 복수의 워크 그룹의 메모리 접근 패턴을 분석한 결과를 기초로, 복수의 워크 그룹과 연관된 데이터는, 복수의 워크 그룹이 복수의 계산 디바이스에 의해 처리되기 전에, 복수의 워크 그룹과 연관된 데이터는 상기 복수의 계산 디바이스의 각각에 미리 프리패칭(pre-fetching)될 수 있다. 본 개시의 일 실시예에 따른 상술한 이종클러스터 시스템에서 프로그램을 실행시키는 방법을 컴퓨터에서 실행하기 위해 컴퓨터 판독 가능한 기록 매체에 저장된 컴퓨터 프로그램이 제공된다.
본 개시의 일부 실시예에 따르면, 런타임 시스템에서 가상의 단일 디바이스와 가상의 단일 디바이스 메모리를 제공함으로써, 가상의 단일 디바이스는 이종 클러스터 시스템에 탑재된 복수의 실제 디바이스에 나누어 실행될 수 있다. 이에 따라, 복수의 가속기가 장착된 여러 노드들이 있는 이종 클러스터 시스템에서 프로그램 또는 애플리케이션을 작성하는 복잡도가 매우 낮아지게 될 수 있다. 또한, 프로그래머 측에서는 복수의 노드, 복수의 가속기에 대한 고려없이 단일 계산 디바이스, 단일한 메모리에 대한 프로그래밍만을 작성하면 되기 때문에 프로그램의 생산성이 매우 높아지고 유지보수도 매우 쉬워질 수 있다. 또한, 계산 디바이스에서 접근하는 메모리만이 사용되기 때문에 계산 디바이스의 메모리를 넘어서는 메모리가 필요한 프로그램이 실행될 수 있다.
본 개시의 일부 실시예에 따르면, 기본적으로 나누어진 계산 작업이 이종 클러스터의 각 계산 디바이스에서 실행될 때 해당 계산 디바이스에서 발생하는 페이지 폴트를 이용하여 그 실행에 필요한 페이지만이 복사됨으로써 데이터 통신과 실제 계산 디바이스의 메모리 사용이 최소화될 수 있다.
본 개시의 일부 실시예에 따르면, 프로그램과 연관된 복수의 워크 그룹의 메모리 접근 패턴을 분석하여 분석된 결과를 기초로 복수의 워크 그룹 및/또는 이와 연관된 데이터를 복수의 계산 디바이스에 분배함으로써, 노드 사이의 데이터 통신 및/또는 호스트와 계산 디바이스 사이의 데이터 통신이 감소하여 전체적인 통신량이 최소화될 수 있으며, 이에 따라 발생된 통신 오버헤드가 최소화될 수 있다. 즉, 데이터의 분배 성능이 향상될 수 있다.
본 개시의 실시예들은, 이하 설명하는 첨부 도면들을 참조하여 설명될 것이며, 여기서 유사한 참조 번호는 유사한 요소들을 나타내지만, 이에 한정되지는 않는다.
도 1은 본 개시의 일 실시예에 따른 이종클러스터 시스템에서 실행되는 프로그램을 실행시키기 위하여, 복수의 계산 디바이스를 포함하는 복수의 서버 노드를 가상 시스템을 이용해 프로그램을 실행 가능하도록 연결된 구성을 나타내는 개요도이다.
도 2는 본 개시의 일 실시예에 따른 클라이언트 노드 및 서버 노드의 내부 구성을 나타내는 블록도이다.
도 3은 본 개시의 일 실시예에 따른 이종클러스터 시스템에서 실행되는 프로그램을 실행시키기 위한 페이지 폴트 처리 방법을 나타내는 흐름도이다.
도 4는 본 개시의 일 실시예에 따른 복수의 워크 그룹을 복수의 계산 디바이스 각각에 할당하는 예시를 나타내는 도면이다.
도 5는 본 개시의 일 실시예에 따른 복수의 워크 그룹과 복수의 워크 그룹이 접근하는 복수의 가상 페이지 사이의 관계를 나타내는 테이블의 예시를 나타내는 도면이다.
도 6은 본 개시의 일 실시예에 따른 이종클러스터 시스템에서 실행되는 프로그램을 실행시키기 위해, 페이지 폴트를 처리하는 방법을 나타내는 흐름도이다.
도 7은 본 개시의 일 실시예에 따른 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 페이지 폴트가 발생한 페이지와 같은 노드에 있을 경우, 페이지 폴트를 처리하는 예시를 나타내는 도면이다.
도 8은 본 개시의 일 실시예에 따른 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 클라이언트 노드의 가상 메모리에 존재할 경우, 페이지 폴트를 처리하는 예시를 나타내는 도면이다.
도 9는 본 개시의 일 실시예에 따른 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 페이지 폴트가 발생한 페이지와 다른 노드에 있을 경우, 페이지 폴트를 처리하는 예시를 나타내는 도면이다.
이하, 본 개시의 실시를 위한 구체적인 내용을 첨부된 도면을 참조하여 상세히 설명한다. 다만, 이하의 설명에서는 본 개시의 요지를 불필요하게 흐릴 우려가 있는 경우, 널리 알려진 기능이나 구성에 관한 구체적 설명은 생략하기로 한다.
첨부된 도면에서, 동일하거나 대응하는 구성요소에는 동일한 참조부호가 부여되어 있다. 또한, 이하의 실시예들의 설명에 있어서, 동일하거나 대응되는 구성요소를 중복하여 기술하는 것이 생략될 수 있다. 그러나 구성요소에 관한 기술이 생략되어도, 그러한 구성요소가 어떤 실시예에 포함되지 않는 것으로 의도되지는 않는다.
개시된 실시예의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 개시는 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 개시가 완전하도록 하고, 본 개시가 통상의 기술자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것일 뿐이다.
본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 개시된 실시예에 대해 구체적으로 설명하기로 한다. 본 명세서에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 관련 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다.
본 명세서에서의 단수의 표현은 문맥상 명백하게 단수인 것으로 특정하지 않는 한, 복수의 표현을 포함한다. 또한, 복수의 표현은 문맥상 명백하게 복수인 것으로 특정하지 않는 한, 단수의 표현을 포함한다. 명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다.
본 개시에서, '프로그램'은 이종시스템을 대상으로 하는 프로그램을 지칭할 수 있다. 또한, 프로그램은 프로세서에 의해 실행되는 클라이언트 프로그램 및 계산 디바이스에 의해 실행되는 커널(kernel)을 포함할 수 있다. 클라이언트 프로그램 및 커널은 OpenCL과 같이 완전히 분리되어 있을 수도 있고, CUDA, OpenMP 4.0, OpenACC 등과 같이 커널이 클라이언트 프로그램 중간에 포함(embed)되어 있을 수도 있다. 본 개시에서. 프로그램은 위의 클라이언트 프로그램 및 커널을 포함할 수 있다.
본 개시에서, '워크 그룹(work-group)'은, 워크 아이템들(work-item)의 집합을 지칭할 수 있다. 워크 아이템은 클라이언트 프로그램이 계산 디바이스에 커널 실행 명령을 보내면, 계산 디바이스에서는 하나 이상의 커널 인스턴스(kernel instance)가 실행된다. 여기서, 커널 인스턴스는 커널을 실행하는 스레드를 지칭할 수 있다. OpenCL에서는 각각의 커널 인스턴스를 워크 아이템이라고 지칭할 수 있다. CUDA에서는 각각의 커널 인스턴스를 스레드(thread)라고 지칭한다. 또한, CUDA에서는 워크 그룹을 스레드블록(thread-block)이라고 지칭할 수 있다. 또한, 워크 그룹은 계산 디바이스에 포함된 복수의 계산 유닛들로 나뉘어져 실행될 수 있다. 또한, 워크 그룹에 속한 워크 아이템들은 다시, 계산 유닛에 포함된 복수의 PE(Processing Element)로 나누어져 실행될 수 있다. 즉, 워크 그룹은 계산 디바이스에 속한 많은 수의 PE에서 동시에 실행될 수 있다.
본 개시에서, '페이지'는, 메모리 영역을 특정한 크기로 나눠서 관리하는 유닛을 지칭할 수 있다, 예를 들어, 일반적인 운영체제에서는 4K byte 단위로 관리가 된다. 이에 따르면, 1024 KB 메모리 영역을 할당하면 이는 256개의 페이지로 나뉘어져 관리가 될 수 있다.
본 개시에서, '오너 노드'는, 가상의 메모리에 포함된 복수의 가상 페이지 중 적어도 일부 페이지를 관리하는 노드를 지칭할 수 있다. 예를 들어, 오너 노드는 오너 노드에 의해 관리되는 가상 페이지와 그러한 가상 페이지에 대한 최근 페이지(예: 계산 디바이스에 포함된 메모리 내의 실제 페이지)에 대한 정보를 저장하고 있으며, 최근 페이지에 대한 정보가 수정될 때 마다, 그러한 정보를 업데이트할 수 있다. 이러한 정보는 테이블의 형태로 오너 노드에 저장될 수 있다.
본 개시에서, '이종시스템(Heterogeneous System)'은, 통상적으로 범용 계산을 위한 CPU(예를 들어, x86 CPU)와 고속의 병렬 처리에 특화된 계산 디바이스 또는 가속기를 함께 장착한 시스템을 포함할 수 있다. 예를 들어, 계산 디바이스는 GPU(Graphics Processing Unit), Intel Xeon Phi, FPGA, DSP 등을 포함할 수 있다. 병렬로 수행이 가능하고 계산양이 많은 코드 영역을 병렬 계산에 특화되어 있는 프로그램은 복수의 계산 디바이스에 오프로딩(offloading)되어 처리되면 프로그램의 성능과 전력효율을 크게 향상될 수 있다. 예를 들어, 이종시스템에서 이러한 오프로딩을 위한 프로그래밍 모델로는 CUDA와 OpenCL이 널리 사용되고 있다.
본 개시에서, '이종클러스터 시스템'은, 네트워크를 통해 연결된 계산 디바이스 또는 가속기(예를 들어, GPU 또는 FPGA 등의 계산 디바이스)가 장착된 복수의 노드(예를 들어, 컴퓨터)를 포함할 수 있다. 이종클러스터 시스템에 사용되는 네트워크는 기가빗 이더넷(Gigabit Ethernet), 인피니밴드(Infiniband) 등을 포함할 수 있다. 이종클러스터 시스템에는 복수의 노드가 있고, 각 노드는 1개 이상의 가속기를 포함할 수 있다. 이러한 이종 클러스터 환경에서 응용프로그램의 특정 부분을 오프로딩 하여 실행하기 위해서는 노드간 통신이 필요하게 되고 노드 간 통신을 위해서 RDMA(Remote Direct Memory Access), MPI(Message Passing Interface), 소켓 통신 라이브러리 등의 통신 라이브러리가 사용될 수 있다.
또한, 본 개시에서의 '이종클러스터 시스템'에서의 프로그래밍은 일반적으로 마스터-슬래이브(Master-Slave) 형태의 모델이 사용될 수 있다. 마스터-슬래이브 형태의 모델은 클라이언트-서버 모델로 이해할 수도 있다. 마스터-슬래이브 모델은 하나의 호스트 노드(마스터; 클라이언트)와 1개 이상의 계산 노드(슬래이브; 서버)로 구성된 환경을 가정한다. 호스트 노드에서는 호스트 프로그램이 동작하며 일반적으로 커널(Kernel)이라고 불리는 병렬 프로그램의 인스턴스(instance)를 각 계산 노드로 분산하여 실행을 하고, 메모리를 관리할 수 있다. 계산 노드는 호스트 노드로부터 받은 데이터와 커널 인스턴스를 자기가 가지고 있는 가속기(컴퓨트 디바이스)를 활용하여 실행할 수 있다. 이종클러스터 시스템에서의 프로그래밍은 오프로딩 하여 수행할 데이터를 해당 노드의 메인 메모리 혹은 이차 스토리지에 소유하고 있어야 한다. 만약 해당하는 데이터가 존재하지 않으면 노드간 통신을 통해서 해당 데이터를 그 데이터가 필요한 노드로 옮기는 작업이 우선되어야 한다. 클라이언트 노드는 소유한 데이터를 각 계산 노드로 나눠 주기 위해서 MPI, RDMA, 소켓 통신과 같은 노드간 통신 라이브러리를 활용하고, 계산 노드에는 오프로딩 된 계산 작업을 처리하기 위해 CUDA와 OpenCL같은 프로그래밍 모델을 사용할 수 있다.
본 개시에서, 계산 디바이스에 의해 처리, 수신 또는 송신되는 것은 계산 디바이스가 포함된 노드의 CPU에서 처리, 수신 또는 송신되는 것을 포함할 수 있다.
본 개시에서, '페이지 폴트'는, 프로세서 또는 계산 디바이스가 운영체제를 통해 특정 페이지를 메모리에 요청하고, 물리 메모리 상에 해당 페이지가 존재하면, 해당 페이지에 접근할 수 있다. 그러나, 해당 페이지가 물리 메모리 상에 존재하지 않는 경우, 가상 메모리 공간에 해당 페이지를 요청해야 하는데, 이를 페이지 폴트라 지칭할 수 있다.
본 개시에서, '페이지 폴트 핸들러'는, 페이지 폴트가 발생하면, 가상 메모리로부터 물리 메모리 상에 해당 페이지를 로드할 수 있다. 또한, 페이지를 물리 메모리 상에 로드할 때, 물리 메모리의 공간이 부족하다면, 물리 메모리 상에 있는 페이지를 가상 메모리로 로드하고, 가상 메모리 상에 있는 접근하고자 하는 페이지를 물리 메모리 상에 로드할 수 있다. 프로세서의 메인 메모리에서 페이지 폴트가 발생하는 경우, 페이지 폴트 핸들러는 운영체제에서 제공하는 페이지 폴트 메커니즘을 의미할 수 있다. 또한, 계산 디바이스에서 페이지 폴트가 발생하는 경우, 페이지 폴트 핸들러는 ISR(Interrupt Service Routine)을 통해서 처리하는 것을 의미할 수 있다.
본 개시에서, 'n'은 1이상의 자연수를 지칭할 수 있으며, 'm'은 1 이상의 자연수를 지칭할 수 있으며, 'n'과 'm'은 동일한 수일 수 있고, 상이한 수일 수 있다.
도 1은 본 개시의 일 실시예에 따른 이종클러스터 시스템(130)에서 실행되는 프로그램을 실행시키기 위하여, 복수의 계산 디바이스(170_1, ..., 170_m)를 포함하는 복수의 서버 노드(150_1, ..., 150_n)를 가상 시스템(100)을 이용해 프로그램을 실행 가능하도록 연결된 구성을 나타내는 개요도이다. 여기서, 서버 노드(150_1, ..., 150_n)는 계산 노드 또는 슬래이브 노드를 지칭할 수 있다. 또한, 복수의 계산 디바이스(170_1, ..., 170_m)는 이종클러스터 시스템(130)에 포함된 복수의 서버 노드(150_1, ..., 150_n)의 각각에 포함될 수 있다. 예를 들어, 복수의 계산 디바이스(170_1, ..., 170_m)는 복수의 서버 노드(150_1, ..., 150_n)의 적어도 일부 노드에 포함될 수 있다. 또 다른 예로서, 복수의 서버 노드(150_1, ..., 150_n)의 각각은 복수의 계산 디바이스(170_1, ..., 170_m) 중 적어도 일부를 포함할 수 있다. 또한, 이종클러스터 시스템(130)은 클라이언트 노드(미도시), 복수의 서버 노드(150_1, ..., 150_n) 및 네트워크(140)를 포함할 수 있다. 또한, 클라이언트 노드(미도시) 및 복수의 서버 노드(150_1, ..., 150_n)의 각각은 프로세서(160), 복수의 계산 디바이스(170_1, ..., 170_m), 복수의 계산 디바이스 메모리(175_1, ..., 175_m), Interconnection Bus(180), 통신부(185) 및 메인 메모리(190)를 포함할 수 있다.
가상 시스템(100)은, 이종클러스터 시스템을 이용하는 프로그램을 실행시키도록 구성될 수 있다. 가상 시스템(100)은, 클라이언트 노드(미도시)에 의해 제어될 수 있다. 또한, 가상 시스템(100)은 복수의 서버 노드(150_1, ..., 150_n)와 통신 가능하도록 구성되고, 복수의 서버 노드(150_1, ..., 150_n)에 포함된 복수의 계산 디바이스(170_1, ..., 170_m)의 동작을 제어하도록 구성될 수 있다. 예를 들어, 가상 시스템(100)은 이종클러스터 시스템(130)에 포함된 전체 노드를 대상으로 전체 작업을 분배하고, 각각의 노드에서 복수의 계산 디바이스로 워크로드를 분배하여 실행할 수 있다. 그리고, 모든 계산 작업이 완료되면, 분배된 결과를 다시 클라이언트 노드에서 취합할 수 있다.
클라이언트 프로세서(110)는, 클라이언트 노드(미도시)에 포함될 수 있다. 또한, 클라이언트 프로세서(110)는, 이종클러스터 시스템(130)을 제어하기 위한, 가상 계산 디바이스(115) 및 가상 메모리(120)를 제어할 수 있다. 클라이언트 프로세서(110)는, 예를 들어, CPU(Central Processing Unit, 중앙 처리 장치)와 같은 연산 처리를 위한 범용 프로세서로 구성될 수 있으며, 클라이언트 프로세서(110)는 가상 계산 디바이스(115)와 연결되어 복수의 계산 디바이스(170_1, ..., 170_m)의 동작을 제어할 수 있다. 또한, 클라이언트 프로세서(110)는 가상 메모리(120) 및/또는 메인 메모리(190)와 연결될 수 있다. 예를 들어, 클라이언트 프로세서(110)는 PCI-E(Peripheral component interconnect-Express) 버스를 통해 복수의 계산 디바이스(170_1, ..., 170_m) 및/또는 메인 메모리(190)와 서로 연결될 수 있으며 복수의 계산 디바이스(170_1, ..., 170_m) 및/또는 메인 메모리(190)의 제어를 위한 데이터를 송수신할 수 있다.
가상 계산 디바이스(115)는, 클라이언트 프로세서(110)에 의해 제어될 수 있다. 또한, 가상 계산 디바이스(115)는 단일 계산 디바이스를 타겟으로 작성된 애플리케이션을 복수의 계산 디바이스(170_1, ..., 170_m)에 나누어 실행할 수 있다. 가상 계산 디바이스(115)를 구현하기 위하여, 가상 GPU(예를 들어, NVIDIA의 vGPU 등)에서 제공하는 기술이 이용될 수 있다.
가상 메모리(120)는, 본 발명의 구현을 위해 이종클러스터 시스템(130) 상에서 단일한 메모리 주소공간을 제공하기 위한 통합된 가상 메모리를 지칭할 수 있다. 본 개시에서는 이를 이기종 가속기 클러스터를 위한 통합 메모리(UMHC, Unified Memory for Heterogeneous-Accelerator Clusters)라고 지칭할 수 있다. 일 실시예에 따르면, 가상 메모리(120)는 이종 클러스터 내의 모든 메인 메모리와 복수의 계산 디바이스의 메모리가 단일 메모리 주소 공간 상에서 할당, 관리, 및/또는 동작되도록 구성될 수 있다. 예를 들어, 가상 메모리(120)는 CUDA의 Unified memory, OpenCL의 OpenCL SVM 등을 이용해 구현될 수 있다. 여기서, 가상 메모리(120)는 가상의 디바이스 메모리를 지칭할 수 있다. 이러한 가상의 디바이스 메모리는 전체 이종 클러스터 상에서 단일한 주소 공간을 공유하며, 운영체제에서 제공하는 페이지 폴트(page fault) mechanism 및/또는 계산 디바이스 또는 가속기에서 제공하는 페이지 폴트를 처리하기 위한 ISR(Interrupt Service Routine)을 이용하여 구현될 수 있다.
RHAC(Runtime system for Heterogeneous Accelerator Cluster)(125)는, 이기종 가속기 클러스터를 위한 런타임 시스템를 지칭할 수 있다. 일 실시예에 따르면, RHAC(125)는 복수의 계산 디바이스(170_1, ..., 170_m)를 이용하는 이종클러스터 시스템(130)에서 단일한 계산 디바이스를 이용하는 것처럼 프로그램을 실행시키도록 구성될 수 있다. 예를 들어, RHAC(125)는 복수의 계산 디바이스(170_1, ..., 170_m)를 가상 계산 디바이스(115)로 관리하고, 복수의 서버 노드(150_1, ..., 150_n) 각각이 포함하는 메인 메모리(190) 및 계산 디바이스 메모리(175_1, ... 175_m)를 단일 주소를 갖는 가상 메모리(120)로 관리하기 위한 런타임 시스템을 지칭할 수 있다. 또한, RHAC(125)는, 단일 주소 공간을 제공하기 위해, 페이지 폴트 핸들링을 실행할 수 있으며, 도 7 내지 도 9를 통해 보다 상세히 후술한다.
이종클러스터 시스템(130)은, 네트워크(140)를 통해 연결된 클라이언트 노드(미도시) 및 복수의 서버 노드(150_1, ..., 150_n)를 포함할 수 있다. 또한, 이종클러스터 시스템(130)을 통해, 클라이언트 노드(미도시)는 이종클러스터 시스템(130)을 하나의 컴퓨터처럼 이용할 수 있다.
네트워크(140)는, 이종클러스터 시스템(130)에 포함됨 클라이언트 노드(미도시) 및 복수의 서버 노드(150_1, ..., 150_n) 사이의 통신이 가능하도록 구성될 수 있다. 네트워크(140)는 설치 환경에 따라, 예를 들어, 이더넷(Ethernet), 유선 홈 네트워크(Power Line Communication), 전화선 통신 장치 및 RS-serial 통신 등의 유선 네트워크, 이동통신망, WLAN(Wireless LAN), Wi-Fi, Bluetooth 및 ZigBee 등과 같은 무선 네트워크 또는 그 조합으로 구성될 수 있다. 다시 말해, 통신 방식은 제한되지 않으며, 네트워크(140)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망, 위성망 등)을 활용하는 통신 방식뿐만 아니라 클라이언트 노드(미도시) 및 복수의 서버 노드(150_1, ..., 150_n) 사이의 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크(140)는 PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(140)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.
복수의 서버 노드(150_1, ..., 150_n)는, 이종클러스터 시스템(130) 상에서 정보처리, 계산, 연산 및/또는 통신을 수행하도록 구성된 컴퓨팅 장치를 포함할 수 있다. 복수의 서버 노드(150_1, ..., 150_n)는 컴퓨터 또는 원격처리 장치와 같은 단말의 형태로 구성될 수 있다. 또한, 각 복수의 서버 노드(150_1, ..., 150_n)는 독립적으로 정보처리 등을 수행할 수 있으나, 병렬 프로그래밍을 통하여 다른 복수의 서버 노드(150_1, ..., 150_n)들과 협력하면서 정보처리 등을 수행할 수 있다. 각 복수의 서버 노드(150_1, ..., 150_n)는 네트워크(140)를 통해 프로그램 동작을 위한 통신 및 페이지 폴트를 처리하기 위한 통신을 실행할 수 있다. 이러한 복수의 서버 노드(150_1, ..., 150_n)는 데이터의 송신원, 수신처 또는 중계점 중 어느 하나에 해당할 수 있다. 또는 이러한 복수의 서버 노드(150_1, ..., 150_n) 중 적어도 일부는 오너 노드로서 수행될 수 있다. 도시된 바와 같이, 복수의 서버 노드(150_1, ..., 150_n)의 각각은 프로세서(160), 계산 디바이스(170_1, ..., 170_m), 계산 디바이스 메모리(175_1, ..., 175_m), Interconnection Bus(180), 메인 메모리(190) 및 통신부(185)를 포함할 수 있다. 또한, 이러한 구성은 클라이언트 노드(미도시)에도 포함될 수 있다.
프로세서(160)는, 예를 들어, CPU(Central Processing Unit, 중앙 처리 장치)와 같은 연산 처리를 위한 범용 프로세서로 구성될 수 있으며, 프로세서(160)는 복수의 계산 디바이스(170_1, ..., 170_m)와 연결되어 복수의 계산 디바이스(170_1, ..., 170_m)의 동작을 제어할 수 있다. 또한, 프로세서(160)는 메인 메모리(190)가 연결될 수 있다. 예를 들어, 프로세서(160)는 Interconnection Bus(180)를 통해 복수의 계산 디바이스 메모리(175_1, ..., 175_m) 및/또는 메인 메모리(190)와 서로 연결될 수 있으며 복수의 계산 디바이스 메모리(175_1, ..., 175_m) 및/또는 메인 메모리(190)의 제어를 수행하고, 이를 위한 데이터를 송수신할 수 있다.
복수의 계산 디바이스(170_1, ..., 170_m)는, 범용의 CPU와는 달리 특정 패턴의 연산에 특화된 프로세서로 구성될 수 있다. 예를 들어, 복수의 계산 디바이스(170_1, ..., 170_m)의 각각은 GPU, FPGA, DSP, Intel Xeon Phi, TPU, NPU, 멀티코어 CPU 등을 포함할 수 있다. 또한, 복수의 계산 디바이스(170_1, ..., 170_m) 각각에는 메인 메모리(190)와는 별도로 계산 디바이스 메모리(175_1, ..., 175_m)가 연결될 수 있다.
복수의 계산 디바이스(170_1, ..., 170_m)는, 각각 하나 이상의 계산 유닛(CU; compute unit)을 포함하고, 각각의 계산 유닛은 다시 하나 이상의 PE(processing element)를 포함할 수 있다.
복수의 계산 디바이스(170_1, ..., 170_m) 각각의 모든 PE는 각각의 계산 디바이스 메모리를 공유하며, 각각의 계산 디바이스 메모리에서 데이터를 읽고 쓸 수 있다. 복수의 계산 디바이스(170_1, ..., 170_m)에 포함된 각각의 구성요소들은 실제 물리적으로 구분되는 것일 수도 있고, 물리적으로는 구분되지 않지만 논리적으로(예를 들면, 소프트웨어에 의해서) 구분되는 것일 수도 있다. 특히 메인 메모리(190) 혹은 계산 디바이스 메모리(175_1, ..., 175_m)는 실제 물리적인 메모리 칩 하나를 가리킬 수도 있지만, 복수의 메모리 칩 및 다른 구성요소가 연결되어 단일한 메모리 주소 공간(address space)를 제공할 때, 그 단일한 메모리 주소 공간을 가리킬 수도 있다.
복수의 계산 디바이스 메모리(175_1, ..., 175_m)는, 복수의 계산 디바이스(170_1, ..., 170_m)에 연결될 수 있다. 예를 들어, 복수의 계산 디바이스(170_1, ..., 170_m)가 프로세서(160)에 연결된 메인 메모리(190)에 직접 접근은 할 수 없기 때문에, 복수의 계산 디바이스(170_1, ..., 170_m)는 메인 메모리(190)에서 복수의 계산 디바이스 메모리(175_1, ..., 175_m)로 입력 데이터를 복사하고, 복수의 계산 디바이스(170_1, ..., 170_m)에 오프로딩된 또는 분배된 코드를 실행할 수 있다. 이러한 오프로딩 또는 분배된 코드는 클라이언트 노드(미도시)로부터 수신될 수 있으며, 자신의 계산 디바이스에 포함된 계산 디바이스 메모리에 저장될 수 있다. 또한, 오프로딩 또는 분배된 코드를 처리한 이후, 복수의 계산 디바이스(170_1, ..., 170_m)는 코드를 처리한 결과 데이터를 복수의 계산 디바이스 메모리(175_1, ..., 175_m)로부터 프로세서(160)의 메인 메모리(190)로 복사할 수 있다. 복수의 계산 디바이스 메모리(175_1, ..., 175_m)는 Interconnection Bus(180)를 통해 메인 메모리(190)와 연결될 수 있다.
Interconnection Bus(180)는, 복수의 계산 디바이스 메모리(175_1, ..., 175_m), 통신부(185) 및 메인 메모리(190)와 연결되어 통신을 수행할 수 있다. Interconnection Bus(180)는 예를 들어, PCI-E(Peripheral component interconnect-Express) 버스와 같은 통신을 수행하기 위한 장치로 구성될 수 있다.
통신부(185)는, Interconnection Bus(180)와 연결되어, 복수의 계산 디바이스 메모리(175_1, ..., 175_m) 및 메인 메모리(190)에 저장된 데이터를 송수신할 수 있다. 통신부(185)는, 클라이언트 노드 및 복수의 서버 노드(150_1, ..., 150_n)의 각각에 포함될 수 있으며, 다른 노드와 데이터 송수신할 수 있다. 통신부(185)는, 예를 들어, 클라이언트 노드 및 복수의 서버 노드(150_1, ..., 150_n)를 인피니밴드나 기가빗 이더넷으로 연결할 수 있다. 또한, 노드간 통신은 RDMA나 MPI등 다양한 통신 라이브러리 및 기술을 이용해 수행될 수 있다.
메인 메모리(190)는, 전자 정보를 저장 가능한 임의의 전자 컴포넌트를 포함하도록 넓게 해석되어야 한다. 예를 들어, 메인 메모리(190)는 임의 액세스 메모리(RAM), 판독-전용 메모리(ROM), 비-휘발성 임의 액세스 메모리(NVRAM), 프로그램가능 판독-전용 메모리(PROM), 소거-프로그램가능 판독 전용 메모리(EPROM), 전기적으로 소거가능 PROM(EEPROM), 플래쉬 메모리, 자기 또는 광학 데이터 저장장치, 레지스터들 등과 같은 프로세서-판독가능 매체의 다양한 유형들을 지칭할 수도 있다. 프로세서(160) 및/또는 복수의 계산 디바이스(170_1, ..., 170_m)로부터 정보를 판독하거나 메모리에 정보를 기록할 수 있다면 메인 메모리(190)는 프로세서(160) 및/또는 복수의 계산 디바이스(170_1, ..., 170_m)와 전자 통신 상태에 있다고 불린다. 본 개시에서, 메인 메모리(190)는 프로세서(160) 및/또는 복수의 계산 디바이스(170_1, ..., 170_m)에 의해 실행되는 프로그램과 연관된 임의의 데이터 및/또는 정보를 저장할 수 있다.
도 2는 본 개시의 일 실시예에 따른 클라이언트 노드(210) 및 복수의 서버 노드(220_1, 220_2)의 내부 구성을 나타내는 블록도이다. 클라이언트 노드(210) 및 복수의 서버 노드(220_1, 220_2)는 이종클러스터 시스템에 포함될 수 있다. 도 2에서는 서버 노드가 2개 이상으로 도시되어 있으나, 이에 한정되지 않으며, 복수의 서버 노드는 n개(여기서, n은 1 이상의 자연수)일 수 있다. 여기서, 클라이언트 노드(210)는 호스트 노드 또는 마스터 노드를 지칭할 수 있다.
또한, 복수의 서버 노드(220_1, 220_2)의 각각은 도 1의 서버 노드(150_1, ..., 150_n)의 각각과 동일할 수 있다. 또는, 도 1의 서버 노드(150_1, ..., 150_n)의 내부 구성은 복수의 서버 노드(220_1, 220_2)의 내부 구성에 포함되거나, 복수의 서버 노드(220_1, 220_2)의 내부 구성은 도 1의 서버 노드(150_1, ..., 150_n)의 내부 구성에 포함될 수 있다. 이에 따라, 도 2에서, 도 1에서 설명된 구성과 동일 또는 유사한 구성에 대한 설명은 반복을 피하기 위하여 생략된다.
도시된 바와 같이, 각각의 클라이언트 노드(210) 및 복수의 서버 노드(220_1, 220_2)는 RHAC(225_0, 225_1, 225_2), 가상 메모리(230), 계산 디바이스 런타임(240_0, 240_1, 240_2), 가상 메모리 드라이버(250_0, 250_1, 250_2), 계산 디바이스 드라이버(260_0, 260_1, 260_2), 복수의 계산 디바이스(270_1, ..., 270_m, 271_1, ..., 271_m, 272_1, ..., 272_m) 및 통신부(285_0, 285_1, 285_2)를 포함할 수 있다. 본 개시에서, 복수의 계산 디바이스는 각 노드에서 m 개의 계산 디바이스를 포함한다고 편의상 도시되어 있으나, 이에 한정되지 않으며, 각 노드는 상이한 개수의 계산 디바이스를 포함하도록 구성될 수 있다.
일 실시예에 따르면, 계산 디바이스 런타임(240_0, 240_1, 240_2)은, 계산 디바이스 제조사가 제공하는 런타임을 지칭할 수 있다. 예를 들어, 계산 디바이스가 NVIDIA의 GPU일 경우, 계산 디바이스 런타임(240_0, 240_1, 240_2)은 CUDA 런타임을 포함할 수 있다. 또한, RHAC(225_0, 225_1, 225_2)는 계산 디바이스 런타임(240_0, 240_1, 240_2)을 이용하여 구현될 수 있다.
가상 메모리 드라이버(250_0, 250_1, 250_2)는, 복수의 계산 디바이스 드라이버(260_0, 260_1, 260_2)를 이용하여 가상 메모리(230)(예를 들어, UMHC(Unified Memory for Heterogeneous-Accelerator Clusters))를 구현할 수 있다.
계산 디바이스 드라이버(260_0, 260_1, 260_2)의 각각은 자신의 노드에 포함된 복수의 계산 디바이스를 제어할 수 있다. 예를 들어, 계산 디바이스가 NVIDIA의 GPU일 경우, 계산 디바이스 드라이버(260_0, 260_1, 260_2)는 NVIDIA에 의해 제공되는 NVIDIA GPU 드라이버를 포함할 수 있다.
본 개시의 일 실시예에 따르면, 분배된 계산 작업(예를 들어, 프로그램, 커널 프로그램 등)이 실행되는 중에, 해당 노드 혹은 해당 계산 디바이스가 접근하는 메모리 영역에, 계산에 필요한 데이터가 없다면 등록된 페이지 폴트 핸들러가 호출되어 처리될 수도 있다. 일반적으로 프로세서의 메인 메모리에서 발생하는 페이지 폴트는 운영체제의 페이지 폴트 메커니즘을 이용하여 처리되거나, 계산 디바이스에서 발생하는 페이지 폴트는 ISR(Interrupt Service Routine)을 통해서 처리될 수 있다.
가상 메모리(230)는 이종클러스터 시스템에 단일 주소 공간의 공유 메모리를 제공할 수 있다. 가상 메모리(230)는 이종클러스터 시스템의 클라이언트 노드(210) 및 복수의 서버 노드(220_1, 220_2)가 모두 동일한 주소로 읽고 쓸 수 있는 메모리이며, 그 데이터는 모든 노드에서 공유될 수 있다. 가상 메모리(120)를 구현을 위해서 각 노드 내에서는 계산 디바이스 제조사가 제공하는 계산 디바이스 드라이버의 통합 메모리(또는 공유 메모리)를 사용하여 구현될 수도 있다. 예를 들어, NVIDIA의 CUDA는 Unified Memory라는 명칭으로 공유 메모리가 제공되고, OpenCL은 OpenCL SVM이라는 명칭으로 해당 공유 메모리의 기능이 제공된다. 다만, 이러한 종래의 가상 메모리는 하나의 노드 내에서만 단일한 주소 공간을 가지고 공유되는 메모리이며, 이종클러스터 시스템 상의 복수의 서버 노드 사이에는 가상 메모리를 제공하지 않을 수 있다. 본 개시의 가상 메모리(230)는 이종 클러스터 시스템 상의 복수의 서버 노드 사이에서 제공되는 가상 메모리를 지칭할 수 있다. 예를 들어, 가상 메모리(230)는 이종 클러스터 시스템에 포함된 임의의 메모리를 단일의 주소 공간 상에 할당, 관리 및/또는 동작되도록 구성될 수 있다.
이러한 가상 메모리(230)를 제공하기 위해서, 이종클러스터 시스템 내의 계산 디바이스에서 접근하는 메모리의 페이지가 계산 디바이스 메모리 상에 없을 때, 인터럽트를 통해 페이지 폴트를 처리하는 방식 또는 이와 유사한 방식으로 페이지 폴트 메커니즘이 구현될 수 있다. 예를 들어, 페이지 폴트가 발생하면, 페이지 폴트가 발생한 페이지가 있는 곳 또는 위치(예를 들어, 메인 메모리 또는 계산 디바이스 메모리)에서 페이지를 복사할 수 있고, 페이지에 저장된 데이터를 액세스할 수 있다. 일반적으로 페이지를 가장 최근에 접근한 디바이스에게 최근 페이지를 이전(migration)하는 방식으로 구현될 수 있다. 또 다른 예로서, 시스템 상에 동일한 페이지가 동시에 여러 벌 존재할 수도 있으며, 이에 제한되지 않는다. 동일한 페이지가 여러 벌 시스템 상에 존재하는 경우는 읽기 전용(read-only) 메모리의 경우일 수 있다. 이와 달리, 메모리 일관성을 위해서 쓰기(write)가 진행된 페이지의 경우, 동일한 복수 개의 페이지가 존재할 수 없다.
본 개시의 일 실시예에 따르면, 이종클러스터 시스템(130)을 대상으로 하는 프로그램은 크게 클라이언트 노드의 프로세서에서 실행되는 클라이언트 프로그램(또는, 호스트 프로그램)과 계산 디바이스에서 실행되는 하나 이상의 커널(kernel)로 구성될 수 있다. 클라이언트 프로그램과 커널은 완전히 분리되어 있을 수도 있고(예를 들어, OpenCL의 경우), 커널이 클라이언트 프로그램의 중간에 포함(embed)되어 있을 수도 있다(예를 들어, CUDA, OpenMP 4.0, OpenACC의 경우).
본 개시의 일 실시예에 따르면, 클라이언트 프로그램과 커널은 모두 예를 들어, C 언어 등의 통상적인 고수준 프로그래밍 언어를 사용해 작성될 수 있다. 클라이언트 프로그램은 병렬 프로그래밍 모델이 제공하는 API를 사용해 메인 메모리의 데이터를 계산 디바이스 메모리로 복사하고, 계산 디바이스에서 커널을 실행시키고, 계산 디바이스 메모리의 데이터를 메인 메모리로 복사하라는 명령(command)을 내릴 수 있다. 전술한 API를 구현(implementation)한 소프트웨어인 런타임 시스템(runtime system)이 클라이언트 프로그램과 동시에 실행되면서, 클라이언트 프로그램의 명령을 받아 계산 디바이스를 제어할 수 있다. 클라이언트 프로그램이 내리는 명령은, 쓰기 명령(write command), 커널 실행 명령(kernel execution command), 읽기 명령(command)을 포함할 수 있다.
예를 들어, 쓰기 명령은, 메인 메모리의 데이터를 계산 디바이스의 메모리로 복사할 수 있다. 커널 실행 명령은 계산 디바이스에서 커널을 실행시킬 수 있다. 읽기 명령은 디바이스 메모리의 데이터를 메인 메모리로 복사할 수 있다.
도 3은 본 개시의 일 실시예에 따른 이종클러스터 시스템에서 실행되는 프로그램을 실행시키기 위한 페이지 폴트 처리 방법(300)을 나타내는 흐름도이다. 도시된 바와 같이, 이종클러스터 시스템에서 프로그램을 실행시키는 방법(300)은, 이종클러스터 시스템에 포함된 복수의 계산 디바이스의 각각에서 이종클러스터 시스템의 클라이언트 노드로부터 할당된 프로그램과 연관된 복수의 워크 그룹을 수신하는 단계(S310)로 개시될 수 있다. 그리고 나서, 복수의 계산 디바이스의 각각에서 할당된 복수의 워크 그룹은 처리될 수 있다(S320). 복수의 워크 그룹에 의해 접근(읽기 및/또는 쓰기)되는 페이지는 이종클러스터 시스템 상에서 단일 메모리 주소 공간을 제공하도록 구성된 가상 메모리에 포함된 가상 페이지를 통해 관리될 수 있다.
단계(S330)에서, 복수의 계산 디바이스 중 제1 디바이스가 페이지 폴트가 발생하였는지 여부를 판정할 수 있다. 제1 계산 디바이스에 할당된 복수의 워크 그룹을 실행하는 중에 페이지 폴트가 발생하는 경우, 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지에 대한 정보를 불러올 수 있다(S340). 그리고 나서, 최근 페이지에 대한 데이터가 수신될 수 있다(S350). 페이지 폴트가 발생되지 않는 경우, 할당된 복수의 워크 그룹의 처리를 계속하거나, 처리가 완료되었으면 종료될 수 있다. 예를 들어, 제1 계산 디바이스는 할당된 워크 그룹을 처리하고 나면, 다음 워크 그룹을 수신하여 처리할 수 있다. 여기서, 제1 계산 디바이스에 의해 처리되는 워크 그룹을 하기 위한 데이터는 이종클러스터 시스템 내의 다른 계산 디바이스 또는 다른 노드에 존재하거나 저장될 수 있다. 이 경우, 제1 계산 디바이스는 이종클러스터 시스템 내의 다른 계산 디바이스에서 워크 그룹을 처리한 결과 데이터를 입력 데이터로 수신하는 경우가 생길 수 있다. 이를 위해, 제1 계산 디바이스는 이러한 입력 데이터를 수신하기 위해, 해당 페이지의 최근 노드를 찾아야 할 수 있는데, 이러한 과정은 도 6을 참고하여 상세히 설명된다.
도 4는 본 개시의 일 실시예에 따른 복수의 워크 그룹을 복수의 계산 디바이스 각각에 할당하는 예시를 나타내는 도면이다. 여기서, 복수의 노드의 각각은 복수의 계산 디바이스를 포함할 수 있다. 도 4에서는 복수의 노드의 각각이 동일한 수의 계산 디바이스를 포함하도록 도시되어 있으나, 이에 한정되지 않으며, 복수의 노드의 각각은 상이한 수의 계산 디바이스를 포함할 수 있다.
이종클러스터 시스템에서, 복수의 계산 디바이스의 특성 및 성능에 따라 복수의 계산 디바이스의 각각에 할당되는 최적의 워크 그룹의 개수를 결정할 수 있다. 일 실시예에 따르면, 프로그램의 컴파일 동안의 static 분석 결과, 프로그램의 실행 시의 Runtime 분석 결과 또는 프로그램의 프로파일(profile) 분석 결과 중 적어도 하나를 기초로, 프로그램과 연관된 복수의 워크 그룹은 복수의 계산 디바이스의 각각에 할당될 수 있다. 예를 들어, 컴파일 동안의 정적 분석(Static Analysis) 기법은, 프로그램의 컴파일 타임 중에 복수의 계산 디바이스가 접근하는 메모리 영역의 패턴을 추출할 수 있다. 또한, 프로그램이 실행되기 위해 복수의 계산 디바이스 각각이 접근하는 메모리 영역에 해당하는 데이터를 복수의 계산 디바이스 각각에 미리 분배하는데 이용할 수 있으며, 이에 제한되지 않고 다양한 분석 기법들을 활용될 수 있다.
도 4에 도시된 바와 같이, 노드 0의 제1 계산 디바이스(410), 제2 계산 디바이스(420), 및 노드 N의 제2 계산 디바이스(430) 각각에 워크 그룹을 분배할 수 있다. 복수의 계산 디바이스는 도시된 바와 같이, 서로 상이한 노드에 포함되어 있으며, 단일 메모리 주소공간을 갖는 가상 메모리를 공유할 수 있다. 또한, 복수의 계산 디바이스에 할당된 워크 그룹들은 도시된 바와 같이, 워크 아이템(440)으로 나뉘어, 복수의 계산 디바이스 각각에 포함된 계산 유닛 또는 복수의 PE(Processing Element)에 분배되어 처리될 수 있다.
일 실시예에서, 가상 계산 디바이스로 입력된 워크 그룹은, 이종클러스터 시스템 상의 복수의 계산 디바이스에 분배되어 실행될 수 있다. 예를 들어, 워크 그룹의 분배는, 입력 받은 전체 워크 그룹을 균등하게 복수의 계산 디바이스에 분배할 수 있다. 다른 실시예에서, 특정 서버 노드 또는 특정 계산 디바이스에만 워크 그룹을 분배할 수도 있다. 또 다른 실시예에서, 복수의 계산 디바이스(410, 420, 430)들의 성능이 균등하지 않을 경우, 실행이 먼저 끝난 계산 디바이스가 처리되지 않은 워크 그룹을 할당받아 처리하는 형태로 워크 그룹이 분배될 수도 있다. 또 다른 실시예에서, 분배되는 복수개의 워크 그룹이 하나의 계산 디바이스에 할당되어 실행될 수도 있다.
도 5는 본 개시의 일 실시예에 따른 복수의 워크 그룹과 복수의 워크 그룹이 접근하는 복수의 가상 페이지 사이의 관계를 나타내는 테이블(500)의 예시를 나타내는 도면이다. 여기서, 복수의 가상 페이지는 이종클러스터 시스템에서 제공되는 가상의 메모리에 포함된 임의의 페이지를 지칭할 수 있다. 일 실시예에 따르면, 복수의 워크 그룹과 복수의 워크 그룹이 접근하는 복수의 가상 페이지 사이의 관계를 나타내는 테이블(500)을 기초로, 프로그램과 연관된 복수의 워크 그룹은 복수의 계산 디바이스의 각각에 할당될 수 있다. 여기서, 테이블(500)은, 도 5에 도시된 바와 같이, 각 워크그룹이 접근하는 페이지를 2차원 매트릭스(예를 들어, 가로축은 워크그룹 id, 세로축은 page id)로 나타낼 수 있다. 일 실시예에서, 이러한 테이블(500)을 생성하기 위하여, 종래의 컴파일러 분석 기법, 런타임 분석 기법, 프로파일링 기법 및/또는 샘플링 기법 등의 다양한 기법이 이용될 수 있다. 예를 들어, 정적 분석(Static Analysis) 기법은, 프로그램의 컴파일 타임 중에 복수의 계산 디바이스가 접근하는 메모리 영역의 패턴을 추출할 수 있다. 또한, 런타임 분석 기법은 프로그램의 런타임 중에 복수의 계산 디바이스에 접근하는 메모리 영역의 패턴을 분석할 수 있다. 이에 더하여, 프로파일링 기법은, 프로그램과 연관된 복수의 워크 그룹이 복수의 계산 디바이스에 의해 워크 그룹 내의 동작을 실제 실행하지 않고, 메모리 영역에만 접근하도록 실행시키는 기법을 지칭할 수 있다. 이러한 메모리 영역의 접근을 분석함으로써, 메모리 영역의 패턴이 분석될 수 있다. 또한, 샘플링 기법은 프로그램과 연관된 복수의 워크 그룹 중 일부를 복수의 계산 디바이스에 의해 실행함으로써 분석된 복수의 워크 그룹 중 일부에 의한 메모리 영역의 접근 패턴을 기초로, 복수의 워크 그룹 전체의 메모리 영역의 접근 패턴이 추론될 수 있다. 이러한 다양한 분석 방식을 통해 추출되거나 추론된 패턴을 기초로, 프로그램과 연관된 복수의 워크 그룹 및/또는 복수의 워크 그룹의 데이터(예: 초기 데이터)는 복수의 계산 디바이스 각각에 미리 분배될 수 있다. 예를 들어, 복수의 워크 그룹의 데이터는 페이지 폴트가 발생되기 전에 해당 워크 그룹이 실행될 계산 디바이스의 메모리에 미리 프리패칭(pre-fetching)될 수 있다. 이러한 복수의 워크 그룹 및/또는 복수의 워크 그룹의 데이터의 분배에 대한 정보는 도 5의 테이블(500)에 포함될 수 있다.
생성된 테이블(500)에 포함된 정보를 기초로, 이종클러스터 시스템 내에서 산술적으로 전체 프로그램이 실행되기 위한 최적의 스케줄은 산출될 수 있다. 예를 들어, 전술한 최적의 스케줄은 페이지 폴트를 최소한으로 발생되도록 구성된 스케줄을 포함할 수 있다. 이러한 최적의 스케줄을 이용하여, 복수의 워크 그룹 및 복수의 워크 그룹의 데이터를 복수의 계산 디바이스에 할당하면, 페이지 폴트를 최소화하도록, 즉 최고의 효율로 프로그램을 복수의 계산 디바이스로 나누어 실행할 수 있다.
일 실시예에 따르면, 이러한 최적의 스케줄은, 일 실시예에서, 최적의 솔루션이 도출 가능한 ILP(integer linear programing)를 이용해 추출할 수 있으며, 이에 제한되지 않고, 다른 실시예에서, 최적에 가까운 솔루션을 위해 그리디(Greedy) 알고리즘으로 휴리스틱 하게 추출할 수도 있다. 이러한 최적의 스케줄에 포함된 정보는 테이블(500)에 포함될 수 있다.
일 실시예에 따르면, 상술된 분석 및/또는 최적의 스케줄을 이용하여 생성된 테이블(500)은, 도 5에 도시된 바와 같이, 페이지_0에 읽고 쓰는(Read, Write) 작업을 수행하는 워크 그룹(wg)_0, 페이지_0에 읽는 작업을 수행하고 페이지_6에 읽는(R) 작업을 수행하는 워크 그룹_1 및 페이지_1에 읽는(R) 작업을 수행하고 페이지_6에 읽는(R) 작업을 수행하는 워크 그룹_2를 하나의 계산 디바이스 0에 할당하도록 구성된 정보를 포함할 수 있다. 또한, 테이블(500)에 도시된 바와 같이, 페이지 2에 읽고 쓰는(RW) 작업을 수행하는 워크 그룹_3, 페이지 2에 쓰는(W) 작업을 수행하는 워크 그룹_4, 및 페이지 2, 페이지 3 및 페이지 4에 읽는(R) 작업을 수행하는 워크 그룹 5는 계산 디바이스 1에 할당될 수 있다. 여기서, 페이지 0 부터 페이지 2까지는 오너 노드 0에 의해 관리되고, 페이지 3부터 페이지 5까지는 오너 노드 1에 의해 관리될 수 있다.
도 6은 본 개시의 일 실시예에 따른 이종클러스터 시스템에서 실행되는 프로그램을 실행시키기 위해, 페이지 폴트를 처리하는 방법(600)을 나타내는 흐름도이다. 페이지 폴트를 처리하는 방법(600)은, 노드 n(610)의 제1 계산 디바이스에서 페이지 p에 페이지 폴트가 발생하는 단계(S605)로 개시될 수 있다. 그리고 나서, 단계(S610)에서, 제1 계산 디바이스는 오너 노드(620)에게 페이지 p의 페이지 잠금 요청을 전송할 수 있다. 이 때, 노드 n(610)의 제1 계산 디바이스는 페이지 폴트가 발생한 페이지 p의 최근 페이지 정보 요청을 오너 노드(620)에 송신할 수 있다(S610). 여기서, 제1 계산 디바이스는 노드 n에 포함된 임의의 계산 디비아스를 지칭할 수 있다. 이에 더하여, 페이지 p는 노드 n(610), 클라이언트 노드 및 오너 노드(620)를 포함한 이종클러스터 시스템에 동작가능한 가상 메모리에 포함된 임의의 가상 페이지를 지칭할 수 있다. 또한, 오너 노드는 가상 메모리에 포함된 복수의 페이지 중 일부 페이지를 관리하는 노드를 지칭할 수 있다. 즉, 오너 노드는 자신이 관리하는 페이지에 대한 최근 페이지에 대한 정보를 저장할 수 있다. 예를 들어, 오너 노드(620)는 가상 메모리에 포함된 복수의 가상 페이지 중에서 페이지 p에 대한 최근 페이지에 대한 정보를 저장할 수 있다.
이에 응답하여, 오너 노드(620)는, 단계(S615)에서, 오너 노드(620)에서 페이지 p에 대한 잠금 획득 여부를 검증할 수 있다. 페이지 p에 대한 잠금을 획득한 경우, 페이지 p 잠금 획득에 대응하는 ACK를 노드 n(610)에 전송하고, 단계(S625)로 진행할 수 있다. 페이지 p에 대한 잠금을 획득하지 못한 경우, 단계(S620)로 진행할 수 있다. 다음으로, 단계(S620)에서, 오너 노드(620)에 포함된 페이지 p의 대기자 명단에 노드 n(610) 또는 노드 n(610)의 계산 디바이스를 추가할 수 있다. 페이지 p의 대기자 명단에 노드 n(610) 또는 노드 n(610)의 계산 디바이스를 추가한 경우, 페이지 p에 대한 잠금을 획득할 때까지 대기한 후, 페이지 p에 대한 잠금을 획득하면, 단계(S615)로 돌아가 페이지 p에 대한 잠금 획득에 대응하는 ACK를 노드 n(610) 또는 노드 n(610)의 계산 디바이스에 전송하고, 단계(S625)로 진행할 수 있다.
다음으로, 단계(S625)에서, 노드 n의 제1 계산 디바이스는 오너 노드(620)에서 페이지 p에 대한 최근 페이지 정보를 수신하거나 읽을 수 있다. 다음으로, 단계(S630)에서, 페이지 p에 대한 최근 페이지가 노드 n(610) 내에 존재하는지 검증할 수 있다. 즉, 페이지 p에 대한 최근 페이지에 대한 정보가 노드 n(610)의 제1 계산 디바이스와 상이한 계산 디바이스의 메모리에 포함된 페이지를 가리키는지 여부가 판정될 수 있다.
페이지 p에 대한 최근 페이지가 노드 n(610)에 존재하는 경우, 단계(S655)로 진행할 수 있다. 페이지 p에 대한 최근 페이지가 노드 n(610)에 존재하지 않는 경우, 단계(S635)로 진행할 수 있다. 다음으로, 단계(S635)에서, 페이지 p에 대한 최근 페이지가 클라이언트 노드에 존재하는지 검증할 수 있다. 즉, 노드 n(610)은, 페이지 p에 대한 최근 페이지에 포함된 데이터가 클라이언트 노드에 있는 문의할 수 있다. 페이지 p에 대한 최근 페이지가 클라이언트 노드에 존재하는 경우, 단계(S645)로 진행할 수 있다. 페이지 p에 대한 최근 페이지가 클라이언트 노드에 존재하지 않는 경우, 단계(S640)로 진행할 수 있다. 다음으로, 단계(S640)에서, 페이지 p는 계산 디바이스 메모리에서 메인 메모리로 마이그레이션될 수 있다.
다음으로, 단계(S645)에서, 노드 n(610)은 최근 노드(630)에서 페이지 p에 대한 최근 페이지를 읽을 수 있다. 예를 들어, 클라이언트 노드에 최근 페이지에 대한 데이터가 포함된 경우, 노드 n(610)은 클라이언트 노드로부터 페이지 p에 대한 최근 페이지에 대한 데이터를 수신할 수 있다. 또 다른 예로서, 페이지 p에 대한 최근 페이지가 클라이언트 노드에 포함되지 않은 경우, 최근 페이지 정보가 나타내는 최신 노드(620) 또는 최신 노드(620)의 제2 계산 디바이스로부터 페이지 p와 연관된 최근 페이지에 대한 데이터를 수신할 수 있다. 여기서, 이러한 데이터 수신을 위해 제1 계산 디바이스와 제2 계산 디바이스 사이의 통신이 이용될 수 있다. 이와 달리, 이러한 데이터 수신을 위해 노드 n(510)의 CPU와 최근 노드(630)의 CPU 사이의 통신이 이용될 수 있다. 또는, 클라이언트 노드를 통해 제1 계산 디바이스로부터 제2 계산 디바이스로 데이터가 수신될 수 있다.
단계(S650)에서, 오너 노드(620)에서 페이지 p에 대한 최근 페이지 정보를 기록(write)할 수 있고, 단계(S655)로 진행될 수 있다. 일 실시예에 따르면, 오너 노드(620)의 가상 페이지 관리 테이블의 업데이트를 수행하기 위하여, 노드 n(610)의 제1 계산 디바이스에 의해 최근 페이지에 포함된 데이터를 처리한, 페이지 p에 대한 정보를 오너 노드(620)로 송신할 수 있다.
단계(S655)에서, 노드 n(610)은 페이지 p에 대한 페이지 폴트 핸들러를 호출할 수 있다. 일 실시예에 따르면, 노드 n(610)는 오너 노드로부터 수신된 최근 페이지에 대한 정보가 노드 n(610)의 상이한 계산 디바이스의 메모리에 포함된 페이지를 가리키는 경우, 노드 n(610)에서 제공하는 페이지 폴트 핸들러를 실행핼 수 있다. 그리고 나서, 오너 노드(620)에서 페이지 p에 대한 페이지 잠금 해제 요청을 전송할 수 있다(S660).
다음으로, 단계(S665)에서, 오너 노드(620)는 페이지 p에 대한 잠금을 해제할 수 있고, 페이지 p에 대한 대기자 명단의 첫 번째 노드로 ACK를 전송할 수 있다(S670).
상술한 단계를 통해 이종클러스터 시스템에서 가상 메모리가 구현되어, 이종클러스터 시스템에 포함된 모든 노드가 단일 메모리 주소 공간을 공유하는 메모리를 구현할 수 있으며, 이에 제한되지 않고, 이와 유사한 다른 방식으로 가상 메모리를 구현할 수 있다.
일 실시예에서, 가상 메모리(120)를 이용하여 각각의 노드에 포함된 복수의 계산 디바이스는 프로그램의 실행에 필요한 데이터를 필요할 때마다, 복수의 계산 디바이스 메모리로 가져와 프로그램(예를 들어, 커널 프로그램)을 실행할 수 있다. 이 때, 프로그램의 실행에 필요한 데이터는 페이지 단위로 관리될 수 있으나, 이에 제한되지 않고, 더 큰 메모리 단위로 관리될 수도 있다.
요컨대, 노드 n(610)의 페이지 p에 페이지 폴트가 발생하면 atomic한 페이지 폴트 처리를 위해 페이지 p의 오너 노드(620)에 잠금(lock)을 요청하고, 노드 n(610)이 페이지 p에 대한 잠금 획득에 대응하는 ACK(Acknowledgement, 예를 들어, 확인응답)를 수신하면, 오너 노드(620)로부터 페이지 정보를 읽고, 최근 페이지가 존재하는 노드에서 페이지의 데이터를 읽어올 수 있다. 그리고, 오너 노드(620)가 보유한 페이지 정보에 페이지 폴트가 발생한 노드 n(610)을, 최근 페이지를 보유한 노드로 수정할 수 있다. 그리고 나서, 계산 디바이스 제조사에서 제공하는 계산 디바이스의 페이지 폴트 핸들러(예를 들어, 페이지 폴트 핸들러 함수)를 호출할 수 있다. 마지막으로 모든 페이지 폴트 처리가 끝나면, 페이지 폴트에 대한 잠금을 해제할 수 있다.
일 실시예에 따르면, 페이지 정보를 관리하기 위한 페이지 정보 테이블이 각 노드에 있으며, 이는 페이지 폴트가 발생한 메모리가 할당(allocation)될 때 생성될 수 있다. 예를 들어, 페이지 정보는 해당 페이지가 위치한 최근 노드의 정보를 포함할 수 있다.
일 실시예에 따르면, 모든 페이지 정보 테이블을 하나의 노드가 가지고 있을 수 있으나, 이에 제한되지 않고, 여러 노드에 분산되어 페이지 정보 테이블을 가질 수 있다. 예를 들어, 중앙집중형으로 모든 페이지 정보를 하나의 노드가 가지고 있을 경우, 페이지 폴트가 발생할 때마다 최근 페이지의 위치를 확인하기 위해, 하나의 노드에 통신이 발생하여 성능 저하가 발생할 수 있다.
다른 실시예에 따르면, 페이지 정보 테이블을 여러 노드에 분산하여 관리할 수도 있다. 예를 들어, 페이지 폴트가 발생할 때, 최근 페이지의 위치를 확인하기 위한 통신이 분산되어, 통신으로 인한 성능 저하를 줄일 수 있다.
일 실시예에 따르면, 페이지 정보 테이블을 가지고 있는 페이지를 오너 노드라고 지칭할 수 있다. 예를 들어, 오너 노드는 복수의 서버 노드 중 일정 개수의 서버 노드들의 페이지 정보 테이블을 관리할 수도 있다. 또한, 해당 페이지의 최신 위치를 최근 노드라고 지칭할 수 있다.
일 실시예에 따르면, 본 발명에 따른 이종클러스터 시스템(130)에서 처리하는 페이지 폴트는 세 가지의 경우를 포함할 수 있다. 페이지 폴트의 세 가지 경우는, 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 페이지 폴트가 발생한 페이지와 같은 노드에 있는 경우, 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 클라이언트 노드의 가상 메모리에 존재할 경우 및 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 페이지 폴트가 발생한 페이지와 다른 노드에 있을 경우를 포함할 수 있으며, 각각 도 7 내지 도 9를 통해 보다 상세히 후술한다.
도 7 내지 도 9를 통해 본 개시의 일 실시예에 따른 페이지 폴트를 처리하는 예시를 설명한다. 도 7 내지 도 9에 도시된 바와 같이, 클러스터 시스템에서 단일 주소공간의 가상 메모리(예를 들어, 공유 메모리)를 제공하기 위해서, 가상 메모리 드라이버는, 페이지 폴트 메커니즘에 통신부에 의해 수행되는 노드간 통신을 추가할 수 있다. 예를 들어, 특정 노드에 포함된 특정 계산 디바이스에서 페이지 폴트가 발생한 경우, 해당 페이지를 소유하고 있는 노드를 찾아낸 뒤, 해당 페이지를 네트워크를 통해 페이지 폴트가 발생한 노드로 가져와, 페이지 폴트가 발생한 특정 계산 디바이스의 특정 계산 디바이스 메모리에 전송하여 페이지 폴트를 처리할 수 있다.
도 7은 본 개시의 일 실시예에 따른 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 페이지 폴트가 발생한 페이지와 같은 노드에 있을 경우, 페이지 폴트를 처리하는 예시를 나타내는 도면이다. 일 실시예에 따르면, 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 페이지 폴트가 발생한 페이지와 같은 노드에 존재하는 경우에는, 하나의 노드에서 복수의 계산 디바이스를 이용해 프로그램을 처리할 때 발생한 페이지 폴트를 처리하는 방법과 유사하며, 각각의 노드에 설치된 운영체제가 제공하는 페이지 폴트 메커니즘 및 계산 디바이스 제조사가 제공하는 페이지 폴트 핸들러 함수(예를 들어, ISR, Interrupt Service Routine)를 이용해 페이지 폴트를 처리할 수 있다. 예를 들어, 제1 계산 디바이스에서, 오너 노드로부터 수신된 최근 페이지에 대한 정보가 제1 계산 디바이스가 포함된 노드 내의 상이한 계산 디바이스(여기서, 제2 계산 디바이스)의 메모리에 포함된 페이지를 가리키는 경우, 노드에서 제공되는 페이지 폴트 핸들러를 실행할 수 있다. 이에 따라, 제1 계산 디바이스는 제2 계산 디바이스에 포함된 최근 페이지에 포함된 데이터를 제1 계산 디바이스의 노드 메인 메모리를 통해 수신할 수 있다.
도 8은 본 개시의 일 실시예에 따른 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 클라이언트 노드의 가상 메모리에 존재할 경우, 페이지 폴트를 처리하는 예시를 나타내는 도면이다. 일 실시예에 따르면, 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 클라이언트 노드의 가상 메모리에 존재하는 경우에는, 클라이언트 노드의 가상 메모리에 저장된 페이지 p에 대한 최근 페이지에 대한 데이터를 읽어올 수 있다. 예를 들어, 도시된 바와 같이, 오너 노드로부터 수신된 최근 페이지에 대한 정보가 서버 노드 내의 상이한 계산 디바이스의 메모리에 포함된 페이지가 아닌 경우, 가상 페이지와 연관된 최근 페이지에 포함된 데이터가 클라이언트 노드에 있는지 문의할 수 있다. 이에 응답하여, 가상 페이지와 연관된 최근 페이지에 포함된 데이터가 클라이언트 노드에 있는 경우, 제1 계산 디바이스는 클라이언트 노드로부터 가상 페이지와 연관된 최근 페이지에 포함된 데이터를 서버 노드 메인 메모리를 거쳐 수신할 수 있다.
도 9는 본 개시의 일 실시예에 따른 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 페이지 폴트가 발생한 페이지와 다른 노드에 있을 경우, 페이지 폴트를 처리하는 예시를 나타내는 도면이다. 일 실시예에 따르면, 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지가 페이지 폴트가 발생한 페이지와 다른 노드에 존재하는 경우에는, 최근 노드의 계산 디바이스 메모리에서 최근 노드의 메인 메모리로 페이지 p를 마이그레이션 한 뒤, 노드 n(610)에서 페이지 p에 대한 최근 노드의 최근 페이지를 읽어올 수 있다. 예를 들어, 가상 페이지와 연관된 최근 페이지에 포함된 데이터가 클라이언트 노드에 포함되지 않은 경우, 제1 계산 디바이스는 최근 페이지에 대한 정보가 나타내는 제2 계산 디바이스로부터 가상 페이지와 연관된 최근 페이지에 포함된 데이터를 수신할 수 있다. 도시된 바와 같이, 제2 계산 디바이스에 포함된 데이터는 클라이언트 노드를 통해 제1 계산 디바이스로 이동되거나 복사될 수 있다. 이와 달리, 페이지 폴트와 연관된 데이터의 통신은, 클라이언트 노드를 거치지 않고, 각각의 서버 노드에 포함된 프로세서에 의해 노드간 통신을 통해 수행될 수 있다.
또는, 페이지 폴트와 연관된 데이터의 통신은, 각각의 서버 노드에 포함된 계산 디바이스 메모리들의 직접 통신을 통해 수행될 수 있다. 예를 들어, RDMA(Remote Direct Memory Access), MPI(Message Passing Interface) 또는, 소켓 통신 라이브러리 등을 포함하는 노드간 통신 라이브러리를 이용하여 계산 디바이스 메모리들의 직접 통신을 수행할 수 있다.
상술된 페이지 폴트 처리 방법을 이용해, 페이지 폴트 발생 시, 프로그램을 실행하기 위해 계산 디바이스에서 필요한 페이지만을 복사함으로써, 데이터 통신 및 실제 계산 디바이스 메모리의 사용을 최소화할 수 있다.
상술된 이종클러스터 시스템에서 프로그램을 실행시키는 방법은, 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현될 수도 있다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의해 판독될 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광데이터 저장장치 등이 있다. 또한, 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다. 그리고, 전술된 실시예들을 구현하기 위한 기능적인(functional) 프로그램, 코드 및 코드 세그먼트들은 본 발명이 속하는 기술분야의 프로그래머들에 의해 용이하게 추론될 수 있다.
본 개시의 방법, 동작 또는 기법들은 다양한 수단에 의해 구현될 수도 있다. 예를 들어, 이러한 기법들은 하드웨어, 펌웨어, 소프트웨어, 또는 이들의 조합으로 구현될 수도 있다. 본원의 개시와 연계하여 설명된 다양한 예시적인 논리적 블록들, 모듈들, 회로들, 및 알고리즘 단계들은 전자 하드웨어, 컴퓨터 소프트웨어, 또는 양자의 조합들로 구현될 수도 있음을 통상의 기술자들은 이해할 것이다. 하드웨어 및 소프트웨어의 이러한 상호 대체를 명확하게 설명하기 위해, 다양한 예시적인 구성요소들, 블록들, 모듈들, 회로들, 및 단계들이 그들의 기능적 관점에서 일반적으로 위에서 설명되었다. 그러한 기능이 하드웨어로서 구현되는지 또는 소프트웨어로서 구현되는 지의 여부는, 특정 애플리케이션 및 전체 시스템에 부과되는 설계 요구사항들에 따라 달라진다. 통상의 기술자들은 각각의 특정 애플리케이션을 위해 다양한 방식들로 설명된 기능을 구현할 수도 있으나, 그러한 구현들은 본 개시의 범위로부터 벗어나게 하는 것으로 해석되어서는 안된다.
하드웨어 구현에서, 기법들을 수행하는 데 이용되는 프로세싱 유닛들은, 하나 이상의 ASIC들, DSP들, 디지털 신호 프로세싱 디바이스들(digital signal processing devices; DSPD들), 프로그램가능 논리 디바이스들(programmable logic devices; PLD들), 필드 프로그램가능 게이트 어레이들(field programmable gate arrays; FPGA들), 프로세서들, 제어기들, 마이크로제어기들, 마이크로프로세서들, 전자 디바이스들, 본 개시에 설명된 기능들을 수행하도록 설계된 다른 전자 유닛들, 컴퓨터, 또는 이들의 조합 내에서 구현될 수도 있다.
따라서, 본 개시와 연계하여 설명된 다양한 예시적인 논리 블록들, 모듈들, 및 회로들은 범용 프로세서, DSP, ASIC, FPGA나 다른 프로그램 가능 논리 디바이스, 이산 게이트나 트랜지스터 로직, 이산 하드웨어 컴포넌트들, 또는 본원에 설명된 기능들을 수행하도록 설계된 것들의 임의의 조합으로 구현되거나 수행될 수도 있다. 범용 프로세서는 마이크로프로세서일 수도 있지만, 대안으로, 프로세서는 임의의 종래의 프로세서, 제어기, 마이크로제어기, 또는 상태 머신일 수도 있다. 프로세서는 또한, 컴퓨팅 디바이스들의 조합, 예를 들면, DSP와 마이크로프로세서, 복수의 마이크로프로세서들, DSP 코어와 연계한 하나 이상의 마이크로프로세서들, 또는 임의의 다른 구성의 조합으로서 구현될 수도 있다.
펌웨어 및/또는 소프트웨어 구현에 있어서, 기법들은 랜덤 액세스 메모리(random access memory; RAM), 판독 전용 메모리(read-only memory; ROM), 비휘발성 RAM(non-volatile random access memory; NVRAM), PROM(programmable read-only memory), EPROM(erasable programmable read-only memory), EEPROM(electrically erasable PROM), 플래시 메모리, 컴팩트 디스크(compact disc; CD), 자기 또는 광학 데이터 스토리지 디바이스 등과 같은 컴퓨터 판독가능 매체 상에 저장된 명령들로서 구현될 수도 있다. 명령들은 하나 이상의 프로세서들에 의해 실행 가능할 수도 있고, 프로세서(들)로 하여금 본 개시에 설명된 기능의 특정 양태들을 수행하게 할 수도 있다.
소프트웨어로 구현되는 경우, 상기 기법들은 하나 이상의 명령들 또는 코드로서 컴퓨터 판독 가능한 매체 상에 저장되거나 또는 컴퓨터 판독 가능한 매체를 통해 전송될 수도 있다. 컴퓨터 판독가능 매체들은 한 장소에서 다른 장소로 컴퓨터 프로그램의 전송을 용이하게 하는 임의의 매체를 포함하여 컴퓨터 저장 매체들 및 통신 매체들 양자를 포함한다. 저장 매체들은 컴퓨터에 의해 액세스될 수 있는 임의의 이용 가능한 매체들일 수도 있다. 비제한적인 예로서, 이러한 컴퓨터 판독가능 매체는 RAM, ROM, EEPROM, CD-ROM 또는 다른 광학 디스크 스토리지, 자기 디스크 스토리지 또는 다른 자기 스토리지 디바이스들, 또는 소망의 프로그램 코드를 명령들 또는 데이터 구조들의 형태로 이송 또는 저장하기 위해 사용될 수 있으며 컴퓨터에 의해 액세스될 수 있는 임의의 다른 매체를 포함할 수 있다. 또한, 임의의 접속이 컴퓨터 판독가능 매체로 적절히 칭해진다.
예를 들어, 소프트웨어가 동축 케이블, 광섬유 케이블, 연선, 디지털 가입자 회선 (DSL), 또는 적외선, 무선, 및 마이크로파와 같은 무선 기술들을 사용하여 웹사이트, 서버, 또는 다른 원격 소스로부터 전송되면, 동축 케이블, 광섬유 케이블, 연선, 디지털 가입자 회선, 또는 적외선, 무선, 및 마이크로파와 같은 무선 기술들은 매체의 정의 내에 포함된다. 본원에서 사용된 디스크(disk) 와 디스크(disc)는, CD, 레이저 디스크, 광 디스크, DVD(digital versatile disc), 플로피디스크, 및 블루레이 디스크를 포함하며, 여기서 디스크들(disks)은 보통 자기적으로 데이터를 재생하고, 반면 디스크들(discs) 은 레이저를 이용하여 광학적으로 데이터를 재생한다. 위의 조합들도 컴퓨터 판독가능 매체들의 범위 내에 포함되어야 한다.
소프트웨어 모듈은, RAM 메모리, 플래시 메모리, ROM 메모리, EPROM 메모리, EEPROM 메모리, 레지스터들, 하드 디스크, 이동식 디스크, CD-ROM, 또는 공지된 임의의 다른 형태의 저장 매체 내에 상주할 수도 있다. 예시적인 저장 매체는, 프로세가 저장 매체로부터 정보를 판독하거나 저장 매체에 정보를 기록할 수 있도록, 프로세서에 연결될 수 있다. 대안으로, 저장 매체는 프로세서에 통합될 수도 있다. 프로세서와 저장 매체는 ASIC 내에 존재할 수도 있다. ASIC은 유저 단말 내에 존재할 수도 있다. 대안으로, 프로세서와 저장 매체는 유저 단말에서 개별 구성요소들로써 존재할 수도 있다.
이상 설명된 실시예들이 하나 이상의 독립형 컴퓨터 시스템에서 현재 개시된 주제의 양태들을 활용하는 것으로 기술되었으나, 본 개시는 이에 한정되지 않고, 네트워크나 분산 컴퓨팅 환경과 같은 임의의 컴퓨팅 환경과 연계하여 구현될 수도 있다. 또 나아가, 본 개시에서 주제의 양상들은 복수의 프로세싱 칩들이나 장치들에서 구현될 수도 있고, 스토리지는 복수의 장치들에 걸쳐 유사하게 영향을 받게 될 수도 있다. 이러한 장치들은 PC들, 네트워크 서버들, 및 휴대용 장치들을 포함할 수도 있다.
본 명세서에서는 본 개시가 일부 실시예들과 관련하여 설명되었지만, 본 개시의 발명이 속하는 기술분야의 통상의 기술자가 이해할 수 있는 본 개시의 범위를 벗어나지 않는 범위에서 다양한 변형 및 변경이 이루어질 수 있다. 또한, 그러한 변형 및 변경은 본 명세서에 첨부된 특허청구의 범위 내에 속하는 것으로 생각되어야 한다.
Claims (12)
- 이종클러스터 시스템에서 프로그램을 실행시키는 방법에 있어서,상기 이종클러스터 시스템에 포함된 복수의 계산 디바이스의 각각에서, 상기 이종클러스터 시스템의 클라이언트 노드로부터 할당된 상기 프로그램과 연관된 복수의 워크 그룹을 수신하는 단계; 및상기 복수의 계산 디바이스의 각각에서 상기 할당된 복수의 워크 그룹을 처리하는 단계를 포함하고,상기 복수의 워크 그룹에 의해 접근되는 페이지는 상기 이종클러스터 시스템 상에서 단일 메모리 주소 공간을 제공하도록 구성된 가상 메모리에 포함된 가상 페이지를 통해 관리되는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제1항에 있어서,상기 할당된 복수의 워크 그룹을 처리하는 단계는,상기 복수의 계산 디바이스 중 제1 계산 디바이스에서, 상기 제1 계산 디바이스에 할당된 복수의 워크 그룹을 실행하는 중에 페이지 폴트가 발생하는 경우, 상기 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지에 대한 정보를 불러오는 단계; 및상기 제1 계산 디바이스에서, 상기 최근 페이지에 포함된 데이터를 수신하는 단계를 포함하는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제2항에 있어서,상기 복수의 계산 디바이스는 상기 이종클러스터 시스템에 포함된 복수의 서버 노드의 각각에 포함되는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제3항에 있어서,상기 페이지 폴트가 발생한 가상 페이지와 연관된 최근 페이지에 대한 정보를 불러오는 단계는,상기 페이지 폴트가 발생한 가상 페이지의 최근 페이지 정보 요청을 오너 노드에 송신하는 단계; 및상기 오너 노드로부터 상기 가상 페이지의 최근 페이지에 대한 정보를 수신하는 단계;상기 수신된 최근 페이지에 대한 정보가, 상기 제1 계산 디바이스를 포함한 제1 노드 내에서, 상기 제1 계산 디바이스와 상이한 계산 디바이스의 메모리에 포함된 페이지를 가리키는지 여부를 판정하는 단계를 포함하는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제4항에 있어서,상기 제1 계산 디바이스에서, 상기 최근 페이지에 포함된 데이터를 수신하는 단계는, 상기 오너 노드로부터 수신된 최근 페이지에 대한 정보가 상기 제1 노드 내의 상이한 계산 디바이스의 메모리에 포함된 페이지를 가리키는 경우, 상기 제1 노드에서 제공되는 페이지 폴트 핸들러를 실행하는 단계를 포함하는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제4항에 있어서,상기 제1 계산 디바이스에서 상기 최근 페이지에 포함된 데이터를 수신하는 단계는,상기 오너 노드로부터 수신된 최근 페이지에 대한 정보가 상기 제1 노드 내의 상이한 계산 디바이스의 메모리에 포함된 페이지가 아닌 경우, 상기 가상 페이지와 연관된 최근 페이지에 포함된 데이터가 상기 클라이언트 노드에 있는지 문의하는 단계; 및상기 가상 페이지와 연관된 최근 페이지에 포함된 데이터가 상기 클라이언트 노드에 있는 경우, 상기 클라이언트 노드로부터 상기 가상 페이지와 연관된 최근 페이지에 포함된 데이터를 수신하는 단계를 포함하는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제6항에 있어서,상기 제1 계산 디바이스에서 상기 최근 페이지에 포함된 데이터를 수신하는 단계는, 상기 가상 페이지와 연관된 최근 페이지에 포함된 데이터가 상기 클라이언트 노드에 포함되지 않은 경우, 상기 최근 페이지에 대한 정보가 나타내는 제2 계산 디바이스로부터 상기 가상 페이지와 연관된 최근 페이지에 포함된 데이터를 수신하는 단계를 포함하는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제2항에 있어서,오너 노드의 가상 페이지 관리 테이블의 업데이트를 수행하기 위하여, 상기 제1 계산 디바이스에 의해, 상기 수신된 최근 페이지에 포함된 데이터를 처리한, 페이지에 대한 정보를 상기 오너 노드로 송신하는 단계를 더 포함하는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제1항에 있어서,상기 복수의 워크 그룹과 상기 복수의 워크 그룹이 접근하는 복수의 가상 페이지 사이의 관계를 나타내는 테이블을 기초로, 상기 프로그램과 연관된 복수의 워크 그룹은 상기 복수의 계산 디바이스의 각각에 할당되는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제1항에 있어서,상기 프로그램의 컴파일 동안의 static 분석 결과, 상기 프로그램의 실행 시의 Runtime 분석 결과 또는 상기 프로그램의 프로파일(profile) 분석 결과 중 적어도 하나를 기초로, 상기 프로그램과 연관된 복수의 워크 그룹은 상기 복수의 계산 디바이스의 각각에 할당되는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제1항에 있어서,상기 복수의 워크 그룹의 메모리 접근 패턴을 분석한 결과를 기초로, 상기 복수의 워크 그룹과 연관된 데이터는, 상기 복수의 워크 그룹이 상기 복수의 계산 디바이스의 각각에 의해 처리되기 전에, 상기 복수의 워크 그룹과 연관된 데이터는 상기 복수의 계산 디바이스의 각각에 미리 프리패칭(pre-fetching)되는,이종클러스터 시스템에서 프로그램을 실행시키는 방법.
- 제1항 내지 제11항 중 어느 한 항에 따른 이종클러스터 시스템에서 프로그램을 실행시키는 방법을 컴퓨터에서 실행하기 위해 컴퓨터 판독 가능한 기록 매체에 저장된 컴퓨터 프로그램.
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR20190027672 | 2019-03-11 | ||
| KR10-2019-0027672 | 2019-03-11 | ||
| KR1020200030158A KR102338729B1 (ko) | 2019-03-11 | 2020-03-11 | 이종클러스터 시스템에서 실행되는 프로그램을 실행시키는 방법 및 컴퓨터 프로그램 |
| KR10-2020-0030158 | 2020-03-11 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020184982A1 true WO2020184982A1 (ko) | 2020-09-17 |
Family
ID=72426277
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2020/003396 Ceased WO2020184982A1 (ko) | 2019-03-11 | 2020-03-11 | 이종클러스터 시스템에서 실행되는 프로그램을 실행시키는 방법 및 컴퓨터 프로그램 |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2020184982A1 (ko) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025036027A1 (zh) * | 2023-08-16 | 2025-02-20 | 杭州阿里云飞天信息技术有限公司 | 一种缺页恢复方法、设备及存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090213127A1 (en) * | 2008-02-22 | 2009-08-27 | International Business Machines Corporation | Guided attachment of accelerators to computer systems |
| US20120320070A1 (en) * | 2011-06-20 | 2012-12-20 | Qualcomm Incorporated | Memory sharing in graphics processing unit |
| US20160170773A1 (en) * | 2013-07-29 | 2016-06-16 | Alcatel Lucent | Data processing |
| WO2018065530A1 (en) * | 2016-10-05 | 2018-04-12 | Partec Cluster Competence Center Gmbh | High performance computing system and method |
| KR20180084682A (ko) * | 2017-01-17 | 2018-07-25 | 서울대학교산학협력단 | 이종 클러스터 시스템에서의 계산 처리 방법 및 이를 수행하기 위한 병렬 시스템 |
-
2020
- 2020-03-11 WO PCT/KR2020/003396 patent/WO2020184982A1/ko not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090213127A1 (en) * | 2008-02-22 | 2009-08-27 | International Business Machines Corporation | Guided attachment of accelerators to computer systems |
| US20120320070A1 (en) * | 2011-06-20 | 2012-12-20 | Qualcomm Incorporated | Memory sharing in graphics processing unit |
| US20160170773A1 (en) * | 2013-07-29 | 2016-06-16 | Alcatel Lucent | Data processing |
| WO2018065530A1 (en) * | 2016-10-05 | 2018-04-12 | Partec Cluster Competence Center Gmbh | High performance computing system and method |
| KR20180084682A (ko) * | 2017-01-17 | 2018-07-25 | 서울대학교산학협력단 | 이종 클러스터 시스템에서의 계산 처리 방법 및 이를 수행하기 위한 병렬 시스템 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025036027A1 (zh) * | 2023-08-16 | 2025-02-20 | 杭州阿里云飞天信息技术有限公司 | 一种缺页恢复方法、设备及存储介质 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20230136661A1 (en) | Task scheduling for machine-learning workloads | |
| CN101446928B (zh) | 虚拟机器监视器 | |
| US9384042B2 (en) | Techniques for dynamically assigning jobs to processors in a cluster based on inter-thread communications | |
| US8521977B2 (en) | Information processing apparatus and access control method | |
| US20100153966A1 (en) | Techniques for dynamically assigning jobs to processors in a cluster using local job tables | |
| WO2016064158A1 (ko) | 재구성 가능 프로세서 및 그 동작 방법 | |
| WO2017030252A1 (ko) | 컨테이너 이미지 보안 검사 방법 및 그 장치 | |
| KR101401523B1 (ko) | 복수의 가상 머신들 간 조립 공유 gpu 스케줄링 방법 및 장치 | |
| WO2018135766A1 (ko) | 블록 체인을 이용하여 데이터를 관리하는 장치 및 방법 | |
| AU2017290043A1 (en) | Systems and methods for efficient distribution of stored data objects | |
| US20070180161A1 (en) | DMA transfer apparatus | |
| WO2014142553A1 (ko) | 워크 로드에 따라 동적 자원 할당 가능한 상호 연결 패브릭 스위칭 장치 및 방법 | |
| CN110119304B (zh) | 一种中断处理方法、装置及服务器 | |
| CN1522402A (zh) | 多处理器系统及运行多处理器系统的方法 | |
| WO2019139253A1 (ko) | 딥 뉴럴 네트워크를 위한 gpu 메모리 관리 방법 및 그를 수행하는 연산 장치 | |
| WO2017113278A1 (zh) | 数据处理方法、装置和系统 | |
| WO2014193037A1 (ko) | 맵리듀스 연산 가속 시스템 및 방법 | |
| WO2012033237A1 (ko) | 시스템 테스트 방법 | |
| WO2022124720A1 (ko) | 운영체제 커널 메모리의 실시간 오류 검출 방법 | |
| JPH09325944A (ja) | I/oデバイス及び多重メモリ装置間のリファレンスによるコンピュータシステムデータi/o | |
| WO2021210706A1 (ko) | 딥러닝 작업을 이기종 가속기에서 처리하는 방법 및 이러한 방법을 수행하는 클러스터 시스템 | |
| KR100925572B1 (ko) | 상이한 길이의 캐시 위치 내의 캐시 코히어런시를 위한시스템, 방법, 프로세스 및 장치 | |
| EP3097492A1 (en) | Method and apparatus for preventing bank conflict in memory | |
| WO2015023144A1 (ko) | 메모리 공유 환경에서 데이터 무결성 감시 장치 및 방법 | |
| WO2014112831A1 (en) | Method and system for dynamically changing page allocator |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20770236 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20770236 Country of ref document: EP Kind code of ref document: A1 |