PIM-based computing device for accelerating join operation

The PIM-based computing device optimizes join operations by performing global partitioning and minimizing inter-IDP communication, enhancing throughput and reducing latency in PIM hardware.

JP2024154355AActive Publication Date: 2024-10-30IND ACADEMIC COOP FOUND YONSEI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023157985
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-18
Filing Date
2023-09-22
Publication Date
2024-10-30
Estimated Expiration
2043-09-22

AI Technical Summary

Technical Problem

Existing PIM hardware simulators and architectural assumptions are not compatible with DIMM architecture, leading to inefficiencies in join operations and excessive inter-IDP communication overhead.

Method used

A PIM-based computing device that performs global partitioning of data sets across multiple dual inline memory modules (DIMMs) using Rotate-and-Stream (RnS) and Unordered Scatter-Gather (USG) operations, minimizing inter-IDP communication and optimizing join operations through hash joins, sort-merge joins, and nest-loop joins.

Benefits of technology

The solution maximizes join throughput by leveraging DIMM's high internal memory bandwidth and computational throughput, reducing latency and overhead, and achieving up to 2.43 times faster join execution compared to CPU-based methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024154355000001_ABST
    Figure 2024154355000001_ABST
Patent Text Reader

Abstract

To provide a PIM-based computing device for join operational acceleration in which an IDP maximizes join throughput and a PIM-enabled DIMM, instead of a CPU, performs global partitioning of two tables, thereby utilizing a high internal memory bandwidth and computation throughput of the PIM-enabled DIMM and optimizing communication between all-to-all IDPs.SOLUTION: A PIM-based computing device includes: a main memory configured to store first and second data sets; a PIM module configured as an in-line memory module including a memory processor, a working memory, and a memory bank, the memory processor being connected to the working memory and performing a join operation on the first and second data sets loaded into the working memory; and a processor configured to form first and second channels with the main memory and the PIM module, import the first and second data sets through the first channel, and store the data sets in the memory bank through the second channel.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a processing-in-memory (PIM) based computing technology, and more particularly to an acceleration technique that can improve the performance of join operations in PIM hardware. [Background technology]

[0002] PIM is a next-generation semiconductor that integrates memory and processors in one chip, which solves the data bottleneck and excessive power consumption problems that occur in existing computing structures where memory and processors are separated.

[0003] A PIM-supported dual in-line memory module (DIMM) has an IDP (In-DIMM processor) installed near the memory bank. Using a PIM-supported DIMM, applications can offload calculations from the host CPU to the IDP. The IDP can directly access data stored in the memory bank to perform calculations without using host resources. In this way, PIM-supported DIMMs reduce the amount of data transferred between the CPU and main memory, and take advantage of the high internal memory bandwidth and calculation throughput of PIM-supported DIMMs, greatly helping applications overcome data bottlenecks.

[0004] Meanwhile, in order to improve the performance of relational database management systems (RDBMS), a technique has been proposed to accelerate relational operations using PIM-supported DIMMs. The prior art relied on a PIM hardware simulator and architectural assumptions for the PIM hardware. However, the prior art's architectural assumptions differ from the architecture of PIM-supported DIMMs and may be incompatible with DIMMs.

[0005] Therefore, new combining algorithms optimized for PIM-supported DIMMs are needed to realize the high potential of PIM in practical computing systems. [Prior art documents] [Patent documents]

[0006] [Patent Document 1] Republic of Korea Publication Patent No. 10-2022-0094180 Summary of the Invention [Problem to be solved by the invention]

[0007] The present invention provides a PIM-based computing device for accelerating join operations that is compatible with DIMM architecture, maximizes join throughput in an IDP, performs global partitioning of both tables in a PIM-supported DIMM instead of a CPU, and can utilize the high internal memory bandwidth and computational throughput of a PIM-supported DIMM, and optimizes many-to-many IDP communication. [Means for solving the problem]

[0008] In one embodiment, a PIM-based computing device for accelerating a join operation includes a main memory for storing first and second data sets, and an in-line memory module including a memory processor, a working memory, and a memory bank, the memory processor including a Processing-In-Memory (PIM) module connected to the working memory and performing a join operation on the first and second data sets uploaded to the working memory, and a processor forming a first channel and a second channel with the main memory and the PIM module, fetching the first and second data sets through the first channel and storing them in the memory bank through the second channel.

[0009] The PIM module may implement the in-line memory module with multiple dual in-line memory modules to support scale-out join operations.

[0010] The PIM module can sub-group the plurality of dual in-line memory modules and connect them to one of the second channels.

[0011] The PIM module can perform global partitioning via inter data relocation between the plurality of dual in-line memory modules to allocate the first and second data sets.

[0012] The PIM module may perform a Rotate-and-Stream (RnS) operation on data in the memory banks of each of the dual in-line memory modules during the mutual data transfer.

[0013] The PIM module can transmit and receive a specific data set between the plurality of dual in-line memory modules in data set units and perform the RnS (Rotate-and-Stream) operation.

[0014] The processor may perform an Unordered Scatter-Gather (USG) operation on the first and second data sets in the main memory and store the data in the memory bank before performing the global partitioning.

[0015] The processor can perform a Stream Transpose Send (STS) procedure during the USG calculation process to distribute the first and second data sets to the memory banks.

[0016] The memory processor may select a hash join, a sort-merge join, or a nested-loop join as the join operation.

[0017] The memory processor can generate a hash table in the working memory, bring the first and second data sets in the memory bank into the working memory to perform local partitioning, and then associate the first and second data sets with the hash table using a hash function to perform a hash join.

[0018] The memory processor may perform range partitioning, parallel in-place sort, and parallel merge on the first and second data sets in the memory bank to perform a sort-merge join.

[0019] The memory processor can bring first and second data sets in the memory banks into the working memory and perform an inner loop operation on each independently to perform a nested-loop join.

[0020] In one embodiment, the PIM-based computing device includes a main memory for storing first and second source data sets, and in-line memory modules each including a memory processor, a working memory, and a memory bank, the memory processor including a plurality of Processing-In-Memory (PIM) modules connected to the working memory for performing join operations on the first and second processed data sets uploaded to the working memory, and a processor for pre-processing the first and second source data sets and storing them in the memory bank.

