A memory expansion method and related devices

By generating memory topology and dynamically adjusting memory pool load allocation, the problem of insufficient memory in traditional memory pooling solutions is solved, achieving efficient memory resource allocation and data exchange, and improving cluster operation efficiency.

CN118963987BActive Publication Date: 2026-03-13HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-20
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Traditional memory pooling solutions cannot effectively determine the number of network devices and memory capacity required after partitioning, resulting in insufficient network device memory, long cluster job waiting times, and low efficiency.

Method used

By generating a memory topology, the business load distribution between memory pools is dynamically adjusted, a second memory pool is established to allocate memory resources reasonably, and different media attributes such as high-performance memory segments and low-performance memory segments are used to achieve reasonable division and unified addressing of global memory space. Asynchronous or synchronous writing is supported, and data exchange is carried out using RDMA and DSA protocols.

Benefits of technology

It reduces the waiting time of cluster jobs, improves job efficiency, enhances the efficiency of data exchange and sharing, and optimizes the allocation of global memory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118963987B_ABST
    Figure CN118963987B_ABST
Patent Text Reader

Abstract

This application discloses a memory expansion method and related equipment. A first network device can generate a memory topology based on the memory requirements of the target application and the memory resource usage in a first memory pool. Then, based on the memory topology, a second memory pool is established within the first memory pool. The second memory pool indicates the memory resources that the target application is allowed to use. In this way, the first network device can rationally allocate memory to the target application based on the memory requirements and resource usage in the first memory pool, dynamically adjusting the load distribution among the memory pools. This results in a reasonable distribution of the load across the memory pools, reducing the waiting time for cluster jobs and improving job efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The original application has the application number 202110821704.5 and the original application date is July 20, 2021. The entire contents of the original application are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communications, and more particularly to a memory expansion method and related devices. Background Technology

[0003] Currently, computing power pooling and storage pooling are widely used as key infrastructure technologies. To improve application performance, memory pooling is gaining attention in the industry. In traditional memory pooling solutions, the approach typically starts at the architecture level. When network devices determine that local memory is insufficient or data sharing and exchange are necessary, they can access remote memory to achieve global memory sharing and pooling.

[0004] Traditional pooling schemes achieve remote memory sharing and pooling at the system architecture level. Essentially, they extend the local memory of network devices, providing efficient and transparent global memory pool services for network devices running standalone applications. However, for multiple network devices running non-standalone applications, traditional pooling schemes cannot effectively determine the number of network devices and memory capacity required after partitioning (SWAP). This often results in network devices receiving insufficient memory to support job computation, leading to long cluster job waiting times and low job efficiency. Summary of the Invention

[0005] This application provides a memory expansion method, network device, and communication system that can dynamically adjust the service load distribution among memory pools, thereby rationally distributing the service load among memory pools, reducing the waiting time of cluster jobs, and improving job efficiency.

[0006] The first aspect of this application provides a memory expansion method, the method comprising: a first network device generating a memory topology based on memory requirement information of a target application and the usage of memory resources in a first memory pool, wherein the first memory pool is a logical memory composed of memory resources provided by multiple network devices, and the memory topology is used to indicate the capacity of different types of memory resources in one or more network devices that the target application needs to occupy; the first network device establishing a second memory pool within the first memory pool according to the memory topology, wherein the second memory pool is used to indicate the memory resources that the target application is allowed to use.

[0007] In this application, the first network device can generate a memory topology based on the memory requirements of the target application and the memory resource usage in the first memory pool. Then, based on the memory topology, a second memory pool is established within the first memory pool. The second memory pool indicates the memory resources that the target application is allowed to use. In this way, the first network device can rationally allocate memory to the target application based on the memory requirements and resource usage in the first memory pool, dynamically adjusting the load distribution among the memory pools. This results in a reasonable distribution of the load across the memory pools, reducing cluster job waiting time and improving job efficiency.

[0008] In one possible implementation of the first aspect, the first network device establishes a second memory pool within the first memory pool according to the memory topology, comprising: the first network device identifying memory resources in the first memory pool that match the memory topology according to the memory topology; and the first network device establishing the second memory pool according to the memory resources that match the memory topology.

[0009] In this method, when the management node creates the second memory pool, each selected first compute node contributes a portion of its memory resources (generalized memory resources, which can include various media such as HBM, DDR, PCM, and SSD) based on the memory topology information. The management node organizes all the memory resources contributed by each first compute node into a global memory space (the second memory pool). Within a single first compute node, the management node can organize the different media on that first compute node into a multi-level memory structure, which becomes part of the global memory space. This possible implementation provides a concrete way to establish a second memory pool, improving the feasibility of the solution.

[0010] In one possible implementation of the first aspect, the memory topology includes the number of network devices, the types of memory resources, and the capacity of the memory resources.

[0011] This possible implementation provides a concrete way to implement a memory topology, improving the feasibility of the solution.

[0012] In one possible implementation of the first aspect, the second memory pool includes high-performance memory segments, low-performance memory segments, persistent segments, and / or non-persistent segments.

[0013] In this possible implementation, the management node can divide the global memory space into different memory segments based on the different media attributes contained in the memory pool, such as performance differences and whether it has persistence capabilities. These segments can include high-performance memory segments, persistent memory segments, and non-persistent memory segments. Subsequent writes to addresses within these segments will be written to the corresponding media in a synchronous or asynchronous manner. In this possible implementation, the management node can differentiate and store different data based on factors such as usage frequency and storage duration, enabling the primary network device to complete its tasks more efficiently.

