Map reduce using coordination namespace hardware acceleration

A system and method for supporting data MapReduce operations in a tuple space/coordinated namespace (CNS) extended memory storage architecture. The system-wide CNS provides an efficient means for storing and communicating data generated by local processes running at the nodes, and coordinated to provide MapReduce operations in a multi-nodal system. A hardware accelerated mechanism supports map reduce sorting/shuffle operations and reduce operations according to an aggregate function. Local processes running at a node generate a tuple corresponding to data generated by a process, each tuple having a tuple name and tuple data value corresponding to the generated data. Each tuple is processed and stored at the node or another node, dependent upon its tuple name. Tuple records associated with a tuple name are accumulated at one or more nodes according to a linked list structure at each that is accessible via a hash table index pointer at the node.

FIELD

The present invention generally relates to memory architectures and memory management, and particularly a hardware acceleration mechanism for supporting map reduce operations for processes in a multi-node computing system.

BACKGROUND

MapReduce is implemented to process large data sets in a parallel distributed system. It has three components—mapping method to generate a tuple(key, value) for each data, shuffle to sort into different queues and reduce function to aggregate this sorted values. This is currently implemented in software and performance is limited as it relies on libraries that do not take advantage of hardware.

SUMMARY

A hardware accelerated system and method to support map reduce functionality in a Coordination Namespace architecture with minimal additional changes and more efficiently.

A hardware accelerated system and method for MapReduce Shuffle/sorting using network and a hashing table index in a coordination namespace architecture.

A system and method to build upon a CNS architecture and its distributed key value store including the use of CNS opcodes CSShuffle, CSReduce along with tuple engine and data structure modifications to support map reduce operations.

In one aspect, there is provided a method for mapping and reducing data generated by a plurality of processes running at one or more distributed computing nodes sharing a coordination namespace. The method comprises: generating, by a local process running at a current node, a tuple corresponding to data generated by the local process, each the tuple having a tuple name and tuple data value corresponding to the generated data, the tuple generated by applying, by the local process, a mapping function to map the generated data to the tuple name and tuple data value; receiving, at a controller at the current node, one or more messages requesting a shuffleing operation for accumulating tuples associated with a specified tuple name;—allocating, by the controller, responsive to a received shuffle message, a named data element corresponding to the specified tuple name in the coordination namespace at the current node or another node; storing, at one or more memory locations associated with the named data element, tuple data records including the tuple data values from each the one or more messages received at the current node or another node corresponding to data generated from the local processes specifying the tuple name; and receiving, at the controller, a reduce message from a requesting process running at the current node or another node, the reduce message specifying the tuple name and an aggregation function; and returning, using the controller, a data corresponding to the aggregation function associated with the stored tuple data values associated with the tuple name.

In accordance with a further aspect of the invention, there is provided a system for mapping and reducing data generated by a plurality of processes running at one or more distributed computing nodes sharing a coordination namespace. The system comprises: one or more data generated by local processes running at a current node, and the local processes configured to apply a mapping function to generate a tuple comprising a tuple name and tuple data value corresponding to the generated data; a controller circuit associated with a current node of the multi-node computing system, the controller circuit configured to perform a method to: receive one or more messages requesting a shuffling operation for accumulating tuples associated with a specified tuple name; allocate, responsive to a received shuffle message, a named data element corresponding to the specified tuple name in the coordination namespace at the current node or another node; store, at one or more memory locations associated with the named data element, tuple data records including the tuple data values from each the one or more messages received at the current node or another node corresponding to data generated data from the local processes specifying the tuple name; receive a reduce message from a requesting process running at the current node or another node, the reduce message specifying the tuple name and an aggregation function; and return a data corresponding to the aggregation function associated with the stored tuple data values associated with the tuple name.

The present invention is advantageously employed in a multiprocessing computer system having a plurality of processor devices each competing for access to a shared memory structure, however, can easily be adapted for use in multi-core uniprocessor computer systems.

DETAILED DESCRIPTION

The present disclosure provides a novel hardware acceleration mechanism to support map reduce operations for data generated byprocesses in a multi-node computing system having an extended memory defining a tuple space/coordination namespace. According to embodiments, a MapReduce framework include operations for processing large data sets in a parallel distributed system and includes three components—1) mapping method to generate a tuple(key, value) for each data, 2) shuffle to sort into different queues, and 3) reduce function to accumulate this sorted values. A tuple space/coordination namespace provides an architecture including a distributed key value store to efficiently perform these operations.

In an embodiment, the description makes use of and extends the Coordinated Namespace (CNS) system and methods described in commonly-owned, U.S. patent application Ser. No. 16/217,905 entitled Coordinated Namespace Processing, the whole contents and disclosure of each of which are incorporated herein by reference as if wholly set forth herein. The description further makes use of and extends the systems and methods described in commonly-owned, U.S. patent application Ser. Nos. 15/851,480 and 15/851,511, both entitled Data Shuffling With Hierarchical Tuple Spaces and incorporated by reference herein.

The following are abbreviations of terms representing entities involved in the various system and methods herein for data MapReduce (map reduce) operations in a CoordinationSpace (CS) or CoordinationNameSpace (CNS) system.

An ActualHome (AH) or Home, is a node where the named data element (tuple) is actually stored.

A NaturalHome (NH) is a name of a node obtained from the hash applied to the tuple name, always informed.

A PreferredHome (PH) can be a NH or from a user-specified group, AH for OUT, where to look first for RD tuple message (command sent to retrieve a tuple from CNS), and for IN tuple message (command sent to retrieve the tuple from CSN and store it in the requestor node).

A LocalNode (LN) is RequestNode (RN) representing a node where a request originated.

A HashElement (HE) refers to a single (one) record per unique name in CS, e.g., one HE per multiple tuples of the same name.

A PendingRecord (PR) is a tuple record that record the metadata of a tuple itself or a pending request for them.

A LocalTuple (LT) represents a metadata record at the actual home.

A RemoteTuple (RT) represents a metadata record at the NH about tuple homed elsewhere.

Storage class memory (SCM) is a persistent memory extending dynamic memory (DRAM).

A Work queue (WQ) is a hardware work queue; and WQM is a hardware work queue manager. The work manager can be an FPGA (field programmable gate array) to implement the work queue/tuple engines. Alternately, the work manager functions can be a programmable accelerator implementing these functions.

FIG. 1depicts a schematic diagram of a multi-node computer system in which a hardware MapReduce system and method of the invention are employed.FIG. 1is particularly illustrative of an extended memory architecture10constructed using a node architecture of multiple processing nodes 12. At the conceptual level, this architecture enables constructing a system from “units”15that combine memory pools and processing capability. In an embodiment, multiple types of units15are possible. A node 12 may contain a single unit or multiple units15. Examples of units15in a node, may include a memory service unit (Storage Class Memory Unit)151, a Sequential Processing unit (e.g., a DRAM and CPU)152, a Throughput Processing unit (High Bandwidth Memory and Graphic Processing Unit (GPU)))153, and acceleration unit154or FPGA unit155.

Unlike previous architectures where GPUs and accelerators are dependent on the host processor, units are independent and treated as peers under the extended memory architecture10. These units may be optimized for specific computational and memory task. The architecture depicts a collection of units where intra-node network13provides an efficient coherent interconnect between the units within a single node 15 and Inter-node network20, e.g., Ethernet or Infiniband® or like network, interconnecting the computing nodes 12 within the system10. Similar to a unit, the Inter-node Network20may also contain memory18and associated processing19. The “external networks” identify access beyond the extended memory architecture10.

In embodiments, methods are implemented for dynamically creating a logical grouping of units from one or more Nodes 12 to perform an application, wherein at least one of these units can run an operating system including a master process (not shown) that can setup the CNS system. The units15may be, for example, a combination of general-purpose processors, special purpose processors, programmable logic devices, controllers, memory, and the like. To dynamically configure a logical group, these units need to appear to software, especially the operating system and device drivers, as if these are all part of a physically connected system within the shared memory space. To support the connected view, a system manager or management software may assign each unit within a node 12 to an application. A system manager (not shown) may schedule jobs that run over the full set of nodes in the system, start jobs (applications or workflows), and assign the resources at job launch when the required resources are available.