[0021] The processor can perform an Unordered Scatter-Gather (USG) operation on the first and second source data sets in the main memory and store the data in the memory bank.

[0022] The plurality of PIM modules may arrange the first and second processed data sets for the pre-processed first and second source data sets via inter data relocation.

[0023] The PIM modules may perform a Rotate-and-Stream (RnS) operation on the pre-processed first and second source data sets during the mutual data transfer. Effect of the Invention

[0024] The disclosed technology may have the following effects. However, this does not mean that a particular embodiment must include all of the following effects or must include only the following effects, and therefore the scope of the disclosed technology should not be understood to be limited thereby.

[0025] The PIM-based computing device for accelerating join operations according to the present invention is a PIM join operation acceleration technique compatible with DIMM architecture, which maximizes join throughput in the IDP, performs global partitioning of both tables in the DIMM instead of the CPU, can utilize the high internal memory bandwidth and computational throughput of the DIMM, and optimizes many-to-many IDP communication. [Brief description of the drawings]

[0026] [Figure 1] FIG. 1 illustrates a PIM-based computing device according to one embodiment of the present invention. [Figure 2a] FIG. 2 is a diagram for explaining a process of performing a join operation in the memory processor of FIG. [Figure 2b] FIG. 2 is a diagram for explaining a process of performing a join operation in the memory processor of FIG. [Figure 2c] FIG. 2 is a diagram for explaining a process of performing a join operation in the memory processor of FIG. [Diagram 3] 4 is a flow chart illustrating an embodiment of a join calculation method for a PIM-based computing device according to the present invention; [Figure 4] FIG. 1 illustrates a PIM-supported dual in-line memory module (DIMM) architecture. [Diagram 5] FIG. 1 illustrates single-PID performance of various hash functions. [Figure 6a] FIG. 13 is a diagram showing join execution delay times for each of the hash join, sort merge join, and nested loop join algorithms. [Figure 6b] FIG. 13 is a diagram showing join execution delay times for each of the hash join, sort merge join, and nested loop join algorithms. [Figure 7] FIG. 1 is a diagram for explaining the RnS (Rotate-and-Stream) calculation execution process. [Figure 8] 13 is a diagram showing the bandwidth of RnS inter-IDP communication compared to the existing one. [Figure 9] FIG. 1 is a diagram for explaining the process of performing USG (Unordered Scatter-Gather) calculation. [Figure 10] FIG. 2 is a diagram showing a working model of PID-JOIN according to the present invention. [Figure 11] FIG. 13 is a diagram illustrating an experimental result according to the present invention. [Figure 12] FIG. 13 is a diagram illustrating an experimental result according to the present invention. [Figure 13] FIG. 13 is a diagram illustrating an experimental result according to the present invention. [Figure 14] FIG. 1 illustrates the results of a sensitivity study according to the present invention. [Figure 15] FIG. 1 illustrates the results of a sensitivity study according to the present invention. [Figure 16] FIG. 1 illustrates the results of a sensitivity study according to the present invention. [Figure 17a] FIG. 1 illustrates the results of a sensitivity study according to the present invention. [Figure 17b] FIG. 1 illustrates the results of a sensitivity study according to the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0027] The present invention was filed with the support of the following research project: [This invention was supported by the Republic of Korea National Research and Development Project] [Project unique number] 1711193986 [Project Number] 2020-0-01361-004 [Ministry name] Ministry of Science, ICT and Technology [Name of issue management (specialized) organization] Information and Communications Planning and Evaluation Agency [Research Project Name] Information, Communications, and Broadcasting Innovation Human Resource Development [Research title] Artificial Intelligence Graduate School Support (Yonsei University) [Contribution rate] 1 / 2 [Name of project implementation organization] Yonsei University Industry-Academic Cooperation Group [Research period] 2023.01.01~2023.12.31 [This invention was supported by the Republic of Korea National Research and Development Project] [Project unique number] 1711193187 [Project Number] 2021-0-00853-003 [Ministry name] Ministry of Science, ICT and Technology [Name of issue management (specialized) organization] Information and Communications Planning and Evaluation Agency [Research Project Name] New Concept PIM Semiconductor Leading Technology Development [Research title] Software platform development for PIM utilization [Contribution rate] 1 / 2 [Name of project implementation organization] Yonsei University Industry-Academic Cooperation Group [Research period] 2023.01.01~2023.12.31

[0028] The description of the present invention is merely an embodiment for structural or functional description, and therefore the scope of the present invention should not be construed as being limited by the embodiment described herein. In other words, since the embodiment can be modified in various ways and can have various forms, the scope of the present invention should be understood to include equivalents that can realize the technical idea. In addition, the objectives or effects presented in the present invention do not mean that a specific embodiment should include all of them or should include only such effects, and therefore the scope of the present invention should not be understood as being limited thereby.

[0029] Meanwhile, the meanings of the terms used in this application should be understood as follows.

[0030] Terms such as "first" and "second" are used to distinguish one component from another and should not be used to limit the scope of rights. For example, a first component may be named a second component, and similarly, a second component may be named a first component.

[0031] When referring to an element being "connected" to another element, it should be understood that it may be directly connected to the other element, but there may also be other elements in between. Conversely, when referring to an element being "directly connected" to another element, it should be understood that there are no other elements in between. Meanwhile, other expressions describing the relationship between elements, such as "between" and "immediately between," or "adjacent to" and "directly adjacent to," should be interpreted in the same way.

[0032] Singular expressions shall be understood to include plural expressions unless the context clearly dictates otherwise, and terms such as "comprise" or "have" shall be understood to be intended to specify the presence of embodied features, numbers, steps, operations, components, parts, or combinations thereof, and not to preclude the presence or additional possibility of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0033] In each step, the identification numbers (e.g., a, b, c, etc.) are used for convenience of description, and the identification numbers do not describe the order of each step, and each step may occur in a different order than specified unless the context clearly dictates a specific order. That is, each step may occur in the same order as specified, may be performed substantially simultaneously, or may be performed in the reverse order.