[0014] In one possible implementation of the first aspect, the method further includes: the first network device receiving data request information sent by a second network device, the second network device running the target application, the data request information being used to request target data; the first network device sending target address information to the second network device according to the data request information, the target address information including the address of a memory resource in a second memory pool storing the target data, the target address information being used to instruct the second network device to obtain the target data from the second memory pool through memory semantics.

[0015] In this possible implementation, multiple secondary compute nodes run different processes of the target application, and the management node uses a unified addressing method to manage the memory resources in the secondary memory pool. Secondary compute nodes running different processes can exchange or share data within the secondary memory pool using memory semantics. Secondary compute nodes can also exchange data with other secondary compute nodes within the secondary memory pool using memory semantics, avoiding cumbersome communication processes and significantly improving the efficiency of data exchange and sharing.

[0016] In one possible implementation of the first aspect, the method further includes: the first network device generating the memory requirement information based on relevant information of the target application, wherein the relevant information of the target application includes the type of the target application, the memory expansion coefficient of the target application, the access characteristics of the target application and / or the amount of input data of the target application, and the memory requirement information includes the computing power, absolute memory usage, memory hierarchical configuration and / or node affinity configuration of the target application.

[0017] In this possible implementation, the management node may include an in-memory computing unit. When the target application on the second computing node starts, the management node can use the in-memory computing unit to assess the target application's memory requirements based on relevant information about the target application. The in-memory computing unit is application-aware, and its information about the target application can be obtained through various methods such as program integration, user input, or self-learning. After obtaining the relevant information about the target application, the in-memory computing unit can calculate the required memory amount, memory grading recommendations, and node affinity recommendations based on the application type, the amount of input data, the application's memory expansion coefficient, and the application's memory access characteristics such as hot / cold data distribution and inter-node data exchange volume.

[0018] In one possible implementation of the first aspect, the method further includes: the first network device establishing the first memory pool using a globally unified memory addressing method.

[0019] In one possible implementation of the first aspect, the memory semantics include Remote Direct Memory Access (RDMA) and / or Data Streaming Assessment (DSA).

[0020] In one possible implementation of the first aspect, the memory resources include high-bandwidth memory (HBM), double-data-rate synchronous dynamic random access memory (DDR), phase-change memory (PCM), and / or solid-state memory (SSD).

[0021] A second aspect of this application provides a data acquisition method, comprising: a first network device sending data request information to a second network device, wherein a target application is running on the first network device, and the data request information is used to request target data; the first network device receiving target address information sent by the second network device, wherein the target address information includes the address of a memory resource in a second memory pool that stores the target data; and the first network device acquiring the target data from the first memory pool according to the target address information through memory semantics, wherein the first memory pool is used to indicate the memory resources that the target application is allowed to use.

[0022] In this application, multiple first network devices run different processes of the target application, and the management node uses a unified addressing method to manage the memory resources in the first memory pool. First network devices running different processes can exchange or share data within the first memory pool using memory semantics. First network devices can exchange data with other first network devices within the first memory pool using memory semantics, avoiding cumbersome communication processes and greatly improving the efficiency of data exchange and sharing.

[0023] In one possible implementation of the second aspect, the memory semantics include remote RDMA and / or DSA.

[0024] A third aspect of this application provides a network device including at least one processor, a memory, and a communication interface. The processor is coupled to the memory and the communication interface. The memory stores instructions, the processor executes the instructions, and the communication interface communicates with other network devices under the control of the processor. When executed by the processor, the instructions cause the network device to perform the methods of the first aspect or any possible implementation thereof, or cause the network device to perform the methods of the second aspect or any possible implementation thereof.

[0025] A fourth aspect of this application provides a computer-readable storage medium storing a program that causes the network device to perform the method of the first aspect or any possible implementation thereof, or causes the network device to perform the method of the second aspect or any possible implementation thereof.

[0026] The fifth aspect of this application provides a computer program product storing one or more computer-executable instructions, wherein when the computer-executable instructions are executed by the processor, the processor executes the method of the first aspect or any possible implementation thereof, or the processor executes the method of the second aspect or any possible implementation thereof.

[0027] The sixth aspect of this application provides a chip including a processor and a communication interface, wherein the processor is coupled to the communication interface, and the processor is configured to read instructions to execute the method of the first aspect or any possible implementation thereof, or to execute the method of the second aspect or any possible implementation thereof.

[0028] The seventh aspect of this application discloses a memory expansion system, which includes the network device described in the first aspect or any possible implementation thereof, as well as the network device described in the second aspect or any possible implementation thereof.

[0029] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0030] In this application, the first network device can generate a memory topology based on the memory requirements of the target application and the memory resource usage in the first memory pool. Then, based on the memory topology, a second memory pool is established within the first memory pool. The second memory pool indicates the memory resources that the target application is allowed to use. In this way, the first network device can rationally allocate memory to the target application based on the memory requirements and resource usage in the first memory pool, dynamically adjusting the load distribution among the memory pools. This results in a reasonable distribution of the load across the memory pools, reducing cluster job waiting time and improving job efficiency. Attached Figure Description

[0031] Figure 1 This is a schematic diagram illustrating the application scenario of the memory expansion system provided in this application;

[0032] Figure 2 This is a schematic diagram illustrating an application of the memory expansion method provided in this application;

[0033] Figure 3 A schematic diagram of a memory topology provided in this application;

[0034] Figure 4 This is a schematic diagram illustrating another application of the memory expansion method provided in this application;

[0035] Figure 5 This is a schematic diagram illustrating another application of the memory expansion method provided in this application;

