Solid state drive performance testing method and device, storage medium and electronic device
By allocating queues to multiple virtual functions VFs of solid state drives and testing their performance, the problem of inefficient SSD performance testing in the prior art is solved, and more efficient performance evaluation is achieved.
Patent Information
- Application Number
- CN202411755199.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-08
AI Technical Summary
After the prior art allocates SRIOV resources to solid-state drive SSDs, performance testing cannot be performed well, resulting in inefficient testing.
By determining the target file, a queue is assigned to multiple virtual functions VFs of the solid state drive according to the target file, and the performance of each VF is determined, thereby determining whether the solid state drive meets the performance requirements.
VF-based performance testing is implemented, testing efficiency is improved, and the problem of not being able to test the performance of solid-state drives well.
Smart Images

Figure CN119782058A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a performance testing method and device for a solid-state hard disk, a storage medium, and an electronic device. Background Art
[0002] With the development of computer hardware devices, Solid State Drive (SSD) as a new type of storage device has the characteristics of small size, low power consumption, no noise, good shock resistance, high storage density, etc., and has been widely used in notebooks, servers and other devices. SSD is a hard disk that uses flash memory chips as storage media. Through the Single Root I / O Virtualization (SRIOV) technology, multiple lightweight Peripheral Component Interconnect Express (PCIe) physical devices can be virtualized, allowing PCIe devices to be efficiently shared between virtual machines. Since the virtual machine is implemented in hardware, it can obtain input / output (I / O) performance comparable to that of the local machine. The created new device allows the virtual machine to be directly connected to the I / O device.
[0003] At present, most mainstream SSDs on the market support SRIOV technology. The resource allocation and corresponding performance evaluation after SRIOV support are often based on the end-user usage scenario, using a test method that combines external test tools with SSD drivers, that is, using external test tools and SSD drivers to perform performance tests on the SSD virtual function (Virtual Function, referred to as VF). However, due to the complex test process and cumbersome test steps of the external test tools and SSD drivers, the test efficiency is low.
[0004] In the related art, there is no effective solution to the problem that after SRIOV resources are allocated to the solid state drive SSD, the solid state drive SSD cannot be tested well. Summary of the invention
[0005] The embodiments of the present application provide a method and device for testing the performance of a solid-state drive, a storage medium, and an electronic device, so as to at least solve the problem that after SRIOV resources are allocated to the solid-state drive SSD, the solid-state drive SSD cannot be tested well.
[0006] According to an embodiment of the present application, a performance testing method for a solid-state drive is provided, comprising: determining a target file, wherein the target file has the performance of a virtual function VF of the solid-state drive when i queues are allocated, i is an integer greater than or equal to 1 and less than or equal to N, and N is the maximum number of queues allowed to be allocated to the VF; allocating a queue to each of a plurality of VFs of the solid-state drive according to the target file, and determining the performance of each of the plurality of VFs; and determining whether the solid-state drive meets performance requirements according to the performance of each of the plurality of VFs.
[0007] In an exemplary embodiment, the method further includes: obtaining the performance of the VF when N queues are allocated; when the performance of the VF when Z queues are allocated is lower than the performance of the VF when N queues are allocated, and the performance of the VF when Z+1 queues are allocated is higher than the performance of the VF when N queues are allocated, determining Z+1 as the optimal number of queues of the VF, where Z is an integer greater than or equal to 1 and less than or equal to N-1.
[0008] In an exemplary embodiment, the allocating a queue for each VF in the plurality of VFs of the solid-state drive according to the target file includes: determining the number of queues allowed to be allocated by the solid-state drive to obtain a target number of queues; dividing the target number of queues by the optimal number of queues to obtain a target value; rounding the target value to obtain the number of VFs, wherein the plurality of VFs are VFs of the number of VFs; allocating a queue with the optimal number of queues to each VF in the plurality of VFs, wherein the capacity of each VF in the plurality of VFs is equal to the total capacity of the solid-state drive divided by the number of VFs; and determining the optimal number of queues according to the performance of each VF in the plurality of VFs. Whether the solid-state drive meets the performance requirements includes: when the performance speed of each VF is not limited when the performance test is performed on each VF, and the sum of the performances of the multiple VFs is not lower than the performance of the physical function PF of the solid-state drive when M queues are allocated, determining that the solid-state drive meets the performance requirements; wherein M is equal to the target number of queues; when the performance speed of each VF is not limited when the performance test is performed on each VF, and the sum of the performances of the multiple VFs is lower than the performance of the physical function PF of the solid-state drive when M queues are allocated, determining that the solid-state drive does not meet the performance requirements.
[0009] In an exemplary embodiment, determining the performance of each VF among the multiple VFs includes: determining the limiting performance of each VF, wherein the limiting performance of each VF is equal to the performance of the physical function PF of the solid-state drive when M queues are allocated divided by the number of VFs; determining the performance of each VF based on the limiting performance of each VF when a performance test is performed on each VF; determining whether the solid-state drive meets the performance requirements based on the performance of each VF among the multiple VFs includes: determining that the solid-state drive meets the performance requirements when the performance of each VF among the multiple VFs is not higher than the corresponding limiting performance; and determining that the solid-state drive does not meet the performance requirements when there is a VF among the multiple VFs whose performance is higher than the corresponding limiting performance.
[0010] In an exemplary embodiment, allocating a queue for each VF in the plurality of VFs of the solid-state drive according to the target file includes: allocating a queue for each VF according to the target file based on the required performance of each VF, wherein, in the case where the plurality of VFs include X VFs, the number of queues allocated to the j-th VF in the X VFs is equal to P, wherein the performance of the VF recorded in the target file when P queues are allocated is higher than the required performance of the j-th VF, the performance of the VF recorded in the target file when P-1 queues are allocated is lower than the required performance of the j-th VF, and the capacity of the j-th VF in the X VFs is equal to the total capacity of the solid-state drive divided by 2 j , X is a positive integer greater than or equal to 2; the determining whether the solid-state drive meets the performance requirement according to the performance of each VF in the multiple VFs includes: when each VF is subjected to a performance test, the performance rate limit is not performed on each VF, the sum of the performances of the multiple VFs is not lower than the performance of the physical function PF of the solid-state drive when M queues are allocated, and the performance of each VF in the multiple VFs is not lower than the corresponding required performance, determining that the solid-state drive meets the performance requirement; wherein M is equal to the number of queues allowed to be allocated to the solid-state drive; when each VF is subjected to a performance test, the performance rate limit is not performed on each VF, the sum of the performances of the multiple VFs is lower than the performance of the physical function PF of the solid-state drive when M queues are allocated, and there is a VF in the multiple VFs whose performance is lower than the corresponding required performance, determining that the solid-state drive does not meet the performance requirement.
[0011] In an exemplary embodiment, the method further includes: determining the performance of each VF among the multiple VFs, including: determining the limiting performance of each VF according to the capacity of each VF, wherein the ratio of the limiting performance of each VF to the performance of the physical function PF of the solid-state drive when M queues are allocated is equal to a target ratio, and the target ratio is equal to the ratio of the capacity of each VF to the capacity of the PF; in the case of performing a performance test on each VF, determining the performance of each VF based on the limiting performance of each VF; determining whether the solid-state drive meets the performance requirements according to the performance of each VF among the multiple VFs, including: determining that the solid-state drive meets the performance requirements when the performance of each VF among the multiple VFs is not higher than the corresponding limiting performance; and determining that the solid-state drive does not meet the performance requirements when the performance of a VF among the multiple VFs is higher than the corresponding limiting performance.
[0012] In an exemplary embodiment, determining the performance of each VF in the multiple VFs includes: using an input and output testing tool to determine the performance of each VF; wherein the performance of each VF includes: read bandwidth, write bandwidth, total read and write bandwidth, read input / output operations per second IOPS, write IOPS, and read and write IOPS.
[0013] According to another embodiment of the embodiment of the present application, a performance testing device for a solid-state hard disk is also provided, including a first determination module, used to determine a target file, wherein the target file has the performance of a virtual function VF of the solid-state hard disk when i queues are allocated, i is an integer greater than or equal to 1 and less than or equal to N, and N is the maximum number of queues allowed to be allocated to the VF; an allocation module, used to allocate a queue to each of a plurality of VFs of the solid-state hard disk according to the target file, and determine the performance of each of the plurality of VFs; a second determination module, used to determine whether the solid-state hard disk meets the performance requirements according to the performance of each of the plurality of VFs.
[0014] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0015] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0016] According to another embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0017] Through this application, a queue is allocated to each of the multiple VFs in the solid-state drive according to the target file, and the performance of each VF is determined, so as to judge whether the solid-state drive can meet the performance requirements according to the performance of each VF in the multiple VFs. Since reasonable queues are allocated to the multiple VFs in the solid-state drive based on the target file, the performance of the solid-state drive can be better tested based on the performance of the VF, thereby solving the problem that the solid-state drive SSD cannot be tested well after SRIOV resources are allocated to the solid-state drive SSD. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 It is a hardware structure block diagram of a server device of a solid state hard disk performance testing method according to an embodiment of the present application;
[0020] Figure 2 is a flow chart of a method for testing the performance of a solid state drive according to an embodiment of the present application;
[0021] Figure 3 is a structural schematic diagram of a solid state hard disk according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of a performance indicator test process according to an embodiment of the present application;
[0023] Figure 5 It is a schematic diagram of the overall process of a performance test according to an embodiment of the present application;
[0024] Figure 6 is a structural block diagram of a performance testing device for a solid state drive according to an embodiment of the present application;
[0025] Figure 7 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0028] The performance test method of the solid state drive provided in the embodiment of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a solid state drive performance test method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the performance test method of the solid-state hard disk in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0030] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] In order to solve the above problems, this embodiment provides a performance test method for a solid state drive. Optionally, the execution subject of the method may be a performance test program corresponding to the solid state drive, such as Figure 2 As shown, the method includes the following steps S202-S206:
[0032] Step S202: determining a target file, wherein the target file has the performance of a virtual function VF of a solid state drive when i queues are allocated, i is an integer greater than or equal to 1 and less than or equal to N, and N is the maximum number of queues allowed to be allocated by the VF;
[0033] Optionally, the target file contains VF performance data under different queue number allocations. Specifically, this file records the performance indicators that a VF can achieve when a single VF is allocated any number of queues (i queues, where i is an integer greater than or equal to 1 and less than or equal to N) from 1 to its maximum allowed queue number (N). Performance indicators include but are not limited to: read and write bandwidth, input / output operations per second (IOPS), etc.
[0034] Optionally, the target file is as follows:
[0035] Table 1
[0036]
[0037] It should be noted that step S202 enables the test program to know the expected performance under various configurations before queue allocation, so that resource pre-allocation can be performed more scientifically and efficiently, avoiding the waste of resources and time consumption that may be caused by blind testing.
[0038] Step S204: allocating a queue for each of the multiple VFs of the solid state drive according to the target file, and determining the performance of each of the multiple VFs;
[0039] Optionally, based on the target file determined in step S202, the performance test program will allocate a corresponding number of queue resources to each VF in the solid-state drive to ensure that each VF can perform performance testing under different resource configurations. Subsequently, each VF is tested using a performance testing tool (such as a flexible I / O tool (Flexible I / O Tester, referred to as FIO)) to determine the specific performance of each VF after a specific number of queue resources are allocated.
[0040] It should be noted that, through step S204, the performance of all VFs is tested in parallel, and the testing method collects comprehensive performance data in a relatively short period of time, thus providing a solid foundation for subsequent comprehensive evaluation.
[0041] Step S206: determining whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs.
[0042] Optionally, the performance test program will perform a comprehensive analysis based on the performance data of all VFs collected in step S204. If the sum of the performance of all VFs reaches or exceeds the performance peak of a single physical function (PF), and the performance of each VF meets its predetermined performance requirements, then it can be determined that the solid-state drive can meet the performance requirements in SRIOV mode. On the contrary, if the sum of the performance is lower than the performance peak of the PF, or the performance of any VF does not meet the requirements, the test program will determine that the performance of the solid-state drive does not meet the requirements, and it may be necessary to adjust and optimize the firmware or resource allocation strategy of the solid-state drive.
[0043] It should be noted that step S206 is not only a performance test of individual VFs, but a comprehensive evaluation of the performance of all VFs, ensuring that the overall performance of the SSD can be effectively utilized in resource sharing scenarios to avoid resource waste, while ensuring that each VF user can obtain a satisfactory performance experience. It evaluates whether the overall performance of the SSD meets the standards in complex scenarios where multiple VFs run simultaneously and share resources. By comparing the sum of the performance of all VFs with the peak performance of a single physical function (PF), this method can ensure that in SRIOV mode, the resource allocation and performance of the SSD can achieve the expected high efficiency and stability, thereby verifying the actual availability and performance advantages of the SSD in a virtualized environment.
[0044] It should be noted that the above steps effectively improve the test efficiency through early performance data preparation, accurate queue resource allocation and comprehensive performance verification, while ensuring the accuracy and effectiveness of the test results, and have a significant driving effect on the performance evaluation of solid-state drives under SR-IOV characteristics. This method is particularly suitable for evaluating the performance of solid-state drives in multi-user, multi-task virtualized environments, ensuring that they can meet the performance requirements of various application scenarios, avoid resource waste, and achieve the best balance between performance and efficiency.
[0045] Through the above steps, a queue is allocated to each of the multiple VFs in the solid-state drive according to the target file, and the performance of each VF is determined, so as to judge whether the solid-state drive can meet the performance requirements according to the performance of each VF in the multiple VFs. Since reasonable queues are allocated to the multiple VFs in the solid-state drive based on the target file, the performance of the solid-state drive can be better tested based on the performance of the VF, thereby solving the problem that the solid-state drive SSD cannot be tested well after SRIOV resources are allocated to the solid-state drive SSD.
[0046] In an exemplary embodiment, the method further comprises the following steps S11-S12:
[0047] Step S11: Obtain the performance of the VF when N queues are allocated;
[0048] Optionally, the performance test program tests and records the performance indicators of the VF when the VF is assigned its maximum allowed number of queues (N). Generally, more queues can provide higher parallel operation capabilities, which can theoretically lead to better I / O performance. Obtaining the performance of the VF under the maximum queue configuration provides benchmark data for subsequent optimization steps and helps identify the performance change trend of the VF under different queue number configurations.
[0049] Step S12: When the performance of the VF when Z queues are allocated is lower than the performance of the VF when N queues are allocated, and the performance of the VF when Z+1 queues are allocated is higher than the performance of the VF when N queues are allocated, determine Z+1 as the optimal number of queues for the VF, where Z is an integer greater than or equal to 1 and less than or equal to N-1.
[0050] It should be noted that through testing, it was found that the more queues, the better. There is a critical point near which the performance of the VF will be significantly improved, and then the marginal effect of increasing the number of queues on performance improvement will decrease. Therefore, finding the optimal number of queues can ensure that each VF achieves the best performance with relatively few resources. By determining the optimal number of queues, you can avoid over-configuring queue resources and reduce resource waste. For example, if a VF can reach or approach its performance peak with Z+1 queues, there is no need to allocate N queues, which can free up more queue resources for other VFs and improve overall resource utilization efficiency.
[0051] Optionally, assume that the performance test program configures the number of queues of the VF to the maximum value N, that is, 32 queues, and then obtains the performance indicators of the VF under the 32-queue configuration through a series of standard performance tests (for example, using the FIO tool). Assume that under the 32-queue configuration, the read bandwidth of the VF is 2000MB / s and the write bandwidth is 1500MB / s. Then, the performance test program begins to reduce the number of queues one by one, starting from N-1 (that is, 31), until the critical point is found; assume that during the test, when the number of queues is configured to 20 (that is, Z=20), the read bandwidth of the VF drops to 1900MB / s and the write bandwidth drops to 1400MB / s, that is, the performance of the VF with 20 queues is lower than that with 32 queues, and when the test VF is in 21 queues (that is, When comparing the performance of the VF with Z=20 queues (N=32 queues), it is found that the read bandwidth is unexpectedly increased to 2050 MB / s and the write bandwidth is also increased to 1550 MB / s, that is, the performance of the VF with 21 queues is higher than that with 32 queues. Step S12 is executed. Since the performance of the VF with Z=20 queues is lower than that with N=32 queues, and the performance with Z+1=21 queues is higher than that with N=32 queues, it can be determined that Z+1 (i.e., 21) is the optimal number of queues for the VF.
[0052] Alternatively, if the committed read bandwidth of a virtual function VF is 500MB / s, and the test results show that when VF is assigned 3 queues (Z=2, Z+1=3), its read bandwidth peak performance can reach 510MB / s, then it can be considered that assigning 3 queues to VF is a reasonable configuration, because this can both meet performance requirements and avoid resource waste caused by assigning too many queues.
[0053] In an exemplary embodiment, allocating a queue for each VF in the plurality of VFs of the solid state drive according to the target file may be implemented by the following steps S21-S24:
[0054] Step S21: determining the number of queues allowed to be allocated by the solid state drive, and obtaining a target number of queues;
[0055] Optionally, the maximum number of queue resources allowed by the SSD, i.e., the target number of queues, is obtained through the hardware specifications of the SSD. The determination of the target number of queues provides an upper limit for allocating resources for subsequent steps, ensuring that the hardware limit of the SSD is not exceeded when allocating queues to VFs. For example, if the SSD allows a maximum of 512 queues to be allocated, then the target number of queues is 512.
[0056] Step S22: Divide the target number of queues by the optimal number of queues to obtain a target value;
[0057] Optionally, the optimal number of queues for each of the multiple VFs is the same, and after the maximum number of queue resources allowed by the solid-state drive obtained in step S21 (i.e., the target number of queues) is divided by the optimal number of queues determined in step S12 to obtain a target value. The target value reflects how many VFs the queue resources of the solid-state drive can theoretically support running simultaneously under the optimal queue configuration. For example, if the optimal number of queues is 3 and the total number of queues allowed to be allocated by the solid-state drive is 512, then the target value will be 512 / 3.
[0058] Step S23: rounding the target value to obtain the number of VFs, wherein the plurality of VFs are the VFs of the number of VFs;
[0059] Optionally, after obtaining the target value, a rounding operation needs to be performed. If the target value is a decimal, the nearest smaller integer is taken as the number of VFs to determine the number of VFs that can actually be created. For example, if the target value is 512 / 3, the rounded number of VFs is 170 (512 / 3=170.666...≈170).
[0060] Alternatively, if the optimal number of queues is 4, the target number of queues is 512, and the target value is 128 (512 / 4=128), no further rounding operation is required, which means that 128 VFs can be created on the SSD.
[0061] It should be noted that step S23 ensures that the queue resources of the solid state drive can be evenly and reasonably allocated to each VF, thereby avoiding fragmentation of resource allocation.
[0062] Step S24: allocating a queue with the optimal number of queues to each VF in the multiple VFs, wherein the capacity of each VF in the multiple VFs is equal to the total capacity of the solid state drive divided by the number of VFs;
[0063] Alternatively, if the optimal number of queues is 4, the target number of queues is 512. This means that the total 512 queue resources on the SSD will be evenly distributed to 128 VFs, and each VF will get 4 queues. If the total capacity of the SSD is 4TB, in order to allocate it to each VF, you can divide 4TB by 128 (the number of VFs) to get a capacity of 32GB for each VF. However, usually, the capacity of the SSD allocated to the VF will be part of the total capacity, rather than a strict average. The 32GB here is a hypothetical example value. In actual applications, it may be more inclined to divide the total capacity of the SSD according to the size of the logical volume (NS). Each VF can be allocated one or more logical volumes, and the allocation of capacity is determined according to specific business needs and the size of the logical volume.
[0064] It should be noted that different queues have different storage areas in the solid state drive, that is, different queues have different storage areas.
[0065] It should be noted that by evenly and reasonably allocating queue resources to each VF, efficient utilization of SSD resources is ensured. Determining the optimal number of queues avoids over-configuration and reduces resource waste, while ensuring that each VF can obtain sufficient queue resources to achieve its performance potential. In addition, each VF will receive the same number of queue resources and an equal share of the total SSD capacity, thus ensuring consistency and predictability in performance for all VFs.
[0066] In an exemplary embodiment, determining whether the solid-state drive meets the performance requirement according to the performance of each VF in the multiple VFs may be implemented by following the steps S31-S32:
[0067] Step S31: when each VF is subjected to a performance test and the performance of each VF is not limited, and the sum of the performance of the multiple VFs is not lower than the performance of the physical function PF of the solid state drive when M queues are allocated, it is determined that the solid state drive meets the performance requirements; wherein M is equal to the target number of queues;
[0068] Optionally, M is equal to the target number of queues, that is, equal to the number of queues allowed to be allocated by the solid state drive, and may be equal to N.
[0069] Optionally, the performance test program executes step S31 without limiting the performance of any VF. Then, the performance test program records the sum of the performance indicators of all VFs, such as read bandwidth, write bandwidth, IOPS, etc., and compares the sum of these performances with the performance of the physical function PF of the solid-state drive when M queues are allocated.
[0070] It should be noted that if the sum of the performance of the multiple VFs is not lower than the performance of the PF when M queues are allocated, then it can be determined that the SSD meets the performance requirements. This means that in SRIOV mode, even if the resources of the SSD are allocated to multiple VFs, the overall performance can still be ensured to be no lower than the level of a single PF configuration.
[0071] Step S32: When each VF is subjected to a performance test and performance speed limit is not imposed on the VF, and the sum of the performances of the multiple VFs is lower than the performance of the physical function PF of the solid state drive when M queues are allocated, it is determined that the solid state drive does not meet the performance requirement.
[0072] It should be noted that if the sum of the performance of the multiple VFs is lower than the performance of the PF when allocating M queues, the SSD fails to meet the performance requirements. This indicates that under the current resource allocation strategy, the performance of the SSD is over-divided, resulting in a decrease in overall performance.
[0073] It should be noted that through the above steps, the performance of SSDs can be evaluated more accurately in the SRIOV environment to ensure that the resource allocation strategy is both reasonable and efficient. Especially for multi-tenant application environments that require high I / O performance and resource isolation, such testing and evaluation methods can provide important guidance and support, and help build high-performance, highly available storage systems.
[0074] In an exemplary embodiment, the determining the performance of each VF in the plurality of VFs may be implemented by following the steps S41-S42:
[0075] Step S41: determining the limiting performance of each VF, wherein the limiting performance of each VF is equal to the performance of the physical function PF of the solid state drive when M queues are allocated divided by the number of VFs;
[0076] Optionally, it is necessary to first calculate the performance upper limit of each VF, that is, the limited performance, which is determined based on the performance level achieved by the physical function PF of the solid-state drive when M queues are allocated. The M value is equal to the total number of queues allowed to be allocated by the solid-state drive, that is, the target number of queues. By dividing the performance of the PF under the M queue configuration by the number of VFs, a fair performance quota can be obtained so that each VF can theoretically obtain the same performance share on the solid-state drive. For example, if the read bandwidth of the PF is 4000MB / s when 512 queues are allocated, and 128 VFs are created on the solid-state drive, then the read bandwidth limit performance of each VF will be 31.25MB / s (4000MB / s / 128=31.25MB / s).
[0077] Step S42: in the case of performing a performance test on each VF, determining the performance of each VF based on the limiting performance of each VF;
[0078] Optionally, after determining the limiting performance of each VF, an actual performance test is performed on each VF, and the test results are compared with the limiting performance calculated in step S41. During the test, if the actual performance of a VF is lower than or equal to its limiting performance, then the performance of this VF is considered reasonable. If the limiting performance is exceeded, it may indicate that the resource allocation strategy of the solid-state drive needs to be further optimized, or that there is a performance improvement mechanism in the firmware that allows some VFs to exceed their theoretical quotas, affecting the performance of other VFs. For example, if the actual read bandwidth test result of a VF is 31MB / s, then it meets the limiting performance requirements in step S41, and its performance can be considered reasonable.
[0079] It should be noted that, through the above steps, a limit performance based on the total performance of the SSD is set for each VF, which can ensure that resources are fairly distributed among multiple VFs, while limiting excessive competition for resources and improving the overall performance efficiency of the SSD in a multi-tenant environment.
[0080] In an exemplary embodiment, determining whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs may be implemented by following the steps S51-S52:
[0081] Step S51: when the performance of each VF in the plurality of VFs is not higher than the corresponding limited performance, determining that the solid state drive meets the performance requirement;
[0082] It should be noted that when the performance test results of all VFs do not exceed their preset limit performance, the SSD can be considered to meet the performance requirements. The limit performance is the theoretical performance upper limit averagely distributed to each VF based on the performance of the SSD physical function PF under a specific queue configuration M (target number of queues). If the actual performance of each VF remains within this upper limit, it means that the resource allocation strategy and firmware design of the SSD can ensure fairness and efficiency in a multi-tenant environment, without excessive resource concentration or performance bottleneck problems.
[0083] Step S52: if the performance of a VF among the multiple VFs is higher than the corresponding limited performance, determine that the solid state drive does not meet the performance requirement.
[0084] Optionally, contrary to step S51, if the actual performance test result of any VF is higher than its corresponding limited performance, the SSD will be deemed to not meet the performance requirements. This indicates that there may be some imbalance or defects in the resource allocation or firmware design of the SSD, resulting in some VFs being able to obtain resources exceeding their fair share, and such unreasonable resource allocation may affect the performance of other VFs, and even cause the overall SSD performance to decline or become unstable.
[0085] Optionally, the fact that the SSD does not meet the performance requirements in step S52 can be used as an indication of a performance bottleneck and optimization strategy. The system administrator or developer can analyze the reasons for the VF performance exceeding the standard (which may be a problem with firmware design, queue allocation strategy or hardware limitation) based on the test results, and optimize the SSD driver, firmware or system configuration in a targeted manner.
[0086] It should be noted that the implementation of steps S51 and S52 can verify whether the SSD has achieved fair resource allocation, ensuring that in a multi-VF environment, each VF can run smoothly according to the preset limited performance, avoiding resource conflicts and user experience problems caused by excessive performance differences. At the same time, this also improves the predictability of performance. The implementation of steps S51 and S52 can not only evaluate the performance of the SSD in SRIOV mode, but also detect and discover potential resource allocation problems. System administrators can better plan and allocate resources to meet various business needs, provide all tenants with stable and expected performance levels, and avoid the degradation of service quality due to improper resource allocation.
[0087] In an exemplary embodiment, the allocation of queues to each VF in the plurality of VFs of the solid-state drive according to the target file may be achieved by the following steps: according to the target file, a queue is allocated to each VF based on the required performance of each VF, wherein, in the case where the plurality of VFs include X VFs, the number of queues allocated to the j-th VF in the X VFs is equal to P, wherein the performance of the VF recorded in the target file when P queues are allocated is higher than the required performance of the j-th VF, and the performance of the VF recorded in the target file when P-1 queues are allocated is lower than the required performance of the j-th VF, and the capacity of the j-th VF in the X VFs is equal to the total capacity of the solid-state drive divided by 2 j , X is a positive integer greater than or equal to 2;
[0088] Optionally, for each VF (for example, the jth VF) among the X VFs (preset that there are X VFs on the SSD), the algorithm searches for a target file (the file records the VF performance under different queue configurations) to determine a queue number P that satisfies the following conditions: 1. When the VF is assigned P queues, its performance is higher than the required performance of the jth VF; 2. When the VF is assigned P-1 queues, its performance is lower than the required performance of the jth VF.
[0089] Optionally, when X=4, the total capacity of the SSD is 16TB, then the capacity of the first VF is 8TB (16TB / 2^1=8TB); the capacity of the second VF is 4TB (16TB / 2^2=4TB); the capacity of the third VF is 2TB (16TB / 2^3=2TB); the capacity of the fourth VF is 1TB (16TB / 2^4=1TB).
[0090] It should be noted that P is the minimum number of queues that can meet the performance requirements of the jth VF, ensuring efficient resource utilization and meeting performance requirements. At the same time, by evenly allocating the total capacity of the SSD to each VF, the fairness of capacity among all VFs is guaranteed, and each VF can obtain sufficient physical storage space under the condition of limited resources.
[0091] It should be noted that when the random read iops in the VF's required performance is 100k, then the queue resources can be allocated with a value greater than 100k. That is, when there are multiple performance indicators required at the same time, the queue with the largest indicator requirement shall prevail.
[0092] It should be noted that by accurately searching for the target file and allocating the minimum number of queues P that meets its required performance to each VF, refined resource management is achieved and waste of resources is avoided. At the same time, it can ensure that the actual performance of each VF is greater than or equal to its required performance, thereby improving the efficiency and effect of resource allocation. In addition, the algorithm of this embodiment can dynamically adjust the allocation of queue resources according to the actual needs of the VF, which means that when the required performance of the VF changes, the solid-state drive can respond flexibly and adjust the resource allocation strategy in time to adapt to different business scenarios.
[0093] In an exemplary embodiment, determining whether the solid-state drive meets the performance requirement according to the performance of each VF in the multiple VFs may be implemented by following the steps S61-S62:
[0094] Step S61: when each VF is subjected to a performance test, the performance speed of each VF is not limited, the sum of the performance of the multiple VFs is not lower than the performance of the physical function PF of the solid state drive when M queues are allocated, and the performance of each VF in the multiple VFs is not lower than the corresponding required performance, it is determined that the solid state drive meets the performance requirements; wherein M is equal to the number of queues allowed to be allocated to the solid state drive;
[0095] Optionally, without performance limiting any VF, first, test whether the sum of the performance of all VFs on the SSD is not lower than the performance of the PF when M queues are allocated. M is the maximum number of queues allowed by the SSD, and usually the PF can achieve the best performance under the M queue configuration. Secondly, the actual performance of each VF needs to be no lower than its corresponding required performance. If both conditions are met, that is, the sum of the performance of all VFs is no lower than the performance of the PF under the M queue configuration, and the performance of each VF is no lower than its required level, then it can be determined that the SSD meets the performance requirements under the current queue and capacity allocation.
[0096] Step S62: When the performance of each VF is not limited during the performance test, the sum of the performance of the multiple VFs is lower than the performance of the physical function PF of the solid-state drive when M queues are allocated, and there is a VF among the multiple VFs whose performance is lower than the corresponding required performance, it is determined that the solid-state drive does not meet the performance requirements.
[0097] Optionally, in contrast to step S61, if the sum of the performance of all VFs is lower than the performance of the PF when M queues are allocated without performance limiting, or the actual performance of any VF is lower than its required performance, then the SSD will be considered to not meet the performance requirements under the current configuration. This may indicate that resource allocation is unbalanced, some VFs may not get enough queue resources, or the SSD firmware design is defective and cannot maintain high performance in a multi-VF environment.
[0098] It should be noted that, through the testing of steps S61 and S62, it is possible to verify whether the SSD has achieved the expected performance level in SRIOV mode. If the test results show that the performance is not up to standard, the cause can be analyzed and the resource allocation strategy or firmware design can be optimized to improve performance in a multi-VF environment. In addition, ensuring that the performance of each VF is not lower than its required level is crucial to maintaining the quality of service in cloud services and virtualized environments, which is directly related to the user's application experience and business continuity. By performing performance testing before deployment, potential performance bottlenecks or resource allocation problems can be prevented, facilitating more reasonable and forward-looking resource planning and allocation.
[0099] In an exemplary embodiment, the method further comprises the following steps:
[0100] The determining of the performance of each VF in the plurality of VFs may be implemented by the following steps S71-S72:
[0101] Step S71: determining the limiting performance of each VF according to the capacity of each VF, wherein the ratio of the limiting performance of each VF to the performance of the physical function PF of the solid state drive when M queues are allocated is equal to a target ratio, and the target ratio is equal to the ratio of the capacity of each VF to the capacity of the PF;
[0102] It should be noted that the limiting performance of each VF is first calculated based on the performance of the SSD PF when M queues are allocated and the capacity of each VF. This limiting performance is based on a target ratio, which is equal to the ratio of the capacity of each VF to the PF capacity. Since the ratio of the limiting performance of the VF to the performance of the PF is equal to the ratio of the capacity of the VF to the capacity of the PF, the limiting performance of the VF can be obtained based on the target ratio.
[0103] Alternatively, if the total capacity of the SSD is allocated to PFs, and there are x VFs on the SSD, and the capacity of each VF is a portion of the total capacity of the SSD (allocated in powers of 2 or evenly), then the limited performance of each VF will be the performance of the PF under the M queue configuration multiplied by the target ratio. For example, if the performance of the PF is 10,000 MB / s when 512 queues are configured, and 4 VFs are created on the SSD, and the capacity of each VF is 1 / 4 of the total capacity of the SSD, then the limited performance of each VF will be 1 / 4 of the PF performance, that is, 2,500 MB / s. In this way, the limited performance of each VF is proportional to its capacity, ensuring fairness in resource allocation.
[0104] Step S72: in the case of performing a performance test on each VF, determining the performance of each VF based on the limiting performance of each VF;
[0105] Optionally, after determining the performance limit of each VF, a performance test is performed on each VF. During the test, the performance of each VF should not exceed its performance limit and should be as close to this limit as possible. If the test results show that the actual performance of a VF exceeds its performance limit, this may mean that there is a problem with the resource allocation strategy. For example, resources may be over-allocated to this VF, which may affect the performance of other VFs. On the contrary, if the actual performance of a VF is much lower than its performance limit, this may indicate that the VF is not fully utilizing its resources or that there is room for optimization in the firmware of the SSD.
[0106] It should be noted that steps S71 and S72 provide scientific and reasonable guidance for resource allocation and performance tuning of SSDs in SRIOV mode by linking the capacity of each VF with the restricted performance and verifying the consistency between the actual performance and the restricted performance through performance testing, which helps to build an efficient, fair and stable multi-VF operating environment.
[0107] Determining whether the solid-state drive meets the performance requirement according to the performance of each VF in the multiple VFs may be implemented by following the steps S81-S82:
[0108] Step S81: when the performance of each VF in the plurality of VFs is not higher than the corresponding limited performance, determining that the solid state drive meets the performance requirement;
[0109] Alternatively, if the actual performance of each VF remains at or below its limited performance without any performance limit configuration, then it can be determined that the resource allocation and performance of the SSD are reasonable and the SSD meets the performance requirements. This indicates that the firmware design and resource management strategy of the SSD can operate effectively in a multi-VF environment, providing each VF with stable performance that does not exceed its requirements.
[0110] Step S82: if the performance of a VF among the multiple VFs is higher than the corresponding limited performance, determine that the solid state drive does not meet the performance requirement.
[0111] Optionally, in contrast to step S81, step S82 checks whether the actual performance of any VF exceeds its limited performance. If it is found that the performance of any VF exceeds the limited performance, then the SSD does not meet the performance requirements. This may indicate that there are defects in the resource allocation strategy, such as over-allocation to some VFs, resulting in insufficient resources for other VFs, or the firmware design of the SSD cannot effectively control resources and performance in a multi-VF environment, which may lead to unstable performance or reduced service quality.
[0112] It should be noted that steps S81 and S82 evaluate the performance control and resource management capabilities of the SSD in SRIOV mode. By comparing performance testing and limiting performance, deficiencies in resource allocation and firmware design can be quickly identified, providing a basis for optimization and tuning of the SSD, helping to improve resource utilization efficiency and reduce performance bottlenecks. In addition, possible performance anomalies or resource conflicts can be prevented at an early stage, helping system administrators to conduct effective monitoring and maintenance, reduce the risk of system downtime, and improve the long-term reliability and stability of the SSD.
[0113] In an exemplary embodiment, determining the performance of each VF in the multiple VFs can be achieved by the following steps: using an input and output testing tool to determine the performance of each VF; wherein the performance of each VF includes: read bandwidth, write bandwidth, total read and write bandwidth, read input / output operations per second IOPS, write IOPS, and read and write IOPS.
[0114] Optionally, use an input / output testing tool such as Fio to test and evaluate the performance of each VF. By configuring fio's test parameters, such as buffer size (bs), read / write range size (size), concurrent testing (numjobs), depth (iodepth), etc., you can accurately measure the read bandwidth, write bandwidth, total read / write bandwidth, read IOPS, write IOPS, and read / write IOPS of each VF. These performance indicators are key parameters for evaluating the service capabilities of a storage system in a multi-tenant environment.
[0115] Optionally, the test steps for determining the performance of each VF using an input and output test tool are as shown in Table 2 below:
[0116] Table 2
[0117]
[0118] It should be noted that there is no necessary connection between the test steps, among which step 1, step 2, and step 6 in Table 2 are preparation steps, and the rest are test steps (step 3, step 4, step 5, and step 7 in Table 2); each indicator can be tested separately, for example, the steps for testing the random read IOPS of VF are step 1, step 2, and step 5; the steps for testing the random write IOPS of VF are step 1, step 2, step 6, and step 7; 1*128 is the parameters numjobs and iodepth during the fio tool test, which can be changed according to the description of the basic performance indicator test load in the SSD white paper; during the test, 128K and 4K can be modified to other bs according to needs, such as 64K, 256K, 1024K, etc.
[0119] It should be noted that "formatting the hard disk to specify Lbaf" refers to the process of formatting the solid-state drive (SSD) according to a specific logical block address format (LBAF). LBAF defines the logical layout and addressing method of data on the storage device, which affects the data read and write operations and the performance of the storage device. For example, if an application mainly performs 4K random reads and writes, it may choose an LBAF with a logical block size of 4096 bytes, which can better match the I / O characteristics of the application, reduce write amplification, and improve random read and write performance.
[0120] It should be noted that "Fio full disk 128K sequential write 2 times" is a specific operation instruction when using Fio (Flexible I / O Tester) to test the performance of storage devices. It means using the Fio tool to perform two consecutive large data blocks (128KB) sequential write operations on the entire storage space of the SSD to test and evaluate the performance level of the SSD in sequential write mode. This test is usually performed during the resource allocation and performance evaluation process of the SSD to determine the maximum performance or steady-state performance under different configurations.
[0121] It should be noted that in the Fio full disk 128K 1*128 sequential read test for 1 hour, "128K" means that the size of each I / O operation is 128 kilobytes. In storage performance testing, the choice of block size will affect the read and write speed and system response time; "1*128" means that there is 1 job, but the I / O depth of each job is 128, which means that 128 I / O operations can be in waiting or processing status at the same time; "sequential read" means that data will be read from the storage device in a predetermined order, which usually simulates continuous read operations on large files; "test for 1 hour" specifies the duration of the test. The 1-hour test time helps to achieve the steady-state performance of the device and eliminate the impact of short-term performance fluctuations.
[0122] It should be noted that using input and output test tools to determine the performance of each VF is a key step in implementing SRIOV resource allocation and performance evaluation test methods. It not only provides quantitative data to support resource allocation decisions, but also helps to identify performance bottlenecks, optimize resource utilization, ensure system stability and efficiency, and ultimately improve service quality and user experience. This is an essential testing and evaluation process when building and maintaining multi-tenant storage solutions.
[0123] In an exemplary embodiment, the method further includes the following steps S91-S95:
[0124] Step S91: allocating a queue for each VF in the plurality of VFs of the solid state drive according to the target file;
[0125] Step S92: Recording the performance of each VF in the plurality of VFs;
[0126] Step S93: when each VF is subjected to a performance test, and when the performance rate of each VF is not limited and the sum of the performance of the multiple VFs is not lower than the performance of the physical function PF of the solid state drive when M queues are allocated, dynamically increase or decrease the number of queues allocated to the specified VF, while keeping the number of queues allocated to other VFs in the multiple VFs unchanged, wherein the multiple VFs include the specified VF;
[0127] Step S94: immediately testing the performance of each of the plurality of VFs after a preset time period to obtain the performance of each of the plurality of VFs after adjustment;
[0128] Step S95: determining whether the solid state drive meets the performance requirement based on the performance of each VF in the plurality of VFs after the adjustment.
[0129] It should be noted that the above steps can provide timely feedback on the performance of the SSD after resource changes, which helps to quickly identify the effectiveness of resource adjustment strategies and ensure that each VF can achieve the best performance level in a dynamic environment.
[0130] In an exemplary embodiment, the method further includes the following steps S111-S115:
[0131] Step S111: allocating a queue for each VF in the plurality of VFs of the solid state drive according to the target file;
[0132] Step S112: recording the performance of each VF in the plurality of VFs;
[0133] Step S113: when each VF is subjected to a performance test and the performance rate of each VF is not limited, and the sum of the performance of the multiple VFs is not lower than the performance of the physical function PF of the solid state drive when M queues are allocated, dynamically increase or decrease the number of target VFs, and randomly reduce or increase the allocated queues for increasing or decreasing the number of target VFs to other VFs in the multiple VFs, wherein the multiple VFs include the target VF;
[0134] Step S114: immediately testing the performance of each of the multiple VFs after a preset time period to obtain the performance of each of the multiple VFs after adjustment;
[0135] Step S115: determining whether the solid state drive meets the performance requirement based on the performance of each VF in the plurality of VFs after the adjustment.
[0136] Obviously, the above-described embodiments are only embodiments of a part of the present invention, rather than all embodiments. In order to better understand the above method, the above process is described below in conjunction with embodiments, but it is not intended to limit the technical solutions of the embodiments of the present invention, specifically:
[0137] First, let's explain the structure of the solid state drive. Figure 3As shown, a solid-state drive is a hard disk that uses flash memory chips as storage media, wherein the submission queue (SQ) is used by the virtual machine to send I / O requests to the hardware device, and the completion queue (CQ) is used by the device to report the completion of the I / O operation to the virtual machine. The virtual machine (VM) is a software-implemented technology that can create and run multiple independent and isolated computer environments on a single physical computer (PF). Each virtual machine has its own operating system, driver, memory, disk space, and network environment. In SSD, the namespace (NS) is the basic unit of data storage and management. An SSD can be divided into one or more namespaces, each of which can be regarded as an independent logical drive with its own logical block address space and storage area that can be independently configured and managed.
[0138] SSD can virtualize multiple lightweight PCIe physical devices through SRIOV technology, allowing efficient sharing of PCIe devices between virtual machines. Since it is implemented in hardware, I / O performance comparable to native performance can be obtained. The created new device allows the virtual machine to be directly connected to the I / O device.
[0139] Overall test process reference Figure 5 .
[0140] 1. Determine the performance of each VF using an input and output test tool;
[0141] 2. Obtaining the standard value of performance indicators - single PF peak performance:
[0142] Connect the SSD to the physical machine, turn off the SRIOV function, and test the performance of one PF with all queues assigned. Burn the disk first, then power it on normally, then format it into the specified Lbaf format, and then assign all resources to the PF. Use the fio tool to test the performance indicators of the single PF with the maximum queue according to the performance test standard method.
[0143] 3. Obtaining the standard value of performance indicators - single VF peak performance:
[0144] Connect the SSD to the physical machine, enable SRIOV and test the performance of one VF with all queues allocated. Figure 4 , first burn the disk and then power it on normally, then format it into the specified Lbaf format, and then allocate all resources to VF. Use the fio tool to test the performance indicators under the maximum queue of a single VF according to the performance test standard method.
[0145] 4. Single VF resource allocation when achieving peak performance - single VF optimal queue, and single VF performance index values when different resource allocations are used:
[0146] Connect the SSD to the physical machine, enable SRIOV and test the performance of 1 VF with 2 queues (2 VQs and VI). Figure 4 , first burn the disk and then power it on normally, then format it into the specified Lbaf format, and then allocate resources to VF. Use the fio tool to test the performance indicators under the maximum queue of a single VF according to the performance test standard method.
[0147] Repeat the above steps to test the performance index when VF resources are configured into 3 queues until the maximum queue. When the test is allocated to X resources, if the test value reaches the single VF peak performance index, there is no need to test other resource allocations between X+1 and the maximum queue. At this time, X is the optimal queue for a single VF.
[0148] 5. Record the performance index value table. After completing the test in steps 2, 3 and 4, the index table obtained is similar to the following Table 3:
[0149] Table 3
[0150]
[0151] 6. VF resource allocation method:
[0152] In actual use:
[0153] (1) When allocating resources to a single VF, refer to the performance indicator value table based on the corresponding bandwidth and iops requirements, that is, the committed performance value, to make reasonable resource allocation (for example, if the committed performance read bandwidth is 500MB, and the peak performance is 510MB when there are three VF queues in the table, then allocate the corresponding VF three queue resources);
[0154] (2) When multiple VFs need to allocate resources at the same time, each VF is allocated resources in the same way as a single VF. Before allocating each VF, it is necessary to check that the sum of all VF resources is less than the total number of SSD resources. Otherwise, the current Xth VF fails to allocate resources, that is, X-1 is the maximum number of configured VFs.
[0155] 7. VF performance evaluation - VF optimal queue performance evaluation:
[0156] Connect the SSD to the physical machine, enable SRIOV to test the performance of x VFs under optimal queue allocation (VF size is 1 / x of total capacity, x is the total number of SSD resources / optimal number of single VF queues and rounded up). Burn the disk first and then power it on normally, then format it into the specified Lbaf format, and then allocate optimal queue resources to x VFs. Use the fio tool to test the performance indicators of multiple VFs under optimal queues according to the standard performance test method (multiple VFs need to be tested in parallel);
[0157] The test result is: the sum of x VF performance indicators is greater than the PF performance peak (for example: the sum of the read bandwidths of x VFs is greater than or equal to the single PF bandwidth peak performance, otherwise the test fails and the SSD firmware should be optimized).
[0158] 8. VF performance evaluation - VF resource allocation performance evaluation:
[0159] Connect the SSD to the physical machine, turn on SRIOV to test the performance of the corresponding queues assigned to x VFs (for example, if 6 VFs are assigned, the values are 1 / 2, 1 / 4, 1 / 8, 1 / 16, 1 / 32, and 1 / 64 of the capacity respectively). Burn the disk first and then power it on normally. Then format it into the specified Lbaf format. Then, according to the VF requirements, allocate the corresponding queue resources to x VFs according to the performance indicator value table (Table 3) in step 5 (for example, if the promised performance is 100k random read iops, then allocate queue resources greater than 100k. When there are multiple performance indicator requirements at the same time, the queue with the largest indicator requirement shall prevail). Use the fio tool to test the performance indicators of the corresponding queues of multiple VFs according to the standard performance test method (multiple VFs must be tested in parallel);
[0160] The test results should meet the following requirements: the performance indicators of x VFs meet the VF promised performance, and the sum of the individual performance indicators of x VFs is greater than or equal to the single PF performance peak. Otherwise, the test fails and the SSD firmware should be optimized.
[0161] IX. VF performance evaluation - VF resource allocation performance evaluation when SSD supports speed limit:
[0162] (1) Performance test when multiple VFs are evenly distributed in speed limit mode: Connect the SSD to the physical machine, enable SRIOV, set the speed limit, and test the performance of x VFs under the optimal queue (the VF size is 1 / x of the total capacity, where x is the total number of SSD resources / the optimal number of queues for a single VF and then rounded up). Burn the disk first and then power it on normally, then format it into the specified Lbaf format, allocate the optimal queue resources to x VFs, set the speed limit for the VF according to the capacity and performance indicators (the VF speed limit value is set to 1 / x of the peak performance of a single PF), and use the fio tool to test the performance indicators of multiple VFs under the optimal queue in speed limit mode according to the standard performance test method (multiple VFs must be tested in parallel);
[0163] The test result should satisfy the following conditions: each VF can reach the speed limit value; otherwise, the test fails and the SSD firmware should be optimized.
[0164] (2) Performance evaluation of multiple VFs with different capacities under speed limit mode: Connect the SSD to the physical machine, enable SRIOV to test the performance of x VFs under the corresponding queues (for example, if 6 VFs are allocated, the values are 1 / 2, 1 / 4, 1 / 8, 1 / 16, 1 / 32, and 1 / 64 of the capacity respectively, and the speed limit value is set according to the performance indicator value table). First, burn the disk and then power it on normally. Then format it into the specified Lbaf format. According to the VF requirements, allocate the corresponding queue resources to x VFs according to the performance indicator value table in step 5 (for example, if the requirement is 100k random read iops, then the queue resource value greater than 100k is sufficient. When there are multiple performance indicator requirements, the queue with the largest indicator requirement shall prevail). Set the corresponding speed limit for each VF (the VF speed limit value is set to a certain proportion of the single PF peak performance, which is VF capacity / PF capacity). Use the fio tool to test the performance indicators of multiple VFs under the corresponding queues according to the standard performance test method (multiple VFs must be tested in parallel).
[0165] The test result should satisfy the following conditions: each VF can reach the speed limit value; otherwise, the test fails and the SSD firmware should be optimized.
[0166] 10. VF performance evaluation - fio rate limit VF resource allocation performance evaluation:
[0167] This step is similar to step nine, except that the speed limit setting configuration for each VF is removed and the speed limit is set from the data input terminal fio tool load instead.
[0168] It should be noted that the present application also has the following advantages: compared with the existing SSD test after adding the SRIOV function, a new set of practical SRIOV resource allocation and performance evaluation test methods is added, which can identify problems in the SRIOV resource allocation and performance evaluation process in advance, solve the problem of SRIOV resource allocation having no basis, avoid resource waste and substandard performance during actual use by customers, thereby improving the overall product quality and customer satisfaction.
[0169] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0170] In this embodiment, a performance test device for a solid state drive is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0171] Figure 6 : is a structural block diagram of a performance test device for a solid state drive according to an embodiment of the present application, the device comprising:
[0172] A first determination module 602 is used to determine a target file, wherein the target file has the performance of a virtual function VF of a solid state drive when i queues are allocated, i is an integer greater than or equal to 1 and less than or equal to N, and N is the maximum number of queues allowed to be allocated by the VF;
[0173] An allocation module 604, configured to allocate a queue to each of the plurality of VFs of the solid state drive according to the target file, and determine the performance of each of the plurality of VFs;
[0174] The second determination module 606 is configured to determine whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs.
[0175] The above-mentioned device allocates a queue to each VF of multiple VFs in the solid-state hard disk according to the target file, and determines the performance of each VF, thereby judging whether the solid-state hard disk can meet the performance requirements according to the performance of each VF in the multiple VFs. Since reasonable queues are allocated to the multiple VFs in the solid-state hard disk based on the target file, the performance of the solid-state hard disk can be better tested based on the performance of the VF, thereby solving the problem that the solid-state hard disk SSD cannot be better tested after SRIOV resources are allocated to the solid-state hard disk SSD.
[0176] In an exemplary embodiment, the above-mentioned device also includes: an acquisition module, used to obtain the performance of the VF when N queues are allocated; the above-mentioned device also includes: a third determination module, used to determine that Z+1 is the optimal number of queues of the VF when the performance of the VF when Z queues are allocated is lower than the performance of the VF when N queues are allocated, and the performance of the VF when Z+1 queues are allocated is higher than the performance of the VF when N queues are allocated, and Z is an integer greater than or equal to 1 and less than or equal to N-1.
[0177] In an exemplary embodiment, the allocation module 604 is further used to determine the number of queues allowed to be allocated to the solid-state drive to obtain a target number of queues; divide the target number of queues by the optimal number of queues to obtain a target value; round the target value to obtain the number of VFs, wherein the multiple VFs are VFs of the VF number; allocate a queue of the optimal number of queues to each of the multiple VFs, and the capacity of each of the multiple VFs is equal to the total capacity of the solid-state drive divided by the number of VFs; the second determination module 606 is further used to determine that the solid-state drive meets the performance requirements when each VF is not performance-limited when the performance test is performed on each VF, and the sum of the performance of the multiple VFs is not lower than the performance of the physical function PF of the solid-state drive when M queues are allocated; wherein M is equal to the target number of queues; when each VF is not performance-limited when the performance test is performed on each VF, and the sum of the performance of the multiple VFs is lower than the performance of the physical function PF of the solid-state drive when M queues are allocated, determine that the solid-state drive does not meet the performance requirements.
[0178] In an exemplary embodiment, the second determination module 606 is also used to determine the limiting performance of each VF, wherein the limiting performance of each VF is equal to the performance of the physical function PF of the solid-state drive when M queues are allocated divided by the number of VFs; when a performance test is performed on each VF, the performance of each VF is determined based on the limiting performance of each VF; when the performance of each VF among the multiple VFs is not higher than the corresponding limiting performance, it is determined that the solid-state drive meets the performance requirements; when there is a VF among the multiple VFs whose performance is higher than the corresponding limiting performance, it is determined that the solid-state drive does not meet the performance requirements.
[0179] In an exemplary embodiment, the allocation module 604 is further used to allocate a queue to each VF based on the required performance of each VF according to the target file, wherein, in the case where the multiple VFs include X VFs, the number of queues allocated to the j-th VF among the X VFs is equal to P, wherein the performance of the VF recorded in the target file when P queues are allocated is higher than the required performance of the j-th VF, and the performance of the VF recorded in the target file when P-1 queues are allocated is lower than the required performance of the j-th VF, and the capacity of the j-th VF among the X VFs is equal to the total capacity of the solid state drive divided by 2 j , X is a positive integer greater than or equal to 2; the second determination module 606 is also used to determine that the solid-state drive meets the performance requirements when the performance speed limit is not performed on each VF when the performance test is performed on each VF, the sum of the performance of the multiple VFs is not lower than the performance of the physical function PF of the solid-state drive when M queues are allocated, and the performance of each VF in the multiple VFs is not lower than the corresponding required performance; wherein M is equal to the number of queues allowed to be allocated to the solid-state drive; when the performance speed limit is not performed on each VF when the performance test is performed on each VF, the sum of the performance of the multiple VFs is lower than the performance of the physical function PF of the solid-state drive when M queues are allocated, and there is a VF in the multiple VFs whose performance is lower than the corresponding required performance, determine that the solid-state drive does not meet the performance requirements.
[0180] In an exemplary embodiment, the second determination module 606 is further used to determine the limiting performance of each VF according to the capacity of each VF, wherein the ratio of the limiting performance of each VF to the performance of the physical function PF of the solid-state drive when M queues are allocated is equal to a target ratio, and the target ratio is equal to the ratio of the capacity of each VF to the capacity of the PF; when a performance test is performed on each VF, the performance of each VF is determined based on the limiting performance of each VF; when the performance of each VF among the multiple VFs is not higher than the corresponding limiting performance, it is determined that the solid-state drive meets the performance requirements; when there is a VF among the multiple VFs whose performance is higher than the corresponding limiting performance, it is determined that the solid-state drive does not meet the performance requirements.
[0181] In an exemplary embodiment, the second determination module 606 is further used to determine the performance of each VF using an input and output testing tool; wherein the performance of each VF includes: read bandwidth, write bandwidth, total read and write bandwidth, read input / output operations per second IOPS, write IOPS, and read and write IOPS.
[0182] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0183] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0184] Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:
[0185] S1, determining a target file, wherein the target file has the performance of a virtual function VF of a solid state drive when i queues are allocated, i is an integer greater than or equal to 1 and less than or equal to N, and N is the maximum number of queues allowed to be allocated by the VF;
[0186] S2, allocating a queue for each of the multiple VFs of the solid state drive according to the target file, and determining the performance of each of the multiple VFs;
[0187] S3: Determine whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs.
[0188] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0189] The embodiment of the present application also provides an electronic device, such as Figure 7 As shown, the electronic device includes a memory 702 and a processor 704. The memory 702 stores a computer program, and the processor 704 is configured to execute the steps in any of the above method embodiments through the computer program.
[0190] Optionally, in this embodiment, the processor 704 may be configured to perform the following steps through a computer program:
[0191] S1, determining a target file, wherein the target file has the performance of a virtual function VF of a solid state drive when i queues are allocated, i is an integer greater than or equal to 1 and less than or equal to N, and N is the maximum number of queues allowed to be allocated by the VF;
[0192] S2, allocating a queue for each of the multiple VFs of the solid state drive according to the target file, and determining the performance of each of the multiple VFs;
[0193] S3: Determine whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs.
[0194] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0195] Alternatively, a person skilled in the art may understand that: Figure 7 The structure shown is for illustration only. Figure 7 The structure of the electronic device is not limited. For example, the electronic device may also include Figure 7 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 7 Different configurations shown.
[0196] Among them, the memory 702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the performance testing method of the solid-state hard disk and the performance testing device of the solid-state hard disk in the embodiment of the present application. The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, that is, realizing the above-mentioned performance testing method of the solid-state hard disk. The memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 702 may further include a memory remotely arranged relative to the processor 704, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 702 can be specifically, but not limited to, used to store information such as system configuration files. As an example, such as Figure 7 As shown, the memory 702 may include, but is not limited to, the first determination module 602, the allocation module 604, and the second determination module 606 in the performance test device for the solid state drive. In addition, other module units in the performance test device for the solid state drive may also be included but are not limited to, which will not be described in detail in this example.
[0197] Optionally, the transmission device 706 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 706 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 706 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0198] In addition, the electronic device further includes: a display 708; and a connection bus 710, which is used to connect various module components in the electronic device.
[0199] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0200] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0201] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0202] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0203] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for testing the performance of a solid state drive, characterized in that: include: Determine a target file, wherein the target file has the performance of a virtual function VF of the solid state drive when i queues are allocated, i is an integer greater than or equal to 1 and less than or equal to N, and N is the maximum number of queues allowed to be allocated to the VF; allocate a queue to each of the multiple VFs of the solid state drive according to the target file, and determine the performance of each of the multiple VFs; Determine whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining the performance of the VF when N queues are allocated; When the performance of the VF when Z queues are allocated is lower than the performance of the VF when N queues are allocated, and the performance of the VF when Z+1 queues are allocated is higher than the performance of the VF when N queues are allocated, Z+1 is determined to be the optimal number of queues for the VF, and Z is an integer greater than or equal to 1 and less than or equal to N-1.
3. The method according to claim 2, characterized in that The allocating a queue for each VF in the plurality of VFs of the solid state drive according to the target file comprises: Determine the number of queues allowed to be allocated by the solid-state drive to obtain a target number of queues; divide the target number of queues by the optimal number of queues to obtain a target value; round the target value to obtain the number of VFs, wherein the multiple VFs are VFs of the number of VFs; allocate a queue of the optimal number of queues to each VF in the multiple VFs, and the capacity of each VF in the multiple VFs is equal to the total capacity of the solid-state drive divided by the number of VFs; The determining whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs includes: When each VF is subjected to a performance test, and the sum of the performance of the multiple VFs is not lower than the performance of the physical function PF of the solid state drive when M queues are allocated, it is determined that the solid state drive meets the performance requirements; wherein M is equal to the target number of queues; When performance limit is not performed on each VF during performance testing, and the sum of the performance of the multiple VFs is lower than the performance of the physical function PF of the solid state drive when M queues are allocated, it is determined that the solid state drive does not meet the performance requirement.
4. The method according to claim 3, characterized in that The determining the performance of each VF in the plurality of VFs comprises: Determine the limiting performance of each VF, wherein the limiting performance of each VF is equal to the performance of the physical function PF of the solid state drive when M queues are allocated divided by the number of VFs; when a performance test is performed on each VF, determine the performance of each VF based on the limiting performance of each VF; The determining whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs includes: When the performance of each VF in the plurality of VFs is not higher than the corresponding limited performance, determining that the solid state drive meets the performance requirement; In a case where the performance of a VF among the multiple VFs is higher than the corresponding limited performance, it is determined that the solid state drive does not meet the performance requirement.
5. The method according to claim 1, characterized in that: The allocating a queue for each VF in the plurality of VFs of the solid state drive according to the target file comprises: According to the target file, a queue is allocated to each VF based on the required performance of each VF, wherein, in the case where the multiple VFs include X VFs, the number of queues allocated to the j-th VF among the X VFs is equal to P, wherein the performance of the VF recorded in the target file when P queues are allocated is higher than the required performance of the j-th VF, and the performance of the VF recorded in the target file when P-1 queues are allocated is lower than the required performance of the j-th VF, and the capacity of the j-th VF among the X VFs is equal to the total capacity of the solid state drive divided by 2j, where X is a positive integer greater than or equal to 2; The determining whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs includes: When each VF is subjected to a performance test, the performance speed of each VF is not limited, the sum of the performance of the multiple VFs is not lower than the performance of the physical function PF of the solid state drive when M queues are allocated, and the performance of each VF in the multiple VFs is not lower than the corresponding required performance, it is determined that the solid state drive meets the performance requirements; wherein M is equal to the number of queues allowed to be allocated to the solid state drive; When performance speed limit is not performed on each VF during performance testing, the sum of the performance of the multiple VFs is lower than the performance of the physical function PF of the solid-state drive when M queues are allocated, and there is a VF among the multiple VFs whose performance is lower than the corresponding required performance, it is determined that the solid-state drive does not meet the performance requirements.
6. The method according to claim 5, characterized in that The method further comprises: The determining the performance of each VF in the plurality of VFs comprises: Determining the limiting performance of each VF according to the capacity of each VF, wherein the ratio of the limiting performance of each VF to the performance of the physical function PF of the solid-state drive when M queues are allocated is equal to a target ratio, and the target ratio is equal to the ratio of the capacity of each VF to the capacity of the PF; in the case of performing a performance test on each VF, determining the performance of each VF based on the limiting performance of each VF; The determining whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs includes: When the performance of each VF among the multiple VFs is not higher than the corresponding limit performance, it is determined that the solid-state drive meets the performance requirements; when the performance of a VF among the multiple VFs is higher than the corresponding limit performance, it is determined that the solid-state drive does not meet the performance requirements.
7. The method according to claim 1, characterized in that The determining the performance of each VF in the plurality of VFs comprises: Determining the performance of each of the VFs using an input-output test tool; The performance of each VF includes: read bandwidth, write bandwidth, total read and write bandwidth, read input / output operations per second IOPS, write IOPS, and read and write IOPS.
8. A performance testing device for a solid state hard disk, characterized in that: include: A first determination module is used to determine a target file, wherein the target file has the performance of a virtual function VF of a solid state drive when i queues are allocated, i is an integer greater than or equal to 1 and less than or equal to N, and N is a maximum number of queues allowed to be allocated by the VF; an allocation module, configured to allocate a queue to each of the plurality of VFs of the solid state drive according to the target file, and determine the performance of each of the plurality of VFs; The second determination module is used to determine whether the solid state drive meets the performance requirement according to the performance of each VF in the multiple VFs.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Equipment read-write pressure test method and electronic equipment
CN120762983A
Device read-write pressure test method and electronic device
CN120762983B