[0034] The present invention is embodied as computer readable code on a computer readable recording medium, and the computer readable recording medium includes all kinds of recording devices in which data read by a computer system is stored. Examples of the computer readable recording medium include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc. Furthermore, the computer readable recording medium may be distributed among computer systems connected by a network, so that the computer readable code may be stored and executed in a distributed manner.

[0035] All terms used herein, unless otherwise defined, have the same meaning as commonly understood by a person of ordinary skill in the art to which the present invention pertains. Terms defined in commonly used dictionaries must be interpreted to be consistent with the meaning they have in the context of the relevant art, and cannot be interpreted as having an ideal or overly formal meaning unless expressly defined in this application.

[0036] FIG. 1 is a diagram illustrating a PIM-based computing device according to one embodiment of the present invention.

[0037] Referring to FIG. 1, a PIM-based computing device 100 may be implemented including a main memory 110 , a Processing-In-Memory (PIM) module 130 , and a processor 150 .

[0038] The main memory 110 may store a first and a second set of data.

[0039] The PIM module 130 consists of an in-line memory module that includes a memory processor 131 , a working memory 133 , and a memory bank 135 .

[0040] The memory processor 131 is connected to the working memory 133 and can perform a join operation on the first and second data sets uploaded to the working memory 133. The PIM module 130 can support scale-out join operations by implementing the in-line memory module as a plurality of dual in-line memory modules (DIMMs). In one embodiment, the DIMM can be configured with a set of a plurality of memory processors 131, working memories 133, and memory banks 135 that are interconnected.

[0041] The processor 150 forms first and second channels with the main memory 110 and the PIM module 130 and is capable of capturing first and second data sets in the first channel and storing them in the memory bank 135 in the second channel.

[0042] The PIM module 130 can sub-group a plurality of dual in-line memory modules (DIMMs) and connect them to one of the second channels. The PIM module 130 can perform global partitioning through inter data relocation between the plurality of dual in-line memory modules (DIMMs) to allocate the first and second data sets.

[0043] The processor 150 may perform an Unordered Scatter-Gather (USG) operation on the first and second data sets in the main memory 110 before performing global partitioning, and store the data in the memory bank 135. The processor 150 may distribute the first and second data sets evenly to the memory bank 135 through the USG operation. The processor 150 may perform a Stream Transpose Send (STS) procedure during the USG operation, and distribute the first and second data sets to the memory bank 135.

[0044] The PIM module 130 must distribute the first and second data sets evenly across all memory processors 131 because the first and second data sets are correctly arranged through global partitioning and the input and output data sets in the memory banks 135 do not require a strict order. USG (Unordered Scatter-Gather) can be realized as a mechanism for evenly distributing the first and second data sets to the memory banks 135. The processor 150 can perform streaming on the first and second data sets in the main memory 110 during the USG calculation process, and then perform transposition and transfer to the PIM module 130. The processor 150 can sequentially access both the main memory 110 and the PIM module 130 to evenly distribute the first and second data sets to the memory banks 135.

[0045] The PIM module 130 can perform a rotate-and-stream (RnS) operation on data in the memory bank 135 of each of the dual in-line memory modules (DIMMs) during mutual data transfer. The PIM module 130 can perform a rotate-and-stream (RnS) operation by transmitting and receiving a specific data set between the dual in-line memory modules (DIMMs) in data set units.

[0046] The memory processor 131 can select a hash join, a sort-merge join, or a nested-loop join as a join operation. In one embodiment, the memory processor 131 can generate a hash table in the working memory 133, bring the first and second data sets in the memory bank 135 to the working memory 133 to perform local partitioning, and then associate the hash table with a hash function to perform a hash join. In one embodiment, the memory processor 131 can perform range partitioning, parallel in-place sort, and parallel merge on the first and second data sets in the memory bank 135 to perform a sort-merge join. In one embodiment, the memory processor 131 can bring the first and second data sets in the memory bank 135 to the working memory 133 and perform an inner loop operation for each data set independently to perform a nested-loop join.

[0047] The PIM-based computing device 100 may be realized including a plurality of PIM modules 130. In this case, each of the plurality of PIM modules 130 may be configured as an in-line memory module including a memory processor 131, a working memory 133, and a memory bank 135. The main memory 110 may store the first and second source data sets. The processor 150 may pre-process the first and second source data sets and store them in the memory bank 135. Here, the processor 150 may store them in the memory bank 135 to perform an Unordered Scatter-Gather (USG) operation as pre-processing on the first and second source data sets in the main memory 110. The memory processor 131 may perform a join operation on the first and second processed data sets uploaded to the working memory 133.

[0048] The PIM modules 130 may arrange the first and second processed data sets through inter data relocation for the pre-processed first and second source data sets, and may perform a Rotate-and-Stream (RnS) operation on the pre-processed first and second source data sets during the inter data relocation.

[0049] 2a to 2c are diagrams illustrating the process of performing a join operation in the memory processor of FIG.

[0050] 2a to 2c, the memory processor 131 can perform a join operation on the first and second data sets uploaded to the working memory 133. Here, the memory processor 131 can select a hash join, a sort-merge join, or a nested-loop join as the join operation.

[0051] The hash join uses a hash table to perform a join between the first and second data sets. Specifically, referring to FIG. 2a, the memory processor 131 generates a hash table in the working memory 133. The hash table is composed of pairs (Key, Value) of a key and a value. Here, the key and value of the pair may correspond to the join key and the tuple ID of the R tuple, which is the first data set, respectively. The memory processor 131 uploads the first and second data sets (R, S) in the memory bank 135 to the working memory 133 and performs local partitioning. Next, the memory processor 131 associates them with the hash table 210 using a hash function to perform the hash join. The memory processor 131 probes the hash table with the S tuple, which is the second data set, identifies the R tuple in the hash table entry, and checks whether both tuples satisfy a given join condition.

[0052] Since the memory processor 131 frequently accesses the items of the hash table in the process of performing a hash join, access to the slow memory bank 135 is prevented by generating the hash table in the working memory.