[0036] Figure 6 A schematic diagram illustrating memory requirement information provided in this application;

[0037] Figure 7 A schematic diagram of the structure of a network device provided in this application;

[0038] Figure 8 Another structural schematic diagram of a network device provided in this application;

[0039] Figure 9 This is a schematic diagram of another structure of a network device provided in this application. Detailed Implementation

[0040] The embodiments of this application will now be described with reference to the accompanying drawings. As those skilled in the art will recognize, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0041] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein.

[0042] In this application, "and / or" is merely a descriptive term for the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0043] Currently, computing power pooling and storage pooling are widely used as key infrastructure technologies. To improve application performance, memory pooling is gaining attention in the industry. In traditional memory pooling solutions, the approach typically starts at the architecture level. When network devices determine that local memory is insufficient or data sharing and exchange are necessary, they can access remote memory to achieve global memory sharing and pooling.

[0044] Traditional pooling schemes achieve remote memory sharing and pooling at the system architecture level. Essentially, they extend the local memory of network devices, providing efficient and transparent global memory pool services for network devices with integrated single-machine applications. However, for multiple network devices with integrated applications, traditional pooling schemes, by extending the memory capacity of the local node from an architectural perspective, cannot perceive the memory requirements of the applications, nor can they perceive the memory capacity of the target remote devices. This limitation becomes even more pronounced for dynamic, large-scale distributed applications.

[0045] In the traditional pooling schemes mentioned above, since it is impossible to effectively determine the number of network devices and the memory capacity occupied after partitioning, network devices often have insufficient memory to support job computation, resulting in long cluster job waiting times and low cluster job efficiency.

[0046] In response to the traditional pooling schemes described in the above method examples, this application provides a memory expansion method, a memory expansion system, and a network device, which can reduce the waiting time of cluster jobs and improve the efficiency of cluster jobs.

[0047] The following method example first illustrates the memory expansion system provided in this application.

[0048] Figure 1 This is a schematic diagram illustrating the application scenario of the memory expansion system provided in this application.

[0049] Please see Figure 1 The memory expansion system provided in this application includes: a management node 101, a first computing node 102, and a second computing node 103. In the memory expansion system provided in this application, the management node 101 corresponds to the first network device mentioned in claims 1 to 9 above, the first computing node 102 corresponds to the network device mentioned in claims 1 to 9 above, and the second computing node runs the target application mentioned above, corresponding to the second network device mentioned in claims 5 to 9.

[0050] Optionally, the memory expansion system may include one or more second computing nodes 103, and multiple second computing nodes 103 may constitute a second computing node cluster. Figure 1 Only one second computing node 103 is shown in the figure. The memory expansion system provided in this application may include more second computing nodes 103, which is not limited here.

[0051] In this application, the second computing node 103 is a user-side computing device, such as a server or desktop computer. At the hardware level, the second computing node 103 is equipped with a processor and memory. Figure 1 (Not shown in the image). At the software level, an application runs on the second compute node 103. An application is a general term for various applications presented to the user. For example, the type of application can be a distributed application or other types of applications; no specific limitation is made here. A memory enable plugin and a memory programming kit run on the second compute node. The application communicates with the management node and the first compute node 102 through the memory enable plugin and the memory programming kit.

[0052] In this application, the memory expansion system may include one or more first computing nodes 101, and multiple first computing nodes 101 may constitute a first computing node cluster, and the first computing nodes 101 may be interconnected. The first computing node 101 may be a server, a desktop computer, or a controller, hard disk enclosure, etc. of a storage array.

[0053] Functionally, the first computing node 102 is primarily used for data computation or processing. In terms of hardware, the first computing node 102 includes at least a processor, memory, and a control unit. The processor is a central processing unit (CPU), used to process data from outside the first computing node or data generated internally within the first computing node 102. Memory refers to a device used to store data; it can be RAM or a hard disk. RAM is internal memory that directly exchanges data with the processor; it can read and write data at any time and is very fast, serving as temporary data storage for the operating system or other running programs. Memory includes at least two types of memory; for example, RAM can be random access memory or read-only memory (ROM). For instance, random access memory can be dynamic random access memory (DRAM) or storage class memory (SCM). DRAM is a semiconductor memory, and like most random access memory (RAM), it is a type of volatile memory device. SCM is a hybrid storage technology that combines the characteristics of traditional storage devices and memory. Storage-class memory can provide faster read and write speeds than hard drives, but its access speed is slower than DRAM, and it is also cheaper than DRAM.

[0054] In this application, management node 101 is typically used to create and manage memory pools. Management node 101 can communicate with any of the first compute nodes 102. Optionally, management node 101 can be the same device as one of the first compute nodes 102, and a node can be elected from the first compute nodes 102 to assume the function of management node. Management node 101 is thus a device within the storage cluster. Optionally, management node 101 can be a separate device independent of the first compute nodes 102; this is not specifically limited here. At the software level, management node 101 includes a distributed scheduler and a memory pooling suite. The distributed scheduler can allocate memory to the second compute nodes, and the memory pooling suite can construct the memory pool and manage the memory resources within it. Optionally, management node 101 may also include a memory computing unit, which calculates the amount of memory required by the second compute node 103 to run the target application.

[0055] The above example illustrates the structure of the memory expansion system provided in this application. The following example will refer to the memory expansion system described above, taking the first network device as the management node, the network device as the first computing node, and the target application running on the second computing node (the second network device) as an example to explain in detail the memory expansion method provided in this application.

[0056] Figure 2 This is a schematic diagram illustrating an application of a memory expansion method provided in this application.