As described in herein incorporated U.S. patent application Ser. No. 16/217,905, the extended memory (EM) architecture10architecture for accessing memory beyond a node 12. The EM architecture includes a method for accessing memory referred to as Coordination Namespace (CSN) methods distributed over the full system. Nodes within the extended memory architecture have major characteristics: (1) Capable of being managed by a single operating system; (2) Efficient coherent load/store access to all memory pools within the node; (3) a Global Virtual Address Space for referencing memory pools inside and outside the node; and (4) access to a system wide Coordination Namespace.

As described in commonly-owned, U.S. patent application Ser. No. 16/217,905, the Coordination Namespace (CNS) is a hardware system implementing methods providing support for treating system memory or storage class memory as a key/value store with blocks of data referenced using a “name” or key.

FIG. 2shows a CNS architecture100depicting networked connection of units150A,150B,150C . . . etc. across one or more nodes of the extended memory architecture10. In an embodiment, units150A,150B,150C etc. are independent and treated as peers under the extended memory architecture. These units can be for example, any combination of processors, programmable logic, controllers, or memory optimized for a specific computational/memory task. The architecture100depicts a collection of units where inter-node network20provides an efficient coherent interconnect between the units across the system.

In an example embodiment, each unit150A,150B,150C . . . etc. contains a pool of memory that is divided into one or more regions each having one of three designations: (1) Globally accessible; (2) NDE storage220; and (3) Local222. One embodiment of the extended memory architecture may aggregate memory regions designated as globally accessible into a Global Virtual Address Space and allocate memory regions designated as NDE storage to a distributed Coordination Namespace200.

As shown inFIG. 2, the plural units distributed across nodes of the extended memory architecture include at least hardware one CNS controller300that provides access to the Coordination Namespace. The CNS storage structure200provides an alternate view of extended memory that is separate from a processes' virtual address space local to the unit. In the Coordination Namespace, references to extended memory use a “name” for accessing a finite, ordered list of immutable values referred to as a Named Data Element (NDE) or “tuple”. In an exemplary embodiment, the first field associated with every NDE is its name, a character string with an implementation dependent maximum length. The “name” references a NDE located in the Coordination Namespace. The “name” can simply be the first field, the name, a search template for any set of the fields in the NDE, and the like and referenced herein as a “name,” a “key,” or as a “NDE-name.” The Coordination Namespace allows access to NDEs contained within a distributed object store. As shown inFIG. 2, peer-to-peer messaging over network links175across network20is used for accessing remote NDEs (tuples).

In embodiments, each unit contributing storage is an owner of a set of “groups” segments of the Hash of the “name”. CNS storage can be located in system memory or a Storage Class Memory (SCM), or in a File System. CNS completely implemented by software commands225received via an application programming interface (API)230to the CNS controller300if CNS storage is file system based.

The extended memory architecture uses NDEs or “tuples” within the Coordination Namespace system architecture100to communicate work between applications. In order to manage the Coordination Namespace, the system may also be associated with a CNS server that manages a Coordination Namespace located in a distributed manner across all or subset of the memory elements of the system. The part of the memory of the system associated with the Coordination Namespace is referred to as the Coordination Namespace memory200. Parts of this memory may be in the nodes executing the applications, other parts may be in memory dedicated to the coordination. The Coordination Namespace addresses the challenges of moving data between phases of a workflow by providing an efficient means for communication between and coordination of the applications within a workflow. In addition, the Coordination Namespace also addresses the need for keeping certain types of data persistent in memory longer than the duration of a single program or application.

InFIG. 2, one of the CNS controller elements300is CNS Server used for accessing the Coordination Namespace memory. The CNS server in particular manages the Coordination Namespace located in a distributed manner across all nodes (each node can have its own CNS server, CNS client, or both) of the system contributing to the distributed memory. A node may contribute all its memory to the Coordination Namespace (node is a dedicated CNS Server), parts of its memory or none of its memory. A node may still access the Coordination Namespace200even if not contributing any of its memory. The parts of the memory of the system associated with the Coordination Namespace may also be referred to as the Coordination Namespace memory or distributed memory. Various NDEs, such as NDE280and NDE281may be located in the distributed memory. In order to process Coordination Namespace Requests such as creating and reading NDEs a hashing of a named data element name (key) at a requesting client yields information about the node at which the named data element is located. This provides a single hop mechanism to locate an NDE.

In an embodiment, CNS Server characteristics include the use of a Hash table to manage tuples owned or naturally homed. In embodiments, a single hash table is provided per CNS node. Additionally, as multiple coordination namespaces can run concurrently on a node, there is more than one hash table per CNS node, Each unit has independent hash tables. There is further provided a Tuple memory in storage class memory and CNS data structures in a CNS Controller DDR. A CNS server uses a virtual address space local to the unit for accessing Tuples storage.

A CNS client is provisioned with request queues for locally initiated commands with one queue per process (e.g., allowing access to any open CNS).

In embodiments, three example access methods are provided by the extended memory architecture: (1) Direct load/store access to memory located within a node. (2) An asynchronous copy method. (3) A NDE access method. The NDE access method provides a set of commands to create, read, retrieve, and destroy NDEs in the Coordination Namespace.

When accessing the Coordination Namespace, the CNS controller (e.g., Client or Server) may perform a distributed hash function on the NDE-name to locate the data and perform the data movement. A CNS Server allows access to NDEs in a distributed system in a similar way as load-store instructions in an instruction set allows access to locations in a virtual address space. Furthermore, these NDEs are located beyond an application's virtual address space. NDEs and data in the Global Virtual Address Space may persist beyond the tenure of the application.

In embodiments, each node 12 of EM 10 includes components running methods disclosed herein for implementing data map reduce operations in a coordinated namespace (CNS) extended memory system100.

FIG. 3schematically depicts a high-level schematic of a CNS controller300at a processing node 12 for managing tuples (NDEs) in the coordinated namespace system200ofFIG. 2to implement tuple processing relating to data map reduce operations in the multi-node computing system. In embodiments, the controller300is a hardware FPGA implementation and is seen as an accelerator to process the requests offloaded by a CPU340.

InFIG. 3, CNS controller300at a node 12 includes one or more tuple engines305A,305B, . . . ,305N which are hardware units providing the processing to perform searches for tuples or create/delete tuples as needed in a near memory structure500(e.g., a local DDR memory). Computing using the tuple names includes hashing the name which associates for storage at nodes designated as a preferred home or a natural home. In embodiment, tuple engines respond to commands issued by work manager/scheduler350. Tuple engines further run an aggregation/accumulation function which can be anything from a count/a total/a max. value/a min. value, etc.

Each tuple engine hardware unit305A,305B, . . . ,305N updates local DDR data structure510, HE, PR, LT, and RT. Further, each tuple engine: supports pending records processing as it pertains to data map reduce functionality. That is, apart from creating/searching/deleting a hash element and/or tuple record—the tuple engine further: 1) supports counting of tuples/accumulation of value provided in a received instruction; 2) interprets a CNS MapReduce shuffle (CSshuffle( ) and CNS MapReduce (CSsreduce( ) instructions; 3) stores count/accumulate value in a hash element; and 4) allows a cleaning up of all tuple records of the “key” (tuple name).

In an embodiment, near memory500can be a separate DRAM memory that has lower latency with respect to the tuple engines or it can be a partition within a system memory315. The storage class memory325can also be another partition within system memory. A Heap manager element318is invoked to allocate/free memory in storage class memory.

In an embodiment, the work manager/scheduler350receives/processes software requests308(i.e., CSN opcodes) issued by CNS server and/or CNS client processes, e.g., CPU cores, and issues new work to the different Tuple processing engines305A,305B, . . . ,305N over a ring/bus structure or multiplexor328. The work requests may be queued in an associated WQ (not shown).

In embodiments, near memory500can be a RAM (e.g., DDR3) that stores a hash table510that, instead of hash array element values, contain pointers, such as head pointer512that points to a first HE515and a linked list structure525that record the location of tuples or pending requests waiting for tuples. Such a linked list structure525may be pointed to by a pending record pointer550included in hash element515. Tuple engines305A,305B,305N traverse the hash table510and linked list structures525to search, insert or delete tuple records. By calculating the hash of a tuple name, there is provided an index into the table510which provides the head of the linked list (i.e. the first item in each list525of tuple records).