[0053] The sort-merge join performs range partitioning, parallel in-place sorting, and parallel merge on the first and second data sets (R, S) in the memory bank 135 to perform the join. Specifically, referring to FIG. 2b, the memory processor 131 sorts and merges the R and S tuples, which are the first and second data sets, and performs the join operation. In order to match the working sets in the working memory 133, the memory processor 131 performs range partitioning to group tuples having the same range of join key values. Next, the memory processor 131 performs parallel in-place sorting to assign different partitions to different threads and sort the assigned partitions simultaneously. At this time, the memory processor 131 uses an internal sorting algorithm to ensure that the size of the working set does not exceed the capacity of the working memory 133. Then, the memory processor 131 merges the tuples of the S partition with the R partition.

[0054] The nested-loop join brings the first and second data sets in memory bank 135 up to working memory 133 and performs an inner loop operation on each independently. Specifically, referring to FIG. 2c, the outer loop scans S tuples and the inner loop scans R tuples. Memory processor 131 checks the amount of buffer in working memory 133 required to store the R tuples and allocates a circular buffer in working memory 133 for storing the tuples for each thread. Memory processor 131 then brings the S tuples up to working memory 133, fills the circular buffer with the R tuples, and performs the join on the R and S tuples.

[0055] FIG. 3 is a flow chart illustrating an embodiment of a join calculation method for a PIM-based computing device according to the present invention.

[0056] Referring to FIG. 3, the PIM-based computing device 100 may store the first and second data sets in the main memory 110 (step S310).

[0057] The PIM-based computing device 100 can form a channel with the main memory 110 and the PIM module 130 via the processor 150 (step S330). The processor 150 can form a first and second channel with the main memory 110 and the PIM module 130, acquire first and second data sets through the first channel, and store the first and second data sets in the memory bank 135 in the PIM module 130 through the second channel. The processor 150 can perform an Unordered Scatter-Gather (USG) operation on the first and second data sets in the main memory 110 and store the data in the memory bank 135.

[0058] The PIM-based computing device 100 may perform a join operation on the first and second data sets uploaded to the working memory 135 by the memory processor 131 of the PIM module 130 (step S350). The PIM module 130 may be configured with an in-line memory module including the memory processor 131, the working memory 133, and the memory bank 135. The PIM module 130 may support a scale-out join operation by implementing the in-line memory module as a plurality of dual in-line memory modules. The PIM module 130 may allocate the first and second data sets by performing global partitioning through inter data relocation between the plurality of dual in-line memory modules. The PIM module may perform a rotate-and-stream (RnS) operation on data in the memory bank 135 of each of the plurality of dual in-line memory modules during the inter data transfer process. The memory processor 131 of the PIM module 130 may select a hash join, a sort-merge join, or a nest-loop join as a join operation.

[0059] A PIM-based computing device according to the present invention will now be described in more detail with reference to Figures 4 to 17b.

[0060] FIG. 4 is a diagram illustrating a dual in-line memory module architecture for PIM support.

[0061] Referring to FIG. 4, a PIM-enabled dual in-line memory module (DIMM) 400 connects a memory processor (In-DIMM Processor; IDP) 430 to a memory bank 410 and can support the PIM module 130 of the present invention.

[0062] The DIMM 400 is composed of multiple chips, and each chip is composed of multiple banks. The DIMM 400 groups the chips into ranks and stores sequential pieces of data in one of the ranks, where a rank refers to a set of chips that share the same control signal. The DIMM 400 can realize the PIM module 130 by connecting an IDP 430 to each 64MB memory bank 410. The IDP 430 cannot directly access the data stored in the memory bank 410, and must bring up the data as a working RAM (WRAM) 450.

[0063] Each IDP 430 cannot directly access data stored in other memory banks because data stored in the memory banks 410 must be uploaded to the WRAM 450 before it can be accessed. The host CPU, processor 150, must transfer data between the memory banks 410 of different IDPs 430. Such CPU-based inter-IDP 430 communication uses limited host CPU bandwidth and generates significant performance overhead. Due to the rank-level parallelism of the DIMM 400, the performance overhead can become increasingly large without careful optimization of inter-IDP 430 communication. When transferring data between IDPs 430, all other IDPs belonging to the same rank of the source and destination IDPs must transfer data, and the IDPs of that rank operate in a synchronous manner. Therefore, one of the optimization guidelines for efficiently utilizing the DIMM 400 is to minimize inter-IDP communication.

[0064] In this invention, we present a new PIM-supported join algorithm (hereinafter referred to as "PID-JOIN") that utilizes the DIMM400 architecture characteristics to maximize the performance of join operations using PIM. The PID-JOIN method proposed in this invention can be applied to an actual computing system and evaluated.

[0065] The PID-JOIN method proposed in the present invention can perform a join operation on a first and a second data set. Here, the first and the second data set can correspond to R and S tuples, respectively. The R and S tuples are stored in the memory bank 410. Three representative types of equality join algorithms, hash join, sort-merge join, and nest-loop join, can be prototyped and evaluated as a join operation. After designing the algorithms, the performance can be compared with a synthetic workload and the best performing algorithm can be selected. For the performance comparison, it is assumed that the IDP 430 processes an equality join query. It is further assumed that all keys are initially stored in the memory bank 410, and that tuples are stored in the memory bank 410 as a result of the equality join query.

[0066] To achieve high join performance, a single IDP join algorithm must be optimized for the following key architectural characteristics of the IDP: First, because the IDP can only access data stored in WRAM, the algorithm must fit the working set within the 64KB capacity of the WRAM. If the size of the working set exceeds the WRAM capacity, the IDP may experience performance degradation due to frequent data transfers between the WRAM and the memory bank. Second, the algorithm must transfer large sequential data chunks, up to 2KB in size or larger, to maximize the internal memory bandwidth of the IDP. Because DRAM-based memory banks provide higher bandwidth for larger sequential data accesses, the WRAM must be used to filter small or random data accesses. Third, due to the limited computing capabilities of the IDP, the algorithm must use operations for which the IDP supports the underlying hardware (e.g., integer addition). The IDP supports non-native operations such as integer multiplication / division and floating-point operations via emulation. However, it achieves much lower computational throughput on non-native tasks.