[0057] Please see Figure 2 ,like Figure 2 As shown, the memory expansion method provided in this application includes at least steps 201 to 202.

[0058] 201. The first network device generates a memory topology based on the memory requirements of the target application and the usage of memory resources in the first memory pool.

[0059] In this application, the first memory pool is the logical memory constituted by the memory resources provided by multiple network devices. That is, the first memory pool is the logical memory established by the management node on multiple first computing nodes. For example, using... Figure 1 For example, Figure 1 The memory pools established on the five first computing nodes can be understood as the first memory pool.

[0060] In this application, memory topology is used to indicate the capacity of different types of memory resources in one or more network devices that the target application needs to occupy. Optionally, memory topology may include the number of network devices, the types of memory resources, and the capacity of memory resources. Other parameters may also be included in memory topology, which are not limited here.

[0061] Figure 3 This is a schematic diagram of a memory topology provided in this application.

[0062] For example, suppose the management node receives memory requirement information of the target application running on the second compute node, and generates an optimal memory topology for the application based on multi-dimensional metrics such as resource usage in the first memory pool. A typical memory topology includes information such as... Figure 3 As shown, Figure 3 The memory topology in the diagram indicates that the second compute node requires memory resources from three nodes: Node 1 needs 200GB of DDR memory, 500GB of PCM memory, and 1TB of SSD memory. Similarly, Node 2 needs 250GB of DDR memory, 800GB of PCM memory, and 500GB of SSD memory. Node 3 needs 5GB of DDR memory, 500GB of PCM memory, and 800GB of SSD memory.

[0063] In this application, the scheduler in the management node can allocate computing power and memory to the second computing node in the first memory pool according to the memory demand information and the memory resource usage in the first memory pool, following the scheduling strategy. Unlike traditional schedulers, the scheduler in this application considers the rational use of memory when allocating resources. For example, it ensures the rational use of memory at each level in each first computing node. After satisfying other high-priority strategies, it tries to use the Max-min scheduling method to ensure that the second computing node with a large memory capacity demand is allocated memory resources as early as possible, thereby avoiding memory fragmentation.

[0064] For example, let's illustrate the construction process of a memory topology using a Spark cluster. Assume that multiple secondary compute nodes form a Spark cluster in a big data environment. The cluster incorporates Spark's in-memory shuffle plugin, enabling data computation in memory and data exchange across nodes. After obtaining the memory requirements of each secondary compute node, the management node can allocate memory topology to the secondary compute nodes using the intelligent scheduler Yarn or a third-party scheduler based on the Max-Min scheduling algorithm.

[0065] 202. The first network device establishes a second memory pool within the first memory pool according to the memory topology.

[0066] In this application, the second memory pool is used to indicate the memory resources that the target application is allowed to use. Optionally, the memory resources in the second memory pool can be used to assist in running the target application when the network device's local memory resources are insufficient, when the network device needs to exchange data with other network devices, when the network device shares data with other network devices, and in many other situations.

[0067] Optionally, the second memory pool may include high-performance memory segments, low-performance memory segments, persistent segments, and / or non-persistent segments.

[0068] In this application, the management node can divide the global memory space into different memory segments based on different media attributes contained in the memory pool, such as performance differences and whether it has persistence capabilities. These segments include high-performance memory segments, persistent memory segments, and non-persistent memory segments. Subsequent writes to addresses within these segments will be written to the corresponding media in a synchronous or asynchronous manner. In this possible implementation, the management node can differentiate and store different data based on factors such as usage frequency and storage duration, enabling the first network device to complete its tasks more efficiently.

[0069] Optionally, the first and second memory pools described in the above examples can be distributed memory pools (DML). A distributed memory pool refers to a logical memory pool that is physically distributed across various nodes via a high-speed network, and logically provides global access functionality. The first and second memory pools described in the above examples can also be other types of memory pools, which are not limited here.

[0070] In this application, the first network device can generate a memory topology based on the memory requirements of the target application and the memory resource usage in the first memory pool. Then, based on the memory topology, a second memory pool is established within the first memory pool. The second memory pool indicates the memory resources that the target application is allowed to use. In this way, the first network device can rationally allocate memory to the target application based on the memory requirements and resource usage in the first memory pool, dynamically adjusting the load distribution among the memory pools. This results in a reasonable distribution of the load across the memory pools, reducing cluster job waiting time and improving job efficiency.

[0071] The memory expansion method provided in this application, from a macro perspective and based on the core idea of ​​application-driven approaches, solves the problem of how to evenly allocate memory for applications within a cluster, the problem of applications not having enough memory to complete in-memory data processing, and the problems of low efficiency for data-intensive applications and low throughput for cluster jobs. By using application-driven global memory pooling, it improves application performance, further optimizes global memory allocation, and enhances the efficiency of cluster jobs.

[0072] In this application, steps 201 to 202 in the above method examples illustrate the memory expansion method provided by this application. In step 202 of the above method examples, the first network device establishes a second memory pool in the first memory pool according to the memory topology. This specific implementation method will be described in the following method examples.

[0073] Figure 4 This is a schematic diagram illustrating another application of the memory expansion method provided in this application.

[0074] 301. The first network device searches for memory resources that match the memory topology in the first memory pool according to the memory topology.

[0075] In this application, a Spark cluster is used as an example for illustration. For a single computing device, assuming that the memory topology indication for the target application running on that computing device requires 1.5T of memory, and if each first computing node can have 0.3T of memory for pooling, then the management node will find 5 nodes from the first memory pool to provide memory resources for the target application. This process is the process of finding memory resources that match the memory topology.

