Method and device for testing data transmission rate of solid state disk
By deploying interconnected test nodes and planning parallel testing tasks, simulating complex network environments, the problem that existing testing methods cannot truly reflect SSD performance and low testing efficiency is solved, and more accurate performance evaluation and more efficient testing process are achieved.
Patent Information
- Application Number
- CN202510143878.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-02-10
AI Technical Summary
The existing solid-state drive data transmission rate testing methods cannot truly reflect the performance of SSD in complex network environments, and the test efficiency is low, so it cannot meet the fast and efficient testing needs.
By deploying multiple interconnected test nodes to connect to the solid-state drive, a real network environment where multiple devices work together is simulated, and by planning parallel testing tasks, a task set of multiple read and write operation modes is formulated according to the requirements of different application scenarios, and assigned to each test node for execution in parallel.
It realizes a more accurate reflection of the performance of SSD in actual complex network environments, comprehensively examines the performance of SSD when mixed use of different read and write modes, greatly shortens the overall test time and improves the test efficiency of the SSD data transmission rate.
Smart Images

Figure CN120066869A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid state drives, and in particular to a method and device for testing the data transfer rate of a solid state drive. Background Art
[0002] In the performance evaluation system of solid state drives (SSDs), data transfer rate testing is a key indicator for measuring their performance. Currently, most existing methods for testing the data transfer rate of solid state drives are carried out based on a single-machine environment. This testing environment is too idealized and has a huge difference from the actual usage scenarios. In practical applications, such as large-scale data centers, cloud computing platforms and other scenarios, SSDs are often in a complex network environment where multiple devices work together and face concurrent access from multiple users. Single-machine testing cannot simulate this complex network interaction and concurrent pressure, resulting in the test results being unable to truly reflect the performance of SSDs in actual applications. In addition, the test tasks of traditional testing methods are relatively single, usually only focusing on simple sequential read and write or random read and write operations. However, in real-world applications, the data read and write modes are complex and diverse, including not only continuous read and write of large files, but also frequent random read and write of many small files, as well as the mixed use of different read and write operations. A single test task is difficult to comprehensively consider the performance of SSDs under complex workloads. Moreover, in the testing process of existing testing methods, the utilization of parallel processing capabilities is insufficient, and serial testing methods are mostly used. With the rapid development of SSD technology, its read and write performance has been greatly improved. The serial testing method takes too long and cannot meet the requirements of fast and efficient testing. When it is necessary to evaluate the performance of a large number of SSDs, the problem of low efficiency is particularly prominent. Summary of the Invention
[0003] The present invention provides a method and device for testing the data transfer rate of a solid state drive, which can accurately reflect the performance of an SSD in an actual complex network environment, comprehensively consider the performance of an SSD when different read and write modes are mixed, and improve the testing efficiency of the data transfer rate of the solid state drive.
[0004] In a first aspect, the present invention provides a method for testing the data transfer rate of a solid state drive, including:
[0005] Deploying a plurality of test nodes; wherein each test node is respectively connected to the solid state drive to be tested to establish a communication link, and a network structure that is interconnected with each other is formed among the test nodes;
[0006] Based on a preset application scenario, setting a test task of a combination of multiple read and write operation modes, and allocating the test task to each test node, so that each test node executes different types of test tasks in parallel;
[0007] Synchronously start the test tasks of each test node, and obtain the data volume and operation time consumed for each read and write operation on the solid-state drive by each test node based on the assigned test tasks;
[0008] Calculate the final transmission rate index corresponding to each test node based on the data volume and operation time consumed by each test node;
[0009] Determine the data transmission rate of the solid-state drive in a distributed parallel environment based on the final transmission rate index of each test node.
[0010] In a second aspect, the present invention further provides a solid-state drive data transmission rate test device, including:
[0011] A deployment module for deploying multiple test nodes; wherein each test node is respectively established with a communication link with the solid-state drive to be tested, and a network structure of mutual connection and communication is formed among the test nodes;
[0012] A task test module for setting test tasks of various read and write operation mode combinations based on a preset application scenario, and allocating the test tasks to each test node, so that each test node executes different types of test tasks in parallel;
[0013] An acquisition module for synchronously starting the test tasks of each test node, and obtaining the data volume and operation time consumed for each read and write operation on the solid-state drive by each test node based on the assigned test tasks;
[0014] An operation module for calculating the final transmission rate index corresponding to each test node based on the data volume and operation time consumed by each test node;
[0015] A transmission rate determination module for determining the data transmission rate of the solid-state drive in a distributed parallel environment based on the final transmission rate index of each test node.
[0016] In a third aspect, the present invention further provides an electronic device, including: a memory for storing a computer software program; a processor for reading and executing the computer software program, and further implementing the solid-state drive data transmission rate test method as described in any one of the above.
[0017] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, in which a computer software program is stored, and when the computer software program is executed by a processor, the solid-state drive data transmission rate test method as described in any one of the above is implemented.
[0018] In a fifth aspect, the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the solid-state drive data transmission rate test method as described in any one of the above is implemented.
[0019] The solid-state drive data transfer rate testing method provided by the embodiments of the present invention is connected to a solid-state drive by deploying multiple interconnected test nodes, simulating a real network environment for multi-device collaborative work. Therefore, it can more accurately reflect the performance of the SSD in an actual complex network environment. Furthermore, by planning parallel test tasks, a task set with multiple read-write operation mode combinations is formulated according to the requirements of different application scenarios and distributed to each test node for parallel execution, enabling the test process to simulate the real read-write load in complex application scenarios and comprehensively considering the performance of the SSD when different read-write modes are used in combination. Further, the way of parallel execution of test tasks by each test node gives full play to the parallel processing ability, greatly shortening the overall test time and improving the test efficiency of the solid-state drive data transfer rate. Description of the Drawings
[0020] Figure 1 is a flowchart of the solid-state drive data transfer rate testing method provided by the embodiments of the present invention;
[0021] Figure 2 is a structural diagram of the solid-state drive data transfer rate testing device provided by the embodiments of the present invention;
[0022] Figure 3 is an embodiment diagram of the electronic device provided by the embodiments of the present invention;
[0023] Figure 4 is an embodiment diagram of the computer-readable storage medium provided by the embodiments of the present invention. Detailed Embodiments
[0024] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.
[0025] In the description of the present invention, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality of" means two or more, unless otherwise specifically defined.
[0026] In the description of the present invention, the term "for example" is used to mean "serving as an example, illustration, or explanation". Any embodiment described as "for example" in the present invention is not necessarily construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to implement and use the present invention. In the following description, details are set forth for purposes of explanation. It should be understood that those of ordinary skill in the art can recognize that the present invention can be implemented without the use of these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
[0027] Optionally, referring to Figure 1 as shown in Figure 1 is a flowchart of a method for testing the data transfer rate of a solid-state drive provided by the present invention. In an embodiment of the present invention, the execution subject of the method for testing the data transfer rate of a solid-state drive is a transfer rate testing device. Therefore, the method for testing the data transfer rate of a solid-state drive includes:
[0028] Step 10: Deploy multiple test nodes. Among them, each test node is respectively established with a communication link with the solid-state drive to be tested, and a network structure that is interconnected with each other is formed among the test nodes.
[0029] Optionally, the transfer rate testing device deploys multiple test nodes. Each test node is respectively established with a communication link with the solid-state drive to be tested, and a network structure that is interconnected with each other is formed among the test nodes.
[0030] For establishing the communication link, the specific analysis process is as follows:
[0031] The transfer rate testing device assigns a first digital identifier i to each test node N assigns a second digital identifier ID to the solid-state drive SSD SSD , and maps the first digital identifier i of each test node N and the second digital identifier ID of the solid-state drive SSD SSD to obtain an initial key K for link communication init , where The Map function represents a mapping relationship set according to the identifier characteristics. For example, through a specific hash table lookup, the Encode encoding function where x represents the digital identifier, a k represents a randomly generated coefficient, m represents the polynomial degree, and p represents a preset prime number.
[0032] Further, for any target test node in the test nodes, the target test node scans the available frequency bands in its surrounding environment and records the noise level N of each available frequency band l and the occupancy situation O l , and scores each available frequency band according to the noise level N l and the occupancy situation O l of each available frequency band, and obtains the score value of each available frequency band. The specific formula is Score(l) = 1 / [N l *(1 + O l )], and takes the first n available frequency bands with higher score values as the candidate frequency band set C.
[0033] Further, the target test node randomly selects a frequency band f from the candidate frequency band set C for signal transmission, and modulates the data signal Date with the carrier signal C carrier to obtain the modulated signal where ω is the carrier angular frequency and t is the time.
[0034] Further, the target test node sends the modulated signal to the transmission rate test device, and adjusts the modulation parameters according to the calibration information fed back by the transmission rate test device. The calibration formula is Δθ = (Error / Max(Error)) * θ max , where Δθ is the phase adjustment amount, Error is the current reception error, Max(Error) is the maximum allowable error, and θ max is the maximum phase adjustment range.
[0035] Further, the target test node generates an encryption key K through a key expansion algorithm according to the initial key K init , where the key expansion algorithm is encrypt , s represents the number of expansion steps, and Hash represents the hash function. The transmission data is encrypted using the encryption key, and the encryption algorithm is , where Date represents the transmission data, represents a specific matrix multiplication operation, and IV represents the initial vector.
[0036] Further, the target test node monitors the bandwidth occupancy situation B and the data transmission delay T of the link in real time, and adjusts the transmission rate R according to the formula R adjust =[R current *(1 - B / B max )] / (1 + T / T max )], where R adjust is the current transmission rate, B is the maximum bandwidth, and T current is the maximum data transmission delay, and T max is the current data transmission delay.is the maximum allowable delay, ensuring that the link can maintain efficient and stable data transmission in different network environments.
[0037] Further, after receiving the data, the transmission rate testing device decrypts the data using the decryption key and verifies the integrity of the data through a checksum algorithm, where the checksum algorithm is where Date i represents the i-th data block of the transmitted data Date, and q is the check prime number. If the verification passes, the transmission rate testing device sends a confirmation message to the target test node, including the authentication code AuthCode = Hash(K encrypt +Timestamp). After the target test node verifies that the authentication code is correct, it officially confirms that the communication link is successfully established.
[0038] For the specific process of establishing the network structure as described in steps 101 to 105.
[0039] Step 20, set test tasks for various combinations of read and write operation modes based on a preset application scenario, and allocate the test tasks to each test node so that each test node can execute different types of test tasks in parallel.
[0040] Further, the transmission rate testing device sets test tasks for various combinations of read and write operation modes according to a preset application scenario, specifically as described in steps 201 to 205, where the preset application scenarios include video editing scenarios, audio storage scenarios, picture rendering scenarios, communication data transmission scenarios, etc.
[0041] Further, the transmission rate testing device allocates the test tasks to each test node, specifically as described in steps 206 to 208, so that each test node can execute different types of test tasks in parallel.
[0042] Step 30, synchronously start the test tasks of each test node, and obtain the data volume and operation time consumed for each read and write operation on the solid-state drive by each test node based on the allocated test tasks.
[0043] Further, the transmission rate testing device synchronously starts the test tasks of each test node, and obtains the data volume and operation time consumed for each read and write operation on the solid-state drive by each test node based on the allocated test tasks, specifically as described in steps 301 to 306.
[0044] Step 40, calculate the final transmission rate index corresponding to each test node based on the data volume and operation time consumed by each test node.
[0045] Further, the transmission rate testing device calculates the final transmission rate index corresponding to each test node according to the data volume and operation time consumption of each test node, specifically as in steps 401 to 404.
[0046] Step 50 determines the data transmission rate of the solid-state drive in a distributed parallel environment based on the final transmission rate index of each test node.
[0047] Further, the transmission rate testing device determines the data transmission rate of the solid-state drive in a distributed parallel environment according to the final transmission rate index of each test node, specifically as in steps 501 to 503.
[0048] In the embodiment of the present invention, by deploying multiple interconnected test nodes connected to the solid-state drive, a real network environment for multi-device collaborative work is simulated, so that the performance of the SSD in an actual complex network environment can be more accurately reflected. Furthermore, by planning parallel test tasks, a task set with multiple read-write operation mode combinations is formulated according to the requirements of different application scenarios and distributed to each test node for parallel execution, so that the test process can simulate the real read-write load in complex application scenarios and comprehensively consider the performance of the SSD when different read-write modes are used in combination. Further, the way that each test node executes the test task in parallel gives full play to the parallel processing ability, greatly shortens the overall test time, and improves the test efficiency of the data transmission rate of the solid-state drive.
[0049] In one embodiment, the descriptions of steps 101 to 105 are as follows:
[0050] Step 101, evaluate the capabilities of each test node to obtain the comprehensive capability value of each test node, and allocate each test node to the corresponding node layer according to the comprehensive capability value of each test node.
[0051] Optionally, the transmission rate testing device evaluates the capabilities of each test node N i to obtain the comprehensive capability value Ability(N i ) of each test node N i , where the comprehensive capability value Ability(N i ) of each test node N i is calculated according to the following formula:
[0052]
[0053] Among them, P i represents the processing capability of test node N i , S i represents the storage capacity of test node N i , B i represents the test node N iNetwork bandwidth.
[0054] Further, the transmission rate testing device distributes each test node N i to different node layers according to the comprehensive ability value of each test node N i where the node layers include a core layer, an intermediate layer, and an edge layer. The core layer nodes are responsible for high-speed forwarding and processing of data. The intermediate layer nodes assist the core layer in data distribution and aggregation. The edge layer nodes are mainly responsible for data interaction with the solid-state drive. The specific distribution formula is as follows:
[0055]
[0056] where Layer(N i ) represents the node layer of test node N i , represents rounding up, MaxAbility represents the maximum value of all node ability values, MinAbility represents the minimum value of all node ability values, and Layer(N i ) = 1 means the node layer of test node N i is the edge layer, Layer(N i ) = 2 means the node layer of test node N i is the intermediate layer, and Layer(N i ) = 3 means the node layer of test node N i is the core layer.
[0057] Step 102, for each first test node in the core layer, construct the backbone network of the core layer according to the connection cost between each first test node.
[0058] Further, for each first test node in the core layer, the transmission rate testing device calculates the connection cost Cost ij between the i-th test node and the j-th test node in the core layer according to the geographical location distance d ij (calculated by comparing the ability vectors of the i-th test node and the j-th test node) and the ability complementarity C ij = d ij *(1 - C ij ).
[0059] Further, the transmission rate testing device establishes a connection between the i-th test node and the j-th test node whose connection cost is lower than the preset cost threshold to construct the backbone network of the core layer.
[0060] Step 103: For each second test node in the middle layer, construct a distribution network between the middle layer and the core layer according to the first connection quality between each second test node and each first test node, and the first load condition of each first test node.
[0061] Further, for each second test node in the middle layer, the transmission rate testing device is based on each second test node n in the middle layer i and each first test node n in the core layer j The first connection quality Q(n i , n j ), and the first load condition L(n j ) of each first test node n in the core layer, determine the first target connection node of each second test node n in the core layer, and establish a connection to obtain the distribution network between the middle layer and the core layer. Among them, the first connection quality is evaluated through the signal strength I(n j ) and signal delay T(n i ) between the second test node n i and the first test node n j ). The formula is Q(n i , n j ) = I(n i , n j ) / T(n i , n j ), and the second test node n i and the first test node n j that establish a connection satisfy arg max i (Q(n j ) / L(n i )) j . j (Q(n i , n j ) / L(n j ))
[0062] Step 104: For each third test node in the edge layer, construct an interaction network between the edge layer and the middle layer according to the second connection quality between each third test node and each second test node, the second load condition of each second test node, and the data transmission requirements of the solid state drive.
[0063] Further, for each third test node in the edge layer, the transmission rate testing device is based on each third test node n in the edge layer t and each second test node n in the middle layer i The second connection quality Q(n i , n t), and each second test node n in the middle layer i 's second load condition L(n i ), determine each third test node n in the edge layer t 's second target connection node in the middle layer, and establish a connection to obtain an interaction network between the edge layer and the middle layer. Among them, the second connection quality is obtained through the third test node n t and the second test node n i 's signal strength I(n i ,n t ), signal delay T(n i ,n t ), and the data transfer requirement R of the solid-state drive SSD is evaluated. The formula is Q(n i ,n t ) = [I(n i ,n t ) / T(n i ,n t )] * (R SSD / R current ), and the third test node n t that establishes a connection and the second test node n i satisfy arg max i (Q(n i ,n t ) / L(n i ))), R current represents the rate that the current connection can provide.
[0064] Step 105, fuse the backbone network, distribution network, and interaction network to obtain a network structure.
[0065] Furthermore, the transmission rate testing device fuses the backbone network of the core layer, the distribution network between the middle layer and the core layer, and the interaction network between the edge layer and the middle layer to obtain a network structure.
[0066] In the embodiments of the present invention, multiple interconnected test nodes are deployed and connected to the solid-state drive to simulate a real network environment for multi-device collaborative work, accurately reflecting the performance of the SSD in an actual complex network environment.
[0067] In one embodiment, the descriptions of steps 201 to 205 are as follows:
[0068] Step 201, quantify the scenario features corresponding to the preset application scenario to obtain the comprehensive demand intensity for storage reading and writing of the preset application scenario.
[0069] Optionally, the transmission rate testing device obtains the key scene features of each preset application scenario. Here, the preset application scenarios include, for example, video editing scenarios, audio storage scenarios, picture rendering scenarios, communication data transmission scenarios, etc. In one embodiment, for a picture rendering scenario, the obtained scene features may include the video frame rate F v , the audio sampling rate R a , and the picture resolution P r .
[0070] Furthermore, the transmission rate testing device quantifies the scene features corresponding to the preset application scenario to obtain the comprehensive demand intensity Sence of the preset application scenario for storage read and write Index . Different application scenarios have different quantization formulas. Continuing with the above embodiment, for the picture rendering scenario, the specific quantization formula is Quantify the scene features to obtain the comprehensive demand intensity Sence of the picture rendering scenario for storage read and write Index .
[0071] Step 202: Generate a mode sequence based on the preset read and write operation mode, and generate multiple read and write operation mode combinations based on the mode sequence and the length requirement of the read and write operation mode combination
[0072] Optionally, the preset read and write operation modes in the embodiments of the present invention include 8 read and write operation modes: sequential large file write (SBLW) mode, sequential small file write (SSLW) mode, random large file write (RBLW) mode, random small file write (RSLW) mode, sequential large file read (SBLR) mode, sequential small file read (SSLR) mode, random large file read (RBLR) mode, and random small file read (RSLR) mode. For the distinction between large files and small files, a file size threshold T size is set. Files larger than the threshold T size are large files, and files less than or equal to the threshold T size are small files
[0073] Furthermore, the transmission rate testing device randomly generates a mode sequence according to the 8 preset read and write operation modes. Here, the mode sequence can be expressed as S w =[s 1 , s 2 ,..., s 8 , and generates multiple read and write operation mode combinations through the circular shift algorithm in combination with the mode sequence and the length requirement of the read and write operation mode combination. The specific formula for generating the p-th read and write operation mode combination C p is as follows
[0074] C p =[s (q+p-1)%8+1 for q = 1 to L].
[0075] Among them, p represents the serial number of the read / write operation mode combination, % represents the modulo operation, and L represents the length requirement of the read / write operation mode combination.
[0076] Step 203: Determine the combination complexity of each read / write operation mode combination based on the number of mode switches and the number of file size changes of each read / write operation mode combination.
[0077] Furthermore, the transmission rate testing device calculates the combination complexity Complexity of each read / write operation mode combination according to the number of mode switches and the number of file size changes of each read / write operation mode combination. Among them, the specific calculation formula of the combination complexity Complexity is as follows:
[0078] Complexity = N switch *weight switch +N size-change *weight size-change .
[0079] Among them, N switch represents the number of mode switches, N size-change represents the number of file size changes, and weight switch and weight size-change represent preset weight coefficients.
[0080] Step 204: Based on the comprehensive demand intensity, the combination complexity of each read / write operation mode combination, the preset data volume, and the preset time, determine the test data volume and the test duration of each read / write operation mode combination respectively, and obtain the test tasks of each read / write operation mode combination.
[0081] Furthermore, the transmission rate testing device calculates the test data volume D(C size ) of each read / write operation mode combination according to the comprehensive demand intensity, the combination complexity of each read / write operation mode combination, and the preset data volume base p . Among them, the specific formula of the test data volume D(C p ) of each read / write operation mode combination is as follows:
[0082] D(C p ) = Sence Index *Complexity*base size .
[0083] Furthermore, the transmission rate testing device calculates the test duration T(C time ) of each read / write operation mode combination according to the comprehensive demand intensity, the combination complexity of each read / write operation mode combination, and the preset time base p), where the test data volume T (C) for each combination of read / write operation modes p ) is as follows:
[0084]
[0085] Furthermore, the transmission rate test device determines the test data volume D (C) and the test data volume T (C) for each combination of read / write operation modes as the test tasks for each combination of read / write operation modes. p ) and the test data volume T (C p ) as the test tasks for each combination of read / write operation modes.
[0086] In the embodiment of the present invention, by planning parallel test tasks and formulating a task set of multiple combinations of read / write operation modes according to the requirements of different application scenarios, the test process can simulate the real read / write load in complex application scenarios and comprehensively consider the performance of the SSD when different read / write modes are used in combination.
[0087] In one embodiment, the description of steps 206 to 208:
[0088] Step 206: Calculate the cluster index for each test task according to the priority and complexity of each test task, and classify each test task into the task cluster corresponding to the cluster index of each test task.
[0089] Furthermore, the transmission rate test device obtains the priority P of each test task T j , and calculates the cluster index Cluster of each test task according to the priority P of each test task j and the complexity Complexity j j Index j Index (T j ), where the specific calculation formula for the cluster index Cluster Index (T j ) is as follows:
[0090]
[0091] Among them, Max(P * Complexity) represents the maximum value of the product of the priorities and complexities of all tasks, and k represents the preset number of clusters.
[0092] Furthermore, the transmission rate test device classifies each test task T j into the task cluster corresponding to the cluster index Cluster Index (T j ).
[0093] Step 207: Allocate the test tasks in each task cluster to the corresponding test nodes according to the cluster information of each task cluster and the comprehensive performance value of each test node.
[0094] Further, the transmission rate testing device performs performance evaluation on each test node N i to obtain the comprehensive performance value Node(N i ) of each test node N i , where the formula for the comprehensive performance value Node(N i ) is as follows:
[0095]
[0096] Among them, C i represents the CPU performance of test node N i , M i represents the memory bandwidth of test node N i , B i represents the network bandwidth of test node N i , and S i represents the storage interface bandwidth of test node N i .
[0097] Further, for high-priority and high-complexity task clusters, they are preferentially assigned to nodes with high comprehensive performance. Therefore, the transmission rate testing device determines the average priority k and average complexity of each task cluster Cl as
[0098] Further, the transmission rate testing device determines the allocation probability of assigning the test tasks in each task cluster Cl i to test node N k according to the comprehensive performance value Node(N ), the average priority of each task cluster Cl , and the average complexity, and the specific formula is as follows:
[0099]
[0100]
[0101]
[0102] Among them, Allocation(N i ,Cl k ) represents the allocation probability of assigning the test tasks in task cluster Cl k to test node N i , and Num represents the total number of nodes.
[0101] Further, if it is determined that the test tasks in task cluster Cl k are assigned to test node N iThe allocation probability is greater than or equal to a preset probability threshold θ, that is, Allocation(N i , Cl k ) ≥ θ. The transmission rate testing device then allocates the test tasks in the task cluster Cl k to the test node N i .
[0102] Step 208: For any first target test node, determine the load condition of the first target test node based on the resource consumption of each task in the first target test node. When the load condition is greater than the load threshold, allocate the tasks with a complexity lower than the preset complexity in the first target test node to the second target test node.
[0103] Furthermore, after the transmission rate testing device allocates the test tasks in the task cluster Cl k to the test node N i , check the load condition of each test node. Therefore, for any first target test node N i in the test nodes, obtain the resource consumption of each task in the first target test node N i , and calculate the load condition Load(N i ) of the first target test node N i according to the resource consumption of each task therein, where task i represents the set of tasks allocated to the test node N i , and RS j represents the resource consumption of task j.
[0104] Furthermore, when it is determined that the load condition Load(N i ) of the first target test node N i is greater than the load threshold Load th , the transmission rate testing device obtains the tasks with a complexity lower than the preset complexity in the first target test node N i , and allocates the tasks with a complexity lower than the preset complexity to the second target test node in the test nodes, where the load condition of the second target test node is less than or equal to the load threshold.
[0105] The embodiments of the present invention formulate a task set of multiple read / write operation mode combinations according to different application scenario requirements, and allocate them to each test node for parallel execution, so that the test process can simulate the real read / write load in complex application scenarios and comprehensively consider the performance of the SSD when different read / write modes are used in combination.
[0106] In one embodiment, the descriptions of steps 301 to 306 are as follows:
[0107] Step 301: Take any test node as the main test node, and broadcast a clock synchronization message to the third target test nodes based on the main test node.
[0108] Optionally, take any test node as the main test node M, and the main test node M regularly broadcasts a clock synchronization message to all other third target test nodes N i where the clock synchronization message carries the first local time t of the main test node M p .
[0109] Step 302: Based on the third target test node, calculate the clock deviation from the main test node according to the second local time and the first local time when receiving the clock synchronization message, and adjust the local clock of the third target test node based on the clock deviation.
[0110] Furthermore, for each third target test node, the third target test node N i records its second local time t when receiving the clock synchronization message s,i , and calculates its clock deviation Δt from the main test node according to the second local time t s,i and the first local time t p . The specific calculation formula is: Δt i = t i - t s,i -(d p / v), where d i represents the network distance between the test node N i and the main test node M (estimated by the number of network hops), and v represents the average speed of message propagation in the network. i
[0111] Furthermore, the third target test node N i adjusts its local clock according to the clock deviation Δt i to make the clocks of all third target test nodes N i reach approximate synchronization.
[0112] Step 303: Based on the main test node, generate a synchronization start signal according to the preset start time, and broadcast the synchronization start signal to the third target test nodes.
[0113] Furthermore, after completing the clock synchronization, the main test node M generates a synchronization start signal S start according to the preset start time T t , and broadcasts the synchronization start signal S to all third target test nodes N i , where the start signal S t carries the verification code V t , and the verification code V t t The generation formula of V is t = Hash(T start + NodeID M + TimeStamp), which represents the unique identifier of the main test node M. TimeStamp represents the current timestamp, and Hash represents the hash calculation.
[0114] Step 304: Based on the third target test node receiving the synchronization start signal, after the verification code in the synchronization start signal passes the verification and the local clock reaches the start time, start the test task.
[0115] Further, for the third target test node N i after receiving the synchronization start signal S t , for the verification code V t in the synchronization start signal S t perform verification. If it is determined that the verification code V t passes the verification and the local clock reaches the start time T start , the third target test node N i will immediately start the assigned test task.
[0116] Step 305: Determine the data volume for each read / write operation based on the number of data blocks involved in each read / write operation of the test task of each test node and the size of each data block.
[0117] Optionally, in the test task of each test node N i of the embodiment of the present invention, for each read / write operation, the data is divided into data blocks N i (b) of a fixed size, and the size of each data block is Size b . When generating a read / write request, a unique serial number Seq is attached to each request.
[0118] Therefore, the transmission rate test device obtains the number of data blocks involved in each read / write operation of the test task of each test node, and determines the data volume for each read / write operation according to the number of data blocks and the size of each data block. In one embodiment, when a read / write operation involves k data blocks, the data volume D i,j of this operation is calculated by the formula D i,j = k * Size b , where i represents the test node number and j represents the operation sequence number on that node. It should be noted that in order to prevent data blocks from being lost or incorrect during transmission, a checksum Checksum b is calculated for each data block, and the formula is Checksum b = XOR(b 1 , b 2,...,b m ), where XOR represents the exclusive OR operation, b 1 ,b 2 ,...,b m represents the data block N i in each byte of (b).
[0119] Step 306: Based on the start time of the read / write request initiated by each test node's test task during each read / write operation and the end time when the read / write operation completion response returned by the solid-state drive is received, determine the operation consumption time during each read / write operation.
[0120] Furthermore, on each test node N i , the transmission rate test device sets a pair of timestamp marks for each read / write operation. Before the test task of each test node initiates a read / write request during each read / write operation, the transmission rate test device records the start time t start,i,j of the test node. When the test node receives the read / write operation completion response returned by the solid-state drive, the transmission rate test device records the end time t end,i,j .
[0121] Furthermore, the transmission rate test device determines the operation consumption time T i,j during each read / write operation according to the start time and the end time. The specific calculation formula is T i,j =t end,i,j -t start,i,j . To eliminate the influence of factors such as system clock jitter, multiple time measurements are performed for each operation, and the final operation consumption time is where T i,j,r represents the operation consumption time of the r-th measurement, is the median of the R measurement times.
[0122] The embodiment of the present invention determines the data volume and operation consumption time during each read / write operation, so that the subsequent final transmission rate index corresponding to each test node is calculated according to the data volume and operation consumption time during each read / write operation, and thus the data transmission rate is determined according to the final transmission rate index, improving the test accuracy.
[0123] In one embodiment, the descriptions of steps 401 to 404 are as follows:
[0124] Step 401: Calculate the initial transmission rate index of each test node during each read / write operation according to the data volume and operation consumption time of each test node during each read / write operation, and the network packet loss rate and hardware busy degree of each test node.
[0125] Optionally, the transmission rate testing device monitors the network packet loss rate LossRate of the network environment where each test node is currently located and the hardware busy level BusyLevel of the current hardware of each test node, and calculates the environmental impact factor AdjustFactor based on the network packet loss rate LossRate and the hardware busy level BusyLevel. The specific calculation formula is AdjustFactor = 1 / (1 + LossRate + BusyLevel).
[0126] Further, the transmission rate testing device calculates the initial transmission rate index R of each read / write operation of each test node according to the data volume and operation consumption time of each read / write operation of each test node, as well as the network packet loss rate and hardware busy level of each test node. i,j , and the specific calculation formula is R i,j = D i,j / T i,j * AdjustFactor.
[0127] Step 402: Divide the test time into multiple time windows, and calculate the average transmission rate of each test node within each time window based on the operation set of each test node within each time window and the data volume and operation consumption time of each test node within each time window.
[0128] Further, the transmission rate testing device divides the test time into multiple time windows W n , where the length of each time window W n is window, and obtains the operation set of each test node within each time window and the data volume and operation consumption time of each test node within each time window. For the test node N i , the set of operation serial numbers within the time window W n is S i,n = {j | t start,i,j ∈ W n}
[0129] Further, the transmission rate testing device calculates the average transmission rate R i,n of each test node within each time window according to the operation set of each test node within each time window and the data volume and operation consumption time of each test node within each time window. The specific formula is:
[0130]
[0131] Step 403: Calculate the fluctuation coefficient of each test node within each time window based on the operation set of each test node within each time window and the initial transmission rate index of each read / write operation of each test node.
[0132] Further, the transmission rate testing device calculates the fluctuation coefficient F of each test node in each time window according to the operation set of each test node in each time window and the initial transmission rate index of each read / write operation of each test node. i,n , and the specific formula is where |S i,n | represents the number of elements in the operation sequence set S i,n .
[0133] Step 404: Calculate the final transmission rate index corresponding to each test node based on the average transmission rate and the fluctuation coefficient of each test node in each time window.
[0134] Further, the transmission rate testing device calculates the final transmission rate index corresponding to each test node according to the average transmission rate and the fluctuation coefficient of each test node in each time window Final transmission rate index The specific formula is:
[0135]
[0136] where N W represents the total number of time windows; W weught (n) represents the time window weight. In one embodiment, the time window weights near the start and end of the test are relatively low, and the time window weights in the middle are relatively high. Therefore,
[0137] In the embodiment of the present invention, the final transmission rate index corresponding to each test node is calculated according to the data volume and operation time consumed during each read / write operation, so as to determine the data transmission rate according to the final transmission rate index, improving the test accuracy.
[0138] In one embodiment, the descriptions of steps 501 to 503 are as follows:
[0139] Step 501: Determine the network traffic conflict index between each test node based on the network bandwidth occupancy overlap between each test node.
[0140] Optionally, the transmission rate testing device obtains the network bandwidth occupancy of each test node and determines the network bandwidth occupancy overlap between each test node according to the network bandwidth occupancy of each test node.
[0141] Further, the transmission rate testing device determines the network traffic conflict metrics between each pair of test nodes according to the overlapping situation of network bandwidth occupation between the test nodes. In one embodiment, for test node l and test node k, the network traffic conflict metric TrafficConflict lk between test node l and test node k has the following specific calculation formula:
[0142]
[0143] where B l (t) represents the network bandwidth occupation of test node l at time point t, and B k (t) represents the network bandwidth occupation of test node k at time point t.
[0144] Step 502: Determine the storage resource competition metrics between each pair of test nodes based on the overlapping situation of the time when each pair of test nodes access the solid-state drive simultaneously.
[0145] Further, the transmission rate testing device obtains the set of access time intervals of each test node to the solid-state drive, and determines the overlapping situation of the time when each pair of test nodes access the solid-state drive simultaneously according to the set of access time intervals of each test node to the solid-state drive.
[0146] Further, the transmission rate testing device calculates the storage resource competition metrics between each pair of test nodes according to the overlapping situation of the time when each pair of test nodes access the solid-state drive simultaneously. In one embodiment, for test node l and test node k, the storage resource competition metric StorageCompetition lk between test node l and test node k has the following specific calculation formula:
[0147] StorageCompetition lk = |A l ∩ A k | / |A l ∪ A k |.
[0148] where A l represents the set of access time intervals of test node l to the solid-state drive, and A k represents the set of access time intervals of test node k to the solid-state drive. /
[0149] Step 503: Obtain the data transmission rate of the solid-state drive in the distributed parallel environment based on the network traffic conflict metrics and storage resource competition metrics between each pair of test nodes, and the final transmission rate metric corresponding to each test node.
[0150] Further, the transmission rate testing device obtains the data transmission rate R of the solid-state drive in a distributed parallel environment according to the network traffic conflict index and storage resource competition index between each test node, as well as the final transmission rate index corresponding to each test node. revised , and the specific formula is as follows:
[0151]
[0152] The method of parallelly executing test tasks by each test node in the embodiment of the present invention gives full play to the parallel processing ability, greatly shortens the overall test time, and improves the test efficiency of the data transmission rate of the solid-state drive.
[0153] Further, the solid-state drive data transmission rate testing system provided by the present invention is described below. The solid-state drive data transmission rate testing system described below can be correspondingly referred to the solid-state drive data transmission rate testing method described above.
[0154] Optionally, referring to Figure 2 , Figure 2 is the structural diagram of the solid-state drive data transmission rate testing device provided by the present invention. The solid-state drive data transmission rate testing device includes:
[0155] A deployment module 210, configured to deploy multiple test nodes; wherein, each test node respectively establishes a communication link with the solid-state drive to be tested, and a network structure that is interconnected is formed between the test nodes;
[0156] A task testing module 220, configured to set test tasks of various read-write operation mode combinations based on a preset application scenario, and allocate the test tasks to each test node, so that each test node parallelly executes different types of test tasks;
[0157] An acquisition module 230, configured to synchronously start the test tasks of each test node, and acquire the data volume and operation consumption time when each test node performs each read-write operation on the solid-state drive based on the allocated test tasks;
[0158] An operation module 240, configured to calculate the final transmission rate index corresponding to each test node based on the data volume and operation consumption time of each test node;
[0159] A transmission rate determination module 350, configured to determine the data transmission rate of the solid-state drive in a distributed parallel environment based on the final transmission rate index of each test node.
[0160] In the embodiments of the present invention, by deploying multiple interconnected test nodes connected to a solid-state drive, a real network environment for multi-device collaborative work is simulated, so that the performance of the SSD in an actual complex network environment can be more accurately reflected. Moreover, by planning parallel test tasks, a task set with multiple combinations of read and write operation modes is formulated according to the requirements of different application scenarios and distributed to each test node for parallel execution, enabling the test process to simulate the real read and write loads in complex application scenarios and comprehensively considering the performance of the SSD when different read and write modes are used in combination. Further, the way of parallel execution of test tasks by each test node gives full play to the parallel processing ability, greatly shortening the overall test time and improving the test efficiency of the data transfer rate of the solid-state drive.
[0161] Please refer to Figure 3 , Figure 3 which is an embodiment diagram of the electronic device provided by the embodiments of the present invention. As Figure 3 shown, the embodiments of the present invention provide an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored on the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, the following steps are implemented:
[0162] Deploy multiple test nodes; wherein each test node respectively establishes a communication link with the solid-state drive to be tested, and an interconnected network structure is formed among the test nodes;
[0163] Based on a preset application scenario, set test tasks with multiple combinations of read and write operation modes, and allocate the test tasks to each test node so that each test node executes different types of test tasks in parallel;
[0164] Synchronously start the test tasks of each test node, and obtain the data volume and operation consumption time for each read and write operation of the solid-state drive by each test node based on the allocated test tasks;
[0165] Calculate the final transmission rate index corresponding to each test node based on the data volume and operation consumption time of each test node;
[0166] Determine the data transfer rate of the solid-state drive in a distributed parallel environment based on the final transmission rate index of each test node.
[0167] Please refer to Figure 4 , Figure 4 which is an embodiment diagram of the computer-readable storage medium provided by the embodiments of the present invention. As Figure 4 shown, this embodiment provides a computer-readable storage medium 400, on which a computer program 311 is stored. When the computer program 311 is executed by a processor, the following steps are implemented:
[0168] Deploy multiple test nodes; among them, each test node establishes a communication link with the solid-state drive to be tested respectively, and a network structure of interconnection and interoperability is formed among the test nodes;
[0169] Set test tasks of multiple read-write operation mode combinations based on a preset application scenario, and allocate the test tasks to each test node, so that each test node executes different types of test tasks in parallel;
[0170] Synchronously start the test tasks of each test node, and obtain the data volume and operation time consumed for each read-write operation of the solid-state drive by each test node based on the allocated test tasks;
[0171] Calculate the final transmission rate index corresponding to each test node based on the data volume and operation time consumed by each test node;
[0172] Determine the data transmission rate of the solid-state drive in a distributed parallel environment based on the final transmission rate index of each test node.
[0173] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the solid-state drive data transmission rate test method provided by each of the above methods. The method includes:
[0174] Deploy multiple test nodes; among them, each test node establishes a communication link with the solid-state drive to be tested respectively, and a network structure of interconnection and interoperability is formed among the test nodes;
[0175] Set test tasks of multiple read-write operation mode combinations based on a preset application scenario, and allocate the test tasks to each test node, so that each test node executes different types of test tasks in parallel;
[0176] Synchronously start the test tasks of each test node, and obtain the data volume and operation time consumed for each read-write operation of the solid-state drive by each test node based on the allocated test tasks;
[0177] Calculate the final transmission rate index corresponding to each test node based on the data volume and operation time consumed by each test node;
[0178] Determine the data transmission rate of the solid-state drive in a distributed parallel environment based on the final transmission rate index of each test node.
[0179] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0180] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0181] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for testing the data transmission rate of a solid state hard disk, characterized in that: include: Deploy multiple test nodes; wherein each test node establishes a communication link with the solid-state drive to be tested, and an interconnected network structure is formed between the test nodes; Setting test tasks of multiple read-write operation mode combinations based on preset application scenarios, and allocating the test tasks to each test node so that each test node executes different types of test tasks in parallel; Synchronously start the test tasks of each test node, and obtain the data volume and operation time consumed when each test node performs each read and write operation on the solid-state hard disk based on the assigned test tasks; Calculate the final transmission rate index corresponding to each test node based on the data volume and operation time of each test node; The data transfer rate of the solid-state drive in a distributed parallel environment is determined based on the final transfer rate indicator of each test node.
2. The method for testing the data transmission rate of a solid state hard disk according to claim 1, characterized in that: The specific steps of establishing the network structure include: Performing capacity evaluation on each test node to obtain a comprehensive capacity value of each test node, and assigning each test node to a corresponding node layer according to the comprehensive capacity value of each test node; the node layer includes a core layer, a middle layer and an edge layer; For each first test node in the core layer, constructing a backbone network of the core layer according to the connection cost between each first test node; For each second test node in the middle layer, according to the first connection quality between each second test node and each first test node, and the first load condition of each first test node, a distribution network between the middle layer and the core layer is constructed; For each third test node in the edge layer, an interactive network between the edge layer and the middle layer is constructed according to the second connection quality between each third test node and each second test node, the second load condition of each second test node, and the data transmission requirement of the solid state drive; The backbone network, the distribution network and the interactive network are integrated to obtain a network structure.
3. The method for testing the data transmission rate of a solid state hard disk according to claim 1, characterized in that: The test task of setting a combination of multiple read and write operation modes based on a preset application scenario includes: Quantifying the scenario characteristics corresponding to the preset application scenario to obtain the comprehensive demand intensity of the preset application scenario for storage reading and writing; Generate a pattern sequence based on a preset read / write operation mode, and generate a plurality of read / write operation mode combinations based on the pattern sequence and the length requirement of the read / write operation mode combination; Determine the combination complexity of each read-write operation mode combination based on the number of mode switching and the number of file size changes of each read-write operation mode combination; Based on the comprehensive demand intensity, the combination complexity of each read-write operation mode combination, the preset data volume and the preset time, the test data volume and test duration of each read-write operation mode combination are determined respectively to obtain the test task of each read-write operation mode combination.
4. The method for testing the data transmission rate of a solid state hard disk according to claim 1, characterized in that: The allocating the test task to each test node includes: Calculate the cluster index of each test task according to the priority and complexity of each test task, and classify each test task into the task cluster corresponding to the cluster index of each test task; According to the cluster information of each task cluster and the comprehensive performance value of each test node, the test tasks in each task cluster are assigned to the corresponding test nodes; For any first target test node, the load condition of the first target test node is determined based on the resource consumption of each task in the first target test node; when the load condition is greater than a load threshold, the tasks in the first target test node with a complexity lower than a preset complexity are allocated to the second target test node; the load condition of the second target test node is less than or equal to the load threshold.
5. The method for testing the data transmission rate of a solid state hard disk according to claim 1, characterized in that: The synchronously starting the test tasks of each test node and obtaining the data volume and operation time consumed when each test node performs each read and write operation on the solid state drive based on the assigned test tasks includes: Taking any test node as a main test node, broadcasting a clock synchronization message to a third target test node based on the main test node; the clock synchronization message carries a first local time of the main test node; Calculating a clock deviation from the master test node based on the third target test node according to a second local time and the first local time when the clock synchronization message is received, and adjusting a local clock of the third target test node based on the clock deviation; Generate a synchronous start signal based on the master test node according to a preset start time, and broadcast the synchronous start signal to the third target test node; the synchronous start signal carries a verification code; Based on the third target test node receiving the synchronous start signal, after the verification code in the synchronous start signal is verified and the local clock reaches the start time, starting the test task; Determine the amount of data in each read and write operation based on the number of data blocks involved in each read and write operation of the test task of each test node and the size of each data block; Based on the start time of the read / write request initiated by the test task of each test node during each read / write operation, and the end time when the read / write operation completion response returned by the solid-state drive is received, the operation time consumed during each read / write operation is determined.
6. The method for testing the data transmission rate of a solid state hard disk according to claim 1, characterized in that: The calculation of the final transmission rate index corresponding to each test node based on the data volume and operation time of each test node includes: Calculate the initial transmission rate index of each read and write operation of each test node based on the data volume and operation time of each test node, as well as the network packet loss rate and hardware busyness of each test node; Divide the test time into multiple time windows, and calculate the average transmission rate of each test node in each time window based on the operation set of each test node in each time window and the data volume and operation time of each test node in each time window; Based on the operation set of each test node in each time window and the initial transmission rate index of each read and write operation of each test node, the fluctuation coefficient of each test node in each time window is calculated; Based on the average transmission rate and fluctuation coefficient of each test node in each time window, the final transmission rate indicator corresponding to each test node is calculated.
7. The method for testing the data transmission rate of a solid state hard disk according to claim 1, characterized in that: The data transmission rate of the solid state drive in a distributed parallel environment is determined based on the final transmission rate index of each test node, including Based on the overlapping of network bandwidth occupancy between various test nodes, determine the network traffic conflict index between various test nodes; Based on the time overlap between the test nodes when simultaneously accessing the solid-state hard disk, determine the storage resource competition index between the test nodes; Based on the network traffic conflict index and storage resource competition index between each test node, as well as the final transmission rate index corresponding to each test node, the data transmission rate of the solid-state drive in a distributed parallel environment is obtained.
8. A solid state hard disk data transmission rate test device, characterized in that: include: A deployment module is used to deploy multiple test nodes; wherein each test node establishes a communication link with the solid-state drive to be tested, and an interconnected network structure is formed between the test nodes; A task testing module is used to set test tasks of multiple read and write operation mode combinations based on preset application scenarios, and distribute the test tasks to each test node so that each test node executes different types of test tasks in parallel; An acquisition module is used to synchronously start the test tasks of each test node and obtain the data volume and operation time consumed when each test node performs each read and write operation on the solid-state hard disk based on the assigned test tasks; A calculation module, used to calculate the final transmission rate index corresponding to each test node based on the data volume and operation time of each test node; The transmission rate determination module is used to determine the data transmission rate of the solid state drive in a distributed parallel environment based on the final transmission rate indicator of each test node.
9. An electronic device, comprising: Memory for storing computer software programs; A processor, used to read and execute the computer software program, characterized in that when the processor executes the computer software program, it implements the solid state hard disk data transmission rate testing method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer software program stored therein, characterized in that: When the computer software program is executed by a processor, the solid state hard disk data transmission rate testing method as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Visual hard disk automatic test method and device, terminal and storage medium
CN109684138A
Power-on and power-off test method and system for solid state disk, storage medium and equipment
CN114595104A
Solid state disk performance detection method and device and electronic equipment
CN117149550A
Method and system for realizing multi-node cloud hard disk performance test
CN119049531A