[0067] The hash join algorithm uses a hash table to perform the join on both tables, i.e., R and S. The hash join algorithm first generates a hash table with the tuples of R. The hash table consists of (key, value) pairs, where the key and value of the pair correspond to the original join key and tuple ID of the R tuple, respectively. The hash join algorithm then probes the hash table with the tuples of S, identifies the tuples of R with their entries in the hash table, and checks whether both tuples satisfy the given join condition.

[0068] In order to make the most of the architecture characteristics, the single IDP hash join algorithm generates a hash table in the working memory, and after performing local partitioning in R with respect to the limited capacity of the working memory, it builds a hash table for the partitions and searches it to process each partition of R. By building a single hash table containing all tuples of R, the hash table is stored in a memory bank, which causes memory bank accesses. The hash join algorithm can achieve high computational throughput by using an IDP-friendly hash function for the tasks that IDP basically supports. The hash join algorithm uses linear probing as a collision handling method.

[0069] FIG. 5 is a diagram illustrating the single-PID performance of various hash functions, showing the hashing throughput and collision rate of the evaluated hash functions.

[0070] Referring to FIG. 5, hash functions that utilize integer multiplication, i.e., Mult, MultAdd, and Murmur, achieve low hash throughput due to lack of support in the underlying hardware of IDP. The other three hash functions, i.e., Tabulation, OAT, and CRC32, achieve much higher hash throughput because they utilize XOR-based operations. In addition, the collision rates of hash functions were compared by measuring the number of hash collisions that occurred while constructing and searching a hash table with 128-K randomly generated tuples, and the results show that OAT and CRC32 achieve lower collision rates than Tabulation. However, through additional measurements, it was found that the higher the hashing throughput of Tubulation, the higher the collision rate and the fastest speed.

[0071] The sort-merge join algorithm first sorts the R and S tuples and then merges them. The sort-merge join algorithm used in the join operation in the present invention performs range partitioning, parallel sort-in-place, and parallel merging with respect to the structural characteristics of the IDP. Range partitioning is used to group tuples with the same range of join key values ​​to fit into a working set in the WRAM. In the case of range partitioning, sorting of tuples in one partition is independent of tuples in other partitions, so that different partitions have unique ranges of join key values. Therefore, after different partitions are assigned to different threads through parallel sort-in-place, the threads sort the assigned partitions simultaneously. Also, an internal sorting algorithm is used to ensure that the size of the working set does not exceed the WRAM capacity. The sort-merge join algorithm also uses multi-threading support to load various R and S partitions into the WRAM to merge the R and S tuples, and then assigns the R partition to other threads of the IDP to merge the tuples of one S partition with all the R partitions. This algorithm uses fast sorting.

[0072] The nested-loop join algorithm repeatedly evaluates the join condition on every pair of R and S tuples using nested loops. To maximize the bandwidth of the memory banks, our nested-loop join algorithm allocates different amounts of WRAM to buffers that temporarily store R tuples depending on whether all tuples of R can fit into WRAM, thereby minimizing the amount of data transfer between WRAM and the memory banks. If all tuples of R can fit into WRAM, the nested-loop join algorithm allocates a WRAM buffer whose capacity matches the capacity of the tuples, loads all tuples of R into the buffer, and utilizes the remaining WRAM buffer to stream S tuples. Otherwise, it allocates most of the WRAM to store S tuples and uses the remaining WRAM as a circular buffer for R tuples.

[0073] The PID-JOIN method proposed in this invention can compare the join execution latency of three single IDP join algorithms on a single IDP to identify the best performing single IDP join algorithm.

[0074] 6a and 6b show the join execution latency for hash join, sort-merge join, and nested-loop join algorithms, where FIG. 6a shows the case of a uniform S and FIG. 6b shows the case of a skewed S.

[0075] Referring to Figures 6a and 6b, the hash join algorithm was the fastest in all experiments, efficiently used WRAM to minimize data transfer between WRAM and memory banks, and achieved the best performance. In contrast, other join algorithms experienced difficulties due to frequent memory bank access. Using TAB on the side of the hash function can speed up the join process more than using OAT or CRC32. Tabulation achieves a higher collision rate than OAT and CRC32, but a higher hashing throughput can mitigate the penalty due to the higher collision rate.

[0076] To make the most of PIM-supported DIMMs, the single IDP hash join algorithm must be extended to an entire rank consisting of at least 64 IDPs. Rank-level extension inevitably leads to partitioning problems. The single IDP join algorithm assumes that the entire R and S are stored in memory banks. However, to extend to an entire rank, the tables must first be partitioned such that each IDP processes only one set of R and S partitions and there are no dependencies between partitions. The partitioning step, also called global partitioning, distributes the tuples of both tables to the IDPs such that all tuples that belong to the same hash key range belong to the same IDP.

[0077] Due to the shared-nothing architecture of IDPs, host CPU intervention is unavoidable for inter-IDP communication. This characteristic generates a huge amount of overhead and becomes a performance bottleneck. Therefore, the main challenge for fast inter-IDP communication is the data layout on the DIMM. Due to byte-wise interleaving among multiple chips in a rank, the host CPU cannot interpret the source data obtained from the PIM-supported DIMM. To solve this, existing kernel modules on the DIMM can perform byte-level transposition operations for every cache line received by the CPU, but this puts a lot of computational burden on the CPU, resulting in a performance bottleneck.

[0078] The PID merging method proposed in this invention can perform Rotate-and-Stream (RnS) operation to solve the high latency and low bandwidth of existing inter-IDP communication. By slightly adjusting the partitioning operation, the CPU burden can be significantly reduced to a single rotation. Also, the rotation occurs within a single cache line. This allows data for inter-IDP communication to be stored only in registers without being transferred to main memory, making vector streaming possible without the need for main memory access.

[0079] FIG. 7 is a diagram for explaining the process of executing an RnS (Rotate-and-Stream) operation.