[0076] Optionally, memory resources may include HBM, DDR, phase-change memory (PCM), and other types of memory resources such as solid-state storage (SSD). No specific limitations are made here.

[0077] 302. The first network device establishes a second memory pool based on memory resources that match the memory topology.

[0078] In this application, after the management node finds a matching memory resource based on the application's memory topology information, the scheduler included in the management node can dynamically create a second memory pool by calling the memory pool suite.

[0079] In this application, when the management node creates the second memory pool, each first compute node selected according to the memory topology information will contribute a portion of the memory resources. Optionally, the portion of the memory resources contributed by the first compute node can be high-bandwidth memory (HBM), DDR, PCM, SSD, or other media, etc., and is not limited here.

[0080] The management node organizes all memory resources contributed by each primary compute node into a global memory space (second memory pool). Within a primary compute node, the management node can organize different media on that node into a multi-level memory structure, which becomes part of the global memory space. Furthermore, based on the different media attributes within the memory pool, such as performance differences and persistence capabilities, the management node can divide the global memory space into different memory segments, such as high-performance memory segments, persistent memory segments, and non-persistent memory segments. Subsequent writes to addresses in these segments will be written synchronously or asynchronously to the corresponding media.

[0081] For example, taking a Spark cluster as an example, suppose the management node finds five nodes in the first memory pool that match the memory topology. The management node can dynamically form these five nodes into a cluster using the scheduler, and use a memory pooling suite to pool the memory resources provided by these five nodes to obtain a second memory pool. After the data on the second compute nodes has been shuffled in the second memory pool and written to disk, these five nodes are quickly released to provide memory resources for other applications.

[0082] In this application, after the management node creates the second memory pool, all second memory pools are managed uniformly by the memory pool suite. The second memory pool has global unified memory addressing and access capabilities. The second memory pool provides a northbound interface, which can realize functions such as global memory allocation, read / write access, release, and cross-node memory access through protocols such as RDMA and iWARP.

[0083] In this application, the management node includes a memory pool suite that manages the second memory pool. This second memory pool contains various media, such as HBM, DRAM, PCM, and SSD mentioned above. Based on this second memory pool, upper-layer users can allocate memory according to certain rules, such as specifying attributes like performance level, persistence, or allocating memory on a specific node with a specified length. During allocation, the system will request memory space and update statistical information on the corresponding nodes according to the specified rules. After completing memory space allocation on all required nodes, the system will return a global ID to the upper-layer user. This ID contains management information for these addresses, such as the memory partition, unique index, performance, and persistence attributes.

[0084] In this application, during the memory allocation process, the management node can simultaneously allocate memory across multiple nodes and combine it into a memory space according to specified rules. Optionally, multiple addresses can be allocated across nodes and connected sequentially to form a linear memory space. Alternatively, the memory space can be organized according to replication rules or other methods. All of these memory spaces will return a global ID to the upper-layer user in the manner described in the previous paragraph.

[0085] In this application, when an upper-layer user finishes using a segment of global memory, the management node will release this memory space to the first memory pool and mark the space as available. Furthermore, the management node will notify all relevant compute nodes to release previously allocated memory space according to the actual distribution of the corresponding memory space and update capacity and other information.

[0086] In this application, when the management node runs the memory expansion method, in addition to performing steps 201 to 202 as described in the above example, optionally, the management node can also return target address information based on the data request information sent by the second network device. This process will be described in detail in the following example.

[0087] In this application, it is assumed that the second network device is Figure 1 The system shown includes multiple second-level compute nodes, each running different processes of the target application. The management node uses a unified addressing method to manage memory resources in the second memory pool. Second-level compute nodes running different processes can exchange or share data within the second memory pool using memory semantics.

[0088] Figure 5 This is a schematic diagram illustrating another application of the memory expansion method provided in this application.

[0089] 401. The first network device receives the data request information sent by the second network device.

[0090] For example, when process A running on the second compute node A completes its computation, the second compute node A can place the data A to be exchanged in the global memory pool (the second memory pool) and publish the globally uniformly addressed address to the KV server on the management node. If process B under the target application is running on compute node B, compute node B needs to use data A. Compute node B sends a data request message to the management node, indicating that compute node B needs to obtain data A.

[0091] 402. The first network device sends the target address information to the second network device based on the data request information.

[0092] For example, after compute node B sends a data request to the management node, the management node can send target address information to the compute node in various ways (e.g., through a KV server) based on the data request information. The target address information includes the address of the memory resource in the second memory pool that stores the target data.

[0093] 403. The second network device obtains the target data from the second memory pool based on the target address information and memory semantics.

[0094] For example, compute node B sends a data request to the management node. After the management node sends the target address information to the compute node through the KV server based on the data request, compute node B obtains the global unified address (target address information) of data A by accessing the KV server on the management node. Then, it can directly read data A from the global memory pool (second memory pool) through the RDMA protocol or the DSA (Data Streaming Assessment) protocol.

[0095] In this application, during traditional data interaction or data sharing, when data in large-scale data-intensive applications cannot complete the required calculations due to insufficient memory capacity, the system will swap the data to local storage media or remote devices. In the next stage of processing, the data needs to be read back from the storage media or remote devices and exchanged through socket communication to continue processing. This repeated I / O processing seriously affects the job completion time and the overall performance of the system.