A direct memory access (DMA) memory processing unit332is configured to move data between the system memory and storage class memory. DMA unit332further enables the various CNS controller hardware components to access system memory (random-access memory)315and/or storage class memory325and enable transfer of tuple data between storage, SCM and near memory400or vice versa independent of any central processing unit (CPU).

A messaging unit310is implemented for supporting the message structure for multi-node data map reduce operations.

A network interface card (NIC)375is provided that interfaces the CNS controller unit300to an external network for inter-node communications.

In embodiments, work manager element350receives the CNS software requests (e.g., opcode)308from master and client processes and keeps track of processes participating in data map reduce operations. In an embodiment, the work manager350can receive request messages, e.g., tuple commands302, over the network from other nodes relating to data MapReduce operations. The work manager350implements process for notifying DMA unit332to transfer tuple data depending on the CNS opcode being processed.

Further included as part of the system memory315in the CNS node architecture12is a request queue365in which local processes write a request, and a completion queue366which are created at the start of the coordination namespace system. A single request queue and completion queue is provided for each user process, e.g., processes labeled prO, prl, . . . , prn. In an embodiment, the completion queue366is placed consecutively after the request queue365array in system memory.

In an embodiment, user processes running in a CPU core340issues write commands to a request queue via system bus375providing data transfer amongst the CPU, system memory and CNS hardware controller300. As the CNS controller hardware may not know about this new request being inserted in system memory, the process performs writing to a memory mapped10address (MMIO address) a value —which could be the updated tail pointer of the queue that contains the request. The hardware monitors the MMIO bus and upon seeing an address belonging to it— and the corresponding value that came with the address—it compares the value with its known head pointer of the queue. If the new tail is greater than the head—then it knows that a new request has been inserted in the queue. It then proceeds to issue a load on the address corresponding to the tail pointer. If tail pointer was incremented by more than 1—then hardware loads head ptr+1, until it reaches tail of the queue. The MMIO bus carries data in packet of multiple beats. The first beat would have the address of the MMIO, and the subsequent beats have the data associated with the address.

Thus, every time a user process issues a request message342into the request queue363-aMMIO doorbell is rung to the hardware for processing. Via messaging353,363over a system bus, the CNS hardware controller300picks this request from the request queue365and processes it while the user process waits for the processing to complete. When the hardware/controller completes processing the request, it issues a completion notification message352,362into this completion queue366for that process. The user program/processes further polls343via the system bus375, this completion queue366for new completions. When it finds one, it clears the corresponding request from the request queue. The completion entry in the completion queue informs the user process which request got completed and some status and error messages. In an embodiment, the aggregate value from tuple reduce operations could also be included in this completion message, or it could have been in a predefined location that was indicated in the original request. The user process picks the value from this predefined location. The hardware has updated the aggregation value at this predefined location as part of its processing.

FIG. 4shows a diagram400depicting the homing of a tuple in a Coordination Namespace (CNS). With respect to running a workflow or application, a requesting Node (e.g., client401) is the location running the process making the remote memory NDE request405, i.e., the unit15making the tuple command, e.g., including the tuple key or “name”. At the CNS controller, the hash algorithm is applied to the tuple-name to identify the Natural Home410. The Natural Home directly or indirectly indicates the node where the NDE is created or may be found if no other information is provided. The Preferred Home415may be provided by the process making the request or by prediction algorithm, e.g. running at the CNS client, for example, by an affinity parameter. The preferred home node can be a desired location, e.g., specified by a user. When supplied, the Preferred Home415directly or indirectly indicates the node where the NDE should be created or where to first search for the NDE. The Actual Home420identifies the node where the NDE resides. When creating a NDE, the Preferred Home (node) is tried first. If the tuple cannot be created there for some reason, such as out of memory an alternate home is chosen, and that node becomes the Actual Home. When a NDE is created, the Natural Home410always keeps a record in the local hash table indicating the Actual Home but does not store the data. In embodiments, a PH could also be the tuple's natural home (based on the hash of the name). The Natural home node will always receive the tuple based on its key hash and make and add an entry in it. When a NDE is requested, the hash table on the Preferred Home (node)415is searched first. If the NDE is not found, the request is sent to the Natural Home for recording the dummy pointers for the associated key. The nodes identified by the Natural, Actual, and Preferred Homes can all be different, the same, or any combination. In addition, they can also be different or the same as the requesting node. The communication between the requesting node, the Natural Home, the Preferred Home, and the Actual Home is performed via a the inter-node Network20.

FIG. 5depicts an implementation of an FPGA of a DDR hash structures in a near memory500(e.g. dynamic RAM (DRAM) memory or double data rate RAM (DDR)) or a partition in system memory, used for hardware support of the data MapReduce operations in the coordinated namespace architecture. In embodiments, the nodes 12 include a local or near memory of the CNS extended memory architecture.

As shown inFIG. 5an FPGA unit500provides the hash table510in the dynamic RAM (DRAM) memory or a DDR memory, with the hash table510containing fixed size structures in the form of a hash table map including hash element pointer entries512, that point to a corresponding linked list array structure525maintaining a linked list of pointers to various types of tuples (e.g., LT, RT and PR) stored at memory locations in the CNS extended memory. In particular, a tuple pointer (HashElemPtr)512points to a head pointer of the linked list525.

In an embodiment, the hash table510is initially accessed by a pointer509based on a part of the hash value of a tuple name of a received sorting operation tuple command. The hash table map data structure510implements a hash function to further compute from the hash value of the tuple name a pointer index530for accessing a particular memory pointer element in the table510of memory pointers. The hash element contains the key of a tuple key-value pair. While multiple tuple keys or “names” can hash to a same index, they are linked as a linked list525of hash elements515in a linked list structure525.

For example, as shown inFIG. 5, a HashElemPtr memory pointer513points to a first hash memory element, i.e., a first element515A of a linked list of tuple storage locations in memory500which can be used for memory read or write operations in the CNS extended memory. That is, instead of each hash array element values, each item in the hash table map data structure510is simply the head pointer513to a first hash element item in a linked list525. By calculating the hash of the received tuple name, there is provided an index530into the array table—which in provides the head513of the linked list (i.e. the first item in linked list525).

In embodiments, each hash element515in that linked list would be for a unique tuple name, and it is possible to have multiple tuples for the same name, i.e., each hash element515is searched to find a tuple name (1per hash element) and within each hash element515is three lists: list of local tuples (actually stored on that node), a list of remote tuples (if the node is NH for that name), a list of tuples that are known that exist somewhere else, and in an event that a request for the tuple came before the data is actually provided, e.g., by receiving an CNS “IN” opcode prior to receiving an CNS “OUT” opcode, the request is saved in a pending record. Each linked list525is a linked list of hash elements, with each hash element515including one or more of: a pointer516to connect to the local tuple(s) list, a pointer517to connect to a respective linked list structure of remote tuple(s), and/or a pointer518to connect to a respective linked list structure of pending record(s) all for the same tuple name, as well as a next pointer531to a following hash element515in that linked list525.

Each of the local tuples/remote tuples/pending records connected to the given hash element515are connected themselves as circular doubly linked structures. Thus, as shown inFIG. 5, there are four (4) possible combination of allocation of tuple records in memory500as circular doubly linked structures including: 1) a circular doubly linked structure541of local tuples, and circular doubly linked structure542of remote tuples associated with a tuple name hash element if its a natural home or actual home; 2) a circular doubly linked structure543of only local tuples present—indicating for actual home local tuples only; 3) a circular doubly linked structure544of only pending records present for a given tuple—indicated for the natural home as PR cannot be present in actual homes; and 4) a circular doubly linked structure545of only remote tuples if only remote tuple list is present for a given tuple name—its the natural home for that tuple. In additional embodiments, a combination such as a NH=AH can exist such that both LT list and RT list would be maintained in the same node (e.g., both the natural home and actual home for the tuple).

Thus, as further shown inFIG. 5, the LT head pointer516of hashelement1515A associated with a first tuple name points to a head571of double-linked circular list structure541of local tuples and the RT head pointer517of hashelement1515A associated with a first tuple name can point to a head572of double-linked circular list structure542of remote tuples. Similarly, the PR head pointer518of hashelement1515C associated with a third tuple name points to a head element573of double-linked circular list structure544of pending records. It is understood that a head tuple of the pointers can represent a new hash element taken from free pointer list560to record a first open tuple element for that name responsive to a CSOut( ) tuple command without a corresponding entry in hash table510. When the hash table is searched, and a hash element is already found for the processed tuple name, then the linked list structure is formed by appending a new record for commands received for that same tuple name.