[0080] Referring to FIG. 7, RnS is shown with an example of eight IDPs each sending and receiving eight 8-byte tuples. A single tuple is sent and received between the eight IDPs. In the partitioning step, each IDP configures the partitioned storage in a twisted order. Unlike existing IDP-to-IDP communication where partitioning bins are always ordered by target chip ID starting from 0, in the case of RnS, the bins targeted to it are arranged first and then in ascending order. For example, the partitions of chip 0 are stored in the order 0, 1, 2, ..., 7, and the partitions of chip 7 are stored in the order 7, 0, 1, ..., 6. Then, a single 64-byte cache line sized data block is read from the main processor without byte-level transposition. A cache line contains the first 8 bytes of each of the eight chips, but is drawn in a byte interleaving manner with vertically aligned same-hued tuples. Then, a bit rotation is performed on each 64-byte block (N bytes for the Nth chip), and finally, inter-IDP communication is possible by simply transferring the data to the PIM-supported DIMM.

[0081] The rotation occurs within a 64-byte cache line, so it can fit into a 512-bit SIMD register. This allows efficient rotation using vector commands, and more importantly, no main memory is required. Also, cache access overhead can be minimized by streaming into the cache with a non-temporal streaming operation. Here, the RnS realization loads 64 bytes of data in the PIM-supported DIMM using a non-temporal stream load instruction, _mm512_stream_load_si512(), which does not pollute the host CPU cache. The rotation is performed in-place using the _mm512_rol_epi64() instruction. Then, when the data is written back to the DIMM, it uses a stream store operation, _mm512_stream_si512(), which accesses the DIMM directly without writing the data to the cache.

[0082] FIG. 8 is a diagram showing the bandwidth of inter-IDP communication of RnS compared to the existing one.

[0083] FIG. 8(a) shows the bandwidth when the total amount of data transferred between 64 IDPs of a single rank is changed from 32 MB to 2 GB. In terms of bandwidth, RnS is 6.23 times better than existing methods in terms of geometric mean because the computational load of the host CPU is reduced and data does not flow to main memory. FIG. 8(b) shows how performance degrades when the number of available CPU cores is reduced. RnS is less sensitive to available computational resources than existing inter-IDP communication because it is less dependent on the CPU. To perform RnS, each IDP must prepare the data to be transferred in packets. To utilize PIM-supported DIMMs, the inter-IDP communication of a single rank must be extended to multiple ranks and DIMMs. The PID-JOIN method proposed in this invention can take a parallel RnS access method.

[0084] The PID-JOIN scheme proposed in this invention does not require a strict order for the input and output tuples in the memory banks of the DIMM because the global partitioning places them in the correct IDPs. The PID-JOIN scheme distributes the R and S tuples evenly across all IDPs. The PID-JOIN scheme realizes an Unordered Scatter-Gather (USG) operation, which is a mechanism to distribute the R and S tuples evenly across IDPs without requiring any access to main memory.

[0085] FIG. 9 is a diagram for explaining the process of performing USG (Unordered Scatter-Gather) calculation, and particularly shows the scattering process.

[0086] Referring to Figure 9, the working model of USG is to load 64-byte tuples directly into 512-bit vector registers in a streaming manner, eliminating unnecessary small loads in various regions of main memory. Then, it simply performs a byte-level transposition and transfers them to PIM-supported DIMMs to complete the transfer. Existing IDP-based data transfers are limited in that tuples must be transferred to the exact target IDP, whereas USG does not include region division. As a result, tuples can be evenly distributed to IDPs, whereas USG accesses main memory and PIM-supported DIMMs sequentially.

[0087] FIG. 10 is a diagram showing a working model of PID-JOIN according to the present invention.

[0088] Referring to FIG. 10, the PID-JOIN method according to the present invention performs USG and RnS operations between a CPU (Central processing unit) and a DIMM (Dual in-line memory module) supported by a PIM (Processing-in-memory), and can perform join operations on the R and S of both tables.

[0089] First, the CPU performs USG operations on the R and S tuples in main memory and distributes them evenly to the PIM-supported DIMMs ((1)). Next, the IDP (In-DIMM Processor) of each PIM-supported DIMM performs global partitioning on its own R and S tuples, groups the tuples of each partition, and forms a packet for RnS ((2)). RnS is used between the PIM-supported DIMMs to perform all-to-all mutual IDP communication, so that R and S tuples with the same hash key value are transferred to the same IDP ((3)). After that, the IDP performs a single IDP hash join algorithm on the R and S tuples to generate a tuple as a result of the join ((4)). The resulting tuple is transferred to main memory via the execution of USG operations ((5)).

[0090] The PID-JOIN method proposed in this invention is evaluated by comparing the join execution delay time of existing CPU-based join algorithms in a CPU-based basic system with that of a PIM-supported system. For the workload, a workload set derived from various previous studies on in-memory join acceleration is used. The join execution delay time is measured for both tables R and S with various numbers of tuples and Zipf coefficients. Each tuple consists of a 32-bit integer join key and a 32-bit tuple ID. In addition, the Zipf factor of S is configured to 0.00, 0.25, 0.50, and 0.75, which are typical Zipf factors used in join performance evaluation, to evaluate the impact of a skewed table.

[0091] First, we use uniform R and S to compare with CPU-based join algorithms and evaluate the execution delay time of the PID-JOIN method according to the present invention. As CPU-based join algorithms, we select SQLite for nested-loop join, M-PASS for sort-merge join, and PRO and PRHO for hash join. In the case of the PID-JOIN method, we include single IDP sort-merge and nested-loop join algorithms in addition to the single IDP hash join algorithm. RnS and USG are applied to all three single IDP join algorithms.

[0092] FIG. 11 shows the experimental results of join execution delay time for the CPU-based join algorithm and the PID-JOIN scheme using uniform R, S, and variable |R|:|S| ratios.