[0096] For example, if a second computing node A and a second computing node B need to exchange or share data, such as exchanging data A, then the socket ports between the second computing node A and the second computing node B need to communicate with each other to exchange data A. This communication process includes a lengthy data serialization and deserialization process, as well as disk I / O operations between the second computing node A and the second computing node B. Traditional data exchange or data sharing processes are costly and time-consuming. However, in the data exchange or data sharing process between computing nodes provided in this application, the second computing node A and the second computing node B can exchange data A through memory semantics, avoiding the cumbersome communication process and greatly improving the efficiency of data exchange and data sharing.

[0097] Optionally, the memory semantics can be the RDMA protocol, the DSA protocol, or other types of protocols; no specific limitations are made here.

[0098] In this application, when the management node runs the memory expansion method, in addition to executing steps 201 to 202 as described in the above example, it can optionally generate memory requirement information based on the relevant information of the target application. The specific generation method will be described in the following example.

[0099] In this application, optionally, the relevant information of the target application may include the type of the target application, the amount of input data of the target application, the memory expansion coefficient of the target application and / or the access characteristics of the target application (such as hot and cold data distribution and node data exchange volume, etc.). The relevant information of the target application may also include other information, which is not limited here.

[0100] In this application, optionally, the memory requirement information of the target application represents some information related to the memory required by the target application. Optionally, the memory requirement information may include absolute memory usage, memory tier configuration and / or node affinity configuration, and may also include other parameters, which are not limited here.

[0101] Figure 6 This is a schematic diagram illustrating memory requirement information provided in this application.

[0102] Optionally, the management node may include a memory computing unit. When the target application on the second computing node starts, the management node can use the memory computing unit to assess the target application's memory requirements based on relevant information about the target application. The memory computing unit is application-aware, and its information about the target application can be obtained through various methods such as program integration, user input, or self-learning. After obtaining the relevant information about the target application, the memory computing unit can calculate the required memory for the target application, provide memory grading suggestions, and node affinity suggestions based on the application type, the amount of input data, the application's memory expansion coefficient, and the application's memory access characteristics such as hot / cold data distribution and inter-node data exchange volume. A typical application memory requirement is shown below. Figure 6 As shown, the management node can... Figure 6 The memory requirement information shown is used to generate the memory topology.

[0103] In this application, the management node can obtain memory requirement information in several ways. Optionally, the memory computing unit included on the management node can generate memory requirement information based on relevant information of the target application. Optionally, other nodes can generate memory requirement information based on relevant information of the target application and then send the memory requirement information to the management node. Optionally, the management node can also obtain memory requirement information through other methods, which are not limited here.

[0104] In this application, the above example illustrates the process by which the management node generates memory requirement information. When the management node runs the memory expansion method, in addition to performing the steps described in the above example, optionally, the management node may also establish a first memory pool. The specific establishment method will be described in the following example.

[0105] In this application, the memory in the first memory pool is organized using a global hybrid memory unified addressing method. The management node can use the memory pooling kit to uniformly manage different types of media (such as HBM, DDR, PCM, SSD). The management node can also use the memory pooling kit to uniformly address and access cross-node memory.

[0106] In this application, the first network device can generate a memory topology based on the memory requirements of the target application and the memory resource usage in the first memory pool. Then, based on the memory topology, a second memory pool is established within the first memory pool. The second memory pool indicates the memory resources that the target application is allowed to use. In this way, the first network device can rationally allocate memory to the target application based on the memory requirements and resource usage in the first memory pool, dynamically adjusting the load distribution among the memory pools. This results in a reasonable distribution of the load across the memory pools, reducing cluster job waiting time and improving job efficiency.

[0107] The above example provides a different implementation of a memory expansion method. Below is a network device 50, such as... Figure 7 As shown, the network device 50 is used to perform the steps executed by the first network device (management node) in the above example. For details on these steps and their corresponding beneficial effects, please refer to the corresponding examples above; they will not be repeated here. The network device 50 includes:

[0108] Processing unit 501 is used for:

[0109] A memory topology is generated based on the memory requirements of the target application and the usage of memory resources in the first memory pool. The first memory pool is a logical memory composed of memory resources provided by multiple network devices. The memory topology is used to indicate the capacity of different types of memory resources in one or more network devices that the target application needs to occupy.

[0110] A second memory pool is established within the first memory pool according to the memory topology. The second memory pool is used to indicate the memory resources that the target application is allowed to use.

[0111] In one possible implementation,

[0112] The processing unit 501 is used for:

[0113] Based on the memory topology, identify memory resources in the first memory pool that match the memory topology;

[0114] The second memory pool is established based on the memory resources that match the memory topology.

[0115] In one possible implementation,

[0116] The memory topology includes the number of network devices, the types of memory resources, and the capacity of the memory resources.

[0117] In one possible implementation,

[0118] The second memory pool includes high-performance memory segments, low-performance memory segments, persistent segments, and / or non-persistent segments.

[0119] In one possible implementation, the network device further includes a receiving unit 502.

[0120] The receiving unit 502 is further configured to receive data request information sent by a second network device, wherein the target application is running on the second network device, and the data request information is used to request target data;

[0121] The processing unit 501 is further configured to send target address information to the second network device according to the data request information. The target address information includes the address of the memory resource storing the target data in the second memory pool. The target address information is used to instruct the second network device to obtain the target data from the second memory pool through memory semantics.

[0122] In one possible implementation,

[0123] The processing unit 501 is further configured to generate the memory requirement information based on the relevant information of the target application. The relevant information of the target application includes the type of the target application, the memory expansion coefficient of the target application, the access characteristics of the target application, and / or the amount of input data of the target application. The memory requirement information includes the computing power, absolute memory usage, memory tier configuration, and / or node affinity configuration of the target application.