As further shown inFIG. 5, in support of hardware data map reduce operations, each of the hash elements515each have a 64 bit value memory519for directly storing the incremented/accumulated immediate count value, i.e., rather than storing it in SCM. Otherwise, this associated field519can store a pointer to an SCM location for storing the accumulated value. Thus, for every time a map reduce processing is associated with a tuple name, the counter at the tuple engine is incremented and the incremented counter value is stored back at the accumulator register519at the hash element for that tuple name.

In an embodiment, as shown inFIG. 5, at a node, the data value part of the tuple is stored in the local tuples542pointed to by the pointer as indexed in the hash element corresponding to the tuple name in the CNS structure at a node shown inFIG. 5. Using multi-bit memory storage architectures, e.g., 64 bit, there is locally stored tuple values. Performance is improved by storing this tuple value data locally within the local tuple itself in the form of immediate data.

Further, as shown inFIG. 5, there are corresponding four (4) types of free list memory buffers560—one for each type that is needed to form these linked list structures541,542,543,544and545. As a tuple engine traverses the hash table and linked list structures to search, insert or delete tuple records. When a tuple engine needs to create an entry in these linked structures—it picks it up from the free lists560of the given type. As shown inFIG. 5, a tuple engine can pick an entry for a linked list structure from free lists associated with hash element type561, local tuples type562, remote tuples type563and pending records type564.

In embodiments, fields for the linked list associated with hash element type561include a head of linked lists for local, remote and PR. For example, the fields581in free lists associated with hash element type561include: address of next HashElem, an address of a previous HashElem, an address of a HashTable parent, an address of a PendingReq (pending request), an address of a LocalTuple, and address of a RemoteTuple, etc.

Further, the fields582in free lists associated with Local Tuples type562include tuple address in SCM, size and tuple record in details in the NH including: address of the next LocalTuple, an address of a previous LocalTuple, an address of a HashElem parent, an address of actual tuple, a size of the actual tuple, and an address of the NH RemoteTuple.

Further, the fields583in free lists associated with Remote Tuples type563include details of actual home of tuple and location of tuple record in home hash table structure including: address of the next RemoteTuple, an address of a previous RemoteTuple, an address of a HashElem parent, an actual home unit of tuple, and an address of LocalTuple at home.

Further, the fields584in free lists associated with Pending Records type564include information to recreate the original request into work queue including: address of the next PendingReq, an address of previous PendingReq, an address of HashElem parent, a Requesting unit, a Requesting pid (process identifier) to facilitate memory address translations between effective address to real/physical addresses, a Requesting address, a Requesting size, aRequesting queue tag and a Request type (RD/IN).

Although not depicted, in a further embodiment, CNS controllers send commands there between in processing of tuples.

For example Coordination Namespace APIs are provided with one coordination namespace access API is csOut( ) which is a command sent from a requesting unit to a NH or PH to take the tuple from requestor and store it, i.e., create it, in the CNS. A csRD( ) is a command sent from a requesting unit to a NH or PH to retrieve a tuple from CNS, and csIn( ) is a command sent from a requesting unit to a NH or PH to retrieve the tuple from CSN and store it in the requestor node (i.e., and removing the tuple from CNS).

In embodiments, a requesting node401can issue a software API “csOut( )” (hardware opcode=csout) which is invoked to request creation of a new tuple in the CNS, e.g., taking the tuple from request to store in CNS system200.

The processing of the CSOut( ) command message to create a tuple for storage at a node include steps of: receiving, at a node from a requesting node, a User Req CSOut, and in response, checking at the workload scheduler whether the node is the preferred home for the tuple, e.g., check if node=preferred home. If the node receiving the CSOut( ) command is not the preferred home, then the messaging unit sends the CSOut( ) message to the preferred home for processing that tuple. If the node receiving the CSOut( ) command is the preferred home, then the tuple engine at the node will check the hash of the tuple name and compute a hash entry address. Further the tuple engine at the receiving node issues a Read head pointer in the Hash table and searches or scans any associated hash element linked list structure for the corresponding entry in the DDR memory500to determine whether a tuple had been created for that tuple name.

The tuple engine will further check the response received from the DDR memory on board the FPGA unit500, or alternatively, the system memory or any near memory which is faster/lower latency than the storage class memory, compute a next address of hash element and issue a Read hash element. Further, the tuple engine will check the DDR response, check the tuple name in hash element; and determine whether the tuple name matches the request. This process of computing next hash element address, reading the hash element and determining whether the tuple name has been created in a hash element is repeated continuously until reaching the end of the linked list structure.

That is, as long as the tuple name of hash element linked list structures does not match the request, then the tuple engine will obtain the head of local tuple list and issue a DDR read request for first local tuple. Then, the tuple engine gets the next pointer of retrieved tuple, and Issues a DDR read request for next local tuple in list. The process of reading from the DDR is repeated until the last element of the linked list is read.

If, while traversing the linked list structure, it is determined that no tuple (hash element) has been created to match the tuple name requested, a new hash element is created from the free pointer list and it is inserted into the list and a first record of the tuple name is created as a tuple hash element. That is, the CSOut( ) method will obtain a free pointer for the local tuple record and writes a new tuple record with the location of data in the SCM. The tuple engine then completes processing, notifies the work scheduler/user of the completion and notifies the Natural home of new record.

Upon scanning by the tuple engine, if a tuple hash element has already been created for the received tuple name in the linked list indicated in the CSOut( ) request, then a new record is created in the associated linked list structure for that hash element.

In embodiments, the requesting node can issue a software API “csIn( )” (hardware opcode=c sin) which is invoked to retrieve and remove a matching tuple from CNS. In CNS processing of the CSIn( ) command at a node can include steps of: receiving, at a node, a User Req CSIn, and in response, checking at the workload scheduler whether the node is the preferred home for the tuple, e.g., check if node=preferred home. If the node receiving the CSIn( ) command is not the preferred home, then the messaging unit sends the message to the preferred home for processing thereat. If the node receiving the CSIn( ) command is the preferred home, then the tuple engine at the node will check the hash of the tuple and compute a hash entry address. Further the tuple engine at the receiving node issues a Read head pointer in the Hash table and search for the corresponding entry in DDR memory. In an embodiment, if the tuple record is not found in preferred home, then this request gets sent to the natural home where information on the tuple record will be found. This might be in the form of a remote tuple that informs where the actual home is for the record. If not found, it becomes a pending request record.

The tuple engine will further check the response received from a memory controller of the DDR memory, compute a next address of hash element and issue a Read hash element. Further, the tuple engine will check the DDR response, check the tuple name in hash element; and determine whether the tuple name matches the request.

If the tuple name does not match the request, then the tuple engine will continue to check a response from the DDR memory controller.

If the tuple name does match the request, then the tuple engine will obtain the head of local tuple list and issue a DDR read request for first local tuple. Then, the tuple engine performs removing the element from linked list, updating the hash element to point to next element in list, and delete the Hash element if it was last element.

The tuple engine then informs a local memory using a direct memory access (DMA) request, to transfer data from the SCM to the local memory. Then a command is issued to update the natural home in response to the removing the tuple. Then, the tuple engine completes processing and notifies work scheduler/user of the completion.

The extended memory architecture10ofFIG. 1provides a hardware accelerated mechanism to support data map reduce operations for multiple parallel operating processes in a distributed multi-node computing system.

The CNS extended memory architecture provides hardware support for efficiently providing data map reduce operations in the CNS architecture. The present methods provide for a method of communication which involves participation of many nodes (all processes) in a communicator, without MPI (message passing interface standard) implementation.