[0093] Referring to FIG. 11, the experimental results show that the PID-JOIN method according to the present invention efficiently utilizes the high internal memory bandwidth and computational throughput of the IDP and outperforms CPU-based join algorithms in all workloads. In contrast, CPU-based join algorithms experience limited memory bandwidth issues in the process of transferring data between the host CPU and main memory. In the case of the PID-JOIN method applying the single-IDP hash join algorithm, which is the fastest among the join algorithms evaluated, it achieves a geometric mean speedup of 1.92 times over PRHO. Referring to FIG. 11(a), the PID-JOIN method according to the present invention achieves a geometric mean speedup of 2.27 times over PRHO, while the speedup is 1.6 times for 64M tuples. The large speedup of the PID-JOIN method is mainly due to the fast hash table build and probe using the PIM-supported DIMM.

[0094] 12 and 13 are diagrams showing the analysis results of the join execution delay time in the PID-JOIN method.

[0095] Referring to FIG. 12, when only a single IDP hash join algorithm is applied, a geometric mean speed drop of 1.62 times is observed due to the high overhead of inter-IDP and host-DIMM data transfer, which accounts for 92.4% of the average total latency. Inter-IDP communication and host-DIMM communication are only 1.79 GB / s and 1.77 GB / s, respectively, and significant delays occur. When RnS is applied, overall inter-IDP communication is optimized, and the geometric mean speed is improved by 1.15 times compared to PRHO. When rank-specific USG is applied, host-DIMM data transfer is optimized, and the geometric mean speed is improved by 2.27 times compared to PRHO. As the ratio of |R|:|S| increases, the delays of PRHO and PID-JOIN methods become smaller, and R decreases. Nevertheless, the speed improvement remains relatively constant. When the ratio of |R|:|S| is 1:1, the increase in the geometric mean velocity is 2.43 times, and when it is 1:32, the increase in the geometric mean velocity is 2.21 times.

[0096] We can adjust the Zipf coefficient of,S,from 0 to 0.75 to evaluate the robustness of PID-JOIN on,skewed tables.,Since the PID-JOIN method performs global partitioning by,hashing, high skewness can cause load imbalance among IDPs.

[0097] Referring to FIG. 13, we can see that PID-JOIN is robust to biased tables except for Zipf coefficient 0.75. However, when the Zipf coefficient is 0.75, the execution delay of PID-JOIN remains lower than PRHO. In contrast, the execution delay of PRHO decreases slightly as the Zipf coefficient increases. This is because the number of duplicate tuples in S increases. Duplicate tuples generate the same hash value and refer to the same item in the hash table. Duplicate tuples in PID-JOIN can induce imbalance between IDPs because global partitioning assigns duplicate tuples to the same IDP. It is expected that such load imbalance between IDPs can be mitigated using a skew handling method that modifies duplicate tuples to generate other hash values.

[0098] Next, the system cost of the PID-JOIN method according to the present invention is compared with the system cost of the CPU-based PRHO.

[0099] For comparison, we can first collect and add up the manufacturer's suggested retail prices (MSRP) of the PIM-supported and CPU-based base systems, then divide the system cost by the maximum join processing throughput (i.e., tuples / s) achieved in our experiments to obtain the system cost per performance for the two join algorithms.

[0100] The comparison shows that PID-JOIN achieves 26.9% lower system cost per performance than PRHO. PID-JOIN achieves a maximum of 158.4M tuples / sec on a $4,020 PIM-supported system. However, PRHO achieves a maximum of 65.2M tuples / sec on a basic system. The results show that PID-JOIN can be a more attractive choice for RDBMS than CPU-based join algorithms.

[0101] Sensitivity Studies

[0102] Effect of bucket size on RnS (Rotate-and-Stream)

[0103] To study the effect of RnS packet size on the bandwidth of all-to-all inter-IDP communication, we measure total bandwidth, effective bandwidth and fill rate for five packet sizes (8, 16, 32, 64 and 128 bytes) with various sizes of S (64M, 128M, 256M and 512M tuples). Total bandwidth is measured with the bandwidth including null packets, whereas effective bandwidth excludes null packets. Fill rate is the ratio between the two bandwidth values.

[0104] Figure 14 shows how the bandwidth of RnS varies with packet size. As mentioned above, RnS achieves fast inter-IDP communication using 8-byte packets (64 bytes for a rank containing 8 IDPs). Ideally, the total bandwidth should remain constant for packet sizes larger than 8 bytes. Larger packet sizes benefit from sequential memory bank accesses. However, larger packet sizes result in a small decrease in effective bandwidth due to reduced fill rate.

[0105] PIM kernel call overhead

[0106] We analyze the impact of PIM kernel invocation overhead on PID-JOIN throughput. Every PIM kernel invocation incurs a latency overhead of about 12 ms on a PIM-supported system. Because PID-JOIN invokes different PIM kernels for partitioning, building hash tables, and searching hash tables, the total PIM kernel invocation overhead remains constant. To ensure that the overhead does not offset the performance benefit of PID-JOIN, the PIM kernel must have a sufficient amount of work to do that increases with the table size.

[0107] Figure 15 shows the impact of PIM kernel invocation overhead for various sizes of R and S. The contribution of the invocation overhead to the join execution latency decreases as the table size increases. The invocation overhead is negligible at 256M tuples. However, the invocation overhead accounts for 14.9% at 64M tuples. Despite the overhead, PID-JOIN still consistently outperforms PRHO for all workloads evaluated.

[0108] Collision handling method

[0109] PID-JOIN's single IDP hash join algorithm uses linear probing (LP) for collision handling, but LP can incur significant performance overhead as the number of failed probes increases.

[0110] FIG. 16 shows the execution delay analysis and collision ratio of PID-JOIN, LP, QP (quadratic probing), and DH (double hashing).

[0111] In general, LP has a higher collision rate than QP and DH, but the lowest execution latency. LP's low latency is due to its low computational overhead. In the event of a collision, LP simply probes the next item in the hash table by adding one to the previous key. However, QP requires integer multiplication, which IDP does not inherently support, and DH includes an additional hash function. Due to the additional computational overhead, QP and DH have a higher combined execution latency, making LP the fastest collision handling method. A similar trend can be observed for skewed S.

[0112] The results also show that local partitioning accounts for up to 48.0% of the join execution latency of PID-JOIN. Local partitioning limits the maximum number of tuples per partition, calculated by assuming that the tuples in a partition fill a 32KB hash table with a 50% packing ratio, and guarantees that the partition's working set fits in WRAM. In the case of extreme skewness, excessive duplicate tuples may cause local partitioning to not fit the partitioning working set in WRAM.

