Memory expansion method and related equipment
By generating memory topology and establishing a second memory pool, and dynamically adjusting memory resource allocation, the problem of insufficient memory in traditional memory pooling solutions is solved, and the efficiency and waiting time of cluster jobs are improved.
Patent Information
- Application Number
- CN202410895800.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2021-04-08
- Filing Date
- 2021-07-20
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-07-20
AI Technical Summary
Traditional memory pooling schemes cannot effectively determine the number and memory capacity of network devices after partitioning, resulting in insufficient memory obtained by network devices, resulting in long waiting time for cluster operations and inefficient efficiency.
By generating memory topology, dynamically adjusting the business load allocation between each memory pool, establishing a second memory pool to reasonably allocate memory resources, ensuring that the target application obtains sufficient memory resources, reducing the waiting time of cluster jobs and improving efficiency.
It realizes the reasonable distribution of business loads of each memory pool, reduces the waiting time of cluster jobs, improves job efficiency, and solves the problem of insufficient memory in traditional solutions.
Smart Images

Figure CN118963987A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202110821704.5, and the original application date is July 20, 2021. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The embodiments of the present application relate to the field of communications, and in particular to a memory expansion method and related devices. Background Art
[0003] At present, computing power pooling and storage pooling have become quite popular as the main infrastructure-level technologies. In order to improve the performance of applications, memory pooling has begun to attract attention from the industry. In traditional memory pooling solutions, usually starting from the architecture level, network devices use various means to confirm that local memory is insufficient or data sharing and exchange is required. In this case, network devices can access remote memory, thereby realizing global memory sharing and pooling.
[0004] Traditional pooling solutions achieve remote memory sharing and pooling from the system structure level. Its essence is to expand the local memory of network devices, and can provide efficient and transparent global memory pool services for network devices running stand-alone applications. However, for multiple network devices running a non-stand-alone application, traditional pooling solutions cannot effectively determine the number of network devices and memory capacity occupied after partitioning (SWAP). It often happens that the network devices obtain too little memory to support job calculations, resulting in long waiting times for cluster jobs and low job efficiency. Summary of the invention
[0005] The present application provides a memory expansion method, a network device, and a communication system, which can dynamically adjust the business load distribution between memory pools so that the business load of each memory pool is reasonably distributed, reducing the waiting time of cluster operations and improving operation efficiency.
[0006] A first aspect of the present application provides a memory expansion method, which includes: a first network device generates a memory topology based on memory demand information of a target application and 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 establishes a second memory pool in the first memory pool based on the memory topology, and the second memory pool is used to indicate the memory resources that the target application is allowed to use.
[0007] In the present application, the first network device can generate a memory topology based on the memory demand information of the target application and the usage of the memory resources in the first memory pool, and then establish a second memory pool in the first memory pool based on the memory topology, and the second memory pool is used to indicate the memory resources that the target application is allowed to use. In this way, the first network device can reasonably allocate memory to the target application based on the memory demand information and the usage of the resources in the first memory pool, and dynamically adjust the business load distribution between the memory pools, so that the business load of each memory pool is reasonably distributed, reducing the waiting time of cluster operations and improving operation efficiency.
[0008] In a possible implementation of the first aspect, the first network device establishes a second memory pool in the first memory pool according to the memory topology, including: the first network device confirms memory resources matching the memory topology in the first memory pool according to the memory topology; the first network device establishes the second memory pool according to the memory resources matching the memory topology.
[0009] In this method, when the management node creates the second memory pool, each first computing node selected according to the memory topology information will contribute part of the memory resources (broadly defined memory resources, which may include multiple media such as HBM, DDR, PCM, SSD, etc.). The management node organizes all the memory resources contributed by the first computing nodes into a global memory space (second memory pool). Within a first computing node, the management node can organize the different media on the first computing nodes into a multi-level memory structure, which will become part of the global memory space. This possible implementation method provides a specific method for establishing a second memory pool, which improves the feasibility of the solution.
[0010] In a possible implementation manner of the first aspect, the memory topology includes the number of the network devices, the types of the memory resources, and the capacity of the memory resources.
[0011] This possible implementation method provides a specific implementation method of the memory topology, which improves the feasibility of the solution.
[0012] In a possible implementation manner of the first aspect, the second memory pool includes a high-performance memory segment, a low-performance memory segment, a persistence capability segment and / or a non-persistence capability segment.
[0013] In this possible implementation, the management node can divide the global memory space into different memory segments, such as high-performance memory segments, segments with persistence capabilities, and segments without persistence capabilities, according to different media attributes contained in the memory pool, such as performance differences and whether they have persistence capabilities. When addresses in these address segments are subsequently written, they will be written to the corresponding media in a synchronous or asynchronous manner. In this possible implementation, the management node can distinguish and store different data based on multiple factors such as frequency of use and storage duration, so that the first network device can complete the task more efficiently.
[0014] In a possible implementation of the first aspect, the method also includes: the first network device receives data request information sent by the second network device, the target application is run on the second network device, and 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, and 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.
[0015] In this possible implementation, different processes of the target application are running on multiple second computing nodes, and the management node compiles the memory resources in the second memory pool in a unified addressing manner. Second computing nodes running different processes can exchange or share data in the second memory pool through memory semantics. Second computing nodes and other second computing nodes can exchange data in the second memory pool through memory semantics, avoiding cumbersome communication processes and greatly improving the efficiency of data exchange and data sharing.
[0016] In a possible implementation of the first aspect, the method also includes: the first network device generates the memory requirement information based on 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 input data volume of the target application, and the memory requirement information includes the computing power of the target application, absolute memory usage, memory hierarchical configuration and / or node affinity configuration.
[0017] In this possible implementation, the management node may include a memory calculation unit. When the target application on the second computing node is started, the management node can evaluate the memory requirement information of the target application based on the relevant information of the target application through the memory calculation unit. Among them, the memory calculation unit is application-aware, and the relevant information of the target application by the memory calculation unit can be obtained through a variety of methods such as program built-in, user input or self-learning. After the memory calculation unit obtains the relevant information of the target application, the memory calculation unit can calculate the amount of memory required for the target application, memory classification suggestions, and node affinity suggestions based on the type of application, the amount of input data, the memory expansion coefficient of the application, and the memory access characteristics of the application such as the distribution of hot and cold data, the amount of data exchange between nodes, etc.
[0018] In a possible implementation manner of the first aspect, the method further includes: the first network device establishes the first memory pool in a global memory unified addressing manner.
[0019] In a possible implementation manner of the first aspect, the memory semantics includes remote direct memory access (RDMA) and / or (Data Streaming Assessment, DSA).
[0020] In a possible implementation of the first aspect, the memory resources include high bandwidth memory (High Bandwidth Memory, HBM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR), phase change memory (Phase Change Memory, PCM) and / or solid state disk (Solid State Disk, SSD).
[0021] A second aspect of the present application provides a data acquisition method, the method comprising: a first network device sends data request information to a second network device, a target application is run on the first network device, and the data request information is used to request target data; the first network device receives target address information sent by the second network device, the target address information includes the address of a memory resource in the second memory pool that stores the target data; the first network device obtains the target data from the first memory pool through memory semantics according to the target address information, and the first memory pool is used to indicate the memory resources that the target application is allowed to use.
[0022] In the present application, different processes of the target application are running on multiple first network devices, and the management node compiles the memory resources in the first memory pool in a unified addressing manner. The first network devices running different processes can exchange or share data in the first memory pool through memory semantics. The first network device and other first network devices can exchange data in the first memory pool through memory semantics, avoiding cumbersome communication processes and greatly improving the efficiency of data exchange and data sharing.
[0023] In a possible implementation manner of the second aspect, the memory semantics include remote RDMA and / or DSA.
[0024] The third aspect of the present application provides a network device, which includes at least one processor, a memory and a communication interface. The processor is coupled to the memory and the communication interface. The memory is used to store instructions, the processor is used to execute the instructions, and the communication interface is used to communicate with other network devices under the control of the processor. When the instruction is executed by the processor, the network device executes the method in the first aspect or any possible implementation of the first aspect, or the network device executes the method in the second aspect or any possible implementation of the second aspect.
[0025] The fourth aspect of the present application provides a computer-readable storage medium, which stores a program, which enables the network device to execute the method in the above-mentioned first aspect or any possible implementation of the first aspect, or enables the network device to execute the above-mentioned second aspect or any possible implementation of the second aspect.
[0026] The fifth aspect of the present application provides a computer program product storing one or more computer-executable instructions. When the computer-executable instructions are executed by the processor, the processor executes the method of the first aspect or any possible implementation of the first aspect, or the processor executes the method of the second aspect or any possible implementation of the second aspect.
[0027] In a sixth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the processor is coupled to the communication interface, and the processor is used to read instructions to execute the method of the above-mentioned first aspect or any possible implementation of the first aspect, or to execute the above-mentioned second aspect or any possible implementation of the second aspect.
[0028] A seventh aspect of the present application is a memory expansion system, which includes the network device described in the first aspect or any possible implementation of the first aspect and the network device described in the second aspect or any possible implementation of the second aspect.
[0029] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0030] In the present application, the first network device can generate a memory topology based on the memory demand information of the target application and the usage of the memory resources in the first memory pool, and then establish a second memory pool in the first memory pool based on the memory topology, and the second memory pool is used to indicate the memory resources that the target application is allowed to use. In this way, the first network device can reasonably allocate memory to the target application based on the memory demand information and the usage of the resources in the first memory pool, and dynamically adjust the business load distribution between the memory pools, so that the business load of each memory pool is reasonably distributed, reducing the waiting time of cluster operations and improving operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a schematic diagram of an application scenario of the memory expansion system provided by this application;
[0032] Figure 2 It is an application schematic diagram of a memory expansion method provided by the present application;
[0033] Figure 3 A schematic diagram of a memory topology provided for this application;
[0034] Figure 4 It is another application schematic diagram of a memory expansion method provided by the present application;
[0035] Figure 5 It is another application schematic diagram of a memory expansion method provided by the present application;
[0036] Figure 6 A schematic diagram of memory requirement information provided for this application;
[0037] Figure 7 A schematic diagram of the structure of a network device provided for this application;
[0038] Figure 8 Another structural schematic diagram of a network device provided for this application;
[0039] Fig. 9 Another structural schematic diagram of a network device provided for this application. DETAILED DESCRIPTION
[0040] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art may appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0041] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.
[0042] "And / or" in this application is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers 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, c can be single or multiple.
[0043] At present, computing power pooling and storage pooling have become quite popular as the main infrastructure-level technologies. In order to improve the performance of applications, memory pooling has begun to attract attention from the industry. In traditional memory pooling solutions, usually starting from the architecture level, network devices use various means to confirm that local memory is insufficient or data sharing and exchange is required. In this case, network devices can access remote memory, thereby realizing global memory sharing and pooling.
[0044] Traditional pooling solutions achieve remote memory sharing and pooling from the system structure level. Its essence is to expand the local memory of network devices, and can provide efficient and transparent global memory pool services for network devices integrated with stand-alone applications. However, for multiple network devices integrated with applications, traditional pooling solutions expand the memory capacity of the node from the perspective of architecture, and cannot perceive the memory required by the application, and cannot perceive the memory capacity of the target device extended to the remote end. For dynamic large-scale distributed applications, this limitation is even more obvious.
[0045] In the above-mentioned traditional pooling scheme, since it is impossible to effectively determine the number of network devices and memory capacity occupied after partitioning, it often happens that the network devices obtain too little memory to support job calculations, resulting in long waiting times for cluster jobs and low cluster job efficiency.
[0046] With respect to the traditional pooling solution described in the above method example, the present application provides a memory expansion method, a memory expansion system and a network device, which can reduce the waiting time of cluster operations and improve the efficiency of cluster operations.
[0047] The following method example first illustrates the memory expansion system provided by the present application.
[0048] Figure 1 It is a schematic diagram of an application scenario of the memory expansion system provided in this application.
[0049] See also Figure 1 The memory expansion system provided by the present application includes: a management node 101, a first computing node 102 and a second computing node 103. In the memory expansion system provided by the present 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 target application mentioned above runs on the second computing node, corresponding to the second network device mentioned in claims 5 to 9.
[0050] In the present application, 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 the present application may include more second computing nodes 103, which are not specifically limited here.
[0051] In this application, the second computing node 103 is a computing device on the user side, such as a server, a desktop computer, etc. At the hardware level, the second computing node 103 is provided with a processor and a memory ( Figure 1 (not shown in the figure). At the software level, an application program (application) is running on the second computing node 103, which is a general term for various applications presented to users. For example, the type of the application can be a distributed application or other types of applications, which are not specifically limited here. A memory enabling plug-in and a memory programming kit are running on the second computing node, and the application communicates with the management node and the first computing node 102 through the memory enabling plug-in and the memory programming kit.
[0052] In the present application, the memory expansion system may include one or more first computing nodes 101. Multiple first computing nodes 101 may constitute a first computing node cluster, and each first computing node 101 may be interconnected. The first computing node 101 may be a server, a desktop computer, or a controller of a storage array, a hard disk enclosure, etc.
[0053] Functionally, the first computing node 102 is mainly used to calculate or process data. In terms of hardware, the first computing node 102 includes at least a processor, a memory, and a control unit. Among them, the processor is a central processing unit (CPU), which is used to process data from outside the first computing node or data generated inside the first computing node 102. Memory refers to a device for storing data, which can be a memory or a hard disk. Memory refers to an internal memory that directly exchanges data with the processor. It can read and write data at any time, and the speed is very fast. It serves as a temporary data storage for the operating system or other running programs. Memory includes at least two types of memory. For example, memory can be either a random access memory or a read-only memory (ROM). For example, the random access memory can be a dynamic random access memory (DRAM) or a storage class memory (SCM). DRAM is a semiconductor memory, and like most random access memories (RAM), it is a volatile memory device. SCM is a composite storage technology that combines the characteristics of traditional storage devices and memory. Storage-class memory can provide faster read and write speeds than hard disks, but its access speed is slower than DRAM and its cost is cheaper than DRAM.
[0054] In the present application, the management node 101 is generally used to create and manage a memory pool, and the management node 101 can communicate with any first computing node 102. Optionally, the management node 101 can be the same device as a first computing node 102, and a node can be elected from the first computing node 102 to assume the function of the management node, and the management node 101 is a device in the storage cluster. Optionally, the management node 101 can be a separate device independent of the first computing node 102, and the specifics are not limited here. At the software level, the management node 101 includes a distributed scheduler and a memory pool suite. The distributed scheduler can allocate memory to the second computing node, and the memory pooling suite can realize the construction of the memory pool and the management of memory resources in the memory pool. Optionally, the management node 101 can also include a memory computing unit, which calculates the size of the memory required by the second computing node 103 to run the target application.
[0055] The above example illustrates the structure of the memory expansion system provided by the present application. The following example will refer to the memory expansion system illustrated in the above example, and take the first network device as the management node, the network device as the first computing node, and the (second network device) second computing node as an example to explain in detail the memory expansion method provided by the present application.
[0056] Figure 2 This is an application schematic diagram of a memory expansion method provided by this application.
[0057] See also Figure 2 ,like Figure 2 As shown, the memory expansion method provided in the present application at least includes steps 201 to 202.
[0058] 201. A first network device generates a memory topology according to memory requirement information of a target application and usage of memory resources in a first memory pool.
[0059] In the present application, the first memory pool is a logical memory composed of memory resources provided by multiple network devices. That is, the first memory pool is a logical memory established by the management node on multiple first computing nodes. Figure 1 For example, Figure 1 The memory pool established on the five first computing nodes can be understood as the first memory pool.
[0060] In this application, 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. Optionally, the memory topology may include the number of network devices, the memory topology may include the types of memory resources, the memory topology may include the capacity of memory resources, and the memory topology may also include other parameters, which are not specifically limited here.
[0061] Figure 3 A schematic diagram of a memory topology provided for this application.
[0062] For example, assume that the management node receives the memory requirement information of the target application running on the second computing node, and generates the best memory topology for the application based on multi-dimensional metrics such as resource usage in the first memory pool. A typical memory topology contains information such as Figure 3 As shown, Figure 3 The memory topology in the figure indicates that the second computing node needs three nodes to provide memory resources, of which node 1 needs to provide 200GB of DDR memory, 500GB of PCM memory, and 1TB of SSD memory. Similarly, node 2 needs to provide 250GB of DDR memory, 800GB of PCM memory, and 500GB of SSD memory. Node 3 needs to provide 5GB of DDR memory, 500GB of PCM memory, and 800GB of SSD memory.
[0063] In this application, the scheduler in the management node can complete the allocation of computing power and memory for the second computing node in the first memory pool according to the scheduling strategy based on the memory demand information and the usage of memory resources in the first memory pool. Unlike traditional schedulers, the scheduler in this application will consider the reasonable use of memory when allocating resources, such as ensuring the reasonable use of memory at each level in each first computing node. After meeting other high-priority strategies, the Max-min scheduling method is used as much as possible to ensure that the second computing node with a large memory capacity demand is allocated memory resources as much as possible, thereby avoiding memory fragmentation.
[0064] For example, the process of constructing the memory topology is explained by taking a Spark cluster as an example. For example, assume that multiple second computing nodes form a Spark cluster in a big data environment, and a Spark in memory shuffle plug-in is built in the cluster so that data can be calculated in memory and data can be exchanged across nodes. After the management node obtains the memory requirements of each second computing node, it can allocate memory topology to the second computing node based on the Max-Min scheduling algorithm through the intelligent scheduler Yarn or a third-party scheduler.
[0065] 202. The first network device establishes a second memory pool in the first memory pool according to the memory topology.
[0066] In the present application, the second memory pool is used to indicate the memory resources that the target application is allowed to use. Optionally, when the local memory resources of the network device 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, the memory resources in the second memory resource pool can be used to assist in running the target application.
[0067] Optionally, the second memory pool includes a high-performance memory segment, a low-performance memory segment, a persistence capability segment and / or a non-persistence capability segment.
[0068] In this application, the management node can divide the global memory space into different memory segments, such as high-performance memory segments, segments with persistence capabilities, and segments without persistence capabilities, according to the different media attributes contained in the memory pool, such as performance differences and whether it has persistence capabilities. When the addresses in these address segments are subsequently written, they will be written to the corresponding media in a synchronous or asynchronous manner. In this possible implementation, the management node can distinguish and store different data based on multiple factors such as frequency of use and storage duration, so that the first network device can complete the task more efficiently.
[0069] Optionally, the first memory pool and the second memory pool described in the above example may be a distributed memory pool (DML), which refers to a logical memory that is physically dispersed across nodes through a high-speed network and can logically provide global access. The first memory pool and the second memory pool described in the above example may also be other types of memory pools, which are not specifically limited here.
[0070] In the present application, the first network device can generate a memory topology based on the memory demand information of the target application and the usage of the memory resources in the first memory pool, and then establish a second memory pool in the first memory pool based on the memory topology, and the second memory pool is used to indicate the memory resources that the target application is allowed to use. In this way, the first network device can reasonably allocate memory to the target application based on the memory demand information and the usage of the resources in the first memory pool, and dynamically adjust the business load distribution between the memory pools, so that the business load of each memory pool is reasonably distributed, reducing the waiting time of cluster operations and improving operation efficiency.
[0071] The memory expansion method provided by this application solves the problem of how to evenly distribute the memory of applications in the cluster from a macro perspective, based on the core idea of application-driven, and solves the problem that applications cannot obtain enough memory in the cluster to complete in-memory data processing, and solves the problem of low efficiency of data-intensive applications in the cluster and low cluster operation throughput. The application performance is improved through application-driven global memory pooling, and the allocation of global memory is further optimized, which improves the efficiency of cluster operations.
[0072] In the present application, steps 201 to 202 in the above method example illustrate the memory expansion method provided by the present application. In step 202 in the above method example, the first network device has a specific implementation method for establishing 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 example.
[0073] Figure 4 This is another application schematic diagram of a memory expansion method provided by the present application.
[0074] 301. A first network device searches a first memory pool for a memory resource that matches a memory topology according to a memory topology.
[0075] In this application, Spark cluster is used as an example. For a single computing device, assuming that the memory topology obtained for the target application running on the computing device indicates that 1.5T of memory is required, if each first computing node can have 0.3T of memory for pooling, 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, the memory resources may include HBM, the memory resources may include DDR, the memory resources may include phase change memory PCM, the memory resources may also include other types of memory resources such as solid-state memory SSD, etc., which are not specifically limited here.
[0077] 302. The first network device establishes a second memory pool according to memory resources matching the memory topology.
[0078] In the present application, after the management node finds matching memory resources according to the memory topology information of the application, the scheduler included in the management node can dynamically create a second memory pool by calling the memory pool suite.
[0079] In the present application, when the management node creates the second memory pool, each first computing node selected according to the memory topology information will contribute part of the memory resources. Optionally, part of the memory resources contributed by the first computing node can be high bandwidth memory (HBM), part of the memory resources contributed by the first computing node can be DDR, part of the memory resources contributed by the first computing node can be PCM, part of the memory resources contributed by the first computing node can also be SSD and other media, which are not limited here.
[0080] The management node organizes all memory resources contributed by the first computing nodes into a global memory space (second memory pool). In a first computing node, the management node can organize different media on the first computing node into a multi-level memory structure, which will become part of the global memory space. In addition, the management node can divide the global memory space into different memory segments, such as high-performance memory segments, segments with persistence capabilities, and segments without persistence capabilities, based on the different media attributes contained in the memory pool, such as performance differences and whether they have persistence capabilities. When the addresses in these address segments are subsequently written, they will be written to the corresponding media in a synchronous or asynchronous manner.
[0081] For example, taking the Spark cluster as an example, assume that the management node finds 5 nodes in the first memory pool as memory resources that match the memory topology. The management node can dynamically form these 5 nodes into a cluster through the scheduler, and use the memory pooling kit to pool the memory resources provided by these 5 nodes to obtain the second memory pool. When the data of the second computing node is shuffled in the second memory pool and the obtained data is stored on the disk, these 5 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, and the second memory pool has the ability to uniformly address and access global memory. The second memory pool provides a northbound interface, which can implement global memory application, read and write access, release, cross-node memory access and other functions through protocols such as RDMA and iWARP.
[0083] In this application, when the memory pool suite included in the management node manages the second memory pool, the second memory pool will contain different types of media, such as HBM, DRAM, PCM, SSD, etc. mentioned above. Based on the above-mentioned second memory pool, the upper-level user can allocate memory according to certain rules, such as specifying attributes, performance, persistence, or specifying allocation according to a specified length on a certain node. During allocation, the system will apply for memory space and update statistical information on the corresponding nodes according to the specified rules. After the memory space application is completed on all nodes that need to be applied, the system will return a global ID to the upper-level user. This ID contains management information of these addresses, such as the memory partition, unique index, performance and persistence attributes.
[0084] In this application, when allocating memory, the management node can also allocate it on multiple nodes at the same time and combine it into a memory space with specified rules. Optionally, multiple addresses can be allocated across nodes and connected front and back to form a linear memory space. It can be organized into a memory space according to the copy rules, or it can be organized into a memory space in other ways. These memory spaces will return a global ID to the upper user in the manner described in the previous paragraph.
[0085] In this application, when the upper-level user finishes using a certain segment of global memory, the management node will release the memory space of this segment to the first memory pool and mark the space as available. In addition, the management node will notify each related computing node to release the previously applied memory space according to the actual distribution of the corresponding memory space, and update the capacity and other information.
[0086] In the present application, when the management node runs the memory expansion method, in addition to executing steps 201 to 202 described in the above example, the management node can optionally return the 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 In the second computing nodes of the system shown, different processes of the target application are running on multiple second computing nodes, and the management node compiles the memory resources in the second memory pool in a unified addressing manner. The second computing nodes running different processes can exchange or share data in the second memory pool through memory semantics.
[0088] Figure 5 This is another application schematic diagram of a memory expansion method provided by the present application.
[0089] 401. A first network device receives data request information sent by a second network device.
[0090] Exemplarily, when process A running on the second computing node A completes the calculation, the second computing node A can place the data A that needs 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 computing node B, computing node B needs to use data A. Computing node B sends a data request message to the management node, which indicates that computing node B needs to obtain data A.
[0091] 402. The first network device sends target address information to the second network device according to the data request information.
[0092] Exemplarily, after computing node B sends data request information to the management node, the management node can send target address information to the computing node in a variety of ways (for example, through a KV server) based on the data request information. The target address information includes the address of the memory resource storing the target data in the second memory pool.
[0093] 403. The second network device obtains target data from the second memory pool according to the target address information through memory semantics.
[0094] Exemplarily, computing node B sends data request information to the management node, and the management node sends target address information to the computing node through the KV server according to the data request information, that is, computing node B obtains the global unified address (target address information) of data A by accessing the KV server on the management node, and can read data A directly from the global memory pool (second memory pool) through the RDMA protocol or the DSA (Data Streaming Assessment, DSA) protocol.
[0095] In the present application, during traditional data interaction or data sharing, when the data in large-scale data-intensive applications cannot complete the required calculations in the memory due to insufficient memory capacity, the system will SWAP the data to the local storage medium or remote device, and in the next stage of processing, the data needs to be read back from the storage medium or remote device, and data exchange is achieved through socket communication to continue processing. This repeated IO processing seriously affects the completion time of the job and affects the overall performance of the system.
[0096] Exemplarily, if data exchange or data sharing is required between the second computing node A and the second computing node B, for example, data A is to be exchanged, the Socket ports between the second computing node A and the second computing node B need to communicate with each other to realize the exchange of data A. The communication process includes lengthy data serialization and data deserialization processes, and the second computing node A and the second computing node B need to perform disk IO operations. The traditional data exchange or data sharing process is expensive and time-consuming. In the data exchange or data sharing process between computing nodes provided in the present application, the second computing node A and the second computing node B can exchange data A through memory semantics, avoiding cumbersome communication processes and greatly improving the efficiency of data exchange and data sharing.
[0097] Optionally, the memory semantics may be an RDMA protocol, the memory semantics may be a DSA protocol, or the memory semantics may be other types of protocols, which are not specifically limited here.
[0098] In the present application, when the management node runs the memory expansion method, in addition to executing steps 201 to 202 described in the above example, it can optionally generate memory requirement information based on relevant information of the target application. The specific generation method will be described in the following example.
[0099] In the present application, optionally, the relevant information of the target application may include the type of the target application, the input data volume of the target application, the memory expansion coefficient of the target application and / or the access characteristics of the target application (such as the distribution of hot and cold data and the node data exchange volume, etc.). The relevant information of the target application may also include other information, which is not limited here.
[0100] In the present 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 classification configuration and / or node affinity configuration, and the memory requirement information may also include other parameters, which are not specifically limited here.
[0101] Figure 6 A schematic diagram of memory requirement information provided for this application.
[0102] In the present application, optionally, the management node may include a memory computing unit. When the target application on the second computing node is started, the management node can evaluate the memory requirement information of the target application based on the relevant information of the target application through the memory computing unit. Among them, the memory computing unit is application-aware, and the relevant information of the target application by the memory computing unit can be obtained through a variety of methods such as program built-in, user input or self-learning. After the memory computing unit obtains the relevant information of the target application, the memory computing unit can calculate the amount of memory required for the target application based on the type of application, the amount of input data, the memory expansion coefficient of the application, and the memory access characteristics of the application such as the distribution of hot and cold data, the amount of data exchange between nodes, etc., memory grading suggestions, node affinity suggestions, a typical application memory requirement information such as Figure 6 As shown, the management node can be based on Figure 6 Generate the memory topology based on the memory requirements information shown.
[0103] In the present application, there are multiple ways for the management node to obtain memory requirement information. Optionally, the memory calculation unit included in the management node may generate memory requirement information based on the relevant information of the target application. Optionally, other nodes may generate memory requirement information based on the relevant information of the target application and then send the memory requirement information to the management node. Optionally, the management node may also obtain memory requirement information in other ways, which are not limited here.
[0104] In this application, the above example illustrates the process of the management node generating memory demand information. When the management node runs the memory expansion method, in addition to executing the steps described in the above example, the management node may also optionally establish a first memory pool. The specific establishment method will be described in the following example.
[0105] In the present application, the memory in the first memory pool is compiled in a global hybrid memory unified addressing manner. The management node can uniformly manage different types of media (such as HBM, DDR, PCM, SSD) through the memory pooling suite. The management node can also uniformly address and uniformly access cross-node memory through the memory pooling suite.
[0106] In the present application, the first network device can generate a memory topology based on the memory demand information of the target application and the usage of the memory resources in the first memory pool, and then establish a second memory pool in the first memory pool based on the memory topology, and the second memory pool is used to indicate the memory resources that the target application is allowed to use. In this way, the first network device can reasonably allocate memory to the target application based on the memory demand information and the usage of the resources in the first memory pool, and dynamically adjust the business load distribution between the memory pools, so that the business load of each memory pool is reasonably distributed, reducing the waiting time of cluster operations and improving operation efficiency.
[0107] The above example provides a different implementation of a memory expansion method. The following provides a network device 50, such as Figure 7 As shown, the network device 50 is used to execute the steps executed by the first network device (management node) in the above example. The execution steps and corresponding beneficial effects are specifically understood with reference to the above corresponding examples, which will not be repeated here. The network device 50 includes:
[0108] The processing unit 501 is used for:
[0109] Generate a memory topology according to the memory requirement information of the target application and the usage of memory resources in a first memory pool, where the first memory pool is a logical memory composed of memory resources provided by a plurality of 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;
[0110] A second memory pool is established in the first memory pool according to the memory topology, and the second memory pool is used to indicate memory resources that the target application is allowed to use.
[0111] In one possible implementation,
[0112] The processing unit 501 is used for:
[0113] Confirming, in the first memory pool, memory resources matching the memory topology according to the memory topology;
[0114] The second memory pool is established according to the memory resources matching the memory topology.
[0115] In one possible implementation,
[0116] The memory topology includes the number of the network devices, the types of the memory resources, and the capacity of the memory resources.
[0117] In one possible implementation,
[0118] The second memory pool includes a high-performance memory segment, a low-performance memory segment, a persistence capability segment and / or a non-persistence capability segment.
[0119] In a 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, 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 also used to send target address information to the second network device according to the data request information, and the target address information includes the address of the memory resource storing the target data in the second memory pool, and 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 used to generate the memory requirement information based on relevant information of the target application, the relevant information of the target application including the type of the target application, the memory expansion coefficient of the target application, the access characteristics of the target application and / or the input data volume of the target application, and the memory requirement information includes the computing power of the target application, absolute memory usage, memory hierarchical configuration and / or node affinity configuration.
[0124] In one possible implementation,
[0125] The processing unit 501 is further configured to establish the first memory pool by adopting a global memory unified addressing method.
[0126] In a possible implementation, the memory semantics includes remote direct data access RDMA and / or DSA.
[0127] In a possible implementation, the memory resource includes a high bandwidth memory HBM, a double-speed synchronous dynamic random access memory DDR, a phase change memory PCM and / or a solid-state memory SSD.
[0128] It should be noted that the information interaction, execution process, etc. between the modules of the above-mentioned network device 50 are based on the same concept as the method example of the present application, and their execution steps are consistent with the detailed contents of the above-mentioned method steps. Please refer to the description of the above-mentioned method example.
[0129] The above example provides a network device 50, and the following example provides a network device 60, such as Figure 7As shown, the network device 60 is used to execute the steps executed by the second network device (second computing node) in the above example. The execution steps and corresponding beneficial effects are specifically understood with reference to the above corresponding examples, which will not be repeated here. The network device 50 includes:
[0130] A sending unit 601 is configured to send data request information to a second network device, where a target application is running on the first network device, and the data request information is used to request target data;
[0131] A receiving unit 602 is configured to receive target address information sent by the second network device, where the target address information includes an address of a memory resource in the second memory pool storing the target data;
[0132] The processing unit 603 is configured to obtain the target data from the first memory pool through memory semantics according to the target address information, where the first memory pool is used to indicate memory resources that the target application is allowed to use.
[0133] In a possible implementation, the memory semantics includes remote direct data access RDMA and / or DSA.
[0134] It should be noted that the information interaction, execution process, etc. between the modules of the above-mentioned network device 60 are based on the same concept as the method example of the present application, and their execution steps are consistent with the detailed contents of the above-mentioned method steps. Please refer to the description of the above-mentioned method example.
[0135] See also Fig. 9 As shown, the present application provides a schematic diagram of the structure of a network device 700, which includes: a processor 702, a communication interface 703, and a memory 701. Optionally, a bus 704 may be included. The communication interface 703, the processor 702, and the memory 701 may be interconnected via the bus 704; the bus 704 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 The network device 700 can be implemented by using only one thick line. Figure 7 The network device 50 in the example shown may function to implement Figure 8 The processor 702 and the communication interface 703 can perform the corresponding operations of the network device in the above method example.
[0136] Combine the following Fig. 9 A detailed introduction to each component of the network equipment:
[0137] Among them, the memory 701 can be a volatile memory (volatile memory), such as a random-access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, used to store program codes, configuration files or other content that can implement the method of the present application.
[0138] Processor 702 is the control center of the controller, which 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 the present application, such as: one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA).
[0139] The communication interface 703 is used to communicate with other devices.
[0140] The processor 702 may execute the aforementioned Figure 7 The operation performed by the network device 50 in the example shown, or performing the aforementioned Figure 8 The operations performed by the network device 60 are not described in detail here.
[0141] It should be noted that the information interaction, execution process, etc. between the modules of the above-mentioned network device 700 are based on the same concept as the method example of the present application, and their execution steps are consistent with the detailed contents of the above-mentioned method steps. Please refer to the description of the above-mentioned method example.
[0142] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0143] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0145] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0146] If the integrated unit is implemented in the form of 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 the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A memory expansion method, characterized in that: include: The first network device obtains memory requirement information of the target application and usage of memory resources in the first memory pool; The first network device generates a memory topology according to the memory requirement information of the target application and the usage of memory resources in a first memory pool, where the first memory pool is a logical memory composed of memory resources provided by a plurality of 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 establishes a second memory pool in the first memory pool according to the memory topology, and the second memory pool is used to indicate memory resources that the target application is allowed to use.
2. The memory expansion method according to claim 1, characterized in that: The first network device establishes a second memory pool in the first memory pool according to the memory topology, including: The first network device confirms, in the first memory pool according to the memory topology, a memory resource matching the memory topology; The first network device establishes the second memory pool according to the memory resources matching the memory topology.
3. The memory expansion method according to claim 1 or 2, characterized in that: The memory topology includes the number of the network devices, the types of the memory resources, and the capacity of the memory resources.
4. The memory expansion method according to claims 1 to 3, characterized in that: The second memory pool includes a high-performance memory segment, a low-performance memory segment, a persistence capability segment and / or a non-persistence capability segment.
5. The memory expansion method according to any one of claims 1 to 4, characterized in that: The method further comprises: The first network device receives data request information sent by the second network device, the target application is run on the second network device, and 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, and the target address information includes the address of the memory resource storing the target data in the second memory pool, and 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.
6. The memory expansion method according to any one of claims 1 to 5, characterized in that: The method further comprises: The first network device generates the memory requirement information based on 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 input data volume of the target application, and the memory requirement information includes the computing power of the target application, absolute memory usage, memory hierarchical configuration and / or node affinity configuration.
7. The memory expansion method according to any one of claims 1 to 5, characterized in that: The method further comprises: The first network device establishes the first memory pool by using a global memory unified addressing method.
8. The memory expansion method according to any one of claims 1 to 5, characterized in that: The memory semantics include remote direct data access RDMA and / or DSA.
9. The memory expansion method according to any one of claims 1 to 5, 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.
10. A data acquisition method, characterized in that: include: The first network device running the target application sends data request information to the second network device, wherein the data request information is used to request the second network device for target data related to the target application; The first network device receives the target address information sent by the second network device, where the target address information includes an address of a memory resource storing the target data in the second memory pool; The first network device obtains the target data from the second memory pool through memory semantics according to the target address information, and the second memory pool is used to indicate the memory resources that the target application is allowed to use.
11. The memory expansion method according to any one of claim 10, characterized in that: The memory semantics include remote direct data access RDMA and / or DSA.
12. A network device, characterized in that: include: The processing unit is used to: Obtaining memory requirement information of a target application and usage of memory resources in a first memory pool, and generating a memory topology according to the memory requirement information of the target application and usage of memory resources in the first memory pool, wherein the first memory pool is a logical memory composed of memory resources provided by a plurality of 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; A second memory pool is established in the first memory pool according to the memory topology, and the second memory pool is used to indicate memory resources that the target application is allowed to use.
13. The network device according to claim 12, characterized in that: The processing unit is used for: Confirming, in the first memory pool, memory resources matching the memory topology according to the memory topology; The second memory pool is established according to the memory resources matching the memory topology.
14. The network device according to claim 12 or 13, characterized in that: The memory topology includes the number of the network devices, the types of the memory resources, and the capacity of the memory resources.
15. The network device according to any one of claims 12 to 14, characterized in that: The second memory pool includes a high-performance memory segment, a low-performance memory segment, a persistence capability segment and / or a non-persistence capability segment.
16. The network device according to any one of claims 12 to 15, characterized in that: The receiving unit is further configured to receive data request information sent by a second network device, 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 also used 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, and 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.
17. The network device according to any one of claims 12 to 16, characterized in that: The processing unit is further used to generate the memory requirement information based on relevant information of the target application, the relevant information of the target application including the type of the target application, the memory expansion coefficient of the target application, the access characteristics of the target application and / or the input data volume of the target application, and the memory requirement information includes the computing power of the target application, absolute memory usage, memory hierarchical configuration and / or node affinity configuration.
18. The network device according to any one of claims 12 to 16, characterized in that: The processing unit is further configured to establish the first memory pool by adopting a global memory unified addressing method.
19. The network device according to any one of claims 12 to 16, characterized in that: The memory semantics include remote direct data access RDMA and / or DSA.
20. The network device according to any one of claims 12 to 16, 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.
21. A network device, characterized in that: include: A sending unit, configured to send data request information to a second network device, wherein the data request information is used to request the second network device for target data of a target application running on the first network device; A receiving unit, configured to receive target address information sent by the second network device, wherein the target address information includes an address of a memory resource in a second memory pool storing the target data; A processing unit is used to obtain the target data from the second memory pool through memory semantics according to the target address information, and the second memory pool is used to indicate the memory resources that the target application is allowed to use.
22. The network device according to claim 21, characterized in that: The memory semantics include remote direct data access RDMA and / or DSA.
23. 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 the instructions stored in the memory to enable the network device to execute the method according to any one of claims 1 to 9, or to enable the network device to execute the method according to claim 10 or 11.
24. A computer storage medium, characterized in that The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the method according to any one of claims 1 to 9, or the computer executes the method according to claim 10 or 11.
25. A memory expansion system, comprising the first network device and the second network device included in the memory expansion method described in any one of claims 1 to 9, or comprising the first network device and the second network device included in the memory expansion method described in claim 10 or 11.
Citation Information
Patent Citations
Method and device for realizing pooling of distributed I / O (Input / Output) resources
CN103353861A
Dynamic extensible method for increasing virtual machine resources
CN103593243A
Memory management method and memory management device
CN105701019A
Data transmission method and device
CN105867843A
Resource distribution method and explorer
CN107045456A