As shown inFIG. 6, for purposes of storing a count/accumulate value in hash element in the CNS system, a tuple engine305is additionally provided with an accumulator register395to support accumulator operations, e.g., increment/decrement accumulate immediate values (e.g., an aggregate or a count) in a CNS reduce (tuple name) request. In an embodiment, the accumulation register at the tuple engine maintains a current count of a number of tuples generated and sorted and stored in the linked list structure corresponding to a specified tuple name and stored at a node. The tuple engine can increment the count for each tuple record compute a value associated with another aggregate function, e.g., maximum, minimum, average, etc for storage in register395. Further, as shown inFIG. 6, the incremented immediate value can be additionally stored directly in a memory location519pointed to by the hash element. Additionally shown, pointed to by PR head pointer618in hash element515is a first pending record573of a circular linked list of pending records544for use in the tracking stored tuples. For example, in an embodiment, a CSIN/CSRD tuple command received before a CSOUT will result in creating a pending record544for CSIN/CSRD for association with that hash element. The pending records are released when CSOUT for the tuple name is issued. It is noted that every time a counter register in tuple engine accumulator395is incremented/decremented, by virtue of the tuple engine accessing that same hash element for the same tuple name, the count value is additionally stored in the memory location519associated with the hash element515created for that tuple name.

FIG. 7generally depicts Map Reduce processing700for a parallel distributed computing system. In the embodiment depicted, a software mapping operation takes a set of data and converts it into another set of data, where each individual data element is broken down into a respective tuple (key/value pair). Distributed nodes705of a multi-node computing system, e.g., nodes labeled Node 0, Node 1, . . . , Node 7 inFIG. 7, include processing elements performing processes that generate data702, e.g., Node 0 generates data items d0-d3, Node 1 generates data d4-d7, etc. Each node703runs a predetermined software mapping function (fmap(d)) that generates a tuple pair710corresponding to each data item702. Generally, to generate corresponding tuples, the data mapping function performs the following:
data(dn)=><key=fmap(d),value=fval(d)>
where “n” is a number greater than or equal to 0, fmap(d) is the function applied to data “d”702for generating a corresponding key711and a function fva1(d) is applied for generating the tuple value712based on the data value. As an example, considering data d0, d1, . . . , d32 at nodes710, a mapping function applied to data at each node generates corresponding example key, value tuples:
d0=>(t0,a0),
d1=>(t7,g0),
d2=>(t9,i0),
. . .
d32=>(t2,g5)

As further shown inFIG. 7, nodes703storing tuples710perform a shuffle operation. That is, for each stored tuple710(i.e., key,/value pair) generated at the node, a sorting function applied at each of the nodes generates groupings based on the tuple name (=key). Generally, as shown inFIG. 7, a queue725is generated at a node (e.g., a tuple natural or preferred home) for storing all of the tuples amongst all of the nodes having the same key (tuple name). For example a separate queue725is generated corresponding to each respective tuple name, e.g., keys t0, t1, . . . , t9. For example, running a sorting process for the tuple key=t0, it is found that Node 0, Node 2, Node 4 and Node 6 each have generated a tuple with that key name. These nodes sort the t0 tuple and store each tuple entity having the same key name into a single queue725. Further, for example, tuples having a key named “t1” shown stored at nodes Node 1, Node 4 and Node 7 are sorted and their corresponding tuple values b0, b1 and b2 are stored at a single queue726, while generated tuples having a key named “t2” shown stored at nodes Node 5 and Node 6 are sorted and their corresponding tuple values c0, c1 are stored at a single queue727, etc. The sorting function is applied at each node for populating queues725,726, . . . , up to queue733storing values associated with tuple name t9.

Then, a reduce task is performed which takes the output from the mapping as an input and combines those data tuples into a smaller set of tuples. As the sequence of the name MapReduce implies, the reduce task is always performed after the map job.

In accordance with a reducing a reduce operation, for association with a corresponding queue725, there is generated for storage a map reduce value based on a specified aggregation function type. For example, the aggregate function type can be a maximum value, a total value, a count, a minimum value, an average value, a mean value, etc. In the embodiment shown inFIG. 7, such an aggregation function includes an aggregation or “count” of the number of data values stored in that queue. This accumulated/count value may be stored in the tuple engine accumulation register or the 64-bit register in the hash element. For example, for queue725associated with data from nodes having generated tuple values corresponding to tuple name t0, for example, a corresponding data structure750is generated that includes a value of “4” corresponding to the number of tuple values (a0-a3) stored at that queue725. Likewise, for queue726associated with data from nodes having generated tuple values corresponding to tuple name t1, for example, a corresponding data structure756is generated that includes a value of “3” corresponding to the number of tuple values (b0-b2) stored at that queue726, while for queue727associated with data from nodes having generated tuple values corresponding to tuple name t2, for example, a corresponding data structure757is generated that includes a value of “2” corresponding to the number of tuple values (c0-c1) stored at that queue727, etc. The reduce function is applied at any node storing a respective queue725,726, . . . ,733such that there is a one-to-one correspondence775between a queue and its corresponding data structure storing that queue's accumulate/aggregate reduce value.

FIGS. 8A-8Bdepict conceptually an example multi-nodal processing system configured for data_MapReduce processing800in a tuple space/CNS namespace extended memory architecture.

In support of MapReduce operations in the CNS storage system, the CSShuffle (tuple name) is an opcode issued by a process thread at a node in the coordination namespace. The issued CSShuffle (tuple name, tuple value) opcode command instructs that the receiving node(s) perform a sorting function that generates groupings based on the tuple name (=key). The receiving node(s) sort the tuples and store each tuple entity having the same key name into a single queue, e.g., at the node identified by the hash value of the tuple name/key or a user selected node. In an embodiment, CSShuffle (tuple name) can include an additional parameter or flag telling the tuple engine to store the value in metadata of the tuple record pointed to by the hash element pointer. That is, each tuple data value belonging to a tuple name is stored in a linked list structure pointed to by a hash element entry corresponding to the tuple name.