[0124] In one possible implementation,

[0125] The processing unit 501 is also used to establish the first memory pool using a global memory unified addressing method.

[0126] In one possible implementation, the memory semantics include Remote Direct Data Access (RDMA) and / or DSA.

[0127] In one possible implementation, the memory resources include high-bandwidth memory (HBM), double-speed synchronous dynamic random access memory (DDR), phase-change memory (PCM), and / or solid-state memory (SSD).

[0128] It should be noted that the information interaction and execution process between the modules of the network device 50 mentioned above are based on the same concept as the method example of this application, and the execution steps are consistent with the detailed content of the method steps mentioned above. Please refer to the description in the method example mentioned above.

[0129] The above example provides a network device 50. Below is a network device 60, such as... Figure 7As shown, the network device 60 is used to execute the steps performed by the second network device (second computing node) in the above example. For details on these execution steps and their corresponding beneficial effects, please refer to the corresponding examples above; they will not be repeated here. The network device 50 includes:

[0130] The sending unit 601 is used to send data request information to a second network device, wherein a target application is running on the first network device, and the data request information is used to request target data.

[0131] The receiving unit 602 is configured to receive target address information sent by the second network device, wherein the target address information includes the address of the memory resource storing the target data in the second memory pool;

[0132] Processing unit 603 is configured to obtain the target data from the first memory pool according to the target address information through memory semantics, wherein the first memory pool is used to indicate the memory resources that the target application is allowed to use.

[0133] In one possible implementation, the memory semantics include Remote Direct Data Access (RDMA) and / or DSA.

[0134] It should be noted that the information interaction and execution process between the modules of the network device 60 mentioned above are based on the same concept as the method example of this application, and the execution steps are consistent with the detailed content of the method steps mentioned above. Please refer to the description in the method example mentioned above.

[0135] See Figure 9 The diagram shown illustrates the structure of a network device 700 provided in this application. The network device 700 includes a processor 702, a communication interface 703, and a memory 701. Optionally, a bus 704 may be included. The communication interface 703, processor 702, and memory 701 can be interconnected via the bus 704. The bus 704 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 9 The symbol is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. This network device 700 can achieve... Figure 7 The function, or implementation, of network device 50 in the example shown Figure 8 The network device 60 has the following functions. The processor 702 and the communication interface 703 can perform the corresponding operations of the network device in the above method example.

[0136] The following is combined Figure 9 A detailed introduction to each component of a network device:

[0137] The memory 701 may be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, used to store program code, configuration files, or other content that can implement the method of this application.

[0138] The processor 702 is the control center of the controller. It can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the examples provided in this application, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).

[0139] The communication interface 703 is used for communication with other devices.

[0140] The processor 702 can perform the aforementioned... Figure 7 The operation performed by network device 50 in the example shown, or the operation described above. Figure 8 The operations performed by the network equipment 60 are not detailed here.

[0141] It should be noted that the information interaction and execution process between the modules of the network device 700 mentioned above are based on the same concept as the method example of this application, and the execution steps are consistent with the detailed content of the method steps mentioned above. Please refer to the description in the method example mentioned above.

[0142] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0143] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0144] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0145] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0146] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A memory expansion method, characterized in that, include: The first network device obtains the memory requirement information of the target application and the usage of memory resources in the first memory pool; The first network device generates a memory topology based on the memory requirements of the target application and the usage of memory resources in the first memory pool. The first memory pool is a logical memory composed of memory resources provided by multiple network devices. The memory topology is used to indicate the capacity of different types of memory resources in one or more network devices that the target application needs to occupy. The memory topology includes the number of network devices, the types of memory resources, and the capacity of the memory resources. The first network device establishes a second memory pool within the first memory pool according to the memory topology. The second memory pool is used to indicate the memory resources that the target application is allowed to use. The second memory pool is a global memory space, which is formed by uniformly addressing the memory resources and divided into different memory segments with different performance.

2. The memory expansion method according to claim 1, characterized in that, The first network device establishes a second memory pool within the first memory pool according to the memory topology, including: The first network device identifies memory resources in the first memory pool that match the memory topology based on the memory topology; The first network device establishes the second memory pool based on the memory resources that match the memory topology.

3. The memory expansion method according to claim 1 or 2, characterized in that, The second memory pool includes high-performance memory segments, low-performance memory segments, persistent segments, and / or non-persistent segments.

4. The memory expansion method according to claim 1 or 2, characterized in that, The method further includes: The first network device receives a data request information sent by the second network device, and the second network device runs the target application. The data request information is used to request target data. The first network device sends target address information to the second network device according to the data request information. The target address information includes the address of the memory resource in the second memory pool that stores the target data. The target address information is used to instruct the second network device to obtain the target data from the second memory pool through memory semantics.

5. The memory expansion method according to claim 1 or 2, characterized in that, The method further includes: The first network device generates the memory requirement information based on the relevant information of the target application. The relevant information of the target application includes the type of the target application, the memory expansion coefficient of the target application, the access characteristics of the target application and / or the amount of input data of the target application. The memory requirement information includes the computing power, absolute memory usage, memory tier configuration and / or node affinity configuration of the target application.

6. The memory expansion method according to claim 1 or 2, characterized in that, The method further includes: The first network device establishes the first memory pool using a globally unified memory addressing method.

7. The memory expansion method according to claim 4, characterized in that, The memory semantics include Remote Direct Data Access (RDMA) and / or DSA.

8. The memory expansion method according to claim 1 or 2, characterized in that, The memory resources include high-bandwidth memory (HBM), double-speed synchronous dynamic random access memory (DDR), phase-change memory (PCM), and / or solid-state memory (SSD).