[0113] Potential speed improvements via TPC-H queries

[0114] Now, we use four single-join TPC-H queries (Q4, Q12, Q14, Q19) with a scale factor of 400 to probe the potential speedup of PID-JOIN when integrated into a full RDBMS. For our experiments, we first measure the end-to-end query execution latency of MonetDB, a well-known in-memory RDBMS, on a CPU-based baseline system. We then identify the execution latency of the join operators, turn the join execution latency into a PID-JOIN, and calculate the expected speedup for the query. For each query, we first extract the tables used as inputs for the join operators by the query plan in MonetDB. We then perform a PID-JOIN on the extracted tables from the PIM-supported system. We take into account the overhead of host-to-DIMM data transfer when measuring the join execution latency of PID-JOIN for a query.

[0115] 17a and 17b show the analysis of query execution latency of MonetDB and the expected improvement of query speed when integrating PID-JOIN into MonetDB.

[0116] PID-JOIN achieves a geometric mean speedup of 2.55x for query joins. The expected speedup of PID-JOIN augmented MonetDB is a geometric mean of 1.14x. The results show that using PID-JOIN to accelerate joins is a promising choice for in-memory RDBMS. The PID-JOIN method proposed in this invention can take various forms of PIM hardware besides PIM-supported DIMMs.

[0117] The PID-JOIN method proposed in the present invention can maximize the join throughput in the IDP using a distributed and partitioned hash join algorithm, and can utilize the high internal memory bandwidth and calculation throughput of the DIMM by performing global partitioning of both tables in the DIMM instead of the CPU, and can minimize the performance overhead of inter-IDP communication by using CPU cache streaming and vector instructions in the process of many-to-many inter-IDP communication regarding the CPU. In addition, the PID-JOIN method proposed in the present invention can minimize the data transfer latency between the CPU and the DIMM and accelerate data transfer.

[0118] While the present invention has been described above with reference to preferred embodiments, it will be understood by those skilled in the art that various modifications and variations of the present invention can be made without departing from the spirit and scope of the present invention as set forth in the following claims. [Explanation of symbols]

[0119] 100 PIM-based computing devices 110 Main memory 130 PIM Module 131 Memory Processor 133 Working Memory 135 Memory Bank 150 processors

Claims

1. a main memory for storing the first and second data sets; a processing-in-memory (PIM) module including an in-line memory module including a memory processor, a working memory, and a memory bank, the memory processor being connected to the working memory and performing a join operation on the first and second data sets uploaded to the working memory; a processor forming a first channel and a second channel with the main memory and the PIM module, the processor capturing the first and second data sets on the first channel and storing them in the memory bank on the second channel.

2. The PIM module includes:

2. The PIM-based computing device of claim 1, wherein the in-line memory module is implemented with a plurality of dual in-line memory modules to support scale-out join operations.

3. The PIM module includes:

3. The PIM-based computing device of claim 2, wherein the plurality of dual in-line memory modules are sub-grouped and connected to one of the second channels.

4. The PIM module includes:

3. The PIM-based computing device of claim 2, further comprising: global partitioning via inter data relocation between the plurality of dual in-line memory modules to allocate the first and second data sets.

5. The PIM module includes:

5. The PIM-based computing device of claim 4, further comprising a rotate-and-stream (RnS) operation performed on the data in the memory banks of each of the plurality of dual in-line memory modules during the mutual data transfer.

6. The PIM module includes:

6. The PIM-based computing device of claim 5, further comprising: a plurality of dual in-line memory modules for transmitting and receiving a specific data set in units of a data set, and performing the RnS (Rotate-and-Stream) operation.

7. The processor, 5. The PIM-based computing device of claim 4, further comprising: performing an Unordered Scatter-Gather (USG) operation on the first and second data sets in the main memory before performing the global partitioning, and storing the data in the memory bank.

8. The processor, 8. The PIM-based computing device of claim 7, further comprising a Stream Transpose Send (STS) procedure during the USG calculation process to distribute the first and second data sets to the memory banks.

9. The memory processor includes:

2. The PIM-based computing device of claim 1, wherein the join operation is selected to be a hash join, a sort-merge join, or a nested-loop join.

10. The memory processor includes:

2. The PIM-based computing device of claim 1, further comprising: generating a hash table in the working memory; bringing the first and second data sets in the memory bank into the working memory for local partitioning; and associating the data with the hash table using a hash function to perform a hash join.

11. The memory processor includes:

2. The PIM-based computing device of claim 1, further comprising: a first data set and a second data set in the memory bank, the first data set being partitioned by range partitioning, a parallel in-place sort by parallel sorting, and a parallel merge by parallel merging to perform a sort-merge join.

12. The memory processor includes:

2. The PIM-based computing device of claim 1, further comprising: a first and second data set in said memory bank are brought into said working memory and an inner loop operation is performed independently on each to perform a nested-loop join.

13. a main memory for storing the first and second source data sets; a plurality of PIM (Processing-In-Memory) modules each including an in-line memory module including a memory processor, a working memory, and a memory bank, the memory processor being connected to the working memory and performing a join operation on the first and second processed data sets uploaded to the working memory; a processor for pre-processing the first and second source data sets and storing the pre-processed data in the memory bank.

14. The processor, 14. The PIM-based computing device of claim 13, further comprising: performing an Unordered Scatter-Gather (USG) operation on the first and second source data sets in the main memory and storing the data in the memory bank.

15. The plurality of PIM modules include 14. The PIM-based computing device of claim 13, further comprising locating the first and second processed data sets via inter data relocation for the pre-processed first and second source data sets.

16. The plurality of PIM modules include 16. The PIM-based computing device of claim 15, further comprising performing a rotate-and-stream (RnS) operation on the pre-processed first and second source data sets during the mutual data transfer.

Citation Information

Patent Citations

  • Solid state drive

    JP2018005686A

  • Systems, methods, and devices for acceleration of merge join operations

    KR1020220094180A