In alternate embodiments, a variation of the CSShuffle opcode (e.g., CSShufflewithagreg( ) informs the tuple engine to automatically count/accumulate or aggregate the tuple data values, e.g., at the PH node, at the time of sorting tuples at that node and store this value in the memory pointed to by the hash element. Alternatively, an additional aggregate parameter or flag can be included in a CSShuffle( ) command to indicate automatic accumulation or count at the particular preferred node specified at the time of sorting tuples at that node. The aggregated tuple value is thus incremented for each tuple record stored and recorded in the hash element (e.g., register519) and this value can be immediately returned to a requesting process responsive to a reduction operation without having to scan the hash element linked list structure. In an embodiment, any accumulator function can be done as specified by the aggregate function at the preferred home.

In an embodiment, the accumulation register at the tuple engine maintains a current count of a number of tuple records generated and stored in said linked list structure corresponding to said specified tuple name. The tuple engine increments the count for each tuple record in register395appended to the linked list associated with the tuple name.

Alternatively, accumulation is performed when a reduce operation specified by a CSReduce( ) opcode is issued.

The CSReduce( ) opcode is issued to obtain the reduced value for each tuple name, i.e., the user process needing this information issues an instruction that is called CSReduce(tuplename). This request gets routed to the predicted home or PH if provided, or to the natural home (NH). The tuple engine will scan through the linked list matching the key/tuple name and accumulate the value (e.g., a count or perform an aggregate function) based on the stored tuple records, and return this count value to the user (requestor node), e.g., over the network. If CSShuffle( ) already accumulated this value in the hash element, then it does not need to scan the tuple record list. CSReduce( ) also further cleans up tuple records created at predicted home/natural home.

FIG. 8Agenerally depicts an embodiment of performing MapReduce operations in which generated tuples are stored at the natural home. In the embodiments depicted, distributed nodes705shown inFIG. 8A, e.g., labeled Node 1, . . . , Node N, each runs software processes that generate a corresponding key, value pair (tuple) for each stored data element using any applied mapping function. The data tuples at any node are stored in a corresponding hash element with multiple tuples stored in a linked list data structure associated with the hash element created for that tuple name. In an embodiment, a user can specify a node or home for the tuple storage or it may be stored as a default in the tuple's Natural Home (NH).

As shown by way of example inFIG. 8A, each of labeled Nodes 0, 2, 4 and 6 include multiple tuples, with each having data mapped to a tuple name “t0” such as respective mapped data values a0, a1, a2 and a3. Similarly, Nodes 0, 1, 3, 4 and 5 each include a stored tuple having key name “t7” having respective data values g0, g1, . . . , g5.

In an embodiment, shown inFIG. 8A, each node Node 1, . . . , Node N performs a sorting operation810to shuffle and sort all the tuples stored in the CNS extended memory system according to the tuple names of data tuples stored at the nodes. In an embodiment, the sorting is based on hash index computed from the tuple's key name, and unless otherwise specified, all results are stored at the natural home (NH) for that tuple. That is, when a predicted or preferred home (PH) is not provided, the tuple will be stored in its natural home (NH). In an embodiment, all nodes Node NO, . . . , Node N can perform the sorting based on the tuple's key name, e.g., t0, t1, . . . , t9 and collect the data (tuple value) associated with each tuple name. In the example shown inFIG. 8A, Node 0 applies a CNS shuffle process, CSShuffle( ) for each tuple710stored in the memory at that node, e.g., CSShuffle (t0, a0), CSShuffle (t7, g0), CSShuffle (t9, i0) and CSShuffle (t9, i1) which outputs the corresponding data value to a particular queue associated with that tuple name. For example, associated with key name t0, the shuffle operation performed at nodes Nodes 0, 2, 4 and 6 will result in the generation of a queue825associated with tuple key name t0 for storing the respective tuple data values a0, a1, a2 and a3. Similarly, as a result of performing the shuffle operation CSShuffle( ) at nodes Nodes 0, 1, 3, 4 and 5, there is generated a queue827associated with tuple key name t7 for storing the respective tuple data values g0-g5. In embodiments, a queue, e.g.,825,827is a linked list structure for the given tuple name as formed by a given hash group provided by CNS functionality.

In an embodiment, shown inFIG. 8A, a tuple engine at the node (e.g., NH) performs reduce operations850for each queue linked list stored at a hash element to obtain an interpreted value, e.g., a count of the data values, or aggregation of the data values (tuple values) stored at that queue (e.g., a hash element). For example, as shown inFIG. 8A, for the queue825, there is issued a CSReduce( ) command issued by user for the key named t0 to generate an interpreted value corresponding to a count875of the number of tuples stored there, e.g.,4, i.e., the number of data elements values a0, a1, a2 and a3. Operations850include issuing, by a user, a CSReduce( ) command for each key with a parameter indicating an aggregate/accumulate reduction at the tuple's natural home (NH) by tuple engines. Likewise, in the example shown inFIG. 8A, for the queue826, there is issued a CSReduce( ) command issued by user for the key named t1 to generate an interpreted value corresponding to a count876of the number of tuples stored there, e.g., 3 and for the queue827, the user-issued CSReduce( ) command for the key named t7 generates an interpreted value corresponding to a count877of the number of tuples stored there, e.g., 6.

In an embodiment, the reduce (interpreted) value, e.g., the immediate “count” or accumulated value of the number of values stored for that tuple name, is stored at the 64 bit value memory storage location or register519of the hash element shown inFIG. 6. Alternatively, the reduce (interpreted) value can be stored in the aggregator/accumulator memory register395of a tuple engine at the particular node having the hash element associated for storing the tuples for that node and a count incremented/decremented accordingly. This tuple count is metadata in the tuple record and is stored in the memory associated with hash element and subsequently accessed/used for applications.

In an embodiment, tuples of same key/name are collected at a same location/hashgroup, otherwise, unless otherwise specified, tuples are stored at their Natural Home.

For example, as further shown in an example embodiment ofFIG. 8A, at830, Node 0 is the natural home for tuples t0, t1. Thus, Node 0 includes a hashing function (not shown) that hashes the tuple name t0 to a corresponding hash element at the NH (=Node 0) having associated linked list structure for storing the tuple values a0, a1, a2 and a3. Similarly, Node 0 includes a hashing function that hashes the tuple name t1 to another corresponding hash element at the NH (=Node 0) having associated linked list structure for storing the tuple values b0, b1 and b2. In the example embodiment depicted inFIG. 8A, tuple t2 is stored at a hash element associated with a NH=Node 1, tuples t4, t5 are stored at respective hash element associated with a NH=Node 2, tuples t6, t7 are stored at respective hash element associated with a NH=Node 3, tuple t8 is stored at a hash element associated with a NH=Node 4, and tuples t3, t9 are stored at respective hash elements associated with a NH=Node 5.

As mentioned, when a predicted or preferred home (PH) is not provided, the generated tuple is stored in a natural home.FIG. 8Bdepicts MapReduce operations in a further scenario where a user or application at the node specifies a predicted (preferred) home. In the example embodiment depicted inFIG. 8B, tuples of a same key/name are collected at a same location/hashgroup, however, in the embodiment depicted, a user provides a predicted or preferred home (PH). That is, as shown inFIG. 8B, each CSShuffle( ) command specifying a sorting operation811to shuffle and sort all the tuples stored in the CNS extended memory system according to the tuple names of data, includes a further parameter PH822that assigns a preferred home PH for that tuple storage. Thus, as shown inFIG. 8B, CSShuffle( ) commands issued at processing Node 0 assigns generated tuples710to a resulting queue formed as a linked list structure associated with hash elements at PH locations (nodes).

Thus, as further shown in an example sorting technique811in the embodiment ofFIG. 8B, Node 0 is assigned as the preferred home (PH) at840, for storing tuples of keys t0, t1 and t2. Thus, Node 0 includes a hashing function (not shown) that hashes the tuple name t0 to a corresponding hash element at the PH (=Node 0) having associated linked list structure825for storing the tuple values a0, a1, a2 and a3. Similarly, at Node 0, the hashing function that hashes the tuple name t1 to another corresponding hash element at the PH (=Node 0) having associated linked list structure826for storing the tuple values b0, b1 and b2. Similarly, in the example embodiment depicted inFIG. 8B, tuples of key name t2 are stored at a hash element associated with a PH=Node 0.

Given the additional CS Shuffle( ) parameter specification822of preferred homes (PH) in the embodiment depicted inFIG. 8B, tuples having key names t5, t4 and t6 are sorted for storage at respective hash elements associated with a PH=Node 1, while tuples having key names t7, t8 are sorted for storage at a respective hash element associated with a node PH=Node 2. Similarly, Node 3 is assigned as the preferred home (PH) for storing tuples of keys t9 and t3. Thus, in an embodiment, a first stage sorting technique is implemented that uses a network specifying a predicted home, e.g., by issuing CS Shuffle( ) for tuple (t0, a0) and assigning a PH at node NO, while CSShuffle( ) for tuple (t7, g0) is assigned a PH at node N2 (PH=N2). The CSShuffle of tuples (t9, i0) and (t9, i1) at node zero are each assigned a PH at node N3 (PH=N3).

In an embodiment, as Local tuple records are created at predicted homes storing the tuples, then in this embodiment, reduction is performed at the PH by the tuple engines.

FIG. 8Cdepicts an embodiment of the MapReduce functions which stores and collects tuples at multiple nodes. In the scenario depicted inFIG. 8B, the tuple (key name) t7 is shown stored at PH=Node 2, which can create performance issues as the multiple tuples are stored at the hash element linked list causing lengthy traversals of the tuple chain and corresponding processing bottleneck. Thus, in an example implementation depicted inFIG. 8C, for the example tuple having key name=t7, the map reduce processing enables both node 2 and node 3 to gather the t7 tuples based on predicted home (PH) provided by user. For example, a sorting function can map tuples t7 having tuple values (data) g0, g1 and g2 to a linked list structure828at PH=Node 2, while the sorting function further maps tuples t7 having data g3, g4 and g5 to a linked list structure829at PH=Node 3. Thus, in the example depicted inFIG. 8C, while the Natural home (e.g., NH=2) is still unique—computed by applying a hash function to the tuple name (e.g., t7), the CNS map reduce operations850performed by tuple engines in this scenario, can be performed either at a multiple predicted homes880at multiple PH nodes, or by tuple engines at the natural homes881(multiple NH nodes).

In an embodiment, the methods employ CNS processes that performs the following MapReduce operations in the coordination space architecture: 1) map reduce at a natural home including sorting and reducing operations; 2) map reduce including sorting at a preferred home and reducing at a natural home; 3) map reduce at a single preferred home; and 4) sorting at a natural home, and aggregation during shuffle and reducing at natural home.