9. A data acquisition method, characterized in that, include: A first network device running a target application sends a data request message to a second network device, the data request message being used to request target data related to the target application from the second network device; The first network device receives target address information sent by the second network device, the target address information including the address of the memory resource in the second memory pool that stores the target data; The first network device retrieves the target data from the second memory pool based on the target address information using memory semantics. The second memory pool is used to indicate the memory resources that the target application is allowed to use. The second memory pool is a global memory space, which is formed by uniformly addressing the memory resources and divided into different memory segments with different performance. The second memory pool is established within the first memory pool based on the memory topology. The memory topology is generated based on the memory requirements of the target application and the usage of memory resources in the first memory pool. The memory topology includes the number of network devices, the types of memory resources, and the capacity of the memory resources. The first memory pool is a logical memory composed of memory resources provided by multiple network devices. The memory topology is used to indicate the capacity of different types of memory resources in one or more network devices that the target application needs to occupy.

10. The data acquisition method according to claim 9, characterized in that, The memory semantics include Remote Direct Data Access (RDMA) and / or DSA.

11. A network device, characterized in that, include: The processing unit is used for: The system obtains the memory requirements of the target application and the usage of memory resources in the first memory pool. Based on the memory requirements of the target application and the usage of memory resources in the first memory pool, a memory topology is generated. The first memory pool is a logical memory composed of memory resources provided by multiple network devices. The memory topology is used to indicate the capacity of different types of memory resources in one or more network devices that the target application needs to occupy. The memory topology includes the number of network devices, the types of memory resources, and the capacity of the memory resources. According to the memory topology, a second memory pool is established within the first memory pool. The second memory pool is used to indicate the memory resources that the target application is allowed to use. The second memory pool is a global memory space, which is formed by uniformly addressing the memory resources and divided into different memory segments with different performance.

12. The network device according to claim 11, characterized in that, The processing unit is used for: Based on the memory topology, identify memory resources in the first memory pool that match the memory topology; The second memory pool is established based on the memory resources that match the memory topology.

13. The network device according to any one of claims 11 to 12, characterized in that, The second memory pool includes high-performance memory segments, low-performance memory segments, persistent segments, and / or non-persistent segments.

14. The network device according to claim 11 or 12, characterized in that, The receiving unit is further configured to receive data request information sent by a second network device, wherein the target application is running on the second network device, and the data request information is used to request target data; The processing unit is further configured to send target address information to the second network device according to the data request information. The target address information includes the address of the memory resource in the second memory pool that stores the target data. The target address information is used to instruct the second network device to obtain the target data from the second memory pool through memory semantics.

15. The network device according to claim 11 or 12, characterized in that, The processing unit is further configured to generate the memory requirement information based on the relevant information of the target application. The relevant information of the target application includes the type of the target application, the memory expansion coefficient of the target application, the access characteristics of the target application, and / or the amount of input data of the target application. The memory requirement information includes the computing power, absolute memory usage, memory tier configuration, and / or node affinity configuration of the target application.

16. The network device according to claim 11 or 12, characterized in that, The processing unit is also used to establish the first memory pool using a globally unified memory addressing method.

17. The network device according to claim 14, characterized in that, The memory semantics include Remote Direct Data Access (RDMA) and / or DSA.

18. The network device according to claim 11 or 12, characterized in that, The memory resources include high-bandwidth memory (HBM), double-speed synchronous dynamic random access memory (DDR), phase-change memory (PCM), and / or solid-state memory (SSD).

19. A network device, characterized in that, include: The sending unit is used to send data request information to the second network device, wherein the data request information is used to request target data of the target application running on the first network device from the second network device; A receiving unit is configured to receive target address information sent by the second network device, wherein the target address information includes the address of the memory resource in the second memory pool that stores the target data; The processing unit is configured to retrieve the target data from the second memory pool based on the target address information and memory semantics. The second memory pool is used to indicate the memory resources that the target application is allowed to use. The second memory pool is a global memory space, which is formed by uniformly addressing the memory resources and divided into different memory segments with different performance. The second memory pool is established within the first memory pool based on the memory topology. The memory topology is generated based on the memory requirement information of the target application and the usage of memory resources in the first memory pool. The memory topology includes the number of network devices, the types of memory resources, and the capacity of the memory resources. The first memory pool is a logical memory composed of memory resources provided by multiple network devices. The memory topology is used to indicate the capacity of different types of memory resources in one or more network devices that the target application needs to occupy.

20. The network device according to claim 19, characterized in that, The memory semantics include Remote Direct Data Access (RDMA) and / or DSA.

21. A network device, characterized in that, include: Processor, memory, and communication interface; The processor is connected to the memory and the communication interface; The communication interface is used to communicate with other devices; The processor is configured to read instructions stored in the memory and cause the network device to execute the method as described in any one of claims 1 to 8, or to cause the network device to execute the method as described in claim 9 or 10.

22. A computer storage medium, characterized in that, The computer storage medium stores instructions that, when executed on the computer, cause the computer to perform the method as described in any one of claims 1 to 8, or cause the computer to perform the method as described in claim 9 or 10.

23. A memory expansion system, comprising a first network device and a second network device included in the memory expansion method of any one of claims 1 to 8, or comprising a first network device and a second network device included in the memory expansion method of claim 9 or 10.

Citation Information

Patent Citations

  • Data transmission method and device

    CN105867843A

  • Quota management method and device for cloud platform resources and computer equipment

    CN111338786A