Memory access management method, supernode server, device, medium and product
By generating a comprehensive access latency matrix and optimizing memory access paths, the problem of uneven latency when multiple application nodes collaboratively access the memory pool is solved, thereby improving task execution efficiency and resource utilization.
Patent Information
- Application Number
- CN202611664254.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-26
- Publication Date
- 2026-11-24
AI Technical Summary
When multiple application nodes collaboratively access the memory pool, differences in network path latency and memory medium latency lead to uneven latency, making it difficult to adapt to different task types and affecting task execution efficiency and resource utilization.
By obtaining the network path latency of application nodes and the current access latency baseline of the memory pool, a comprehensive access latency matrix is generated. Based on the task type, a memory region is allocated for each application node and the target network path is determined to optimize the memory access path.
It reduces the overall access latency differences between application nodes, improves the execution efficiency of collaborative tasks and the rational allocation of memory resources, and optimizes the task execution process.
Smart Images

Figure CN123157464A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of memory management technology, and in particular to a memory access management method, a supernode server, a device, a medium, and a product. Background Technology
[0002] With the development of technologies such as cloud computing and distributed computing, memory pooling is increasingly being applied in systems that decouple computing and storage resources. Multiple application nodes can access the memory pool via a switching network. Access latency is typically affected by factors such as network topology, link congestion, media type, and access load, resulting in latency differences when different nodes access different storage units. For collaborative tasks, the execution progress between nodes is easily affected by inconsistent access latency and tail latency. Especially in scenarios with high synchronization requirements, slow response from some nodes may cause overall waiting, thereby affecting task execution efficiency and resource utilization. Summary of the Invention
[0003] This application provides a memory access management method, a supernode server, a device, a medium, and a product to at least solve the problem in related technologies that the lack of comprehensive consideration of network path latency and memory medium latency leads to large latency differences when multiple application nodes collaboratively access the memory pool, and that memory allocation and access paths are difficult to adapt to different task types.
[0004] This application provides a memory access management method, comprising: obtaining a collaborative task request for a target task, wherein the collaborative task request includes an application node set and a task type; obtaining the network path latency of each application node in the application node set accessing a corresponding memory pool, and obtaining the current access latency baseline of the memory pool from a memory media performance profile library; generating a comprehensive access latency matrix for the target task based on the network path latency and the current access latency baseline, and allocating a corresponding memory region in the memory pool for each application node based on the comprehensive access latency matrix; determining the target network path for each application node to access the corresponding memory region based on the task type, memory region, and comprehensive access latency matrix; and accessing the memory pool according to the target network path.
[0005] This application also provides a supernode server that implements the steps of any of the memory access management methods described above.
[0006] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the memory access management methods described above when executing the computer program.
[0007] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the memory access management methods described above.
[0008] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the memory access management methods described above.
[0009] By using this application, a comprehensive access latency matrix is generated by combining the network path latency and the current access latency baseline of the memory medium. Memory regions are allocated and target network paths are determined in conjunction with task types. Therefore, the technical problems of uneven latency and mismatch between memory allocation and access paths and task types when multiple application nodes access the memory pool collaboratively can be solved. This achieves the technical effects of balancing comprehensive access latency, optimizing memory access, and improving the execution efficiency of collaborative tasks. Attached Figure Description
[0010] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A schematic diagram of an architecture for a multi-node shared memory resource pool provided for some embodiments of this application; Figure 2 An overall structural diagram of a memory access management system provided in some embodiments of this application; Figure 3 A flowchart illustrating a memory access management method provided in some embodiments of this application; Figure 4 A deterministic equivalent collaboration example diagram is provided for some embodiments of this application; Figure 5 An example diagram of equivalent collaborative regulation is provided for some embodiments of this application; Figure 6 A flowchart illustrating a memory access management method provided in a specific embodiment of this application; Figure 7 Structural diagrams of a memory access management device provided in some embodiments of this application; Figure 8 Structural diagrams of electronic devices provided in some embodiments of this application. Detailed Implementation
[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0013] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0014] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0015] Figure 1 This is a schematic diagram of an architecture for a multi-node shared memory resource pool applicable to embodiments of this application. With the development of technologies such as distributed computing, artificial intelligence training, and high-performance computing, multiple application nodes often need to jointly execute the same task and share access to task data, intermediate results, or model parameters. To expand memory capacity and improve memory resource utilization, multiple application nodes can be connected to the memory pool via a CXL switching network, enabling different application nodes to access the storage resources in the memory pool.
[0016] Reference Figure 1 Host application A and host application B can each act as application nodes. Each application node establishes a connection with the CXL memory pool through one or more CXL (Compute Express Link) switches. The CXL memory pool may include controllers, CXL DRAM (Dynamic Random Access Memory), and CXLSSD (Solid-State Drive), etc. Different storage media may differ in access latency, bandwidth, and load status. Furthermore, the topological location of each application node in the CXL switching network varies, and the number of switches, network links, and path status it traverses when accessing the memory pool may also differ. Therefore, the end-to-end access latency of each application node to the memory pool is not only related to the network path but also affected by the performance of the storage media and its current operating status.
[0017] Related technologies typically focus on allocating memory resources to application nodes based on memory capacity or resource availability, making it difficult to fully reflect the differences in access latency caused by different network paths and storage media. In scenarios where multiple application nodes collaboratively execute tasks, inconsistent access latency among nodes can easily lead to inconsistent task execution progress. Especially in tasks with synchronization barriers, faster-executing nodes need to wait for slower-executing nodes, and nodes with higher access latency may become bottlenecks affecting the overall task execution speed, thereby increasing synchronization waiting time and reducing computing resource utilization.
[0018] To address the aforementioned issues, this application provides a memory access management method. By acquiring the network path latency of each application node accessing the corresponding memory pool and the current access latency baseline of the memory pool, a comprehensive access latency matrix for the target task is generated. Based on the comprehensive access latency matrix, corresponding memory regions are allocated to each application node, and the target network path for each application node to access the corresponding memory region is determined in conjunction with the task type. This reduces the difference in comprehensive access latency between application nodes and improves the execution efficiency of collaborative tasks.
[0019] Figure 2 The overall structure of a memory access management system provided in an embodiment of this application is shown. For example... Figure 2 As shown, the system may include an upper application layer, a collaborative balancing layer, a hardware layer, and an extension policy layer. The upper application layer initiates collaborative tasks and submits registration requests; the collaborative balancing layer performs memory region allocation, network path calculation, and comprehensive access latency adjustment; the hardware layer may include multiple hosts, CXL switches, and a heterogeneous memory pool composed of CXL DRAM nodes and CXL SSD nodes; the extension policy layer provides a collaborative application interface and provides policy parameters to the collaborative balancing layer based on data scale, latency sensitivity, and other information. The specific processing procedures of each layer will be described in the following embodiments.
[0020] Figure 3 This is a flowchart of a memory access management method according to some embodiments of this application.
[0021] Reference Figure 3 Memory access management methods may include: S1, obtain the collaborative task request of the target task, wherein the collaborative task request includes the application node set and the task type.
[0022] The target task can refer to a task that requires multiple application nodes to jointly execute and access a memory pool. During the execution of the target task, multiple application nodes can access task data, intermediate results, model parameters, or temporary data in the memory pool, and the execution progress or processing status of each application node is correlated. This application embodiment does not limit the specific business form of the target task; for example, the target task can be a distributed artificial intelligence training task, a cluster database transaction, a high-performance computing task, a rendering and encoding task, or a grid simulation task, etc.
[0023] A collaborative task request describes the collaborative access requirements of a target task and identifies the application nodes participating in the target task, as well as the collaborative attributes of the target task. Each collaborative task request corresponds to a target task, enabling the memory access management system to distinguish between different target tasks and their participating nodes, and to establish a corresponding memory access management context for each target task.
[0024] An application node set refers to a collection of multiple application nodes that participate in executing a target task. Application nodes can be physical hosts, virtual machines, GPU (Graphics Processing Unit) servers, database nodes, edge service instances, or high-performance computing nodes, etc., on which applications are deployed. An application node set can be represented by information such as node identifiers, node addresses, or node numbers to distinguish the application nodes participating in the target task. For example, in a distributed artificial intelligence training scenario, an application node set may include multiple GPU worker nodes participating in the same training task. In a distributed database scenario, an application node set may include multiple database nodes participating in the same cross-shard transaction.
[0025] Task type is used to characterize the collaborative attributes or synchronization requirements of a target task across multiple application nodes. Different task types can correspond to different node progress consistency requirements, data state consistency requirements, or synchronization timing requirements. The task type can be determined by the target task's own business logic and serve as the basis for subsequent memory access management of the target task.
[0026] Specifically, when a target task enters the execution preparation or startup phase, the memory access management system obtains the corresponding collaborative task request and parses the application node set and task type from the collaborative task request. Each application node in the application node set can establish a connection with the CXL memory pool through the CXL switching network. The memory access management system can associate the target task, application node set, and task type to form the task description information for that target task.
[0027] For example, when the target task is a distributed model training task, the multiple GPU worker nodes participating in the training task can constitute an application node set. The collaborative task request records this application node set and the task type used to characterize the synchronization requirements of the training task. When the target task is a cross-shard database transaction, the multiple database nodes participating in the transaction can constitute an application node set. The collaborative task request records this application node set and the task type used to characterize the synchronization requirements of the transaction. Through these methods, the scope of participating nodes and collaborative attributes of the target task can be clearly defined.
[0028] S2, obtain the network path latency of each application node in the application node set accessing the corresponding memory pool, and obtain the current access latency baseline of the memory pool from the memory media performance profile library.
[0029] Here, the corresponding memory pool refers to a memory pool that application nodes can access and that can provide memory resources for the target task. Different application nodes in the application node set can correspond to the same memory pool or different memory pools. In the embodiments of this application, the memory pool can be a CXL memory pool, and may include one or more memory media such as CXL DRAM and CXL SSD to provide shared memory resources to different application nodes.
[0030] Network path latency characterizes the time overhead of data transmission between application nodes and their corresponding memory pools. Since application nodes may have different topological locations within the system, the network connections they traverse when accessing the memory pool may also differ. Therefore, network path latency may vary between different application nodes. Network path latency primarily reflects the network transmission performance between the application node and the corresponding memory pool, excluding the access latency incurred by the memory medium performing access operations after the data arrives at the memory pool.
[0031] The memory media performance profile library records performance information about the memory pool and its memory media. This performance information can include the type of memory media, read / write latency, throughput, idle rate, load status, and health status. The performance information in the memory media performance profile library can be updated based on the memory pool's operating status to reflect the memory pool's access performance at different times.
[0032] The current access latency baseline is a reference value representing the time required for the memory pool to perform memory access operations when a collaborative task request is retrieved, or within the current time period corresponding to that retrieval time. The current access latency baseline reflects the access performance on the memory pool side and does not include network path latency between the application node and the memory pool. Since the memory media used by the memory pool and its current operating state may differ, the corresponding current access latency baseline may also differ. For example, CXLDRAM and CXL SSD typically differ in access latency. The access latency of the same memory media may also vary under different load conditions. Therefore, using the current access latency baseline can characterize the actual access performance of the memory pool under the current state.
[0033] Specifically, after obtaining the collaborative task request for the target task, the memory access management system determines each application node in the application node set and its corresponding memory pool based on the application node set in the collaborative task request, and obtains the network path latency when each application node accesses the corresponding memory pool. For any application node, the node identifier of the application node, the memory pool identifier of the corresponding memory pool, and the network path latency between the two can be associated and recorded to form a correspondence between application nodes and network path latency.
[0034] Meanwhile, the memory access management system queries the memory media performance profile library based on the memory pool identifier of the corresponding memory pool to read the current access latency baseline of that memory pool. To ensure that the acquired data reflects the system state at the time the target task starts, the network path latency and the current access latency baseline can correspond to the same or similar collection periods.
[0035] For example, when the application node set includes Node1 to Node8 participating in the same distributed training task, the network path latency for Node1 to Node8 to access the corresponding memory pool can be obtained separately. Simultaneously, the access latency baseline of the corresponding memory pool in the current running state can be read from the memory media performance profile library. Thus, the network path latency characterizing network transmission performance and the current access latency baseline characterizing memory pool access performance can be obtained respectively.
[0036] S3 generates a comprehensive access latency matrix for the target task based on network path latency and the current access latency baseline, and allocates a corresponding memory region in the memory pool for each application node based on the comprehensive access latency matrix.
[0037] The overall access latency characterizes the end-to-end latency of application nodes accessing the memory pool via the network. It considers both the network transmission performance between the application node and the memory pool, as well as the current access performance of the memory pool. Compared to using only network path latency or only the memory pool's access latency, it provides a more complete picture of the time required for application nodes to access memory resources.
[0038] The comprehensive access latency matrix is used to record the comprehensive access latency correspondence between each application node in the application node set and the candidate memory resources in the memory pool. The comprehensive access latency matrix may include multiple matrix elements, each corresponding to a combination of an application node and a candidate memory resource, and used to represent the comprehensive access latency when the application node accesses the candidate memory resource. Each row in the comprehensive access latency matrix may correspond to a different application node, and each column may correspond to a different candidate memory resource; alternatively, each row may correspond to a different candidate memory resource, and each column may correspond to a different application node. This embodiment of the application does not impose such limitations.
[0039] Specifically, the memory access management system combines each application node in the application node set with the candidate memory resources in the memory pool based on the network path latency and the current access latency baseline, determines the comprehensive access latency corresponding to each combination, and arranges each comprehensive access latency according to the correspondence between the application node and the candidate memory resources, thereby generating the comprehensive access latency matrix of the target task.
[0040] For example, when the application node set includes application node A and application node B, and the memory pool includes multiple candidate memory resources, the overall access latency when application node A accesses each candidate memory resource, and the overall access latency when application node B accesses each candidate memory resource, can be determined separately. Therefore, the overall access latency matrix can reflect the latency differences between application node A and application node B when accessing different candidate memory resources, providing a basis for memory region allocation.
[0041] After obtaining the comprehensive access latency matrix, the memory access management system determines the memory region corresponding to each application node from the candidate memory resources based on the comprehensive access latency represented by each matrix element. During memory region allocation, the system comprehensively compares different combinations of application nodes and different candidate memory resources, ensuring that each allocated application node has relatively balanced access performance and reducing access latency differences caused by variations in application node topology and memory resource performance.
[0042] After allocation, the memory access management system can record the mapping relationship between the target task, application nodes, and memory regions. For example, it can record the memory region Region_A corresponding to application node A and the memory region Region_B corresponding to application node B. The memory regions allocated to each application node together constitute the set of memory resources corresponding to the target task, which can be used by each application node when executing the target task.
[0043] S4 determines the target network path for each application node to access the corresponding memory region based on the task type, memory region, and comprehensive access latency matrix.
[0044] The target network path refers to the network transmission path used by the application node to access the corresponding memory region during the execution of the target task. When there are multiple available network paths between the application node and the corresponding memory region, one of these available network paths can be selected as the target network path.
[0045] Specifically, the memory access management system determines the memory regions that each application node needs to access based on the mapping relationship between application nodes and memory regions, and identifies available network paths that can connect each application node to its corresponding memory region. Subsequently, it obtains comprehensive access latency information related to each application node and its corresponding memory region from the comprehensive access latency matrix, and determines the corresponding path selection requirements based on the task type.
[0046] The memory access management system evaluates all available network paths according to path selection requirements and determines the target network path for each application node. The target network path does not necessarily have to be the shortest path for a single application node, but can be determined by considering the collaborative access requirements of multiple application nodes in the target task, so that each application node obtains access performance adapted to the task type.
[0047] like Figure 4 As shown, the available network paths from host application A to the memory pool include path A1 and path A2, and the available network paths from host application B to the memory pool include path B1 and path B2.
[0048] In one example, path A1 can be defined as the target network path for host application A to access the CXL DRAM memory region in memory pool 2, and path B1 can be defined as the target network path for host application B to access the CXL SSD memory region in memory pool 2. In another example, path A1 can be defined as the target network path for host application A to access the CXL DRAM memory region in memory pool 2, and path B2 can be defined as the target network path for host application B to access the CXL DRAM memory region in memory pool 1. Once the target network paths are determined, the memory access management system establishes a mapping relationship between application nodes, memory regions, and target network paths for use during the execution of the target task.
[0049] S5 accesses the memory pool based on the target network path.
[0050] Specifically, after determining the target network path for each application node, the memory access management system generates corresponding access configuration information based on the mapping relationship between application nodes, memory regions, and target network paths. The access configuration information may include application node identifiers, memory region identifiers, and target network path identifiers, and is distributed to the CXL switching network and memory pool management layer so that memory access requests initiated by application nodes are transmitted to the corresponding memory regions according to the corresponding target network path.
[0051] During the execution of target tasks, application nodes generate memory access requests, which can include read, write, or update requests. The CXL switching network forwards these memory access requests based on access configuration information, ensuring they reach the memory pool via the corresponding target network path. Upon receiving a memory access request, the memory pool determines the appropriate memory region based on the address information or memory region identifier carried in the request and performs the corresponding access operation within that memory region.
[0052] After the access operation is completed, the memory pool generates the corresponding access result and returns it to the application node that initiated the memory access request. Upon receiving the access result, the application node continues to execute the computation, synchronization, or data processing operations in the target task.
[0053] by Figure 4Taking the scenario shown as an example, after determining path A1 as the target network path for host application A to access the CXL DRAM memory region in memory pool 2, and determining path B1 as the target network path for host application B to access the CXL SSD memory region in memory pool 2, memory access requests initiated by host application A are transmitted to the corresponding CXL DRAM memory region via path A1, and memory access requests initiated by host application B are transmitted to the corresponding CXL SSD memory region via path B1. Thus, each application node can access the corresponding memory region according to the determined target network path, ensuring that the actual access process is consistent with the aforementioned memory region allocation and path determination results.
[0054] This embodiment generates a comprehensive access latency matrix by combining network path latency and the current access latency baseline of the memory pool, and allocates memory regions to each application node accordingly. It also determines the corresponding target network path based on the task type. This allows for a comprehensive consideration of network transmission performance and memory access performance, reduces the difference in comprehensive access latency between application nodes, improves the rationality of memory resource allocation and access path selection, and thus reduces synchronization waiting in collaborative tasks and improves task execution efficiency.
[0055] In some embodiments of this application, obtaining a collaborative task request for a target task includes: in response to a target task instruction, calling a corresponding collaborative application interface to generate a collaborative task request corresponding to the target task instruction.
[0056] Among them, the target task instruction refers to the instruction generated by the upper-layer application, task orchestrator, or task scheduler when creating, registering, or starting a target task. The target task instruction is used to instruct the memory access management system to establish a cooperative access management process for the target task, and can carry node information participating in the target task as well as type information used to characterize the synchronization requirements of the target task.
[0057] A collaborative application interface (CA) is a standardized interface set up between upper-layer applications and the memory access management system to transmit information related to target tasks. CA can register interfaces for collaborative tasks and can configure corresponding interface formats or adaptation methods based on the business type of the upper-layer application to convert target task instructions generated by different upper-layer applications into data formats that the memory access management system can recognize.
[0058] Specifically, when an upper-layer application, task orchestrator, or task scheduler creates or starts a target task, it generates a corresponding target task instruction and sends it to the memory access management system. Upon receiving the target task instruction, the memory access management system identifies the application type or task source corresponding to the instruction and invokes the corresponding collaborative application interface.
[0059] The collaborative application interface parses the target task instruction, extracts the node and type information participating in the target task, and performs format conversion and encapsulation on the extracted information to generate a collaborative task request corresponding to the target task instruction. After generating the collaborative task request, the mapping relationship between the target task instruction and the collaborative task request can be established, and the collaborative task request can be sent to the subsequent processing module.
[0060] For example, in a distributed AI training scenario, the training orchestrator generates a target task instruction when initiating a training task. This target task instruction carries information about the GPU worker nodes participating in the training task and their corresponding type information. In response to this target task instruction, the memory access management system calls the collaborative application interface corresponding to the training application to parse and encapsulate the target task instruction, generating a corresponding collaborative task request.
[0061] For example, in a distributed database scenario, the transaction coordinator generates a target task instruction when initiating a cross-shard transaction. This instruction carries information about the database nodes participating in the transaction and their corresponding type information. The memory access management system responds to this target task instruction by calling the corresponding collaborative application interface for the database application, generating a corresponding collaborative task request. This allows target task instructions generated by different applications to be converted into a unified collaborative task request, facilitating subsequent memory access management.
[0062] This embodiment generates a collaborative task request by responding to the target task instruction and calling the corresponding collaborative application interface. This enables the standardized conversion of task information from different upper-layer applications into a unified collaborative task request, allowing the memory access management system to obtain the participating nodes and task types of the target task in a timely and accurate manner, thereby improving the system's adaptability to different collaborative applications and the efficiency of task request processing.
[0063] In some embodiments of this application, the equivalent collaborative system includes a switch and a memory pool, wherein application nodes establish a connection with the memory pool through the switch; obtaining the network path latency of each application node in the application node set accessing the corresponding memory pool includes: determining the initial path of each application node to the corresponding memory pool through the switch; obtaining the network latency of the initial path, and using the network latency as the network path latency.
[0064] An equivalent collaborative system refers to a system used to uniformly manage the process of multiple application nodes accessing a memory pool. An equivalent collaborative system may include one or more switches and one or more memory pools. The switch can be a CXL switch, used to connect application nodes and memory pools, and to forward memory access requests and results transmitted between application nodes and memory pools.
[0065] The initial path refers to the available transmission path determined based on the network connectivity between application nodes, switches, and corresponding memory pools before the target network path is determined for the target task. The initial path can pass through one switch or multiple switches sequentially. An application node and its corresponding memory pool can have one or more initial paths.
[0066] Specifically, the equivalent-cost collaborative system acquires the topological connections between application nodes, switches, and memory pools. These topological connections can include the connections between application nodes and switches, the connections between different switches, and the connections between switches and memory pools. Based on these topological connections, the equivalent-cost collaborative system determines the initial path for each application node in the application node set to reach its corresponding memory pool via a switch.
[0067] After determining the initial path, the equal-cost cooperative system performs link probing on the initial path to obtain the network latency incurred during data transmission along the initial path. Link probing can perform end-to-end latency probing on the initial path, or it can obtain the latency corresponding to each link segment and switch in the initial path separately, and thus obtain the network latency of the initial path. The equal-cost cooperative system uses the obtained network latency of the initial path as the network path latency for the corresponding application node to access the corresponding memory pool, and records the correspondence between the application node, the corresponding memory pool, the initial path, and the network path latency.
[0068] Combination Figure 1 The multi-node shared memory resource pool architecture shown allows different application nodes to connect to the memory pool via different switches. Because each application node is located in a different topology, the switches and network links along its initial path may differ, resulting in variations in network path latency.
[0069] Combination Figure 4 In the deterministic equivalence collaboration example shown, when host application A accesses the memory pool through the switch, it can determine paths A1 and A2 as initial paths and obtain the network latency of paths A1 and A2 respectively. When host application B accesses the memory pool through the switch, it can determine paths B1 and B2 as initial paths and obtain the network latency of paths B1 and B2 respectively. Therefore, the network path latency of each application node accessing the corresponding memory pool via different initial paths can be obtained, providing network-side latency data for subsequent processing.
[0070] This embodiment determines the initial path from each application node to the corresponding memory pool via the switch and obtains the network latency of the initial path as the network path latency. This enables accurate quantification of the path latency differences caused by different topological locations and network connection relationships, providing a reliable network-side data foundation for subsequent generation of a comprehensive access latency matrix, allocation of memory regions, and determination of target network paths.
[0071] In some embodiments of this application, the memory pool includes multiple storage units, and the current access latency baseline includes the media latency of each storage unit; generating a comprehensive access latency matrix for the target task based on the network path latency and the current access latency baseline includes: generating a comprehensive access latency matrix based on the media latency and network path latency of each storage unit.
[0072] In this context, a storage unit refers to a physical or logical resource unit within a memory pool that provides data storage and access functions. Different storage units can reside within the same memory pool or in different memory pools. Storage units can utilize the same or different types of memory media; for example, they can include CXL DRAM storage units, CXL SSD storage units, or storage units composed of other memory media.
[0073] Media latency refers to the delay incurred when a memory access request arrives at a storage unit and the storage unit executes the corresponding access operation. Different types of storage units can have different media latencies. For example, the media latency of a CXL DRAM storage unit corresponds to the access latency when data hits the CXL DRAM; the media latency of a CXL SSD storage unit can be related to the access status of its internal cache, controller, and NAND flash memory, and may include the latency generated by protocol processing and controller processing.
[0074] Specifically, the memory media performance profile database records the storage unit identifier, media type, and media latency of each storage unit. Based on the storage unit identifier, the memory access management system reads the media latency of each storage unit in the current operating state from the memory media performance profile database and uses the media latency of each storage unit as a component of the current access latency baseline.
[0075] Subsequently, the memory access management system determines the network path latency for each application node in the application node set when it accesses each storage unit, and associates the network path latency with the media latency of the corresponding storage unit. For a combination of an application node and a storage unit, the system determines the corresponding comprehensive access latency matrix elements based on the network path latency when the application node accesses the storage unit and the media latency of the storage unit.
[0076] The matrix elements are arranged according to the correspondence between application nodes and storage units to generate a comprehensive access latency matrix. For example, each row of the comprehensive access latency matrix can correspond to an application node, each column can correspond to a storage unit, and the matrix element at the intersection of the row and column is used to represent the comprehensive access latency when the corresponding application node accesses the corresponding storage unit.
[0077] Combination Figure 4The deterministic equivalent collaboration example shown includes memory pool 1 and memory pool 2, both of which can include CXL DRAM storage units and CXL SSD storage units. For host application A, the network path latency when accessing each storage unit via path A1 or path A2 can be correlated with the media latency of the corresponding storage unit to form matrix elements corresponding to host application A; similarly, for host application B, the network path latency when accessing each storage unit via path B1 or path B2 can be correlated with the media latency of the corresponding storage unit to form matrix elements corresponding to host application B. Thus, the generated comprehensive access latency matrix can simultaneously reflect the network path differences between application nodes and the media performance differences between different storage units.
[0078] This embodiment generates a comprehensive access latency matrix based on the media latency of each storage unit and the network path latency of the application node accessing the corresponding storage unit. This enables the simultaneous quantification of network topology differences and heterogeneous memory media performance differences, improving the completeness and accuracy of the comprehensive access latency representation and providing a reliable data foundation for subsequent memory region allocation.
[0079] In some embodiments of this application, the media latency correction amount of the storage cell is determined based on the hit status of different storage levels in the hybrid memory pool.
[0080] Specifically, for a memory pool consisting only of CXL DRAM, its expected access latency can be expressed as: E(L)pure=Ld For a hybrid memory pool including CXL DRAM and CXL SSD, its expected access latency can be expressed as: E(L)hybrid=Hd×Ld+(1-Hd)×[Ld+Hs×Lc+(1-Hs)×Ln] Where Hd represents the hit rate of CXL DRAM, Hs represents the hit rate of the CXL SSD's internal DRAM cache, Ld represents the hit latency of CXL DRAM, Lc represents the hit latency of the CXL SSD's internal DRAM cache, and Ln represents the access latency of the NAND media. Hd and Hs can be dynamically updated based on memory capacity, data heat distribution, data prefetching strategy, and cache status.
[0081] Furthermore, the additional expected latency of the hybrid memory pool can be determined based on the difference between E(L)hybrid and E(L)pure, and this additional expected latency can be used as a media latency correction amount to update the current access latency baseline in the memory media performance profile library.
[0082] This embodiment quantifies the additional access latency generated by the hybrid memory pool by combining the hit rate of the storage tier and the corresponding access latency, thereby improving the accuracy of the current access latency baseline and the comprehensive access latency matrix.
[0083] In some embodiments of this application, a corresponding memory region is allocated in the memory pool for each application node according to the comprehensive access latency matrix, including: calculating the comprehensive access latency of each application node accessing each storage unit based on the comprehensive access latency matrix, wherein the comprehensive access latency is used to characterize the sum of network path latency and media latency; and allocating a corresponding memory region in the memory pool for each application node according to the comprehensive access latency, so as to minimize the difference between the maximum and minimum values of the comprehensive access latency corresponding to the application node.
[0084] The maximum and minimum values of the overall access latency refer to the maximum and minimum overall access latency of each application node accessing the allocated memory region under the same candidate allocation scheme. The candidate allocation scheme represents a candidate correspondence between application nodes and memory regions.
[0085] Specifically, the network path delay for the i-th application node to access the j-th storage unit can be denoted as Tnet(i,j), and the media delay for the j-th storage unit can be denoted as Tmem(j). Then, the combined access delay T(i,j) for the i-th application node to access the j-th storage unit can be expressed as: T(i,j) = Tnet(i,j) + Tmem(j) Based on the overall access latency in the overall access latency matrix, and combined with the available capacity of each storage unit and the memory requirements of each application node, multiple candidate allocation schemes are generated. In each candidate allocation scheme, the overall access latency of each application node accessing its candidate memory region is determined, and the difference between the maximum and minimum values is calculated.
[0086] For example, for candidate allocation scheme A, the delay difference D(A) corresponding to the candidate allocation scheme can be expressed as: D(A)=max{T(i,A(i))}-min{T(i,A(i))} Here, A(i) represents the storage unit allocated to the i-th application node in candidate allocation scheme A. By comparing D(A) corresponding to different candidate allocation schemes, the candidate allocation scheme with the smallest D(A) is selected as the target allocation scheme, and memory regions are divided in the corresponding storage unit according to the target allocation scheme. When different application nodes are allocated to the same storage unit, they can be divided into independent memory regions in that storage unit.
[0087] Therefore, the allocation of memory regions is not aimed at achieving the lowest access latency for a single application node, but rather at reducing the overall access latency differences between application nodes, so that different application nodes can achieve relatively balanced memory access performance.
[0088] This embodiment calculates the overall access latency of each application node to different storage units and allocates memory regions with the goal of minimizing the difference between the maximum and minimum values of the overall access latency for each application node. This reduces the difference in memory access latency between different application nodes and lowers the possibility of some application nodes becoming task execution bottlenecks due to large access latency. This achieves the technical effect of improving the collaborative execution efficiency of multiple application nodes and the rationality of memory resource allocation.
[0089] In some embodiments of this application, determining the target network path for each application node to access the corresponding memory region based on the task type, memory region, and comprehensive access latency matrix includes: determining a first difference between the comprehensive access latency corresponding to each application node based on the memory region and the comprehensive access latency matrix; and determining the target network path for each application node to access the corresponding memory region from the initial path based on the first difference and the task type.
[0090] The first difference characterizes the overall access latency required by different application nodes to access the corresponding memory regions after memory region allocation. The target network path is the network transmission path actually used by the application nodes to access the allocated memory regions during the execution of the target task.
[0091] Specifically, after the memory region allocation is completed, the comprehensive access latency corresponding to each application node is read from the comprehensive access latency matrix according to the correspondence between each application node and the allocated memory region.
[0092] For any two application nodes, the absolute difference in their combined access latency can be calculated to obtain: ΔT(i,k)=|T(i,A(i))-T(k,A(k))| Here, ΔT(i, k) represents the first difference between the i-th application node and the k-th application node, T(i, A(i)) represents the overall access latency of the i-th application node accessing its corresponding memory region, and T(k, A(k)) represents the overall access latency of the k-th application node accessing its corresponding memory region. By comparing each application node pairwise, the first difference set can be obtained, and based on the first difference set, the application nodes with relatively large overall access latency, the application nodes with relatively small overall access latency, and the degree of latency deviation between each application node can be determined.
[0093] Furthermore, based on the task type in the collaborative task request, the path evaluation rule corresponding to that task type is invoked, and the path selection requirements of each application node are determined based on the first difference. For each application node, its corresponding initial path can be used as a candidate path, and the network path latency corresponding to that candidate path can be obtained.
[0094] For a candidate path p of the i-th application node, the network path latency corresponding to the candidate path can be added to the media latency of the allocated memory region to obtain the predicted aggregated access latency when using candidate path p. Based on the predicted aggregated access latency corresponding to each candidate path, the predicted latency difference between application nodes is recalculated, and candidate paths are filtered according to the path evaluation rules corresponding to the task type.
[0095] Candidate paths that meet the corresponding path evaluation rules are determined as target network paths. The target network path can be the same as the corresponding initial path, or it can be another network path selected from the reachable network paths corresponding to the initial path. This ensures that the selection of the target network path is simultaneously adapted to the media performance of the memory region, the latency differences between application nodes, and the task type of the target task.
[0096] This embodiment determines the first difference between the overall access latency of each application node after memory region allocation is completed, and determines the target network path from the initial path in combination with the task type. This allows the selection of the network path to adapt to the requirements of different target tasks on the access latency relationship between application nodes, thereby reducing the latency difference caused by the mismatch between the fixed network path and the memory region allocation result. This achieves the technical effect of improving the consistency of multi-application node collaborative access and the execution efficiency of the target task.
[0097] In some embodiments of this application, determining the target network path for each application node to access the corresponding memory region from the initial path based on a first difference and the task type includes: in response to a strongly synchronized scenario, determining the target network path for each application node to access the corresponding memory region from the initial path based on a preset time alignment strategy and the first difference; in response to a relaxed synchronized scenario, determining the target network path for each application node to access the corresponding memory region from the initial path based on a preset tail latency optimization strategy and the first difference. The preset time alignment strategy and the preset tail latency optimization strategy can be calibrated according to actual conditions.
[0098] Strong synchronization scenarios refer to task types where each application node must complete its current stage of processing at a synchronization point before proceeding to the next stage. Examples include synchronous distributed training, barrier-synchronized computation, or collective communication tasks. Relaxed synchronization scenarios, on the other hand, allow different application nodes to complete their processing within a certain timeframe, without requiring them to arrive at the synchronization point simultaneously. Examples include asynchronous data processing or multi-source data aggregation tasks.
[0099] The preset time alignment strategy and preset tail latency optimization strategy can be calibrated according to actual conditions. Calibration of the strategy may include determining the evaluation metrics, target values, number of candidate paths, and weights corresponding to different evaluation metrics. The information used for calibration may include historical execution data of similar tasks, service level agreements, synchronization wait times of each application node, distribution of overall access latency, network load status, and the number of available network paths.
[0100] For the time alignment strategy, a strongly synchronous sample task can be run under representative network load conditions to collect the memory access completion time and synchronization wait time of each application node. The alignment deviation range is then determined based on the maximum allowed synchronization wait time of the sample task. Furthermore, the predicted access completion time of each application node under different candidate path combinations is calculated. Path evaluation parameters that minimize the difference between the maximum and minimum predicted access completion times and satisfy the service level agreement are determined as the calibration results of the time alignment strategy. In scenarios with high low latency requirements, the weight of access completion time differences in path evaluation can be increased. In scenarios with high system load, the alignment deviation range can be appropriately widened to reduce the additional pressure on system resources caused by path selection.
[0101] For tail latency optimization strategies, the maximum overall access latency or a preset high-quantile overall access latency can be selected as the tail latency evaluation index based on the overall access latency distribution corresponding to sample tasks of relaxed synchronization type. The tail latency optimization target is then determined based on the task completion time allowed by the service level agreement. By comparing the tail latency evaluation indices corresponding to different candidate path combinations, the path evaluation parameters that can reduce the overall access latency of high-latency application nodes without significantly increasing the overall access latency of other application nodes are determined as the calibration results of the tail latency optimization strategy.
[0102] Specifically, when the task type is a strongly synchronized scenario, the application nodes with relatively large and relatively small overall access latency can be determined based on the first difference, and the alignment reference time can be determined based on the overall access latency of each application node. The alignment reference time can be determined based on the maximum overall access latency among the application nodes.
[0103] For each application node, predict the overall access latency when using different initial paths, and calculate the deviation between the predicted overall access latency and the alignment reference time. The initial path with the smaller deviation is determined as the target network path for that application node. Alternatively, an alignment evaluation value Jalign can be calculated for each application node's path combination. Jalign=max{T′i}-min{T′i} Here, T′i represents the predicted aggregate access latency when the i-th application node accesses the corresponding memory region using the corresponding candidate path. The network paths corresponding to each application node in the path combinations with smaller Jalign can be determined as the target network paths, making the predicted memory access completion times of each application node tend to be consistent.
[0104] When the task type is a relaxed synchronization scenario, the application node with a high overall access latency can be identified based on the first difference. Then, based on the tail latency optimization strategy, the initial path with lower network path latency is prioritized for this application node. For each candidate path combination, the largest predicted overall access latency or the predicted overall access latency at a preset high quantile can be used as the tail latency evaluation value Jtail. The network paths corresponding to each application node in the path combination with the smaller Jtail are then determined as the target network paths.
[0105] Therefore, in a strong synchronization scenario, the selection of the target network path aims to reduce the difference in access completion time between application nodes; in a relaxed synchronization scenario, the selection of the target network path aims to reduce the tail latency of high-latency application nodes, without requiring that the overall access latency of all application nodes be strictly equal.
[0106] For example, such as Figure 5 As shown, host applications A, B, and C each establish corresponding initial paths to the memory pool. When applications A and B are strongly synchronized tasks, paths A1 and B2 can be selected respectively based on a time alignment strategy to make their predicted access completion times more consistent. When applications B and C are relaxed synchronized tasks, paths B1 and C1 can be selected respectively based on a tail latency optimization strategy to avoid one of the application nodes forming a significant latency tail.
[0107] This embodiment uses a time alignment strategy to determine the target network path for strong synchronization scenarios and a tail latency optimization strategy to determine the target network path for relaxed synchronization scenarios. This makes the selection of the network path compatible with the synchronization characteristics of the target task, thereby reducing the difference in access completion time of each application node in strong synchronization scenarios and reducing the possibility of high-latency application nodes forming latency tails in relaxed synchronization scenarios. This achieves the technical effects of reducing synchronization waiting between nodes, improving the execution efficiency of collaborative tasks and the stability of memory access.
[0108] In some embodiments of this application, a second difference between the overall access latency corresponding to each target network path is obtained; in response to the task type being a strong synchronization scenario, a first network path to be adjusted is determined from the target network paths based on the second difference; the overall access latency of the first network path to be adjusted is adjusted based on the second difference so that the overall access latency corresponding to each target network path is equal.
[0109] The second difference is used to characterize the latency differences that still exist between the overall access latency of different application nodes when accessing along the target network path. The first network path to be adjusted is the target network path whose overall access latency is less than the alignment reference latency and requires latency compensation.
[0110] Specifically, after determining the target network path corresponding to each application node, the network path latency of each target network path can be obtained, and the network path latency can be added to the media latency of the corresponding memory region to obtain the comprehensive access latency corresponding to each target network path.
[0111] The maximum value of the overall access delay corresponding to each target network path can be determined as the alignment reference delay Tref, and the second difference between the overall access delay and the alignment reference delay corresponding to other target network paths can be calculated respectively. For the i-th application node, the second difference ΔT2(i) can be expressed as: ΔT2(i) = Tref - Ttarget(i) Where Ttarget(i) represents the overall access latency corresponding to the target network path of the i-th application node. When ΔT2(i) is greater than zero, it indicates that the i-th application node is expected to complete memory access earlier than the application node with the largest overall access latency. The target network path corresponding to the i-th application node can be determined as the first network path to be adjusted, and ΔT2(i) is determined as the amount of latency compensation required for the first network path to be adjusted.
[0112] In one implementation, a micro-latency corresponding to the second difference can be dynamically inserted into the first network path to be adjusted via a switch before the synchronization barrier, so that the adjusted overall access latency meets the following requirements: T′target(i)=Ttarget(i)+ΔT2(i)=Tref Micro-latency insertion can be achieved by adjusting the credit limit, packet priority mapping, or packet forwarding rate of the corresponding virtual channel in the CXL switch through software-defined control methods. For example, the credit limit of the virtual channel corresponding to the first network path to be adjusted can be reduced, or its packet forwarding priority can be reduced, so as to rate-limit the application node with relatively advanced access progress, aligning its memory access completion time with that of other application nodes.
[0113] After the adjustment is completed, the overall access latency corresponding to each target network path can be obtained again and compared. If latency differences still exist, the corresponding first network path to be adjusted can be adjusted based on the newly obtained second difference value until the overall access latency corresponding to each target network path is equal.
[0114] This embodiment obtains the second difference between the comprehensive access delays of each target network path in a strong synchronization scenario, and performs delay compensation on the target network path with the relatively advanced access progress based on the second difference, so that the comprehensive access delays of each application node are equal. This eliminates the residual access completion time deviation after the initial selection of the target network path, reduces node waiting and computing power idleness at the synchronization barrier, and achieves the technical effect of improving the determinism and collaborative efficiency of strong synchronization task execution.
[0115] In some embodiments of this application, in response to a relaxed synchronization scenario, if a third difference exists in the second difference that is greater than or equal to a preset delay threshold, then the third difference in the second difference that is greater than or equal to the preset delay threshold is obtained; based on the third difference, a second network path to be adjusted is determined from the target network paths, and the overall access delay of the second network path to be adjusted is adjusted according to the third difference, so that the difference between the overall access delays corresponding to each target network path is less than the preset delay threshold. The preset delay threshold can be calibrated according to actual conditions.
[0116] The preset latency threshold represents the maximum allowable difference in overall access latency between different application nodes under relaxed synchronization scenarios. The third difference is the difference between the second difference and the preset latency threshold. The second network path to be adjusted is the target network path with the larger overall access latency among the two target network paths corresponding to the third difference.
[0117] The preset latency threshold can be calibrated based on the synchronization latency allowed by the service level agreement (SLA) of the target task, the historical runtime latency of the target task, the fluctuation range of network path latency, the additional media latency generated by the hybrid memory pool, and the system load. In one implementation, the preset latency threshold can be obtained by multiplying the access latency promised by the SLA by a preset adjustment coefficient, i.e.: Tth=TSLA×α Where Tth represents the preset latency threshold, TSLA represents the access latency promised by the Service Level Agreement, and α represents the adjustment coefficient. The adjustment coefficient can be obtained by statistically analyzing the combined access latency of the target task or similar historical tasks under different load conditions. During the calibration process, differences in network path latency and additional latency differences caused by the hybrid memory pool can be included in the statistical scope, and an adjustment coefficient that can meet the task synchronization requirements and will not frequently trigger adjustments can be selected.
[0118] For example, when the system load is low and there are many available network resources, a smaller preset latency threshold can be set to improve the consistency of access latency between different application nodes. When the overall system load is high or the network path latency fluctuates greatly, the adjustment coefficient can be appropriately increased to relax the preset latency threshold and avoid system oscillations caused by frequent adjustments to the network path. The preset latency threshold can be initially calibrated before the target task starts, or it can be updated based on the historical running results of the target task, and the updated value can be used in the next adjustment cycle.
[0119] Specifically, after obtaining the overall access latency corresponding to each target network path, a second difference between each target network path is calculated, and each second difference is compared with a preset latency threshold. When any second difference is greater than or equal to the preset latency threshold, the second difference is determined as the third difference.
[0120] For the two target network paths corresponding to the third difference, compare their overall access latency and determine the target network path with the larger overall access latency as the second network path to be adjusted. When there are multiple third differences, the second network path to be adjusted can be determined sequentially according to the third differences from largest to smallest, or the target network paths with larger overall access latency involved in each third difference can be jointly determined as the second network path to be adjusted.
[0121] Furthermore, the required latency reduction for the second network path to be adjusted is determined based on the third difference. The required latency reduction can be greater than the difference between the third difference and a preset latency threshold, so that the adjusted overall access latency difference is strictly less than the preset latency threshold. The network path latency corresponding to the second network path to be adjusted can be reduced by increasing the packet forwarding priority corresponding to the second network path to be adjusted, increasing the virtual channel credit, increasing the allocated network bandwidth, or adjusting the packet scheduling order.
[0122] After the adjustment is completed, the overall access latency corresponding to each target network path is obtained again, and the second difference is recalculated. If there is still a difference greater than or equal to the preset latency threshold in the recalculated second difference, the second network path to be adjusted is determined and adjusted until the difference between the overall access latency corresponding to each target network path is less than the preset latency threshold.
[0123] This embodiment calibrates a preset latency threshold based on the service level agreement of the target task, historical running latency, additional media latency of the hybrid memory pool, and system load. It only adjusts the target network path where the latency difference reaches the preset latency threshold. This allows the relaxed synchronization task to avoid significant latency tails formed by individual application nodes while allowing for a certain latency difference. This reduces unnecessary path adjustments and the resulting system oscillations, achieving a technical effect that balances the efficiency of collaborative task execution and the utilization of system resources.
[0124] In some embodiments of this application, the collaborative task request further includes latency sensitivity; accessing the memory pool according to the target network path includes: during the access to the memory pool, in response to the latency sensitivity being high, obtaining a fourth difference between the overall access latency corresponding to each target network path; determining a third network path to be adjusted from the target network paths; adjusting the overall access latency of the third network path to be adjusted according to the fourth difference so that the overall access latency corresponding to each target network path is equal; wherein, the priority of latency sensitivity is higher than that of task type.
[0125] Latency sensitivity characterizes the tolerance of a target task to differences in memory access latency between different application nodes. Latency sensitivity can be categorized into high, medium, and low sensitivity levels, and can be set by the upper-layer application through a latency sensitivity declaration interface when submitting a collaborative task request.
[0126] High sensitivity means that even small differences in memory access latency can affect the execution progress or service quality of the target task. The fourth difference is the latency difference calculated based on the real-time comprehensive access latency of each target network path during the actual operation of the target task. The third network path to be adjusted is the target network path that requires real-time latency compensation under high sensitivity conditions.
[0127] Specifically, during the process of each application node accessing the corresponding memory region through the target network path, the actual network path latency of each target network path can be collected according to a preset sampling period, and the current media latency of the corresponding memory region can be obtained. The actual network path latency is added to the current media latency to obtain the real-time comprehensive access latency corresponding to each target network path.
[0128] The maximum value among the various real-time integrated access delays can be determined as the runtime alignment reference delay Tr, and the fourth difference between the real-time integrated access delay and the runtime alignment reference delay for other target network paths can be calculated. For the i-th application node, the fourth difference ΔT4(i) can be expressed as: ΔT4(i) = Tr - Trun(i) Where Trun(i) represents the real-time aggregated access latency of the i-th application node in the current sampling period. When ΔT4(i) is greater than zero, it indicates that the memory access progress of the i-th application node is relatively advanced, and the target network path corresponding to this application node can be determined as the third network path to be adjusted, and ΔT4(i) is used as the corresponding latency compensation amount.
[0129] Based on the fourth difference, the virtual channel credit limit, packet forwarding priority, packet scheduling order, or packet forwarding rate corresponding to the third network path to be adjusted can be modified. A compensation delay corresponding to the fourth difference is inserted into the third network path to be adjusted, ensuring that the adjusted real-time integrated access delay equals the runtime alignment reference delay. After adjustment, the fourth difference can be reacquired in the next sampling period, and adjustments can continue based on the reacquired fourth difference to dynamically maintain equal integrated access delays for each target network path.
[0130] When selecting an adjustment strategy, first determine the latency sensitivity of the collaborative task request, and then determine the task type. When the latency sensitivity is high, regardless of whether the target task belongs to a strongly synchronized or loosely synchronized scenario, adjustments should be made to ensure that the overall access latency of each target network path is equal.
[0131] For example, when the target task belongs to the relaxed synchronization scenario type but has high latency sensitivity, the adjustment target is no longer set at the difference between the overall access latency and the preset latency threshold. Instead, the overall access latency corresponding to each target network path is adjusted to be equal based on the fourth difference. When the latency sensitivity is not high, the appropriate adjustment strategy is selected according to the task type corresponding to the target task.
[0132] This embodiment obtains the fourth difference between the comprehensive access latency of each target network path in real time during the memory pool access process, and prioritizes strict latency alignment of the target network path when the latency sensitivity is high. This allows high-sensitivity tasks to be free from the lenient adjustment conditions corresponding to their original task types, thereby eliminating the access latency differences caused by load changes or link status changes during operation in a timely manner. This achieves the technical effect of improving the determinism of memory access, operational stability and quality of service assurance capabilities of high-sensitivity tasks.
[0133] In some embodiments of this application, accessing the memory pool according to the target network path includes: during the access to the memory pool, in response to the existence of a congested network path to be replaced in the target network path, determining the target application node corresponding to the network path to be replaced from the application node set; and determining the replacement network path corresponding to the target application node from the initial path according to the first difference and the task type.
[0134] The network path to be replaced is the target network path that becomes congested during operation and can no longer meet the latency requirements of the target task. The target application node is the application node currently accessing the corresponding memory region through the network path to be replaced. The replacement network path is an available network path in the initial path, other than the network path to be replaced, used to replace the network path to be replaced.
[0135] Specifically, during the process of each application node accessing the memory pool through the target network path, the current network latency, bandwidth utilization, and packet loss rate of each target network path can be continuously obtained, and the running status information can be compared with the preset congestion judgment conditions.
[0136] For example, when the current network latency of a target network path exceeds the product of its promised latency and adjustment coefficient, or when the packet loss rate of the target network path reaches a preset upper limit for packet loss rate, it can be determined that the target network path is congested and designated as a network path to be replaced. Alternatively, the target network path can be determined to be congested only when its current network latency meets the congestion determination criteria for multiple consecutive sampling periods, in order to avoid unnecessary path switching caused by instantaneous latency fluctuations.
[0137] After determining the network path to be replaced, the mapping between the network path and the application node can be queried to identify the target application node currently accessing the memory pool through the network path to be replaced. Further, the network path to be replaced and currently unavailable network paths are excluded from the initial paths corresponding to the target application node to obtain candidate replacement paths.
[0138] For each candidate replacement path, its current network path latency is obtained, and then added to the media latency of the memory region corresponding to the target application node to obtain the predicted overall access latency after adopting the candidate replacement path. Based on the first difference corresponding to the target application node, the predicted latency difference between the target application node and other application nodes after adopting each candidate replacement path is calculated, and the candidate replacement paths are evaluated according to the task type of the target task.
[0139] When the target task belongs to a strongly synchronized scenario, a candidate replacement path can be selected that is closer to the overall access latency of other application nodes within the same synchronization group, thereby reducing the difference in access completion times between application nodes after path replacement. When the target task belongs to a relaxed synchronization scenario, a candidate replacement path can be selected that can reduce the tail latency of the target application node and keep the difference in overall access latency after path replacement within an acceptable range.
[0140] After determining the replacement network path, a path switching command can be issued to the switch to update the routing table corresponding to the target application node, allowing the target application node to continue accessing the original memory region through the replacement network path. During this process, the mapping relationship between the target application node and the original memory region can be maintained unchanged; only its network transmission path is replaced.
[0141] For example, see Figure 5 The initial paths for host application B include paths B1, B2, and B3. When path B1 becomes congested, host application B can be identified as the target application node. In a relaxed synchronization scenario, if the overall access latency of path B2 is greater than that of path B1, but the latency difference with other application nodes is still within an acceptable range, then path B2 can be identified as the alternative network path. In a strong synchronization scenario, the path that is closer to the overall access latency of other application nodes within the same synchronization group can be selected from paths B2 and B3 as the alternative network path. For example, if the predicted access completion time of path B3 is closer to the predicted access completion time of application A using path A1, then path B3 can be identified as the alternative network path.
[0142] This embodiment detects the congestion status of the target network path during memory pool access, and determines an alternative network path for the corresponding target application node when congestion occurs, based on the first difference and the task type. This ensures that the overall access latency after path switching is still compatible with the synchronization characteristics of the target task, thereby reducing the risk of sudden increases in access latency and task execution interruption caused by network congestion. This achieves the technical effect of improving the continuity of memory access, the operational stability of collaborative tasks, and the fault tolerance of network paths.
[0143] In some embodiments of this application, memory regions and network paths are coordinated during the execution of the target task.
[0144] Specifically, the actual overall access latency of each application node to its corresponding memory region can be continuously acquired, and the actual overall access latency can be compared with the corresponding predicted overall access latency. When the actual overall access latency of the target application node continues to increase, or when the difference between the actual overall access latency and the actual overall access latency of other application nodes no longer satisfies the equivalence cooperation condition, the candidate memory region and candidate network path corresponding to the target application node can be determined.
[0145] At the stage switching point of the target task, the data copy corresponding to the target application node is migrated from the current memory region to the candidate memory region, and the memory access mapping relationship and network routing table of the target application node are updated accordingly, so that the target application node can access the candidate memory region through the candidate network path. The stage switching point can include the end time of a training iteration, the end time of a computation cycle, or the end time of a synchronization stage, so as to reduce the impact of data migration on the operation of the target task.
[0146] Furthermore, the overall access latency, latency difference, memory region load, network path status, and latency compensation results before and after the adjustment can be recorded, and the memory media performance profile library can be updated based on the recorded results for subsequent collaborative tasks to allocate memory regions and select network paths.
[0147] This embodiment coordinates the memory region where the data is located and the corresponding network access path, so that latency anomalies can not only be alleviated by switching the network path, but also further improved by migrating the data location, thereby improving the sustainability of the equivalent collaborative state and improving the accuracy of the initial resource allocation for subsequent collaborative tasks.
[0148] As a specific embodiment of this application, refer to Figure 6 The memory access management method of this application includes: S601, in response to the target task instruction, calls the corresponding collaborative application interface to generate and obtain the collaborative task request corresponding to the target task instruction.
[0149] Specifically, collaborative task requests include the application node set, task type, and latency sensitivity.
[0150] S602, determine the initial path of each application node in the application node set to the corresponding memory pool through the switch, obtain the network latency of the initial path, use the network latency as the network path latency of the corresponding application node to access the corresponding memory pool, and obtain the current access latency baseline of the memory pool from the memory media performance profile library.
[0151] Specifically, the memory pool comprises multiple storage units, and the current access latency baseline includes the media latency of each storage unit.
[0152] S603 generates a comprehensive access latency matrix for the target task based on the media latency and network path latency of each storage unit. Based on the comprehensive access latency matrix, it calculates the comprehensive access latency of each application node accessing each storage unit. Based on the comprehensive access latency, it allocates a corresponding memory region in the memory pool for each application node to minimize the difference between the maximum and minimum comprehensive access latency of each application node.
[0153] Specifically, the overall access delay is used to characterize the sum of network path delay and medium delay.
[0154] S604: Based on the allocated memory region and the comprehensive access latency matrix, determine the first difference between the comprehensive access latency of each application node, and based on the first difference and the task type, determine the target network path for each application node to access the corresponding memory region from the initial path.
[0155] Specifically, in response to a strongly synchronized task type, the target network path is determined based on a preset time alignment strategy and the first difference; in response to a relaxed synchronized task type, the target network path is determined based on a preset tail delay optimization strategy and the first difference.
[0156] S605, obtain the second difference between the overall access latency corresponding to each target network path, and adjust the overall access latency corresponding to the target network path according to the task type.
[0157] Specifically, in response to a task type of strong synchronization scenario, a first network path to be adjusted is determined from the target network paths based on the second difference, and the overall access latency of the first network path to be adjusted is adjusted based on the second difference so that the overall access latency corresponding to each target network path is equal.
[0158] In response to the task type being a relaxed synchronization scenario, if there is a third difference in the second difference that is greater than or equal to a preset delay threshold, then the third difference is obtained, the second network path to be adjusted is determined from the target network path based on the third difference, and the overall access delay of the second network path to be adjusted is adjusted based on the third difference, so that the difference between the overall access delays corresponding to each target network path is less than the preset delay threshold.
[0159] S606, access the memory pool according to the target network path; during the access to the memory pool, in response to the high sensitivity of latency, obtain the fourth difference between the comprehensive access latency corresponding to each target network path, determine the third network path to be adjusted from the target network paths, and adjust the comprehensive access latency of the third network path to be adjusted according to the fourth difference so that the comprehensive access latency corresponding to each target network path is equal.
[0160] Specifically, latency sensitivity takes precedence over task type. When latency sensitivity is high, the third network path to be adjusted is prioritized based on the fourth difference.
[0161] S607, during the process of accessing the memory pool, in response to the existence of a congested replacement network path in the target network path, the target application node corresponding to the replacement network path is determined from the application node set, and a replacement network path corresponding to the target application node is determined from the initial path according to the first difference and the task type, so that the target application node can continue to access the corresponding memory area through the replacement network path.
[0162] In summary, compared with related technologies, the memory access management method of this application has the following technical advantages: First, by combining the network path latency of application nodes accessing the memory pool with the media latency of different storage units, a comprehensive access latency matrix is generated. Memory regions are allocated with the goal of minimizing the difference between the maximum and minimum comprehensive access latency corresponding to each application node. This can reduce the access latency differences caused by network topology asymmetry and storage media performance differences, and achieve equivalent access to heterogeneous memory pools by multiple application nodes.
[0163] Second, by selecting the appropriate network path determination strategy based on the task type of the target task, a time alignment strategy is adopted for strong synchronization scenarios and a tail delay optimization strategy is adopted for relaxed synchronization scenarios. This enables the selection of network paths to be adapted to the synchronization characteristics of the target task, thereby reducing node waiting in strong synchronization tasks and reducing the possibility of individual application nodes forming delay tails in relaxed synchronization tasks.
[0164] Third, by obtaining the difference between the overall access latency corresponding to the target network path and adjusting the corresponding target network path according to the task type, the latency difference remaining after the initial selection of the target network path can be compensated, so that the overall access latency of each application node is equal in the strong synchronization scenario and the overall access latency difference between each application node is kept within the allowable range in the relaxed synchronization scenario, thereby taking into account both the execution efficiency of collaborative tasks and the utilization rate of system resources.
[0165] Fourth, by prioritizing the identification of latency sensitivity in collaborative task requests during the execution of target tasks, and performing strict latency alignment on each target network path when the latency sensitivity is high, it is possible to avoid high-sensitivity tasks being subject to the lenient adjustment conditions set based on task type, thereby improving the memory access determinism and quality of service assurance capabilities of high-sensitivity tasks.
[0166] Fifth, by detecting the congestion status of the target network path during the access to the memory pool, and selecting an alternative network path when congestion occurs, the risk of sudden increases in access latency and task execution interruption caused by path congestion can be reduced, thereby improving the continuity of memory access, the operational stability of collaborative tasks, and the fault tolerance of the network path.
[0167] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0168] Embodiments of this application also provide a supernode server that implements the steps of any of the memory access management methods described above.
[0169] Among them, a supernode server refers to a computing system that is physically composed of multiple computing nodes tightly connected through an efficient interconnection protocol, has unified memory addressing capabilities across physical nodes, and appears as a single computing system to upper-layer software and user logic.
[0170] Embodiments of this application also provide a memory access management device 700, which can be found in detail below. Figure 7 The system includes: a first acquisition module 710, used to acquire a collaborative task request for a target task, wherein the collaborative task request includes an application node set and a task type; a second acquisition module 720, used to acquire the network path latency of each application node in the application node set accessing the corresponding memory pool, and acquire the current access latency baseline of the memory pool from the memory media performance profile library; an allocation module 730, used to generate a comprehensive access latency matrix for the target task based on the network path latency and the current access latency baseline, and allocate a corresponding memory region in the memory pool for each application node based on the comprehensive access latency matrix; a determination module 740, used to determine the target network path for each application node to access the corresponding memory region based on the task type, memory region, and comprehensive access latency matrix; and an access module 750, used to access the memory pool based on the target network path.
[0171] This application also provides an electronic device 800, which is described in detail below. Figure 8 It includes: a memory 810 for storing computer programs; and a processor 820 for implementing the steps of any of the memory access management methods described above when executing the computer program.
[0172] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the memory access management methods described above.
[0173] This application also provides a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of any of the memory access management methods described above.
[0174] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0175] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0176] The foregoing has provided a detailed description of a memory access management method, supernode server, device, medium, and product provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A memory access management method characterized by comprising: include: Obtain the collaborative task request of the target task, wherein the collaborative task request includes an application node set and a task type; Obtain the network path latency of each application node in the application node set accessing the corresponding memory pool, and obtain the current access latency baseline of the memory pool from the memory media performance profile library; Based on the network path latency and the current access latency baseline, a comprehensive access latency matrix for the target task is generated, and based on the comprehensive access latency matrix, a corresponding memory region is allocated in the memory pool for each application node. Based on the task type, the memory region, and the comprehensive access latency matrix, determine the target network path for each application node to access the corresponding memory region; The memory pool is accessed according to the target network path.
2. The memory access management method of claim 1, wherein, The method of obtaining the collaborative task request for the target task includes: In response to the target task instruction, the corresponding collaborative application interface is invoked to generate the collaborative task request corresponding to the target task instruction.
3. The memory access management method of claim 1, wherein, The equivalent collaborative system includes a switch and the memory pool, wherein the application nodes establish a connection with the memory pool through the switch; obtaining the network path latency for each application node in the application node set to access the corresponding memory pool includes: Determine the initial path for each application node to the corresponding memory pool via the switch; Obtain the network latency of the initial path and use the network latency as the network path latency.
4. The memory access management method of claim 3, wherein, The memory pool includes multiple storage units, and the current access latency baseline includes the media latency of each of the storage units; Based on the network path latency and the current access latency baseline, a comprehensive access latency matrix for the target task is generated, including: The comprehensive access latency matrix is generated based on the media latency of each storage unit and the network path latency.
5. The memory access management method of claim 4, wherein, The step of allocating a corresponding memory region in the memory pool for each application node based on the comprehensive access latency matrix includes: Based on the comprehensive access latency matrix, the comprehensive access latency of the application node accessing each of the storage units is calculated, wherein the comprehensive access latency is used to characterize the sum of the network path latency and the medium latency; Based on the overall access latency, a corresponding memory region is allocated in the memory pool for each application node, so as to minimize the difference between the maximum and minimum values of the overall access latency for the application node.
6. The memory access management method of claim 5, wherein, The step of determining the target network path for each application node to access the corresponding memory region based on the task type, the memory region, and the comprehensive access latency matrix includes: Based on the memory region and the comprehensive access latency matrix, a first difference between the comprehensive access latencies corresponding to each application node is determined; Based on the first difference and the task type, the target network path for each application node to access the corresponding memory region is determined from the initial path.
7. The memory access management method of claim 6, wherein, The step of determining the target network path for each application node to access the corresponding memory region from the initial path based on the first difference and the task type includes: In response to the task type being a strongly synchronous scenario, a target network path for each application node to access the corresponding memory region is determined from the initial path based on a preset time alignment strategy and according to the first difference. In response to the task type being a relaxed synchronization scenario, based on a preset tail latency optimization strategy and according to the first difference, the target network path for each application node to access the corresponding memory region is determined from the initial path.
8. The memory access management method of claim 7, wherein, Also includes: Obtain the second difference between the overall access latency corresponding to each of the target network paths; In response to the task type being the strongly synchronized scenario type, a first network path to be adjusted is determined from the target network path based on the second difference; The overall access latency of the first network path to be adjusted is adjusted based on the second difference so that the overall access latency corresponding to each target network path is equal.
9. The memory access management method of claim 8, wherein, Also includes: In response to the task type being the relaxed synchronization scenario type, if there is a third difference in the second difference that is greater than or equal to a preset delay threshold, then the third difference in the second difference that is greater than or equal to the preset delay threshold is obtained. Based on the third difference, a second network path to be adjusted is determined from the target network paths, and the overall access latency of the second network path to be adjusted is adjusted based on the third difference, so that the difference between the overall access latency corresponding to each target network path is less than the preset latency threshold.
10. The memory access management method of claim 1, wherein, The collaborative task request also includes latency sensitivity; the access to the memory pool based on the target network path includes: During the access to the memory pool, in response to the high latency sensitivity, a fourth difference between the overall access latency corresponding to each target network path is obtained; Determine a third network path to be adjusted from the target network path; The overall access latency of the third network path to be adjusted is adjusted based on the fourth difference to make the overall access latency of each target network path equal; wherein... The latency sensitivity takes precedence over the task type.
11. The memory access management method of claim 6, wherein, Accessing the memory pool according to the target network path includes: During the access to the memory pool, in response to the presence of a congested network path to be replaced in the target network path, the target application node corresponding to the network path to be replaced is determined from the application node set. Based on the first difference and the task type, the replacement network path corresponding to the target application node is determined from the initial path.
12. A supernode server, characterized by The steps of implementing the memory access management method as described in any one of claims 1 to 11.
13. An electronic device, comprising: include: Memory, used to store computer programs; A processor for implementing the steps of the memory access management method as described in any one of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the memory access management method as described in any one of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the memory access management method as described in any one of claims 1 to 11.