FIG. 9depicts an embodiment of a map reduce sorting process900running on the hardware controller at a node of the multi-node computing environment with the sorting occurring at the tuple's NH. In an example embodiment, as shown inFIG. 9, at902, a controller process running at a given node703of nodes705generates the data702which is stored locally at the node. As indicated at903, a mapping function is applied to the data702to generate a corresponding tuple710. As shown at905, the generated tuple includes a tuple name and a value associated with the stored data as shown as tuple(tuplename, value) pair. At908, the local process at the sorting node issues a CSShuffle(tuplename, value) command. This shuffle command is a sorting function that places the tuple(tuplename, value) pair at a node associated with the tuplename. Then, at step910, at the node703, the work scheduler applies a hash function to the generated tuple name to compute a natural home (NH) for storing that tuple. Then, at912, a determination is made as to whether the current node is the natural home (NH). If, at912, it is determined that the current node is not the NH for that tuple, then the process proceeds to step918where the messaging unit at the controller forwards the packet to natural home node. Step915depicts a step of receiving a tuple message generated from another processing node. The incoming message from another node is any message from forwarded tuples, e.g., new tuple, delete tuple etc. Further internal CNS messaging, e.g. like ack, negative ack, delete tuple etc do no have tuple name—instead have the actual pointer of the local tuple being processed and have a different processing flow.

If the tuple name is provided—then if the current node is the natural home for the generated tuple at that node as determined at912, or if the current node is a NH configured to receive the tuple message received from another processing node at915, the process proceeds to920in which the tuple engine at the node seeks to find a hash element for the key=tuplename. If, at920, a hash element has not been created for that tuple name at the NH node, then the process proceeds to922where the tuple engine at the node creates a new hash element for key=tuplename and the process proceeds to926,FIG. 9. Otherwise, at920, if it is determined that a hash element has been created for that tuple name at the NH node, then the process proceeds to926. At926,FIG. 9, the tuple engine obtains a next local tuple pointer in hash element, and makes a determination at929whether the next local tuple pointer points to a last element in a linked list-structure for storing tuple records. At929, when a last element in the corresponding linked list at that hash element is available, then the tuple engine stores tuple record at end of the list at the NH.

FIG. 10depicts an embodiment of a map reduce reduction process930running at the tuple engine of the hardware controller at a NH node for that tuplename. In an example embodiment, as shown inFIG. 10, at932, a controller process running at the NH node issues a CSReduce (tuplename, aggregation function) instruction, and in response, at935includes computing a NH based on the tuple name. The process proceeds to940where a determination is made as to whether the current node is the NH. If, at940, it is determined that the current node is not the NH for that tuplename, then the process proceeds to step942where the messaging unit at the controller forwards the packet to the natural home node. Step938depicts a step of receiving an incoming tuple message forwarded from another processing node with the tuple message based on the tuplename. The another processing node is a requesting node that issues the CSreduce command and is any node in the system that a user decides where the aggregate value(s) is/are to be collected. Thus, if the current node is the natural home for the generated tuple at that node as determined at940, or if the current node is a NH configured to receive the tuple message received from another processing node at938, the process proceeds to945in which the tuple engine at the node seeks to find a hash element for the key=tuplename. Then, once a corresponding hash element is found, at948, the tuple engine traverses the linked list structure and obtains or reads the aggregation value based on the aggregate function, e.g., a maximum value, a total value, a count, a minimum value, etc. For example, the aggregate value can be the amount of tuple values (corresponding to data) stored in pending records in the linked list structure at the hash element corresponding to that tuple name.

Upon obtaining the aggregation value, the process proceeds to950,FIG. 10where a determination is made as to whether the current node is the requesting node, i.e., the node that issues the request for reduced aggregate function value. If at950, it is determined that the node storing the tuple records for that tuplename is not the node requesting for the aggregate function value, then the process proceeds to952where the messaging unit at the CNS controller at the node sends the aggregate value to the requesting node. Step953depicts the receiving of a completion incoming tuple message generated from another processing node with the tuple message including the aggregate function value determined for that tuplename. Thus, if the current node is the requesting node for the aggregate (map reduce) value for the tuplename as determined at950, or if the current node receives the incoming message including the aggregate value in a tuple message received from another processing node at953, the process proceeds to955in which the messaging unit at the node sends the aggregate value (based on the aggregate function) to the completion queue (associated with the running local process at the requesting node) via software. At958, the local process at the requesting node then monitors the completion queue storing the result aggregated value (based on the aggregation function).

As the methods900,930ofFIGS. 9 and 10are performed at the NH of the tuples, this can create a bottleneck situation if all records created happened to target same node. Thus, the user is provided with the flexibility to sort at user selected nodes i.e., preferred home nodes as shown inFIG. 11.

FIG. 11depicts an embodiment of a map reduce sorting process960running on the hardware controller at a node of the multi-node computing environment with the sorting occurring at a PH as desired by the user process. In an example embodiment, as shown inFIG. 11, at962, a controller process running at a given node703generates data702which is stored locally at the node. As indicated at965, a mapping function963is applied to the data702to generate a corresponding tuple710. As shown at967, the local process at the sorting node issues a CSShuffle(tuplename, value, preferred home) command, where the “preferred home” is the (user) desired location for storing the sorted tuples corresponding to that tuple name. The shuffle command is a sorting function that places the tuple(tuplename, value) pair at a PH node associated with the tuplename. Then, at step970, at the node703, the work scheduler determines whether the current node=preferred home (PH). If, at970, it is determined that the current node is not the PH for that tuple, then the process proceeds to step972where the messaging unit at the controller forwards the tuple packet to preferred home node. Step969depicts a step of receiving a tuple message generated from an another requesting processing node (e.g., not PH) issuing the CSShuffle or CSReduce commands with tuple message based on the tuplename. Thus, if the current node is the preferred home for the generated tuple at that node as determined at970, or if the current node is a PH configured to receive the tuple message received from another processing node at969, the process proceeds to974in which the tuple engine at the PH node seeks to find a hash element for the key=tuplename. If, at974, a hash element has not been created for that tuple name at the PH node, then the process proceeds to976where the tuple engine at the node creates a new hash element for key=tuplename and the process proceeds to978,FIG. 11. Otherwise, at974, if the tuple engine locates the hash element having been created for that tuple name at the PH node, then the process proceeds to978. At978,FIG. 11, the tuple engine obtains a next local tuple pointer in the hash element, and makes a determination at980whether the next local tuple pointer points to a last element in a linked list-structure for storing tuple records. At980, when a last element in the corresponding linked list at that hash element is available, then the tuple engine stores tuple record at end of the list at the PH. Then, at984,FIG. 11, the PH node storing the sorted tuples generates a message of the created or new tuple to send to the NH node corresponding to the tuplename parameter in the CS Shuffle command.

In the CNS architecture, the natural home provides a central directory of where other local tuples are stored across the system for the given tuple name. Since there can be more than one tuple with same name and created at different preferred homes, the natural home ends up being the central reference point for these tuples. So a subsequent request that doesn't know where the tuples are actually stored come to the natural home computed from the tuplename and find the actual location of the tuple (actual home).

Thus, in an embodiment,FIG. 11depict operations for sorting the tuples first in preferred home. As these sorted tuples are eventually aggregated, the tuple's natural home is still the logical choice for the final reduction. Thus, inFIG. 12, there is performed a local reduction at the preferred home which then gets sent over to the natural home (i.e., computed from the tuple name —key). When the tuple records were created at preferred home—the CNS protocol creates a corresponding tuple record at the natural home too with a smaller set of information. Thus, the aggregation messages from the preferred home are being sent to this record present in the natural home. The tuple engine at the natural home then collects all these aggregation counters and comes up with a final tally according to the aggregation function type.

FIG. 12depicts an embodiment of a map reduce reduction process1000running on the CNS hardware controller at a NH node for that tuplename in an embodiment when sorting occurs first at the tuple's PH node(s) and a multi-stage aggregating process is then performed at the tuple's NH node. In an example embodiment, as shown inFIG. 12, at1002, a controller process running at a node issues a CSReduce (tuplename, aggregation function) command and in response, at1012, computes a NH based on the hash of the tuple name. The process proceeds to1016where a determination is made as to whether the current node=NH. If, at1016, it is determined that the current node is not the NH for that tuplename, then the process proceeds to step1019where the messaging unit at the controller forwards the tuple packet to the natural home node.

Step1014,FIG. 12depicts a step of receiving an incoming CSReduce( ) request message for an aggregate value associated with tuple message forwarded from another actual or PH processing node with the tuple message based on the tuplename. In an embodiment, as a user does not know which preferred nodes have been selected for sorting, it now has to send the request first to the natural home.

