A method and system for segmenting and parallelizing simulation of large model training traffic
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]尽管上述自动切分思路为解决现有技术瓶颈提供了方向,但现有流量自动切分方法仍存在诸多不足,具体表现为:切分精度不足、未与并行仿真框架深度融合、资源分配不合理等问题,难以充分发挥硬件性能,仿真加速效果有限,无法满足大模型训练场景下高效、高保真的仿真需求
[0019]本发明所述的有益效果为:本发明利用针对大模型训练流量的切分方法,将复杂的训练流量切分为利于分布式仿真的相对简单流量;基于NS-3的MPI分布式仿真方法,将网络拓扑进行划分,利用多进程对单个最小仿真单元加速仿真,每个最小仿真单元的流量分至多个进程并行处理,仿真效率提高,将仿真加速提高至仅切分方法的3倍以上;结合切分方法将完整通信树流量切分为多个最小仿真单元,同时再并行仿真这些最小仿真单元,最终叠加的仿真加速达到原本完整通信树仿真的55倍左右;充分利用硬件条件,使用尽可能多的CPU核心参与流量仿真,最大化仿真加速效果。得到完整大模型训练流量的仿真结果,用于后续的数据分析。
Smart Images

Figure CN122578464A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of network simulation technology, specifically relating to a method and system for segmenting and parallelizing simulation of training traffic for large models. Background Technology
[0002] With the rapid development of artificial intelligence technology, the training and inference scale of large models continues to iterate and upgrade. Their underlying network communication architecture exhibits typical characteristics such as large-scale networking, complex communication modes, high concurrency of traffic, and diverse forms. During the training of large models, due to the combined effects of various parallel mechanisms such as model parallelism, data parallelism, and pipeline parallelism, the network traffic during training not only has a massive data scale but also exhibits a significant "hierarchical-periodic" structure—the boundaries of network traffic are clear and their independence is prominent between different sets of communication operators, training stages, and even micro-batches. This characteristic provides a natural foundation for traffic decomposition and parallel simulation.
[0003] However, existing large-scale network simulation technologies still have significant bottlenecks, making it difficult to adapt to the needs of large-scale training scenarios. Currently, most mainstream large-scale model simulation methods rely on single-process or coarse-grained distributed scheduling strategies, which are prone to insufficient simulation performance and poor scalability when facing high-concurrency, hierarchical, and large-scale communication traffic. Especially in the traditional "manually segmenting" traffic mode, the simulation system cannot efficiently identify and utilize the structural independence of large-scale model training traffic, resulting in excessively high parallel scheduling overhead and low hardware resource utilization. This not only significantly prolongs the simulation time but also makes it difficult to guarantee the high fidelity of the simulation results, failing to support the needs of fast and accurate large-scale large-scale model training network simulation.
[0004] To overcome the aforementioned technical bottlenecks, existing research has proposed a technical approach based on automatic traffic segmentation. The core idea is to decompose the originally complex and coupled training traffic of a large model into a series of independent minimum simulation units, thereby achieving parallel scheduling and simulation acceleration. The core basis of this technical approach is: First, the communication traffic in large model training mainly consists of multiple aggregated communication stages (such as typical aggregated communication operators like AllReduce and AllGather). The traffic coupling between different operators is low and the boundaries are clear, serving as an important basis for traffic segmentation. Second, each aggregated communication operator typically contains multiple rounds of independent communication, with each round having strict temporal boundaries, isolated from each other, and without interference. Third, this hierarchical and periodic traffic distribution characteristic provides a natural demarcation point for the accurate segmentation of simulation tasks. The overall network simulation task can be decomposed into several independent minimum simulation units, and simulation efficiency can be improved through independent simulation and parallel scheduling of each unit.
[0005] Although the above-mentioned automatic segmentation approach provides a direction for solving existing technical bottlenecks, existing automatic traffic segmentation methods still have many shortcomings, specifically: insufficient segmentation accuracy, lack of deep integration with parallel simulation frameworks, unreasonable resource allocation, difficulty in fully utilizing hardware performance, limited simulation acceleration effect, and inability to meet the high-efficiency and high-fidelity simulation requirements in large model training scenarios.
[0006] Furthermore, after the complete training traffic is divided into multiple minimal simulation units, existing methods typically lack a unified scheduling mechanism for these units, making it difficult to dynamically allocate logical process resources based on the differences in communication load and the number of available computing cores for each unit. If each simulation unit adopts a fixed number of processes or a simple sequential execution method, it can easily lead to some computing cores being idle and some tasks taking too long to execute, thus limiting the overall simulation acceleration effect. Summary of the Invention
[0007] To address the aforementioned technical problems, this invention provides a method and system for segmenting and parallelizing simulation of large model training traffic, which deeply integrates a parallel simulation framework to achieve higher acceleration while ensuring simulation fidelity.
[0008] The present invention provides a method for partitioning and parallelizing simulation of large model training traffic, comprising the following steps: Step 1: Obtain large model training traffic data, generate and format the processing workload; Step 2: Using a flow-based automatic segmentation algorithm, the complete workload is segmented according to the flow coupling relationship between operators to obtain several independent minimum simulation units. Step 3: Based on the communication load and available computing cores of each minimum simulation unit, a multi-task multi-process scheduling strategy is adopted to determine the execution order, execution batches and number of logical processes for each minimum simulation unit. Step 4: Based on the scheduling results obtained in Step 3, perform MPI parallel simulation on each minimum simulation unit and aggregate the FCT results output by each minimum simulation unit.
[0009] Furthermore, step 1 specifically includes: Step 1.1: Construct a directed acyclic graph describing the dependencies. The input is the parameter settings data for the large model, which includes the model type, network topology scale, and descriptive text of the dependencies between operators. Step 1.2: Generate the operation files and dependency files required for the simulation system based on the directed acyclic graph. The following processing is performed by the script: read and parse the large model parameter text, extract the model type, network topology, and computing node scale information; generate traffic data that conforms to the training characteristics of the large model based on the communication mode of the set communication operator and the temporal dependency relationship between operators; output two txt format structured files, where the operation file records the source node IP, destination node IP, and data packet size of each traffic, and the dependency file records the dependency relationship between each traffic in a directed acyclic graph, specifying that some traffic must start after the transmission of its dependent traffic has ended.
[0010] Furthermore, the complete workload is the traffic data generated in step 1 that conforms to the training characteristics of a large model, including operation files and dependency files; the segmentation process is as follows: input the operation files and dependency files obtained in step 1, parse the directed graph structure in the dependency files to identify the temporal dependencies between each operator, directly segment operators that do not intersect in time, and segment operators that intersect in time by comparing whether the traffic paths intersect. If they do not intersect, segment them to finally obtain several independent minimum simulation units.
[0011] Furthermore, step 3 specifically involves: Step 3.1: Obtain the total number of available computing cores and determine the load weight based on the number of traffic entries, communication data volume, or expected simulation time of each smallest simulation unit; Step 3.2: Initialize and allocate a preset minimum number of logical processes for each minimum simulation unit, and sort each minimum simulation unit according to its load weight; Step 3.3: When the remaining computing cores are available, calculate the expected reduction in simulation time brought about by increasing the number of logic processes in each smallest simulation unit, and select the smallest simulation unit with the largest expected reduction in simulation time for logic process resource allocation; Step 3.4: Based on the number of logical processes allocated to each minimum simulation unit, determine the execution batch and execution order of each minimum simulation unit, so that the total number of logical processes occupied in the same execution batch does not exceed the total number of available computing cores. Step 3.5: When a minimum simulation unit completes its simulation, reclaim the logic process resources it occupies and redistribute the reclaimed logic process resources to the incomplete minimum simulation units until all minimum simulation units complete their simulations.
[0012] Furthermore, in step 3.3, when the remaining computing cores are available, a greedy allocation of logical process resources is performed on each smallest simulation unit, including: (1) Let P be the total number of available computing cores, Crem be the number of currently available allocable cores, Wi be the load weight of the i-th smallest simulation unit, pi be the number of currently allocated logical processes, and pi be the number of candidate logical processes to be added. ; (2) Using the expected simulation time model, the expected simulation time of the i-th smallest simulation unit under pi logic processes is expressed as: Wherein, Wi is determined by the number of traffic entries, the total amount of communication data, or the historical calibration coefficient of the smallest simulation unit; (3) For satisfying and For each smallest simulation unit that is an integer power of 2, the calculation increases. Expected reduction in simulation time after each logical process: ; (4) Among all candidate minimum simulation units, select the minimum simulation unit with the largest ΔTi, and update its logic process number to... and update ; (5) Repeat steps (3) to (4) until Or, for all minimum simulation elements, there are no candidate Δpi that satisfy the constraints, or all .
[0013] Furthermore, step 4 specifically involves: Step 4.1: Based on the MPI parallel computing framework, according to the number of logical processes determined in Step 3, the network topology of each smallest simulation unit is divided equally according to the number of logical processes using the topology partitioning algorithm to distribute the load and ensure load balance among processes, thereby accelerating the simulation. Step 4.2: Execute the core simulation program according to the allocated number of processes, load the NS-3 network simulation core program, initialize the multi-process parallel environment, distribute the operation file data of each smallest simulation unit to the corresponding process, each process independently executes discrete event simulation, handles data packet transmission, queuing, forwarding and other behaviors, cross-process communication is handled through message passing interface, and outputs FCT data file that records the start time, end time and transmission duration of each data stream; Step 4.3: Record the simulation clock's time consumption. Concatenate all FCT files according to the communication dependency tree. Add the end time of the dependent traffic to the start and end times of the data streams that depend on other traffic to ensure the causal consistency of the simulation results and obtain complete FCT information.
[0014] Further, in step 4.1, a topology partitioning algorithm is used to divide the network topology of each smallest simulation unit equally according to the number of processes, specifically including: 1) Based on the actual topology, retrieve the preset topology parameters from the topology preset table. The topology preset table contains multiple standardized configurations, which correspond to the number of spine switches (SPINE), the number of leaf switches (LEAF), and the number of servers (SERVER) under each leaf. 2) Calculation process allocation strategy: The number of leaf switches (leafP) that each process is responsible for in the simulation is obtained by dividing LEAF by DST, and the number of spine switches (spineP) that each process is responsible for is calculated by dividing SPINE by DST and then rounded down to ensure process load balancing. 3) Create nodes and assign processes: Server nodes are assigned to processes using a system identifier (systemId), which is determined by dividing the server index by leafP. That is, all servers under the same leaf switch are assigned to the same system identifier process. Leaf nodes and spine nodes are also assigned based on the system identifier. The systemId of a leaf node is determined by dividing the leaf node index by leafP, and the systemId of a spine node is determined by dividing the spine node index by the rounded-down value of spineP. 4) Establish link structure: Configure point-to-point links between the server and its leaf switches. The link is usually set to a data transmission rate of 25Mbps and a latency of 2 microseconds. A full-connection topology is formed between the leaf switches and the spine switches to ensure that all leaf switches are interconnected with the spine switches. 5) Install the protocol stack and routing: Use InternetStackHelper to install the IP protocol stack; If the NIX protocol is enabled, route priorities are configured using Ipv4NixVectorHelper and Ipv4StaticRoutingHelper; otherwise, the routing table is automatically populated using Ipv4GlobalRoutingHelper. Install a queue management mechanism and deploy the CoDelQueueDisc queue scheduler on all server-leaf links and leaf-spine links through TrafficControlHelper to optimize network traffic processing performance; 6) IP address allocation: Automatically allocate an independent subnet to each server cluster connected to each leaf switch, and automatically allocate a point-to-point subnet to each uplink link between a leaf switch and a spine switch, ensuring that the link addresses are conflict-free and meet the subnet mask requirements, thereby completing the complete construction and partitioning of the network topology.
[0015] Furthermore, in step 4.2, the operation file data of each smallest simulation unit is distributed to the corresponding process using a load loading and mapping algorithm, specifically including: 1) Batch load operation files within a specified range (operateStart to operateEnd), located in the path scratch / rdma_operate{i}.txt; when parsing the file content, skip blank lines, comment lines starting with #, and the identifier line "stat rdma operate:"; when the "phase X" identifier line is detected, create a new communication phase and accumulate the time offset (X / 1e6 seconds); for the "Type rdma_send ..." operation instruction line, parse the source node identifier (srcNodeId), source port (srcPort), target node identifier (dstNodeId), target port (dstPort), and message length (msgLen) and other stream information, and store the parsing results in memory; 2) Loading the current stage of a single operation file: Check whether the current stage has completed the simulation. If not, record the stage start time and traverse all flows in the stage. Calculate the source process identifier (srcSystemId = srcNodeId / (SERVER × LEAF / DST)) and target process identifier (dstSystemId = dstNodeId / (SERVER × LEAF / DST)) based on the node identifier, and determine the source / target leaf switch index and server index at the same time. If the current process is the source process identifier, install the OnOffApplication application, configure it as always on (OnTime = Constant(1)) and always off (OffTime = Constant(0)) and set the maximum number of bytes to msgLen. Specify the remote address as the receiving server interface and introduce 0 to 1 millisecond random jitter in the startup time to avoid synchronization storm. If the current process is the target process identifier, avoid repeatedly creating the PacketSink receiving endpoint through the global registry mechanism. Bind the completion callback function (TraceConnectWithoutContext("RxWithAddresses") when it is first created. flowRx_cb), and each file is bound only once; at the same time, the expected number of packets is calculated (msgLen divided by 1448 bytes of UDP payload and rounded up), and if there are no packets in a stage, the next stage is recursively loaded.
[0016] Furthermore, in step 4.2, a dependent scheduling algorithm is used to control the order of traffic transmission, specifically including: 1) Parse the dependency configuration file, which defines task dependencies in the format of "child range:parent range" (e.g., "3-5:0-2"). Process single numbers or range expressions through the range resolution function to create a set of parent tasks for each subtask, ensuring a structured representation of task dependencies. 2) Initialize the dependency counting mechanism, set the remaining dependency count for each subtask to be equal to the size of its parent task set; at the same time, maintain a subtask list for each parent task and mark the task start status; before the simulation starts, traverse all tasks and trigger the start operation for subtasks with a remaining dependency count of zero. 3) When a task is completed, a completion callback function is triggered. The completion callback function iterates through the list of subtasks of the parent task and reduces the number of remaining dependencies for each subtask one by one. If the number of remaining dependencies drops to zero, the subtask is started immediately. This achieves dynamic scheduling and non-blocking execution of task dependencies, ensuring efficient progress of the simulation process and accurate management of task dependencies.
[0017] The present invention also provides a simulation system for splitting and parallelizing training traffic for large models. The system is built based on the method and includes a parameter setting module, a load generation module, a task splitting module, a multi-task multi-process scheduling module, a topology partitioning module, and a simulation execution module. The parameter setting module is used to configure parameters for large models, including model type and network topology scale. The load generation module is used to generate traffic data for large model training based on the dependencies between operators using a traffic generation script. It includes operation files that record the traffic source, destination address and size, and dependency files that record traffic dependencies. The task segmentation module is used to segment the complete training traffic into several independent minimum simulation units based on the traffic coupling relationship between operators, the temporal dependency relationship, and whether the traffic paths intersect. The multi-task multi-process scheduling module is used to determine the execution order, execution batch, and number of logical processes of each minimum simulation unit based on the total number of available computing cores, the load weight of each minimum simulation unit, and the logical process allocation constraints; and is used to reclaim the logical process resources occupied by the minimum simulation unit after it completes the simulation, and redistribute the reclaimed logical process resources to the minimum simulation units that have not yet completed the simulation. The topology partitioning module is used to divide the network topology of the corresponding smallest simulation unit into equal parts according to the number of logical processes determined by the multi-task multi-process scheduling module. The simulation execution module is used to load the NS-3 core program to perform discrete event simulations, process network behavior, and generate and summarize logs and FCT data files for analysis.
[0018] Furthermore, the simulation execution module includes: MPI Initialization and Process Management Submodule: Used to initialize the MPI environment, color-code processes according to the total number of processes and topology size, and establish communication domains; Topology Construction and Partitioning Submodule: Used to construct the leaf-spine network topology according to configuration parameters, distribute server and switch nodes evenly to each MPI process according to the number of processes, and install network protocol stack, routing algorithm and queue management; Load loading and mapping submodule: used to read multiple operation files, parse traffic information, allocate processes according to node ID, and install the send / receive application only in the corresponding process; Dependency scheduling submodule: Parses dependency files, constructs a traffic dependency graph, and implements dependency-based task startup; Synchronization and Progress Control Submodule: Used to perform MPI global synchronization when the flow simulation of each stage is completed, determine the process completion status, and control the process to switch to the next stage of flow simulation and the termination of simulation. The Performance Statistics and Logs submodule records the completion time (FCT) and MPI synchronization time for each stage, calculates the synchronization overhead percentage, and outputs log files and console statistics.
[0019] The beneficial effects of this invention are as follows: This invention utilizes a segmentation method for large model training traffic, dividing complex training traffic into relatively simple traffic that is conducive to distributed simulation; based on the NS-3-based MPI distributed simulation method, the network topology is divided, and multi-process simulation is used to accelerate the simulation of a single smallest simulation unit. The traffic of each smallest simulation unit is distributed to multiple processes for parallel processing, improving simulation efficiency and increasing simulation acceleration to more than three times that of the segmentation method alone; combining the segmentation method to divide the complete communication tree traffic into multiple smallest simulation units, and then simulating these smallest simulation units in parallel, the final superimposed simulation acceleration reaches approximately 55 times that of the original complete communication tree simulation; fully utilizing hardware conditions, using as many CPU cores as possible to participate in traffic simulation, maximizing the simulation acceleration effect. Simulation results of the complete large model training traffic are obtained for subsequent data analysis. Attached Figure Description
[0020] Figure 1 This is a method framework diagram, showing the complete process of generating traffic for large-scale model training, splitting traffic, running MPI simulations, and finally aggregating the results. Figure 2 This demonstrates the simulation acceleration effect of each operator on deepseek traffic in a 128-node topology; Figure 3 This demonstrates the speedup effect of the MPI method on the splitting results of deepseek traffic in a 128-node topology. Detailed Implementation
[0021] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0022] like Figure 1 As shown, this invention proposes a method for partitioning and parallelizing simulation of large model training traffic. This method is executed in a discrete event-driven network simulator and includes the following steps:
[0023] Step 1: Workload generation and formatting; specifically:
[0024] Step 1.1: Construct a directed acyclic graph (DAG) describing dependencies. The input is large model parameter settings data, including model type parameter text, network topology scale parameter text, and operator dependency description text. The model parameter text, as input to this method, uses a declarative text format, and its structure can be parameterized as follows: the first line of the file is the header, formatted as a triple (N... m D max ,I), where Nm represents the model name, D max This indicates the maximum number of devices, and 'I' represents the number of iterations (e.g., instance(deepseek,2,1) specifies the model type, number of devices, and number of iterations); each subsequent line defines a communication node in the format of a quadruple. Where L is the level number ( ), controls the execution order, Mp is the parallel mode enumeration value (value range {TP, EP, PP, DP}), D parent It supports parent node dependencies (supports single node references such as TP1 or multiple nodes separated by slashes such as PP2 / EP3). This is a key-value pair mapping for the parameter list, containing the number of hosts H. num Message length L msg (e.g., 32×1024×1024 bytes), data parallelism D p Equipment No. D id ( ) and communication direction F dir (F) dir =1 indicates forward propagation, F dir =0 indicates backpropagation). A directed acyclic graph Gd=(V,E) is constructed using hierarchical numbering and parent node dependencies. ) Describe dependencies, where dependencies between nodes are defined by edge set E, thereby enabling unified modeling of hybrid parallel strategies.
[0025] Step 1.2: Generate operation files and dependency files for the input simulation system based on the directed acyclic graph. The following sub-processes are executed via script: reading the input large model parameter text and parsing out basic information such as model type, network topology, and computing node size; generating traffic data conforming to the training characteristics of the large model based on the communication mode of the set communication operator and the temporal dependencies between operators; outputting two structured text files: an operation file (txt format) recording detailed information for each traffic entry, including source node IP address text, destination node IP address text, and packet size; and a dependency file (txt format) recording the dependencies between traffic entries in the operation file using a directed acyclic graph structure, explicitly indicating that some traffic must begin after the transmission of its dependent traffic has ended.
[0026] The operation file output in step 1.2 adopts a staged structure, and its format can be parameterized as follows: the first line of the file is the identifier string S. header The string "=" indicates that this file is an RDMA operation statistics file; subsequent content is organized by phases, with a total of N phases. p P in each stage i (where i = 1, 2, ..., N) p ) with tuple (t w,i R i ) indicates that t w,i Waiting time (unit: microseconds, e.g., t) w,i =3000 indicates that this stage will wait 3000 microseconds before execution. i This is the set of operation records within this phase. Each R... i Includes m i 1 record, each record r j (j=1,2,…,m) i The format is a 7-tuple (T, s) n s p d n d p , p, l), where: T is the operation type (such as the fixed value "rdma_send"), s n s is the source node number (integer). p d is the source port number (integer). n Number the target node (integer), d p Here, P is the target port number (integer), p is the priority (a non-negative integer, the smaller the value, the higher the priority), and l is the message length (in bytes, e.g., l=33554432 represents 32MB). The execution rule can be formalized as: for any two stages P i and P k(i < k), the execution between stages is serial in the order of waiting time, that is, P i is executed only after completion k ; and all operations r j ∈ R i within a stage can be executed in parallel, satisfying ∀r a, , with overlapping execution times. For example, the record instance r_j = (\text{"rdma_send"}, 0, 1000, 1, 1000, 0, 33554432) represents sending a 32MB message from node 0 port 1000 to node 1 port 1000 with a priority of 0. This structure precisely describes the network traffic pattern of each communication stage in distributed training, and realizes timing and parallel control through parameters t w,i and r j .
[0027] The dependency file output by Step 1.2 adopts a colon-separated format, and its structure can be parametrically defined as: each line defines a set of operation dependencies in the format of the string pattern range D :range P , where range D represents the range of dependent operations (such as the interval [a, b], ), and range P represents the range of pre-operations (such as the interval [c, d], c, d ∈ Z+). During system parsing, for each line of dependency, each operation d in the set of dependent operations i adds all operations in the set of pre-operations as dependencies, that is, establishing a dependency mapping , thus realizing batch definition. For example, the instance range D = [8, 15], range P = [0, 7] means that operations 8 to 15 depend on operations 0 to 7, and the dependency relationship can be formulated as , d depends on each . For multiple-line definitions, such as when there are simultaneously range D = [64, 71]:rangeP1 = [48, 55] and rangeD = [64, 71]:rangeP2 = [56, 63], the dependency relationship is that D = {64,..., 71} depends on P1 ∪ P2 simultaneously, that is, ∀d ∈ D, d depends on ∀p ∈ P1 ∪ P2, ensuring that operations 64 to 71 need to wait for both sets P1 and P2 to complete before execution. Through multi-line iterative definition, a complete directed acyclic graph is described, thus supporting the causal consistency modeling of distributed training traffic.
[0028] Step 2: Based on existing traffic-based automatic segmentation algorithms, and according to the traffic coupling relationships between specific operators, segment the complete workload (referring to the traffic data generated in Step 1 that conforms to the training characteristics of a large model; the dataset includes operation files and dependency files; segmentation refers to the segmentation of operation files and dependency files, where dependency files refer to the dependency graph). The specific inputs are the operation files and dependency files obtained in Step 1. By parsing the directed graph structure in the dependency files, the temporal dependencies between operators are identified. For operators that do not overlap temporally, they are segmented. For operators that do overlap temporally, the traffic paths within them are compared; if they do not overlap, they are segmented. For example: Suppose the complete set of operators refers to the set of operation files and dependency files as O={1,2,3,4}. After step 2, we obtain three simulation units U1={1,2}, U2={3}, and U3={4}. The partitioning result guarantees completeness: U1∪U2∪U3={1,2,3,4}=O, and mutual exclusion: Based on the above principles, the complete traffic is segmented to obtain several independent minimum simulation units. These are specifically defined as indivisible combinations of set communication operators, which do not overlap in time and space and have clearly defined boundaries. Each minimum simulation unit consists of an operation file and dependency files, and can serve as the smallest scheduling unit, supporting independent simulation initialization, execution, and result collection.
[0029] Step 3: Multi-task, multi-process scheduling. After traffic segmentation, the system obtains multiple independent minimum simulation units. Since the number of available CPU cores is limited, using a fixed number of processes or a simple sequential execution method for all minimum simulation units can easily lead to insufficient utilization of core resources. Therefore, this invention introduces a multi-task, multi-process scheduling strategy between the segmentation step and the MPI parallel simulation step to determine the execution order, execution batches, and number of logical processes for each minimum simulation unit.
[0030] Specifically, the system first obtains the total number P of currently available computing cores and calculates the load scale of each minimum simulation unit, which includes the number of traffic entries, the total amount of communication data, or the estimated simulation time. Then, a preset minimum number of logical processes is allocated to each minimum simulation unit, and the minimum simulation units are sorted according to their load scale from largest to smallest. While available cores still exist, the system evaluates the estimated reduction in simulation time that can be achieved by increasing the number of logical processes in different minimum simulation units, and prioritizes allocating computing resources to the minimum simulation unit that benefits the most.
[0031] During simulation execution, once a minimum simulation unit completes its simulation, the system reclaims the logical process resources it occupied and redistributes these resources to the remaining minimum simulation units. Through this cyclical process of resource allocation, task execution, and resource reclamation, multiple minimum simulation units can dynamically reuse computing resources under limited computing core conditions, thereby reducing the overall simulation completion time.
[0032] The calculation process for the expected reduction in simulation time is as follows:
[0033] Suppose that after step 2, N minimum simulation units are obtained, the number of traffic entries in the i-th unit is flow_count[i], and the number of currently allocated logical processes is pi; the estimated simulation time T(pi) of each unit under pi logical processes corresponds to the relative completion time flow_count[i] / pi in the optimization objective.
[0034] When the remaining computational cores are available, for each smallest simulation unit i, based on its current process number pi, select a candidate increment Δpi that satisfies the constraint of an integer power of 2, and calculate the time gain: Time Gain In one implementation, T(pi) is taken as flow_count[i] / pi, then: time benefit Among all candidates (i, Δpi), select the smallest simulation unit with the greatest time gain, update its process count to pi + Δpi, and deduct the remaining available cores; repeat the above process until all available cores are allocated or there are no tasks to allocate.
[0035] Example: Assume a total of 16 available computing cores, P = 16. After partitioning, this results in 4 minimum simulation units with flow counts of 800, 400, 200, and 100 respectively. Initially, each unit has 1 process. For unit 1, if candidate Δp = 2, the time gain is approximately 800 / 1 − 800 / 3 ≈ 533.3. For unit 2, the time gain is approximately 266.7 when Δp = 2. Therefore, we prioritize adding 2 processes to unit 1, and then continue iterative allocation until we obtain the process allocation scheme and execution batches for each unit.
[0036] Step 4: Perform MPI parallel simulation and FCT result aggregation on the segmented results, specifically as follows: Step 4.1: Based on the number of logical processes determined in Step 3, accelerate each minimum simulation unit using the MPI parallel computing framework, and divide the network topology of the corresponding minimum simulation unit equally according to the number of logical processes to distribute the load to each logical process and achieve parallel simulation. Step 4.2: Execute the core simulation program according to the allocated number of processes. The inputs are the minimum simulation unit from Step 3 and the number of logical processes from Step 4.1. The specific logic of the simulation program is as follows: Based on the allocated number of logical processes, initialize the multi-process parallel computing environment, load the NS-3 network simulation core program simultaneously in each parallel process, and then distribute the operation file data of each minimum simulation unit to the corresponding process. Each process independently executes discrete event simulation, handling network behaviors such as packet transmission, queuing, and forwarding. Communication events across logical processes are handled through the message passing interface. The program output is a Flow Complete Time (FCT) data file, recording performance metrics such as the start time, end time, and transmission duration of each data stream.
[0037] Step 4.3: After all simulation programs in Step 4.2 have finished, record the simulation time. The simulation time is the clock time of the program running. Based on the complete communication dependency tree, the individual FCT files are concatenated. Specifically, all the obtained FCT information is gathered into the same file. For traffic that depends on the end of other traffic before it starts, its start and end times are both increased by the end time of the dependent traffic. This action is to ensure the causal consistency of the simulation results, thereby obtaining complete FCT information.
[0038] Step 4.3 outputs the total FCT file as the output of this method. It uses a tab-delimited text format, and its structure can be parameterized as follows: the first line of the file is a header containing an ordered sequence of fields (timestamp t). s (Unit: seconds, floating-point number), representing the start time of the stream; stream size f s (Unit: bytes, positive integer); Stream completion time t fct (Unit: microseconds, positive integer), derived from the formula t fct =t end -t s The calculation shows that t end The stream completion event time (i.e., the time when the data stream transmission ends); the baseline stream completion time t b (Unit: microseconds, positive integer), calculated based on ideal network conditions, formula is t b =f s / B+D, where B is the link bandwidth (bps) and D is the propagation delay (microseconds); slowdown ratio r s (Floating-point number), from the formula r s =t fct / t b The baseline round-trip time t is directly derived. rtt (Unit: microseconds, positive integer), the calculation formula is t rtt=2×D (assuming path symmetry); priority p (non-negative integer); and incast stream flag i f (binary value, Each field is separated by a space; each subsequent line is a stream record, formatted as an octet R=(t s ,f s ,t fct ,t b ,r s ,t rtt ,p,i f Each field is separated by a tab character. For example, instance record R=(1.9715×10−5,32768,19715,19632,1.00423,8640,3,0) indicates a start time of 1.9715×10−5 seconds, a stream size of 32768 bytes, and a stream completion time of 19715 microseconds (from...). The system calculates the baseline flow completion time (19632 microseconds, calculated based on bandwidth and latency parameters), slowdown ratio (approximately 1.00423), baseline round-trip time (8640 microseconds), priority 3, and non-incast flow. This allows for the precise recording of performance metrics for each flow using parameterized formulas, which are then used for causal consistency analysis and evaluation of network simulation results.
[0039] This invention is based on a discrete event-driven network simulator. To build, NetworkSimulator is an open-source project written in C++, primarily running on GNU / Linux (such as CentOS, Ubuntu, Fedora, etc.). It is mainly used to simulate computer networks and can simulate various types and sizes of network structures in the physical world on a single computer.
[0040] In step 1, the large model data information used as input can come from the real training data of existing large models, or it can be completely defined by the user.
[0041] In step 4.1, the network topology is divided into equal parts, and different parts are placed on different processors for parallel simulation, thereby improving simulation efficiency.
[0042] To better understand this, we will first explain the traditional discrete event-driven network simulator and its parallelization.
[0043] Traditional simulators typically employ a global event queue management approach, using timestamped events to drive the simulation process. Each event corresponds to the triggering moment of a specific behavior in the network system, such as packet transmission, transmission delay, or node processing. This event-scheduled serial simulation mode can maintain good accuracy in small to medium-sized network scenarios, but its operational efficiency faces significant challenges as the topology scales up and traffic complexity increases.
[0044] Traditional methods for synchronizing logical processes primarily employ two types of synchronization strategies: conservative and optimistic. Conservative synchronization requires each logical process to ensure it doesn't receive messages with earlier timestamps before processing events, typically achieved through null message passing or global barrier synchronization to coordinate time progression. While this approach guarantees causal consistency, frequent inter-process communication incurs additional overhead, especially in scenarios where logical processes are closely interdependent, where synchronization costs may outweigh the benefits of parallelization. Optimistic synchronization, on the other hand, allows logical processes to temporarily ignore locally progressive events constrained by causal constraints, restoring the state through a rollback mechanism when timestamp reversal occurs. While this method reduces some synchronization overhead, it requires maintaining a complex logging system to support state recovery, placing high demands on memory and computational resources.
[0045] Currently, parallel simulation in the discrete event-driven network simulator NS-3 can only be performed on point-to-point links. When a point-to-point link connecting two nodes is constructed, the Point-To-PointHelper determines whether the point-to-point connection crosses logical processes. If not, a remote point-to-point link is established. During cross-logical process communication, the remote point-to-point link serializes data packets, the node index at the other end of the link, and the network interface card index on the message passing interface link. During program initialization, all logical processes independently traverse the network topology and determine the minimum remote point-to-point channel delay, called the plan look-ahead. When all events in a logical process's look-ahead time have ended, the logical process enters the synchronization phase. At this time, logical processes exchange messages containing data packet messages and the timestamp of the next available event. After all messages are exchanged at the message passing interface, each logical process calculates the globally minimum next timestamp and adds it to the look-ahead. Then, the scheduler processes all planned events within the look-ahead time, ensuring that each logical process processes events within a virtual time window of the same look-ahead size.
[0046] In this invention, the basic principle of topology partitioning is to ensure load balancing among different logical processes. This principle ensures that each logical process has a substantially similar workload, guaranteeing that all partitions run and terminate approximately simultaneously. This maximizes processor utilization, minimizes processor idling time, and improves simulation efficiency.
[0047] In this invention, the network topology is divided equally based on a preset number of logical processes. A specific embodiment is described below:
[0048] The network topology is a 128-node spine-leaf architecture, consisting of 4 spine switches and 16 leaf switches, with each leaf switch connecting to 8 host nodes. With a preset 4 logical processes, the entire network topology is evenly divided into 4 partitions. Each partition includes 1 spine switch, 4 leaf switches, and 8 host nodes connected to each leaf switch. The connections between the spine switches in one partition and the leaf switches in other partitions are remote point-to-point links, communicating via message passing interfaces. This partitioning method primarily considers that large model training traffic is evenly distributed across the network topology with fixed features. Evenly dividing the topology distributes the load as evenly as possible across the partitions, ensuring each processor handles the same amount of work, minimizing the time spent on parallel simulations, and achieving a higher speedup ratio.
[0049] This invention provides a simulation system for partitioning and parallelizing large model training traffic. The system is constructed based on the aforementioned method for partitioning and parallelizing large model training traffic, and includes: The parameter setting module is used to set parameters for large models, including model type and network topology scale. The load generation module, based on the dependencies between operators during training, generates a complete traffic file describing the entire large model training by running a traffic generation script. Specifically, this includes operation files describing the specific traffic sources, destination addresses, and sizes, as well as dependency files describing the dependencies between operation files. The task segmentation module is used to segment the complete training traffic into several independent minimum simulation units; The multi-task multi-process scheduling module is used to determine the execution order, execution batch, and number of logical processes of each minimum simulation unit based on the total number of available computing cores, the load weight of each minimum simulation unit, and the logical process allocation constraints; and is used to reclaim the logical process resources occupied by the minimum simulation unit after it completes the simulation, and redistribute the reclaimed logical process resources to the minimum simulation units that have not yet completed the simulation. The topology partitioning module is used to divide the network topology of the corresponding smallest simulation unit into equal parts according to the number of logical processes determined by the multi-task multi-process scheduling module. The simulation execution module is used to simulate each smallest simulation unit, generate corresponding log data, and summarize the data for analysis.
[0050] In this invention, the network topology used is a spine-leaf architecture, which supports network topologies of any size. If the user needs to customize the topology size for the simulation, they can modify the topology parameters in the corresponding script.
[0051] In step 4.2, the specific distributed simulation program is executed. The specific program includes topology generation, load reading, topology partitioning, and specific traffic simulation processes.
[0052] It should be noted that the simulation system and routing protocol module obtained based on the construction method of this invention are independent of each other and support all routing protocols originally supported by discrete event-driven network simulators. If users need to customize the routing protocol for the simulation, they can modify the corresponding routing protocol module.
[0053] In the specific simulation process, the parameter setting module sets the large model training traffic parameters and network topology parameters, which are then input into the load generation module. The load generation module generates a complete traffic file for the large model training based on the input parameters and inputs it into the task segmentation module. The task segmentation module segments the traffic and inputs the information into the multi-task multi-process scheduling module. The multi-task multi-process scheduling module determines the execution order, execution batches, and number of logical processes for each smallest simulation unit and inputs the scheduling results into the topology partitioning module. The topology partitioning module performs topology equalization based on the scheduling results, and finally, the simulation is executed in the simulation execution module.
[0054] To illustrate the effectiveness of the present invention, the following simulation experiment was conducted.
[0055] The experiment uses Deepseek and Qwen large-scale model training traffic to test the acceleration effect. Using a spine-leaf topology, tests were conducted on topologies with 128 nodes, 256 nodes, and 512 nodes, including a comparison between the original large-scale model traffic simulation and experiments using splitting and MPI parallel acceleration methods.
[0056] The experimental environment consisted of a 16-core processor and 16GB of RAM. The code ran on a Linux operating system and was implemented in C++. Speedup and fidelity were used as performance evaluation metrics. Speedup is defined as the ratio of the time taken to simulate the complete training traffic serially to the time taken to simulate the traffic segmentation in parallel, representing the speedup effect of the method. Fidelity is defined as the ratio of the task completion time obtained from serial simulation to the task completion time obtained from parallel simulation. It should be noted that the speedup obtained from simulations on computers with different configurations may vary.
[0057] Experimental results show that MPI can be used to accelerate the simulation of the smallest simulation unit with a deepseek node size of 128 nodes, such as... Figure 2As shown in the figure, TP, EP, PP, and DP represent different parallel strategies. Each parallel strategy involves network traffic loads with different characteristics. With equal distribution of cores, each smallest simulation unit can achieve approximately 2-4 times speedup while maintaining 100% fidelity. In parallel simulation, the overall speedup is 3.6 times. As shown in Table 1, compared to complete communication tree simulation, the method described in this invention achieves a speedup of approximately 54.6 times with a fidelity of 97.7%. At a scale of 128 nodes, 4 processes have achieved the best speedup effect, and evenly distributing 16 cores yields the optimal speedup under current conditions.
[0058] Table 1. Comparison of simulation time and fidelity between this method, the original simulation, and the segmentation-only method.
[0059] After using topology partitioning, regardless of the number of partitions, the simulation speed is faster than that of single-process simulation. The slope of the curve shows that as the number of partitions increases, the speedup effect of parallel simulation gradually decreases. This is because when the number of partitions increases to a certain extent, the communication and synchronization burden between the logical processes required to run the network topology in multiple logical processes increases, offsetting the speedup effect brought by multi-process parallel simulation.
[0060] This simulation system allows users to customize the network topology scale during simulation, and adjust the network size by modifying network topology parameters. It can be widely used in large model training network simulation scenarios.
[0061] In this simulation system, the network routing protocol can be customized during simulation. The routing protocol type during simulation can be customized through the routing protocol interface, and any routing protocol can be simulated.
[0062] In summary, this invention provides a method and system for segmenting and parallelizing simulation of large model training traffic. This simulation system allows for the customization of large model training parameters and network topology parameters, independent of the simulation platform. This invention further accelerates the simulation while maintaining its fidelity by combining task segmentation with MPI acceleration methods. Figure 3 As shown, the traffic of the Deepseek training architecture with 128 nodes is simulated by allocating different numbers of cores. The horizontal axis represents the number of cores allocated to each simulation unit, and the vertical axis represents the simulation clock time (unit / second). Figure 3The broken line represents the change in simulation clock time from single-process simulation using only the segmentation method to simulation clock time using the segmentation and parallelization acceleration method. Experiments show that using the parallelization acceleration method, the simulation clock time can be reduced from 118s to 32s based on the segmentation method, achieving a speedup of at least 3 times. Furthermore, this simulation system is independent of the routing protocol module, supporting all routing protocols originally supported by discrete event-driven network simulators, and also allowing for the creation of custom routing protocols based on simulation requirements. Therefore, this simulation system is suitable for network simulation of large models in large-scale data center networks.
[0063] The above description is merely a preferred embodiment of the present invention and is not intended to further limit the present invention. All equivalent changes made based on the description and drawings of the present invention are within the protection scope of the present invention.
Claims
1. A method for partitioning and parallelizing simulation of training traffic for large models, characterized in that, Includes the following steps: Step 1: Obtain large model training traffic data, generate and format the processing workload; Step 2: Using a flow-based automatic segmentation algorithm, the complete workload is segmented according to the flow coupling relationship between operators to obtain several independent minimum simulation units. Step 3: Based on the communication load and available computing cores of each minimum simulation unit, a multi-task multi-process scheduling strategy is adopted to determine the execution order, execution batches and number of logical processes for each minimum simulation unit. Step 4: Based on the scheduling results obtained in Step 3, perform MPI parallel simulation on each minimum simulation unit and aggregate the FCT results output by each minimum simulation unit.
2. The method for large-scale model training traffic segmentation based on traffic feature analysis according to claim 1, characterized in that, Step 1 is as follows: Step 1.1: Construct a directed acyclic graph describing the dependencies. The input is the parameter settings data for the large model, which includes the model type, network topology scale, and descriptive text of the dependencies between operators. Step 1.2: Generate the operation files and dependency files required for the simulation system based on the directed acyclic graph. The following processing is performed by the script: read and parse the large model parameter text, extract the model type, network topology, and computing node scale information; generate traffic data that conforms to the training characteristics of the large model based on the communication mode of the set communication operator and the temporal dependency relationship between operators; output two txt format structured files, where the operation file records the source node IP, destination node IP, and data packet size of each traffic, and the dependency file records the dependency relationship between each traffic in a directed acyclic graph, specifying that some traffic must start after the transmission of its dependent traffic has ended.
3. The large-model training traffic segmentation method based on traffic feature analysis according to claim 2, characterized in that, Step 2 is as follows: Based on the operation file and dependency file, the directed acyclic graph structure in the dependency file is parsed to identify the temporal dependencies between operators; operators that are not temporally overlapping are directly segmented. For operators that intersect in time, compare whether the flow paths intersect. If they do not intersect, they are segmented to obtain several independent minimum simulation units.
4. The method for large-scale model training traffic segmentation based on traffic feature analysis according to claim 1, characterized in that, Step 3 specifically involves: Step 3.1: Obtain the total number of available computing cores, and determine the load weight of each minimum simulation unit based on the number of traffic entries, communication data volume, or estimated simulation time of each minimum simulation unit; Step 3.2: Initialize and allocate a preset minimum number of logical processes for each minimum simulation unit, and sort each minimum simulation unit according to its load weight; Step 3.3: When the remaining computing cores are available, perform a greedy allocation of logical process resources for each smallest simulation unit, specifically including: (1) Let P be the total number of available computing cores, Crem be the number of currently available allocable cores, Wi be the load weight of the i-th smallest simulation unit, pi be the number of currently allocated logical processes, and pi be the number of candidate logical processes to be added. ; (2) Using the expected simulation time model, the expected simulation time of the i-th smallest simulation unit under pi logic processes is expressed as: Wherein, Wi is determined by the number of traffic entries, the total amount of communication data, or the historical calibration coefficient of the smallest simulation unit; (3) For satisfying and For each smallest simulation unit that is an integer power of 2, the calculation increases. Expected reduction in simulation time after each logical process: ; (4) Among all candidate minimum simulation units, select the minimum simulation unit with the largest ΔTi, and update its logic process number to... and update ; (5) Repeat steps (3) to (4) until Or, for all minimum simulation elements, there are no candidate Δpi that satisfy the constraints, or all ; Step 3.4: Based on the number of logical processes allocated to each minimum simulation unit, determine the execution batch and execution order of each minimum simulation unit, so that the total number of logical processes occupied in the same execution batch does not exceed the total number of available computing cores. Step 3.5: When a minimum simulation unit completes its simulation, reclaim the logic process resources it occupies and redistribute the reclaimed logic process resources to the incomplete minimum simulation units until all minimum simulation units complete their simulations.
5. The method for large-scale model training traffic segmentation based on traffic feature analysis according to claim 1, characterized in that, Step 4 is as follows: Step 4.1: Based on the MPI parallel computing framework, according to the number of logical processes determined in Step 3, the network topology of each smallest simulation unit is divided equally according to the number of logical processes using the topology partitioning algorithm to distribute the load and ensure load balance among processes, thereby accelerating the simulation. Step 4.2: Execute the core simulation program according to the allocated number of processes, load the NS-3 network simulation core program, initialize the multi-process parallel environment, use the load loading and mapping algorithm to distribute the operation file data of each smallest simulation unit to the corresponding process, and use the dependency scheduling algorithm to control the order of traffic transmission. Each process independently executes discrete event simulation, handles data packet transmission, queuing, and forwarding, and cross-process communication is handled through the message passing interface. Output FCT data files that record the start time, end time, and transmission duration of each data stream. Step 4.3: Record the simulation clock's time consumption. Concatenate all FCT files according to the communication dependency tree. Add the end time of the dependent traffic to the start and end times of the data streams that depend on other traffic to ensure the causal consistency of the simulation results and obtain complete FCT information.
6. The large-model training traffic segmentation method based on traffic feature analysis according to claim 5, characterized in that, In step 4.1, a topology partitioning algorithm is used to divide the network topology of each smallest simulation unit equally according to the number of processes. Specifically, this includes: 1) Based on the actual topology, retrieve the preset topology parameters from the topology preset table. The topology preset table contains multiple standardized configurations, which correspond to the number of spine switches (SPINE), the number of leaf switches (LEAF), and the number of servers under each leaf (SERVER). 2) Calculation process allocation strategy: The number of leaf switches (leafP) that each process is responsible for in the simulation is obtained by dividing LEAF by DST, and the number of spine switches (spineP) that each process is responsible for is calculated by dividing SPINE by DST and then rounded down to allocate the switches to ensure process load balancing. 3) Create nodes and assign processes: Server nodes are assigned to processes using the system identifier systemId, which is determined by dividing the server index by leafP. That is, all servers under the same leaf switch are assigned to the same system identifier process. Leaf nodes and spine nodes are also assigned based on the system identifier. The systemId of the leaf node is determined by dividing the leaf node index by leafP, and the systemId of the spine node is determined by dividing the spine node index by the rounded-down value of spineP. 4) Establish link structure: Configure point-to-point links between the server and its leaf switches; form a fully connected topology between the leaf switches and the spine switches to ensure that all leaf switches are interconnected with the spine switches; 5) Install the protocol stack and routing: Use InternetStackHelper to install the IP protocol stack; If the NIX protocol is enabled, route priorities are configured using Ipv4NixVectorHelper and Ipv4StaticRoutingHelper; otherwise, the routing table is automatically populated using Ipv4GlobalRoutingHelper. Install a queue management mechanism and deploy the CoDelQueueDisc queue scheduler on all server-leaf links and leaf-spine links through TrafficControlHelper to optimize network traffic processing performance; 6) IP address allocation: Automatically allocate an independent subnet to each server cluster connected to each leaf switch, and automatically allocate a point-to-point subnet to each uplink link between a leaf switch and a spine switch, ensuring that the link addresses are conflict-free and meet the subnet mask requirements, thereby completing the complete construction and partitioning of the network topology.
7. The method for large-scale model training traffic segmentation based on traffic feature analysis according to claim 5, characterized in that, In step 4.2, the load loading and mapping algorithm is used to distribute the operation file data of each smallest simulation unit to the corresponding process, specifically including: 1) Load operation files within a specified range in batches, parse them, and store the parsing results in memory; 2) Loading the current stage of a single operation file: Check if the current stage has completed the simulation. If not, record the stage start time and traverse all flows in the stage. Calculate the source process identifier and target process identifier based on the node identifier, and determine the source / target leaf switch index and server index. If the current process is the source process identifier, install the OnOffApplication application, configure it to always on and always off, set the maximum number of bytes to msgLen, specify the remote address as the receiving server interface, and introduce 0 to 1 millisecond random jitter at startup time to avoid synchronization storms. If the current process is the target process identifier, avoid repeatedly creating the PacketSink receiving endpoint through the global registry mechanism. Bind the completion callback function when it is first created, and bind it only once per file. At the same time, calculate the expected number of data packets. If there are no data packets in the stage, recursively load the next stage.
8. The method for large-scale model training traffic segmentation based on traffic feature analysis according to claim 5, characterized in that, In step 4.2, a dependency scheduling algorithm is used to control the order of traffic transmission, specifically including: 1) Parse the dependency configuration file, which defines task dependencies in the format of "child scope:parent scope". Use the scope resolution function to process single numbers or scope expressions and create a set of parent tasks for each subtask to ensure a structured representation of task dependencies. 2) Initialize the dependency counting mechanism, set the remaining dependency count for each subtask to be equal to the size of its parent task set; at the same time, maintain a subtask list for each parent task and mark the task start status; before the simulation starts, traverse all tasks and trigger the start operation for subtasks with a remaining dependency count of zero. 3) When a task is completed, a completion callback function is triggered. The completion callback function iterates through the list of child tasks of the parent task and reduces the number of remaining dependencies of each child task one by one. If the number of remaining dependencies drops to zero, the child task is started immediately, thereby realizing dynamic scheduling and non-blocking execution of task dependencies.
9. A simulation system for splitting and parallelizing training traffic for large models, characterized in that, The system is constructed based on the method described in any one of claims 1-8, and includes a parameter setting module, a load generation module, a task splitting module, a multi-task multi-process scheduling module, a topology partitioning module, and a simulation execution module. The parameter setting module is used to configure parameters for large models, including model type and network topology scale. The load generation module is used to generate traffic data for large model training based on the dependencies between operators using a traffic generation script. It includes operation files that record the traffic source, destination address and size, and dependency files that record traffic dependencies. The task segmentation module is used to segment the complete training traffic into several independent minimum simulation units based on the traffic coupling relationship between operators, the temporal dependency relationship, and whether the traffic paths intersect. The multi-task multi-process scheduling module is used to determine the execution order, execution batch and number of logical processes of each minimum simulation unit based on the number of available computing cores, the load weight of each minimum simulation unit and the logical process allocation constraints, and to reclaim logical process resources to reschedule the unfinished minimum simulation units after the minimum simulation unit completes the simulation. The topology partitioning module is used to divide the network topology of the corresponding smallest simulation unit into equal parts according to the number of logical processes determined by the multi-task multi-process scheduling module. The simulation execution module is used to load the NS-3 core program to perform discrete event simulations, process network behavior, and generate and summarize logs and FCT data files for analysis.
10. A simulation system for splitting and parallelizing training traffic for large models according to claim 9, characterized in that, The simulation execution module includes: MPI Initialization and Process Management Submodule: Used to initialize the MPI environment, color-code processes according to the total number of processes and topology size, and establish communication domains; Topology Construction and Partitioning Submodule: Used to construct leaf-spine network topology based on configuration parameters, distribute server and switch nodes evenly to each MPI process according to the number of processes, and install network protocol stack, routing algorithm and queue management; Load loading and mapping submodule: used to read multiple operation files, parse traffic information, allocate processes according to node ID, and install the send / receive application only in the corresponding process; Dependency scheduling submodule: Parses dependency files, constructs a traffic dependency graph, and implements dependency-based task startup; Synchronization and Progress Control Submodule: Used to perform MPI global synchronization when the flow simulation of each stage is completed, determine the process completion status, and control the process to switch to the next stage of flow simulation and the termination of simulation. The Performance Statistics and Logs submodule records the completion time (FCT) and MPI synchronization time for each stage, calculates the synchronization overhead percentage, and outputs log files and console statistics.