Thus, in an embodiment, if the current node is the natural home for the generated tuple at that node as determined at1016, or if the current node is a NH configured to receive the tuple message received from another processing node at1014, the process proceeds to1020in which the tuple engine at the node seeks to find a hash element for the key=tuplename. If no hashelement exists at the NH, then at1022,FIG. 12, the tuple engine creates a new hash element for the key (tuplename) and creates a pending record for storage at that hash element. Then, the process proceeds to1024, where the tuple engine traverses the linked list structure and obtains or reads the actual or PH homes for tuple records. In this embodiment, step1024ofFIG. 12represents the tuple engine traversing or scanning the linked list structure to read the actual home node for multiple actual home tuple records in the natural home. That is, the natural home can always be queried as it stores the actual home of the tuples (not preferred homes). Thus, via processing steps1016,1020,1024, the NH knows which node was the actual home (AH) or preferred home for that particular tuple name (key). In one embodiment, at1024,FIG. 12, there can be multiple tuple records stored at the same actual home or preferred. In response, at1025, the messaging unit at the CNS controller at the node forwards one CSReduce( ) request (e.g., for an aggregation value) to each unique actual home node storing tuple records according to the tuple name.

Returning to step1014,FIG. 12, as a request message for an aggregate value can be forwarded to preferred home through network, it is shown arriving at the node at1030,FIG. 12. In response to receiving the incoming message requesting an aggregate value associated with an aggregation function forwarded from the natural home, a local reduction is then performed the PH, and the requested information is sent back to the natural home. Thus, at1030, given that the current node is the actual home, in an embodiment, at1032, the tuple engine at the actual node seeks to find a hash element for the key=tuplename. Then, at1035, the tuple engine traverses the linked list structure and obtains or reads the aggregation value (based on the aggregation function type). Then, at1037, the CNS controller messaging unit sends the aggregate value to the natural home associated with the tuple name as part of the multi-stage aggregating process.

FIG. 12, step1040depicts the receiving an aggregation incoming message(s), e.g., received from an actual or preferred home, e.g., based on a message(s) sent from an actual node at1037. That is, in the case that multiple actual home tuple records are found in the natural home at step1024, multiple aggregation incoming messages are received at1040from those the actual homes. Then, at1043, for each aggregation incoming message received at1040, upon determining that the current node=Natural home, the process proceeds to1046where the tuple engine finds a hash element for the key (tuplename), adds/increments a count value to the tuple aggregation register395in the tuple engine, which data value gets immediately loaded to the 64 bit accumulation memory location519in the hash element inFIG. 6). Then, at1049, a final aggregation message is sent to the requesting node. At1050,FIG. 12, as the current node is also the requesting node, the process proceeds to1052where the messaging unit sends the aggregate value to the completion queue associated with the local running process via the software. Then, at1055, the local process monitors the completion queue storing the result aggregated value.

In the embodiment depicted inFIG. 12, it is the case that tuples for a same key were sorted in multiple preferred homes as shown depicted in the example ofFIG. 8C. Thus, as part of a “second stage” of an accumulation process multiple aggregation messages are received at1040from different preferred nodes, and they get collected into one final tally at the natural home of the tuple name at1052inFIG. 12. This information is sent back to the requesting node/user at1052.

In an embodiment, the map reduce flows depicted inFIGS. 11 and 12can be directed to sorting and reducing operations processing at a single preferred home (node). Thus, as step1024ofFIG. 12represents the tuple engine traversing the linked list structure to read the actual home for tuple records, it is the case that there is found multiple actual home records in the natural home. However, in a further embodiment, there is just one preferred home. Thus, only one (1) message will be transmitted out at step1037. Similarly, in this embodiment where sorting and reduction occur at a single preferred home, only one (1) aggregation incoming message would be received at step1040,FIG. 12from the preferred home.

FIG. 13depicts an embodiment of a map reduce sorting process1100running on the hardware controller at a NH node of the multi-node computing environment that includes aggregating during the sorting. In an example embodiment, as shown inFIG. 13, at1102, a controller process running at a given node703generates data which is stored locally at the node. As indicated, a mapping function1103is applied to the data702to generate a corresponding tuple710. As shown at1108, the local process at the sorting node issues a CSShuffle(tuplename, value, aggregation function) command, where the “aggregation function” is a type corresponding to the desired aggregate value for the reducing, e.g., a maximum value, a total value, a count, a minimum value, an average value, a mean value, etc. The shuffle command is a sorting function that places the tuple(tuplename, value) pair at a node associated with the tuplename. Then, at1110the tuple engine computes a NH based on the tuple name parameter. The process proceeds to1118where a determination is made as to whether the current node=NH. If, at1118, it is determined that the current node is not the NH for that tuplename, then the process proceeds to step1120where the messaging unit at the controller forwards the message packet to the natural home node.

Step1114depicts a step of receiving an incoming tuple message forwarded from another processing node with the tuple message based on the tuplename. Thus, if the current node is the natural home for the generated tuple at that node as determined at1110, or if the current node is a NH configured to receive the tuple message received from another processing node at1114, the process proceeds to1123in which the tuple engine at the node seeks to find a hash element for the key=tuplename.

If, at1123, a hash element has not been created for that tuple name at the current node, then the process proceeds to1125where the tuple engine at the natural node creates a new hash element for key=tuplename and the process proceeds to1126,FIG. 13. Otherwise, at1123, if the tuple engine locates the hash element having been created for that tuple name at the NH node, then the process proceeds to1126where the value stored in the hashelement is aggregated. Further, at1126, there is obtained by the tuple engine a next local tuple pointer in the hash element. When the next local tuple pointer points to the last element in the linked list, then the tuple record is stored at this pointed to hash element storage location as indicated at1129,FIG. 13.

FIG. 14depicts an embodiment of a map reduce reduction process1200running on the CNS hardware controller at a NH node for that tuplename. In an example embodiment, as shown inFIG. 14, at1203, a controller process running at the NH node issues a CSReduce (tuplename, aggregation function) command, and in response, at1205, computing a NH based on the tuple name. The process proceeds to1218where a determination is made as to whether the current node=NH. If, at1218, it is determined that the current node is not the NH for that tuplename, then the process proceeds to step1210where the messaging unit at the controller forwards the tuple packet to the natural home node.

Step1208,FIG. 14depicts a step of receiving an incoming request message for an aggregate value associated with tuple message forwarded from another processing node with the tuple message based on the tuplename. Thus, in an embodiment, if the current node is the natural home for the generated tuple at that node as determined at1218, or if the current node is a NH configured to receive the tuple message received from another processing node at1208, the process proceeds to1220in which the tuple engine at the node seeks to find a hash element for the key=tuplename. Then, at1225, the tuple engine traverses the linked list structure and obtains or reads from the hash element, the aggregation value (based on the aggregation function type).

Upon obtaining the aggregation value, the process proceeds to1228,FIG. 14where a determination is made as to whether the current node is the requesting node, i.e., the node that issues the request for reduced aggregate function value. If at1228, it is determined that the current node storing the tuple records for that tuplename is not the node requesting for the aggregate function value, then the process proceeds to1232where the messaging unit at the CNS controller at the node sends the aggregate value to the requesting node. Thus, as a request queue and completion queue for a particular user process would be on this requesting node, the completion messages have to be routed back to this node.

Step1230depicts a further step of receiving a completion incoming tuple message generated from an actual home node (e.g., another processing node) with the tuple message including the aggregate function value determined for that tuplename. Thus, if the current node is the requesting node for the aggregate (map reduce) value for the tuplename as determined at1228, or if the current node receives the incoming message including the aggregate value in a tuple message received from another processing node at1230, the process proceeds to1235in which the messaging unit at the CNS controller of the node sends the aggregate value (based on the aggregate function) to the completion queue via software. Then, at1238, the local user process monitors the completion queue storing the result aggregated value.

In embodiments herein, if it desired to back reference to the data, a pointer to the data is stored in the local tuple record. The local tuple record has a field that points to where the data could be present.

As in the embodiments depicted inFIGS. 13 and 14implementing aggregation during shuffle; the reduction needs to match this same aggregation function. If however reduce needs a different aggregation function—it has to traverse the whole list like in the embodiments ofFIGS. 9-12.