[go: up one dir, main page]

CN114138469B - Thread self-adaptive distribution method and device for solid state disk and solid state disk - Google Patents

Thread self-adaptive distribution method and device for solid state disk and solid state disk Download PDF

Info

Publication number
CN114138469B
CN114138469B CN202111354779.3A CN202111354779A CN114138469B CN 114138469 B CN114138469 B CN 114138469B CN 202111354779 A CN202111354779 A CN 202111354779A CN 114138469 B CN114138469 B CN 114138469B
Authority
CN
China
Prior art keywords
thread allocation
input
performance
thread
parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111354779.3A
Other languages
Chinese (zh)
Other versions
CN114138469A (en
Inventor
齐武波
冯超
许春
赵伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111354779.3A priority Critical patent/CN114138469B/en
Publication of CN114138469A publication Critical patent/CN114138469A/en
Application granted granted Critical
Publication of CN114138469B publication Critical patent/CN114138469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请涉及一种固态硬盘的线程自适应分配方法、装置、计算机设备和固态硬盘。所述方法包括:通过获取预设时间间隔内的输入输出特征数据;根据输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;根据输入输出特征向量范围,从线程分配参数映射表中获取第一线程分配参数;比较当前线程分配参数与第一线程分配参数是否一致;当不一致时,将当前线程分配参数调整为第一线程分配参数,实现固态硬盘根据当前的应用场景自适应的修改线程分配参数,使得各个应用场景下固态硬盘的线程分配比例处于最优,性能达到最优,提升了固态硬盘的综合性能。

The present application relates to a thread adaptive allocation method, device, computer equipment and solid state drive of a solid state drive. The method includes: obtaining input and output characteristic data within a preset time interval; determining the input and output characteristic vector range in the thread allocation parameter mapping table according to the input and output characteristic data, and the thread allocation parameter mapping table maps each input and output. The feature vector range corresponds to the thread allocation parameter with the best performance; according to the input and output feature vector range, the first thread allocation parameter is obtained from the thread allocation parameter mapping table; compare whether the current thread allocation parameter is consistent with the first thread allocation parameter; when they are inconsistent , adjust the current thread allocation parameters to the first thread allocation parameters, so that the solid-state drive can adaptively modify the thread allocation parameters according to the current application scenario, so that the thread allocation ratio of the solid-state drive in each application scenario is optimal and the performance is optimal. Improved the overall performance of solid-state drives.

Description

固态硬盘的线程自适应分配方法、装置和固态硬盘Thread adaptive allocation method, device and solid state drive of solid state drive

技术领域Technical field

本申请涉及电子技术领域,特别是涉及一种固态硬盘的线程自适应分配方法、装置、计算机设备和固态硬盘。The present application relates to the field of electronic technology, and in particular to a thread adaptive allocation method, device, computer equipment and solid state drive of a solid state drive.

背景技术Background technique

随着电子技术的发展,出现了固态硬盘,固态硬盘(Solid State Disk或SolidState Drive,简称SSD),又称固态驱动器,是用固态电子存储芯片阵列制成的硬盘,在接口的规范和定义、功能及使用方法上与普通硬盘的完全相同,在产品外形和尺寸上基本与普通硬盘一致固态硬盘,具有传统机械硬盘不具备的快速读写、质量轻、能耗低以及体积小等特点。因此,被广泛应用于军事、车载、工控、视频监控、网络监控、网络终端、电力、医疗、航空、导航设备等诸多领域。With the development of electronic technology, solid-state drives have emerged. Solid-state drives (Solid State Disk or SolidState Drive, referred to as SSD), also known as solid-state drives, are hard drives made of solid-state electronic storage chip arrays. In terms of interface specifications and definitions, The functions and usage methods are exactly the same as ordinary hard drives. The product appearance and size are basically the same as ordinary hard drives. Solid-state drives have the characteristics of fast reading and writing, light weight, low energy consumption and small size that traditional mechanical hard drives do not have. Therefore, it is widely used in military, vehicle, industrial control, video surveillance, network monitoring, network terminals, electric power, medical, aviation, navigation equipment and many other fields.

用户对于固态硬盘的性能要求越来越高,而影响SSD性能的因素有很多,特别是不同的业务场景对性能表现影响很大。目前主要是针对具体的业务场景,优化固态硬盘的固件,使固态硬盘在该业务场景下,达到性能最优。Users have increasingly higher performance requirements for solid-state drives, and there are many factors that affect SSD performance. In particular, different business scenarios have a great impact on performance. At present, the main focus is on optimizing the firmware of solid-state drives for specific business scenarios, so that the solid-state drives can achieve optimal performance in this business scenario.

然而,将固态硬盘应用于其他业务场景时,经常无法满足其他业务场景的性能要求,使得固态硬盘的综合性能低。However, when SSDs are applied to other business scenarios, they often fail to meet the performance requirements of other business scenarios, resulting in low overall performance of SSDs.

发明内容Contents of the invention

基于此,有必要针对上述技术问题,提供一种能够提高固态硬盘的综合性能的固态硬盘的线程自适应分配方法、装置、计算机设备和固态硬盘。Based on this, it is necessary to address the above technical problems and provide a thread adaptive allocation method, device, computer equipment and solid state drive for a solid state drive that can improve the overall performance of the solid state drive.

一方面,提供一种固态硬盘的线程自适应分配方法,所述方法包括:On the one hand, a thread adaptive allocation method for solid state drives is provided, and the method includes:

获取预设时间间隔内的输入输出特征数据;Obtain input and output feature data within a preset time interval;

根据所述输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,所述线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;According to the input and output feature data, determine the input and output feature vector ranges belonging to the thread allocation parameter mapping table, and the thread allocation parameter mapping table maps the thread allocation parameters with the best performance corresponding to each input and output feature vector range;

根据所述输入输出特征向量范围,从所述线程分配参数映射表中获取第一线程分配参数;Obtain the first thread allocation parameter from the thread allocation parameter mapping table according to the input and output feature vector range;

比较当前线程分配参数与所述第一线程分配参数是否一致;Compare whether the current thread allocation parameter is consistent with the first thread allocation parameter;

当不一致时,将当前线程分配参数调整为所述第一线程分配参数。When inconsistent, the current thread allocation parameters are adjusted to the first thread allocation parameters.

在其中一个实施例中,所述根据所述输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围的步骤,包括:In one embodiment, the step of determining the input-output feature vector range belonging to the thread allocation parameter mapping table based on the input-output feature data includes:

对所述输入输出特征数据中的各输入输出特征向量进行去噪整合,获得输入输出特征向量的平均值;Perform denoising integration on each input and output feature vector in the input and output feature data to obtain the average value of the input and output feature vectors;

根据所述输入输出特征向量的平均值,在线程分配参数映射表中匹配所属的输入输出特征向量范围。According to the average value of the input and output feature vectors, the corresponding input and output feature vector ranges are matched in the thread allocation parameter mapping table.

在其中一个实施例中,所述方法还包括:当接收到输入输出请求时,记录所述输入输出请求的输入输出特征向量。In one embodiment, the method further includes: when receiving an input/output request, recording the input/output feature vector of the input/output request.

在其中一个实施例中,所述线程分配参数映射表的映射关系确定方式包括:In one embodiment, the method for determining the mapping relationship of the thread allocation parameter mapping table includes:

从预选线程分配参数集中,依次选取预选线程分配参数作为目标线程分配参数;From the pre-selected thread allocation parameter set, select the pre-selected thread allocation parameters as the target thread allocation parameters;

按照所述目标线程分配参数调整第一固态硬盘中的线程分配参数;Adjust the thread allocation parameters in the first solid-state drive according to the target thread allocation parameters;

模拟各个不同的应用场景对所述第一固态硬盘下发输入输出请求进行性能测试,获取所述第一固态硬盘在各应用场景下的性能结果;Simulate different application scenarios to perform performance testing on the input and output requests issued by the first solid-state drive, and obtain the performance results of the first solid-state drive in each application scenario;

收集所述第一固态硬盘在各应用场景下对应的输入输出特征参数;Collect input and output characteristic parameters corresponding to the first solid-state drive in each application scenario;

返回从所述预选线程分配参数集中依次选取目标线程分配参数的步骤,直至预选线程分配参数集中的所有预选线程分配参数都被选取,获得性能结果数据,所述性能结果数据包括各预选线程分配参数作为目标线程分配参数时,所述第一固态硬盘在各应用场景下的性能结果;Return to the step of sequentially selecting target thread allocation parameters from the pre-selected thread allocation parameter set until all pre-selected thread allocation parameters in the pre-selected thread allocation parameter set are selected, and obtain performance result data, where the performance result data includes each pre-selected thread allocation parameter When assigning parameters as a target thread, the performance results of the first solid-state drive in various application scenarios;

根据所述性能结果数据进行分析,确定各应用场景对应性能最优的初选线程分配参数;Analyze the performance result data to determine the optimal thread allocation parameters corresponding to each application scenario;

根据在各应用场景下收集到所述输入输出特征参数,确定各应用场景下对应的输入输出特征向量范围;According to the input and output feature parameters collected in each application scenario, determine the corresponding input and output feature vector range in each application scenario;

根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系。According to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, the mapping relationship of the thread allocation parameter mapping table is determined.

在其中一个实施例中,所述根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系的步骤,包括:In one embodiment, the step of determining the mapping relationship of the thread allocation parameter mapping table based on the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario includes:

根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,构建初步映射表进行性能检验,获得检验结果;According to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, a preliminary mapping table is constructed for performance testing and the testing results are obtained;

当检验结果满足性能要求时,将各应用场景对应性能最优的初选线程分配参数确定为各应用场景对应性能最优的线程分配参数;When the test results meet the performance requirements, the primary thread allocation parameters with the best performance corresponding to each application scenario are determined as the thread allocation parameters with the best performance corresponding to each application scenario;

根据各应用场景对应性能最优的线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系。The mapping relationship of the thread allocation parameter mapping table is determined based on the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario.

在其中一个实施例中,所述根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,构建初步映射表进行验证,获得验证结果的步骤,包括:In one embodiment, the steps of allocating parameters and input and output feature vector ranges to the primary threads with the best performance corresponding to each application scenario, constructing a preliminary mapping table for verification, and obtaining verification results include:

从各应用场景中依次选取应用场景作为目标应用场景;Select application scenarios from each application scenario in sequence as the target application scenario;

对写入了初步映射表的第二固态硬盘下发所述目标应用场景的输入输出请求进行性能测试,获取所述第二固态硬盘在所述目标应用场景下的性能结果,所述初步映射表是根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围建立的;Perform a performance test on the input and output requests of the target application scenario issued by the second solid-state drive in which the preliminary mapping table is written, and obtain the performance results of the second solid-state drive in the target application scenario. The preliminary mapping table It is established based on the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario;

返回从各应用场景中依次选取应用场景作为目标应用场景的步骤,直至所有应用场景都被作为目标应用场景,获得所述第二固态硬盘在各应用场景下的性能结果;Return to the step of selecting application scenarios as target application scenarios in sequence from each application scenario until all application scenarios are used as target application scenarios, and obtain the performance results of the second solid-state drive in each application scenario;

当各应用场景下的性能结果达到预设阈值时,确定检验结果满足性能要求;When the performance results under each application scenario reach the preset threshold, it is determined that the inspection results meet the performance requirements;

当各应用场景下的性能结果未达到预设阈值时,确定检验结果不满足性能要求。When the performance results under each application scenario do not reach the preset threshold, it is determined that the inspection results do not meet the performance requirements.

在其中一个实施例中,所述线程分配参数包括:处理GC端下发的输入输出请求线程数和处理主机端下发的输入输出请求线程数。In one embodiment, the thread allocation parameters include: the number of threads for processing input and output requests issued by the GC side and the number of threads for processing the input and output requests issued by the host side.

另一方面,提供了一种固态硬盘的线程自适应分配装置,所述装置包括:On the other hand, a thread adaptive allocation device for a solid state drive is provided, and the device includes:

数据获取模块,用于获取预设时间间隔内的输入输出特征数据;The data acquisition module is used to acquire input and output characteristic data within a preset time interval;

范围确定模块,用于根据所述输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,所述线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;A range determination module, configured to determine the input and output feature vector ranges belonging to the thread allocation parameter mapping table according to the input and output feature data. The thread allocation parameter mapping table maps the input and output feature vector ranges corresponding to the optimal performance Thread allocation parameters;

分配参数获取模块,用于根据所述输入输出特征向量范围,从所述线程分配参数映射表中获取第一线程分配参数;An allocation parameter acquisition module, configured to acquire the first thread allocation parameter from the thread allocation parameter mapping table according to the input and output feature vector range;

比较模块,用于比较当前线程分配参数与所述第一线程分配参数是否一致;A comparison module, used to compare whether the current thread allocation parameter is consistent with the first thread allocation parameter;

参数调整模块,用于当不一致时,将当前线程分配参数调整为所述第一线程分配参数。A parameter adjustment module, configured to adjust the current thread allocation parameters to the first thread allocation parameters when they are inconsistent.

再一方面,提供了一种计算机设备,包括存储器、处理器固态硬盘,所述固态硬盘的固件运行时实现以下步骤:On the other hand, a computer device is provided, including a memory, a processor, and a solid-state drive. When the firmware of the solid-state drive is running, the following steps are implemented:

数据获取模块,用于获取预设时间间隔内的输入输出特征数据;The data acquisition module is used to acquire input and output characteristic data within a preset time interval;

范围确定模块,用于根据所述输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,所述线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;A range determination module, configured to determine the input and output feature vector ranges belonging to the thread allocation parameter mapping table according to the input and output feature data. The thread allocation parameter mapping table maps the input and output feature vector ranges corresponding to the optimal performance Thread allocation parameters;

分配参数获取模块,用于根据所述输入输出特征向量范围,从所述线程分配参数映射表中获取第一线程分配参数;An allocation parameter acquisition module, configured to acquire the first thread allocation parameter from the thread allocation parameter mapping table according to the input and output feature vector range;

比较模块,用于比较当前线程分配参数与所述第一线程分配参数是否一致;A comparison module, used to compare whether the current thread allocation parameter is consistent with the first thread allocation parameter;

参数调整模块,用于当不一致时,将当前线程分配参数调整为所述第一线程分配参数。A parameter adjustment module, configured to adjust the current thread allocation parameters to the first thread allocation parameters when they are inconsistent.

又一方面,提供了一种固态硬盘,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:On the other hand, a solid state drive is provided, a computer program is stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

数据获取模块,用于获取预设时间间隔内的输入输出特征数据;The data acquisition module is used to acquire input and output characteristic data within a preset time interval;

范围确定模块,用于根据所述输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,所述线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;A range determination module, configured to determine the input and output feature vector ranges belonging to the thread allocation parameter mapping table according to the input and output feature data. The thread allocation parameter mapping table maps the input and output feature vector ranges corresponding to the optimal performance Thread allocation parameters;

分配参数获取模块,用于根据所述输入输出特征向量范围,从所述线程分配参数映射表中获取第一线程分配参数;An allocation parameter acquisition module, configured to acquire the first thread allocation parameter from the thread allocation parameter mapping table according to the input and output feature vector range;

比较模块,用于比较当前线程分配参数与所述第一线程分配参数是否一致;A comparison module, used to compare whether the current thread allocation parameter is consistent with the first thread allocation parameter;

参数调整模块,用于当不一致时,将当前线程分配参数调整为所述第一线程分配参数。A parameter adjustment module, configured to adjust the current thread allocation parameters to the first thread allocation parameters when they are inconsistent.

上述固态硬盘方法、装置、计算机设备和固态硬盘,通过获取预设时间间隔内的输入输出特征数据,可以体现出固态硬盘主要在什么场景中应用;根据输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;根据输入输出特征向量范围,从线程分配参数映射表中获取第一线程分配参数;比较当前线程分配参数与第一线程分配参数是否一致;当不一致时,将当前线程分配参数调整为第一线程分配参数,实现固态硬盘根据当前的应用场景自适应的修改线程分配参数,使得各个应用场景下固态硬盘的线程分配比例处于最优,性能达到最优,提升了固态硬盘的综合性能。The above-mentioned solid-state drive method, device, computer equipment and solid-state drive can reflect the scenarios in which the solid-state drive is mainly used by obtaining input and output characteristic data within a preset time interval; based on the input and output characteristic data, determine the thread allocation parameter mapping The input and output feature vector ranges in the table, the thread allocation parameter mapping table maps the optimal thread allocation parameters corresponding to each input and output feature vector range; according to the input and output feature vector range, the first thread is obtained from the thread allocation parameter mapping table Allocation parameters; compare whether the current thread allocation parameters are consistent with the first thread allocation parameters; when they are inconsistent, adjust the current thread allocation parameters to the first thread allocation parameters, so that the solid state drive can adaptively modify the thread allocation parameters according to the current application scenario. This optimizes the thread allocation ratio of the solid-state drive in various application scenarios and achieves optimal performance, improving the overall performance of the solid-state drive.

附图说明Description of the drawings

图1为一个实施例中固态硬盘的线程自适应分配方法的流程示意图;Figure 1 is a schematic flowchart of a thread adaptive allocation method for a solid state drive in an embodiment;

图2为一个实施例中固态硬盘的线程自适应分配装置的结构框图;Figure 2 is a structural block diagram of a thread adaptive allocation device for a solid state drive in one embodiment;

图3为一个实施例中计算机设备的内部结构图。Figure 3 is an internal structure diagram of a computer device in one embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.

本申请提供的固态硬盘的线程自适应分配方法,可以应用于固态硬盘。其中,固态硬盘可接入终端使用,使用过程中,固态硬盘中的固件运行时获取预设时间间隔内的输入输出特征数据;根据输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;根据输入输出特征向量范围,从线程分配参数映射表中获取第一线程分配参数;比较当前线程分配参数与第一线程分配参数是否一致;当不一致时,将当前线程分配参数调整为第一线程分配参数。终端可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备等。The thread adaptive allocation method of solid-state drives provided by this application can be applied to solid-state drives. Among them, the solid-state drive can be connected to the terminal for use. During use, the firmware in the solid-state drive obtains the input and output characteristic data within the preset time interval during operation; according to the input and output characteristic data, the input belonging to the thread allocation parameter mapping table is determined. Output feature vector range, thread allocation parameter mapping table maps the optimal thread allocation parameters corresponding to each input and output feature vector range; according to the input and output feature vector range, obtain the first thread allocation parameter from the thread allocation parameter mapping table; compare the current Whether the thread allocation parameters are consistent with the first thread allocation parameters; if they are inconsistent, adjust the current thread allocation parameters to the first thread allocation parameters. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, portable wearable devices, etc.

在一个实施例中,如图1所示,提供了一种固态硬盘的线程自适应分配方法,以该方法应用于固态硬盘为例进行说明,包括以下步骤:In one embodiment, as shown in Figure 1, a method for thread adaptive allocation of solid-state drives is provided. The application of this method to solid-state drives is used as an example to illustrate, including the following steps:

步骤202,获取预设时间间隔内的输入输出特征数据。Step 202: Obtain input and output characteristic data within a preset time interval.

其中,预设时间间隔可以根据用户对固态硬盘的使用频率进行确定,如一个小时、两个小时或一天等等。输入输出特征数据是在预设时间间隔内收集到的所有输入输出特征向量,输入输出特征向量包括输入输出请求的随机性、块大小、队列深度等等,输入输出又称为I/O,全称为Input/Output(即输入/输出)。Among them, the preset time interval can be determined according to the user's frequency of use of the solid state drive, such as one hour, two hours, or one day, etc. Input and output feature data are all input and output feature vectors collected within a preset time interval. The input and output feature vectors include the randomness of input and output requests, block size, queue depth, etc. Input and output are also called I/O, the full name It is Input/Output (i.e. input/output).

步骤204,根据输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数。Step 204: Determine the input and output feature vector ranges in the thread allocation parameter mapping table based on the input and output feature data. The thread allocation parameter mapping table maps the thread allocation parameters with the best performance corresponding to each input and output feature vector range.

其中,每一个输入输出特征向量范围代表了一种应用场景,应用场景可以有:数据库服务、邮箱服务、web服务和流媒体服务等等。线程分配参数映射表存储在固态硬盘中。线程分配参数包括处理GC下发的输入输出请求线程数和处理主机下发的输入输出请求线程数等等。GC(Garbage Collection)是垃圾回收机制。主机是固态硬盘中的主控芯片。可以是从输入输出特征数据中,分析出出现频率最高的输入输出特征向量作为代表值,在线程分配参数映射表中所属的输入输出特征向量范围,也可以是从输入输出特征数据中,分析出输入输出特征向量的平均值作为代表值,在线程分配参数映射表中所属的输入输出特征向量范围,还可以是其他方式去噪出可以代表输入输出特征数据的输入输出特征向量作为判断依据。线程分配参数映射表的映射关系确定可以采用执行测试程序自动获得,也可以由人工测试获得。Among them, each input and output feature vector range represents an application scenario. Application scenarios can include: database service, mailbox service, web service, streaming media service, etc. The thread allocation parameter mapping table is stored in the solid state drive. Thread allocation parameters include the number of threads for processing input and output requests issued by the GC and the number of threads for processing input and output requests issued by the host, etc. GC (Garbage Collection) is a garbage collection mechanism. The host is the main control chip in the solid state drive. The input and output feature vectors with the highest frequency of occurrence can be analyzed from the input and output feature data as the representative value, and the range of input and output feature vectors in the thread allocation parameter mapping table can be analyzed, or the input and output feature vector can be analyzed from the input and output feature data. The average value of the input and output feature vectors is used as the representative value. The range of the input and output feature vectors in the thread allocation parameter mapping table can also be denoised in other ways to produce the input and output feature vectors that can represent the input and output feature data as the basis for judgment. The mapping relationship of the thread allocation parameter mapping table can be automatically obtained by executing the test program, or can be obtained by manual testing.

步骤206,根据输入输出特征向量范围,从线程分配参数映射表中获取第一线程分配参数。Step 206: Obtain the first thread allocation parameter from the thread allocation parameter mapping table according to the input and output feature vector range.

其中,第一线程分配参数是固态硬盘处于该输入输出特征向量范围对应的应用场景时,可以使固态硬盘性能达到最优的线程分配参数。比如:如果应用场景为流媒体服务,对带宽要求高,垃圾数据相对少,就降低处理GC下发的输入输出请求线程数,减少GC的资源占用;如果应用场景为数据库服务,对延迟和IOPS要求高,随机写比较多,垃圾数据就会多,GC压力就大,就需要分配相对较多的线程数给GC。IOPS(Input/Output Operations PerSecond)是指每秒进行读写操作的次数。The first thread allocation parameter is a thread allocation parameter that can optimize the performance of the solid state drive when the solid state drive is in an application scenario corresponding to the input and output feature vector range. For example: if the application scenario is a streaming media service, which requires high bandwidth and relatively little garbage data, reduce the number of input and output request threads issued by the GC to reduce the resource occupation of the GC; if the application scenario is a database service, the latency and IOPS The requirements are high and there are a lot of random writes, so there will be a lot of garbage data, and the pressure on the GC will be great, so a relatively large number of threads need to be allocated to the GC. IOPS (Input/Output Operations PerSecond) refers to the number of read and write operations per second.

步骤208,比较当前线程分配参数与第一线程分配参数是否一致。Step 208: Compare whether the current thread allocation parameter is consistent with the first thread allocation parameter.

其中,获取固态硬盘的固件中当前的线程分配参数,与第一线程分配参数比较,确定当前的线程分配参数与第一线程分配参数是否一致。例如:当前的线程分配参数是处理GC下发的输入输出请求线程数为4和处理主机下发的输入输出请求线程数8,第一线程分配参数也是处理GC下发的输入输出请求线程数为4和处理主机下发的输入输出请求线程数8,则当前的线程分配参数与第一线程分配参数是一致;当前的线程分配参数是处理GC下发的输入输出请求线程数为4和处理主机下发的输入输出请求线程数8,第一线程分配参数是处理GC下发的输入输出请求线程数为8和处理主机下发的输入输出请求线程数4,则当前的线程分配参数与第一线程分配参数是不一致。Among them, the current thread allocation parameters in the firmware of the solid state disk are obtained, compared with the first thread allocation parameters, and it is determined whether the current thread allocation parameters are consistent with the first thread allocation parameters. For example: the current thread allocation parameters are 4 threads for processing input and output requests issued by the GC and 8 threads for processing input and output requests issued by the host. The first thread allocation parameter is also 8 threads for processing input and output requests issued by the GC. 4 and the number of threads processing input and output requests issued by the host is 8, then the current thread allocation parameters are consistent with the first thread allocation parameters; the current thread allocation parameters are the number of threads processing input and output requests issued by the GC is 4 and the number of threads processing the host The number of input and output request threads issued is 8. The first thread allocation parameter is to process the input and output request issued by the GC. The number of threads is 8 and the number of input and output request threads issued by the host is 4. Then the current thread allocation parameter is the same as the first thread allocation parameter. Thread allocation parameters are inconsistent.

步骤300,当不一致时,将当前线程分配参数调整为第一线程分配参数。Step 300: When inconsistent, adjust the current thread allocation parameters to the first thread allocation parameters.

上述固态硬盘的线程自适应分配方法中,通过获取预设时间间隔内的输入输出特征数据,可以体现出固态硬盘主要在什么场景中应用;根据输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;根据输入输出特征向量范围,从线程分配参数映射表中获取第一线程分配参数;比较当前线程分配参数与第一线程分配参数是否一致;当不一致时,将当前线程分配参数调整为第一线程分配参数,实现固态硬盘根据当前的应用场景自适应的修改线程分配参数,使得各个应用场景下固态硬盘的线程分配比例处于最优,性能达到最优,提升了固态硬盘的综合性能。In the thread adaptive allocation method of the solid-state drive mentioned above, by obtaining the input and output characteristic data within the preset time interval, it can be reflected in what scenarios the solid-state drive is mainly used; according to the input and output characteristic data, it is determined in the thread allocation parameter mapping table According to the input and output feature vector range, the thread allocation parameter mapping table maps the optimal thread allocation parameter corresponding to each input and output feature vector range; according to the input and output feature vector range, the first thread allocation parameter is obtained from the thread allocation parameter mapping table ; Compare whether the current thread allocation parameters are consistent with the first thread allocation parameters; when they are inconsistent, adjust the current thread allocation parameters to the first thread allocation parameters, so that the solid state drive can adaptively modify the thread allocation parameters according to the current application scenario, so that each In application scenarios, the thread allocation ratio of the solid-state drive is optimal and the performance is optimal, improving the overall performance of the solid-state drive.

在一个实施例中,根据输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围的步骤,包括:对输入输出特征数据中的各输入输出特征向量进行去噪整合,获得输入输出特征向量的平均值;根据输入输出特征向量的平均值,在线程分配参数映射表中匹配所属的输入输出特征向量范围。In one embodiment, the step of determining the range of input and output feature vectors in the thread allocation parameter mapping table according to the input and output feature data includes: denoising and integrating each input and output feature vector in the input and output feature data to obtain The average value of the input and output feature vectors; according to the average value of the input and output feature vectors, match the corresponding input and output feature vector range in the thread allocation parameter mapping table.

其中,采用输入输出特征向量的平均值作为代表值,可以更准确的体现固态硬盘所使用的应用场景的特征,进一步更准确的对应到获取到第一线程分配参数,使固态硬盘的性能达到最优。Among them, the average value of the input and output feature vectors is used as the representative value, which can more accurately reflect the characteristics of the application scenario used by the solid-state drive, and further more accurately corresponds to the acquisition of the first thread allocation parameters, so that the performance of the solid-state drive can be maximized. excellent.

在一个实施例中,对输入输出特征数据中的各输入输出特征向量进行去噪整合,获得输入输出特征向量的平均值的步骤,包括:将输入输出特征数据中的极端输入输出特征向量剔除,获得剔除后的输入输出特征数据;根据剔除后的输入输出特征数据进行平均值分析,获得输入输出特征向量的平均值。In one embodiment, the step of denoising and integrating each input and output feature vector in the input and output feature data to obtain the average value of the input and output feature vectors includes: removing extreme input and output feature vectors from the input and output feature data, Obtain the eliminated input and output feature data; perform average analysis based on the eliminated input and output feature data to obtain the average value of the input and output feature vectors.

其中,将极端输入输出特征向量剔除,可以避免小概率的输入输出特征向量影响平均值分析,使得输入输出特征向量的平均值可以更准确的体现固态硬盘所使用的应用场景的特征,进一步更准确的对应到获取到第一线程分配参数,使固态硬盘的性能达到最优。Among them, eliminating the extreme input and output feature vectors can avoid the low-probability input and output feature vectors from affecting the average analysis, so that the average value of the input and output feature vectors can more accurately reflect the characteristics of the application scenarios used by the solid-state drive, making it more accurate Corresponding to obtain the first thread allocation parameters, so that the performance of the solid state drive can be optimized.

在一个实施例中,该固态硬盘的线程自适应分配方法还包括:当接收到输入输出请求时,记录输入输出请求的输入输出特征向量。In one embodiment, the thread adaptive allocation method of the solid state drive further includes: when an input/output request is received, recording the input/output feature vector of the input/output request.

其中,输入输出请求可以是GC下发的输入输出请求,也可以是主机下发的输入输出请求。Among them, the input and output requests can be input and output requests issued by the GC or input and output requests issued by the host.

在一个实施例中,以执行测试程序获得线程分配参数映射表的映射关系为例,线程分配参数映射表的映射关系确定方式包括以下步骤:In one embodiment, taking the execution of a test program to obtain the mapping relationship of the thread allocation parameter mapping table as an example, the method for determining the mapping relationship of the thread allocation parameter mapping table includes the following steps:

从预选线程分配参数集中,依次选取预选线程分配参数作为目标线程分配参数;按照目标线程分配参数调整第一固态硬盘中的线程分配参数;模拟各个不同的应用场景对第一固态硬盘下发输入输出请求进行性能测试,获取第一固态硬盘在各应用场景下的性能结果;收集第一固态硬盘在各应用场景下对应的输入输出特征参数;返回从预选线程分配参数集中依次选取目标线程分配参数的步骤,直至预选线程分配参数集中的所有预选线程分配参数都被选取,获得性能结果数据,性能结果数据包括各预选线程分配参数作为目标线程分配参数时,第一固态硬盘在各应用场景下的性能结果;根据性能结果数据进行分析,确定各应用场景对应性能最优的初选线程分配参数;根据在各应用场景下收集到输入输出特征参数,确定各应用场景下对应的输入输出特征向量范围;根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系。From the pre-selected thread allocation parameter set, select the pre-selected thread allocation parameters as the target thread allocation parameters; adjust the thread allocation parameters in the first solid-state drive according to the target thread allocation parameters; simulate various application scenarios to deliver input and output to the first solid-state drive Request a performance test to obtain the performance results of the first solid-state drive in each application scenario; collect the corresponding input and output characteristic parameters of the first solid-state drive in each application scenario; return the target thread allocation parameters selected from the pre-selected thread allocation parameter set. Steps until all pre-selected thread allocation parameters in the pre-selected thread allocation parameter set are selected to obtain performance result data. The performance result data includes the performance of the first solid-state drive in each application scenario when each pre-selected thread allocation parameter is used as the target thread allocation parameter. Results: Analyze the performance result data to determine the optimal thread allocation parameters corresponding to each application scenario; determine the input and output feature vector range corresponding to each application scenario based on the input and output feature parameters collected in each application scenario; According to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, the mapping relationship of the thread allocation parameter mapping table is determined.

其中,模拟各个不同的应用场景可以搭建真实场景,也是使用第三方模拟工具,如fio(支持多种输入输出引擎工作负载生成器)、vdbench(输入输出工作负载生成器)等。性能结果包括带宽、iops(即每秒的输入输出量)、延迟等数据。每一个输入输出特征向量范围都对应了一个应用场景。确定的各应用场景对应性能最优的初选线程分配参数,可以直接作为各输入输出特征向量范围对应性能最优的线程分配参数,确定的线程分配参数映射表的映射关系。也可以对各应用场景对应性能最优的初选线程分配参数进行验证后,验证通过后再确定的线程分配参数映射表的映射关系。Among them, simulating different application scenarios can build real scenarios, and also use third-party simulation tools, such as fio (supports multiple input and output engine workload generators), vdbench (input and output workload generator), etc. Performance results include bandwidth, iops (ie, input and output per second), latency and other data. Each input and output feature vector range corresponds to an application scenario. The determined primary thread allocation parameters corresponding to the optimal performance for each application scenario can be directly used as the thread allocation parameters corresponding to the optimal performance for each input and output feature vector range, and the mapping relationship of the determined thread allocation parameter mapping table. It is also possible to verify the primary thread allocation parameters with the best performance corresponding to each application scenario, and then determine the mapping relationship of the thread allocation parameter mapping table after passing the verification.

在一个实施例中,根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系的步骤,包括:根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,构建初步映射表进行性能检验,获得检验结果;当检验结果满足性能要求时,将各应用场景对应性能最优的初选线程分配参数确定为各应用场景对应性能最优的线程分配参数;根据各应用场景对应性能最优的线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系。In one embodiment, the step of determining the mapping relationship of the thread allocation parameter mapping table according to the primary thread allocation parameters and the input and output feature vector ranges corresponding to the optimal performance of each application scenario includes: according to the optimal performance corresponding to each application scenario Based on the primary thread allocation parameters and input and output feature vector ranges, a preliminary mapping table is constructed for performance testing, and the inspection results are obtained; when the inspection results meet the performance requirements, the primary thread allocation parameters with the best performance corresponding to each application scenario are determined as each The application scenario corresponds to the thread allocation parameter with the best performance; according to the thread allocation parameter with the best performance and the input and output feature vector range corresponding to each application scenario, the mapping relationship of the thread allocation parameter mapping table is determined.

其中,对各应用场景对应性能最优的初选线程分配参数进行验证后,验证通过后再确定的线程分配参数映射表的映射关系,可以提高更准确的对应到调整线程分配参数,使固态硬盘的性能达到最优。Among them, after verifying the primary thread allocation parameters with the best performance for each application scenario, and then determining the mapping relationship of the thread allocation parameter mapping table after passing the verification, it can improve the more accurate correspondence to adjust the thread allocation parameters, so that the solid-state drive performance reaches its optimum.

在一个实施例中,根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,构建初步映射表进行验证,获得验证结果的步骤,包括:从各应用场景中依次选取应用场景作为目标应用场景;对写入了初步映射表的第二固态硬盘下发目标应用场景的输入输出请求进行性能测试,获取第二固态硬盘在目标应用场景下的性能结果,初步映射表是根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围建立的;返回从各应用场景中依次选取应用场景作为目标应用场景的步骤,直至所有应用场景都被作为目标应用场景,获得第二固态硬盘在各应用场景下的性能结果;当各应用场景下的性能结果达到预设阈值时,确定检验结果满足性能要求;当各应用场景下的性能结果未达到预设阈值时,确定检验结果不满足性能要求。In one embodiment, the step of constructing a preliminary mapping table for verification based on the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, and obtaining the verification results includes: selecting applications from each application scenario in turn The scenario is used as the target application scenario; perform a performance test on the input and output requests of the target application scenario issued by the second solid-state drive written in the preliminary mapping table, and obtain the performance results of the second solid-state drive in the target application scenario. The preliminary mapping table is based on Each application scenario corresponds to the optimal primary thread allocation parameters and input and output feature vector ranges; return to the steps of selecting application scenarios as target application scenarios from each application scenario until all application scenarios are used as target application scenarios. Obtain the performance results of the second solid-state drive in each application scenario; when the performance results in each application scenario reach the preset threshold, determine that the inspection results meet the performance requirements; when the performance results in each application scenario do not reach the preset threshold, It is determined that the inspection results do not meet the performance requirements.

其中,对各应用场景对应性能最优的初选线程分配参数进行验证后,验证通过后再确定的线程分配参数映射表的映射关系,可以提高更准确的对应到调整线程分配参数,使固态硬盘的性能达到最优。Among them, after verifying the primary thread allocation parameters with the best performance for each application scenario, and then determining the mapping relationship of the thread allocation parameter mapping table after passing the verification, it can improve the more accurate correspondence to adjust the thread allocation parameters, so that the solid-state drive performance reaches its optimum.

应该理解的是,虽然图1的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图1中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although various steps in the flowchart of FIG. 1 are shown in sequence as indicated by arrows, these steps are not necessarily executed in the order indicated by arrows. Unless explicitly stated in this article, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in Figure 1 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution of these sub-steps or stages The sequence is not necessarily sequential, but may be performed in turn or alternately with other steps or sub-steps of other steps or at least part of the stages.

在一个实施例中,如图2所示,提供了一种固态硬盘的线程自适应分配装置,包括:数据获取模块、范围确定模块、分配参数获取模块、比较模块和参数调整模块,其中:In one embodiment, as shown in Figure 2, a thread adaptive allocation device for a solid state drive is provided, including: a data acquisition module, a range determination module, an allocation parameter acquisition module, a comparison module and a parameter adjustment module, wherein:

数据获取模块,用于获取预设时间间隔内的输入输出特征数据;范围确定模块,用于根据输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;分配参数获取模块,用于根据输入输出特征向量范围,从线程分配参数映射表中获取第一线程分配参数;比较模块,用于比较当前线程分配参数与第一线程分配参数是否一致;参数调整模块,用于当不一致时,将当前线程分配参数调整为第一线程分配参数。The data acquisition module is used to obtain the input and output feature data within the preset time interval; the range determination module is used to determine the input and output feature vector range belonging to the thread allocation parameter mapping table based on the input and output feature data, and the thread allocation parameter mapping The table maps the optimal thread allocation parameters corresponding to each input and output feature vector range; the allocation parameter acquisition module is used to obtain the first thread allocation parameter from the thread allocation parameter mapping table according to the input and output feature vector range; the comparison module is used To compare whether the current thread allocation parameters are consistent with the first thread allocation parameters; the parameter adjustment module is used to adjust the current thread allocation parameters to the first thread allocation parameters when they are inconsistent.

其中,线程分配参数包括:处理GC端下发的输入输出请求线程数和处理主机端下发的输入输出请求线程数。Among them, the thread allocation parameters include: the number of threads for processing input and output requests issued by the GC side and the number of threads for processing input and output requests issued by the host side.

在一个实施例中,范围确定模块还用于:对输入输出特征数据中的各输入输出特征向量进行去噪整合,获得输入输出特征向量的平均值;根据输入输出特征向量的平均值,在线程分配参数映射表中匹配所属的输入输出特征向量范围。In one embodiment, the range determination module is also used to: denoise and integrate each input and output feature vector in the input and output feature data to obtain the average value of the input and output feature vectors; based on the average value of the input and output feature vectors, in the thread Assign the range of input and output feature vectors to which matches in the parameter mapping table belong.

在一个实施例中,固态硬盘的线程自适应分配装置还包括记录模块:用于当接收到输入输出请求时,记录输入输出请求的输入输出特征向量。In one embodiment, the thread adaptive allocation device of the solid state drive further includes a recording module configured to record the input and output feature vectors of the input and output requests when an input and output request is received.

在一个实施例中,线程分配参数映射表的映射关系确定方式包括:In one embodiment, the method for determining the mapping relationship of the thread allocation parameter mapping table includes:

从预选线程分配参数集中,依次选取预选线程分配参数作为目标线程分配参数;按照目标线程分配参数调整第一固态硬盘中的线程分配参数;模拟各个不同的应用场景对第一固态硬盘下发输入输出请求进行性能测试,获取第一固态硬盘在各应用场景下的性能结果;收集第一固态硬盘在各应用场景下对应的输入输出特征参数;返回从预选线程分配参数集中依次选取目标线程分配参数的步骤,直至预选线程分配参数集中的所有预选线程分配参数都被选取,获得性能结果数据,性能结果数据包括各预选线程分配参数作为目标线程分配参数时,第一固态硬盘在各应用场景下的性能结果;根据性能结果数据进行分析,确定各应用场景对应性能最优的初选线程分配参数;根据在各应用场景下收集到输入输出特征参数,确定各应用场景下对应的输入输出特征向量范围;根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系。From the pre-selected thread allocation parameter set, select the pre-selected thread allocation parameters as the target thread allocation parameters; adjust the thread allocation parameters in the first solid-state drive according to the target thread allocation parameters; simulate various application scenarios to deliver input and output to the first solid-state drive Request a performance test to obtain the performance results of the first solid-state drive in each application scenario; collect the corresponding input and output characteristic parameters of the first solid-state drive in each application scenario; return the target thread allocation parameters selected from the pre-selected thread allocation parameter set. Steps until all pre-selected thread allocation parameters in the pre-selected thread allocation parameter set are selected to obtain performance result data. The performance result data includes the performance of the first solid-state drive in each application scenario when each pre-selected thread allocation parameter is used as the target thread allocation parameter. Results: Analyze the performance result data to determine the optimal thread allocation parameters corresponding to each application scenario; determine the input and output feature vector range corresponding to each application scenario based on the input and output feature parameters collected in each application scenario; According to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, the mapping relationship of the thread allocation parameter mapping table is determined.

在一个实施例中,根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系的步骤,包括:根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,构建初步映射表进行性能检验,获得检验结果;当检验结果满足性能要求时,将各应用场景对应性能最优的初选线程分配参数确定为各应用场景对应性能最优的线程分配参数;根据各应用场景对应性能最优的线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系。In one embodiment, the step of determining the mapping relationship of the thread allocation parameter mapping table according to the primary thread allocation parameters and the input and output feature vector ranges corresponding to the optimal performance of each application scenario includes: according to the optimal performance corresponding to each application scenario Based on the primary thread allocation parameters and input and output feature vector ranges, a preliminary mapping table is constructed for performance testing, and the inspection results are obtained; when the inspection results meet the performance requirements, the primary thread allocation parameters with the best performance corresponding to each application scenario are determined as each The application scenario corresponds to the thread allocation parameter with the best performance; according to the thread allocation parameter with the best performance and the input and output feature vector range corresponding to each application scenario, the mapping relationship of the thread allocation parameter mapping table is determined.

在一个实施例中,根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,构建初步映射表进行验证,获得验证结果的步骤,包括:从各应用场景中依次选取应用场景作为目标应用场景;对写入了初步映射表的第二固态硬盘下发目标应用场景的输入输出请求进行性能测试,获取第二固态硬盘在目标应用场景下的性能结果,初步映射表是根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围建立的;返回从各应用场景中依次选取应用场景作为目标应用场景的步骤,直至所有应用场景都被作为目标应用场景,获得第二固态硬盘在各应用场景下的性能结果;当各应用场景下的性能结果达到预设阈值时,确定检验结果满足性能要求;当各应用场景下的性能结果未达到预设阈值时,确定检验结果不满足性能要求。In one embodiment, the step of constructing a preliminary mapping table for verification based on the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, and obtaining the verification results includes: selecting applications from each application scenario in turn The scenario is used as the target application scenario; perform a performance test on the input and output requests of the target application scenario issued by the second solid-state drive written in the preliminary mapping table, and obtain the performance results of the second solid-state drive in the target application scenario. The preliminary mapping table is based on Each application scenario corresponds to the optimal primary thread allocation parameters and input and output feature vector ranges; return to the steps of selecting application scenarios as target application scenarios from each application scenario until all application scenarios are used as target application scenarios. Obtain the performance results of the second solid-state drive in each application scenario; when the performance results in each application scenario reach the preset threshold, determine that the inspection results meet the performance requirements; when the performance results in each application scenario do not reach the preset threshold, It is determined that the inspection results do not meet the performance requirements.

关于固态硬盘的线程自适应分配装置的具体限定可以参见上文中对于固态硬盘的线程自适应分配方法的限定,在此不再赘述。上述固态硬盘的线程自适应分配装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For specific limitations on the thread adaptive allocation device of the solid state drive, please refer to the limitations on the thread adaptive allocation method of the solid state drive mentioned above, which will not be described again here. Each module in the above-mentioned thread adaptive allocation device of the solid state drive can be implemented in whole or in part by software, hardware, and combinations thereof. Each of the above modules may be embedded in or independent of the processor of the computer device in the form of hardware, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图3示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏、固态硬盘和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储器、内存储器。该非易失性存储器存储有操作系统和计算机程序。该内存储器为非易失性存储器中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该固态硬盘的固件运行时实现一种固态硬盘的线程自适应分配方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 3 . The computer device includes a processor, memory, a network interface, a display screen, a solid state drive, and an input device connected via a system bus. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile memory and internal memory. This non-volatile memory stores the operating system and computer programs. This internal memory provides an environment for the execution of operating systems and computer programs in non-volatile memory. The network interface of the computer device is used to communicate with external terminals through a network connection. The firmware of the solid state drive implements a thread adaptive allocation method of the solid state drive when running. The display screen of the computer device may be a liquid crystal display or an electronic ink display. The input device of the computer device may be a touch layer covered on the display screen, or may be a button, trackball or touch pad provided on the computer device shell. , it can also be an external keyboard, trackpad or mouse, etc.

本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 3 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. The specific computer equipment can May include more or fewer parts than shown, or combine certain parts, or have a different arrangement of parts.

在一个实施例中,提供了一种固态硬盘,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a solid state drive is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

获取预设时间间隔内的输入输出特征数据;根据输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;根据输入输出特征向量范围,从线程分配参数映射表中获取第一线程分配参数;比较当前线程分配参数与第一线程分配参数是否一致;当不一致时,将当前线程分配参数调整为第一线程分配参数。Obtain the input and output feature data within the preset time interval; according to the input and output feature data, determine the input and output feature vector ranges in the thread allocation parameter mapping table. The thread allocation parameter mapping table maps the corresponding performance of each input and output feature vector range. Optimal thread allocation parameters; according to the input and output feature vector range, obtain the first thread allocation parameters from the thread allocation parameter mapping table; compare whether the current thread allocation parameters are consistent with the first thread allocation parameters; when they are inconsistent, change the current thread allocation parameters Adjust the allocation parameters for the first thread.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program, when executed by the processor, also implements the following steps:

对输入输出特征数据中的各输入输出特征向量进行去噪整合,获得输入输出特征向量的平均值;根据输入输出特征向量的平均值,在线程分配参数映射表中匹配所属的输入输出特征向量范围。Denoise and integrate each input and output feature vector in the input and output feature data to obtain the average value of the input and output feature vectors; match the corresponding input and output feature vector range in the thread allocation parameter mapping table based on the average value of the input and output feature vectors .

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:当接收到输入输出请求时,记录输入输出请求的输入输出特征向量。In one embodiment, when executed by the processor, the computer program further implements the following steps: when an input-output request is received, recording the input-output feature vector of the input-output request.

其中,线程分配参数映射表的映射关系确定方式包括:Among them, the mapping relationship determination method of the thread allocation parameter mapping table includes:

从预选线程分配参数集中,依次选取预选线程分配参数作为目标线程分配参数;按照目标线程分配参数调整第一固态硬盘中的线程分配参数;模拟各个不同的应用场景对第一固态硬盘下发输入输出请求进行性能测试,获取第一固态硬盘在各应用场景下的性能结果;收集第一固态硬盘在各应用场景下对应的输入输出特征参数;返回从预选线程分配参数集中依次选取目标线程分配参数的步骤,直至预选线程分配参数集中的所有预选线程分配参数都被选取,获得性能结果数据,性能结果数据包括各预选线程分配参数作为目标线程分配参数时,第一固态硬盘在各应用场景下的性能结果;根据性能结果数据进行分析,确定各应用场景对应性能最优的初选线程分配参数;根据在各应用场景下收集到输入输出特征参数,确定各应用场景下对应的输入输出特征向量范围;根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系。From the pre-selected thread allocation parameter set, select the pre-selected thread allocation parameters as the target thread allocation parameters; adjust the thread allocation parameters in the first solid-state drive according to the target thread allocation parameters; simulate various application scenarios to deliver input and output to the first solid-state drive Request a performance test to obtain the performance results of the first solid-state drive in each application scenario; collect the corresponding input and output characteristic parameters of the first solid-state drive in each application scenario; return the target thread allocation parameters selected from the pre-selected thread allocation parameter set. Steps until all pre-selected thread allocation parameters in the pre-selected thread allocation parameter set are selected to obtain performance result data. The performance result data includes the performance of the first solid-state drive in each application scenario when each pre-selected thread allocation parameter is used as the target thread allocation parameter. Results: Analyze the performance result data to determine the optimal thread allocation parameters corresponding to each application scenario; determine the input and output feature vector range corresponding to each application scenario based on the input and output feature parameters collected in each application scenario; According to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, the mapping relationship of the thread allocation parameter mapping table is determined.

根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系的步骤,包括:根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,构建初步映射表进行性能检验,获得检验结果;当检验结果满足性能要求时,将各应用场景对应性能最优的初选线程分配参数确定为各应用场景对应性能最优的线程分配参数;根据各应用场景对应性能最优的线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系。The step of determining the mapping relationship of the thread allocation parameter mapping table according to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario includes: according to the optimal thread allocation parameters corresponding to each application scenario. and the range of input and output feature vectors, construct a preliminary mapping table for performance testing, and obtain the testing results; when the testing results meet the performance requirements, the primary thread allocation parameters corresponding to the optimal performance of each application scenario are determined as the optimal thread allocation parameters corresponding to each application scenario. Thread allocation parameters; according to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, the mapping relationship of the thread allocation parameter mapping table is determined.

根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,构建初步映射表进行验证,获得验证结果的步骤,包括:从各应用场景中依次选取应用场景作为目标应用场景;对写入了初步映射表的第二固态硬盘下发目标应用场景的输入输出请求进行性能测试,获取第二固态硬盘在目标应用场景下的性能结果,初步映射表是根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围建立的;返回从各应用场景中依次选取应用场景作为目标应用场景的步骤,直至所有应用场景都被作为目标应用场景,获得第二固态硬盘在各应用场景下的性能结果;当各应用场景下的性能结果达到预设阈值时,确定检验结果满足性能要求;当各应用场景下的性能结果未达到预设阈值时,确定检验结果不满足性能要求。According to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, a preliminary mapping table is constructed for verification, and the steps for obtaining the verification results include: selecting application scenarios from each application scenario in turn as the target application scenario; Perform a performance test on the input and output requests of the target application scenario delivered by the second solid-state drive written in the preliminary mapping table to obtain the performance results of the second solid-state drive in the target application scenario. The preliminary mapping table is based on the best performance corresponding to each application scenario. The optimal primary thread allocation parameters and input and output feature vector ranges are established; return to the steps of selecting application scenarios as target application scenarios from each application scenario in turn, until all application scenarios are used as target application scenarios, and obtain the second solid state drive in Performance results under each application scenario; when the performance results under each application scenario reach the preset threshold, it is determined that the inspection results meet the performance requirements; when the performance results under each application scenario do not reach the preset threshold, it is determined that the inspection results do not meet the performance requirements Require.

线程分配参数包括:处理GC端下发的输入输出请求线程数和处理主机端下发的输入输出请求线程数。Thread allocation parameters include: the number of threads for processing input and output requests issued by the GC side and the number of threads for processing input and output requests issued by the host side.

在一个实施例中,提供了一种计算机设备,包括存储器、处理器和固态硬盘,固态硬盘的固件运行时实现以下步骤:In one embodiment, a computer device is provided, including a memory, a processor, and a solid state drive. When the firmware of the solid state drive is running, the following steps are implemented:

获取预设时间间隔内的输入输出特征数据;根据输入输出特征数据,确定在线程分配参数映射表中所属的输入输出特征向量范围,线程分配参数映射表映射了各输入输出特征向量范围对应性能最优的线程分配参数;根据输入输出特征向量范围,从线程分配参数映射表中获取第一线程分配参数;比较当前线程分配参数与第一线程分配参数是否一致;当不一致时,将当前线程分配参数调整为第一线程分配参数。Obtain the input and output feature data within the preset time interval; according to the input and output feature data, determine the input and output feature vector ranges in the thread allocation parameter mapping table. The thread allocation parameter mapping table maps the corresponding performance of each input and output feature vector range. Optimal thread allocation parameters; according to the input and output feature vector range, obtain the first thread allocation parameters from the thread allocation parameter mapping table; compare whether the current thread allocation parameters are consistent with the first thread allocation parameters; when they are inconsistent, change the current thread allocation parameters Adjust the allocation parameters for the first thread.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor also implements the following steps when executing the computer program:

对输入输出特征数据中的各输入输出特征向量进行去噪整合,获得输入输出特征向量的平均值;根据输入输出特征向量的平均值,在线程分配参数映射表中匹配所属的输入输出特征向量范围。Denoise and integrate each input and output feature vector in the input and output feature data to obtain the average value of the input and output feature vectors; match the corresponding input and output feature vector range in the thread allocation parameter mapping table based on the average value of the input and output feature vectors .

在一个实施例中,处理器执行计算机程序时还实现以下步骤:当接收到输入输出请求时,记录输入输出请求的输入输出特征向量。In one embodiment, when the processor executes the computer program, the processor also implements the following steps: when receiving the input/output request, recording the input/output feature vector of the input/output request.

其中,线程分配参数映射表的映射关系确定方式包括:Among them, the mapping relationship determination method of the thread allocation parameter mapping table includes:

从预选线程分配参数集中,依次选取预选线程分配参数作为目标线程分配参数;按照目标线程分配参数调整第一固态硬盘中的线程分配参数;模拟各个不同的应用场景对第一固态硬盘下发输入输出请求进行性能测试,获取第一固态硬盘在各应用场景下的性能结果;收集第一固态硬盘在各应用场景下对应的输入输出特征参数;返回从预选线程分配参数集中依次选取目标线程分配参数的步骤,直至预选线程分配参数集中的所有预选线程分配参数都被选取,获得性能结果数据,性能结果数据包括各预选线程分配参数作为目标线程分配参数时,第一固态硬盘在各应用场景下的性能结果;根据性能结果数据进行分析,确定各应用场景对应性能最优的初选线程分配参数;根据在各应用场景下收集到输入输出特征参数,确定各应用场景下对应的输入输出特征向量范围;根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系。From the pre-selected thread allocation parameter set, select the pre-selected thread allocation parameters as the target thread allocation parameters; adjust the thread allocation parameters in the first solid-state drive according to the target thread allocation parameters; simulate various application scenarios to deliver input and output to the first solid-state drive Request a performance test to obtain the performance results of the first solid-state drive in each application scenario; collect the corresponding input and output characteristic parameters of the first solid-state drive in each application scenario; return the target thread allocation parameters selected from the pre-selected thread allocation parameter set. Steps until all pre-selected thread allocation parameters in the pre-selected thread allocation parameter set are selected to obtain performance result data. The performance result data includes the performance of the first solid-state drive in each application scenario when each pre-selected thread allocation parameter is used as the target thread allocation parameter. Results: Analyze the performance result data to determine the optimal thread allocation parameters corresponding to each application scenario; determine the input and output feature vector range corresponding to each application scenario based on the input and output feature parameters collected in each application scenario; According to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, the mapping relationship of the thread allocation parameter mapping table is determined.

根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系的步骤,包括:根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,构建初步映射表进行性能检验,获得检验结果;当检验结果满足性能要求时,将各应用场景对应性能最优的初选线程分配参数确定为各应用场景对应性能最优的线程分配参数;根据各应用场景对应性能最优的线程分配参数和输入输出特征向量范围,确定的线程分配参数映射表的映射关系。The step of determining the mapping relationship of the thread allocation parameter mapping table according to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario includes: according to the optimal thread allocation parameters corresponding to each application scenario. and the range of input and output feature vectors, construct a preliminary mapping table for performance testing, and obtain the testing results; when the testing results meet the performance requirements, the primary thread allocation parameters corresponding to the optimal performance of each application scenario are determined as the optimal thread allocation parameters corresponding to each application scenario. Thread allocation parameters; according to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, the mapping relationship of the thread allocation parameter mapping table is determined.

根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围,构建初步映射表进行验证,获得验证结果的步骤,包括:从各应用场景中依次选取应用场景作为目标应用场景;对写入了初步映射表的第二固态硬盘下发目标应用场景的输入输出请求进行性能测试,获取第二固态硬盘在目标应用场景下的性能结果,初步映射表是根据各应用场景对应性能最优的初选线程分配参数和输入输出特征向量范围建立的;返回从各应用场景中依次选取应用场景作为目标应用场景的步骤,直至所有应用场景都被作为目标应用场景,获得第二固态硬盘在各应用场景下的性能结果;当各应用场景下的性能结果达到预设阈值时,确定检验结果满足性能要求;当各应用场景下的性能结果未达到预设阈值时,确定检验结果不满足性能要求。According to the optimal thread allocation parameters and input and output feature vector ranges corresponding to each application scenario, a preliminary mapping table is constructed for verification, and the steps for obtaining the verification results include: selecting application scenarios from each application scenario in turn as the target application scenario; Perform a performance test on the input and output requests of the target application scenario delivered by the second solid-state drive written in the preliminary mapping table to obtain the performance results of the second solid-state drive in the target application scenario. The preliminary mapping table is based on the best performance corresponding to each application scenario. The optimal primary thread allocation parameters and input and output feature vector ranges are established; return to the steps of selecting application scenarios as target application scenarios from each application scenario in turn, until all application scenarios are used as target application scenarios, and obtain the second solid state drive in Performance results under each application scenario; when the performance results under each application scenario reach the preset threshold, it is determined that the inspection results meet the performance requirements; when the performance results under each application scenario do not reach the preset threshold, it is determined that the inspection results do not meet the performance requirements Require.

线程分配参数包括:处理GC端下发的输入输出请求线程数和处理主机端下发的输入输出请求线程数。Thread allocation parameters include: the number of threads for processing input and output requests issued by the GC side and the number of threads for processing input and output requests issued by the host side.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage. In the media, when executed, the computer program may include the processes of the above method embodiments. Any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined in any way. To simplify the description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, all possible combinations should be used. It is considered to be within the scope of this manual.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-described embodiments only express several implementation modes of the present application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all fall within the protection scope of the present application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims (9)

1. A thread self-adaptive allocation method of a solid state disk comprises the following steps:
acquiring input and output characteristic data in a preset time interval;
determining the range of the input and output feature vectors which belong to a thread allocation parameter mapping table according to the input and output feature data, wherein the thread allocation parameter mapping table maps the thread allocation parameters with optimal performance corresponding to the range of the input and output feature vectors;
Acquiring a first thread allocation parameter from the thread allocation parameter mapping table according to the input/output characteristic vector range;
comparing whether the current thread allocation parameters are consistent with the first thread allocation parameters;
when the current thread allocation parameters are inconsistent, the current thread allocation parameters are adjusted to the first thread allocation parameters;
the method for determining the mapping relation of the thread allocation parameter mapping table comprises the following steps:
sequentially selecting preselected thread allocation parameters from a preselected thread allocation parameter set as target thread allocation parameters;
adjusting thread allocation parameters in the first solid state disk according to the target thread allocation parameters;
simulating different application scenes to perform performance test on the input/output requests issued by the first solid state disk, and obtaining performance results of the first solid state disk in the application scenes;
collecting corresponding input and output characteristic parameters of the first solid state disk under each application scene;
returning to the step of sequentially selecting target thread allocation parameters from the preselected thread allocation parameter set until all preselected thread allocation parameters in the preselected thread allocation parameter set are selected, and obtaining performance result data, wherein the performance result data comprises performance results of the first solid state disk under each application scene when each preselected thread allocation parameter is used as the target thread allocation parameter;
Analyzing according to the performance result data, and determining initial thread allocation parameters with optimal performance corresponding to each application scene;
according to the input and output characteristic parameters collected under each application scene, determining the corresponding input and output characteristic vector range under each application scene;
and determining the mapping relation of the thread allocation parameter mapping table according to the initial thread allocation parameters with optimal performance and the input and output characteristic vector range corresponding to each application scene.
2. The method of claim 1, wherein the step of determining the range of the input-output feature vector to which the thread allocation parameter map belongs according to the input-output feature data comprises:
denoising and integrating each input and output characteristic vector in the input and output characteristic data to obtain an average value of the input and output characteristic vectors;
and matching the range of the input and output characteristic vectors in a thread allocation parameter mapping table according to the average value of the input and output characteristic vectors.
3. The method according to claim 1, wherein the method further comprises: when an input-output request is received, recording an input-output feature vector of the input-output request.
4. The method according to claim 1, wherein the step of determining the mapping relation of the thread allocation parameter mapping table according to the initial thread allocation parameter and the input/output feature vector range with optimal performance corresponding to each application scenario comprises:
according to the initial thread allocation parameters and the input/output characteristic vector range with optimal performance corresponding to each application scene, constructing a preliminary mapping table to perform performance test, and obtaining a test result;
when the test result meets the performance requirement, determining the initially selected thread allocation parameters with the optimal performance corresponding to each application scene as the thread allocation parameters with the optimal performance corresponding to each application scene;
and determining the mapping relation of the thread allocation parameter mapping table according to the thread allocation parameter with the optimal corresponding performance of each application scene and the input/output characteristic vector range.
5. The method of claim 4, wherein the step of constructing a preliminary mapping table for verification according to the initial thread allocation parameter and the input/output feature vector range with optimal performance corresponding to each application scenario, and obtaining a verification result comprises the following steps:
sequentially selecting an application scene from all application scenes as a target application scene;
Performing performance test on an input/output request of a second solid state disk written with a preliminary mapping table for issuing the target application scene, and obtaining a performance result of the second solid state disk in the target application scene, wherein the preliminary mapping table is established according to a preliminary thread allocation parameter and an input/output feature vector range with optimal corresponding performance of each application scene;
returning to the step of sequentially selecting application scenes from all application scenes as target application scenes until all application scenes are used as target application scenes, and obtaining a performance result of the second solid state disk under all application scenes;
when the performance result in each application scene reaches a preset threshold value, determining that the test result meets the performance requirement;
and when the performance result in each application scene does not reach the preset threshold value, determining that the test result does not meet the performance requirement.
6. The method of claim 1, wherein the thread allocation parameters comprise: the method comprises the steps of processing the number of the input/output request threads issued by a GC end and the number of the input/output request threads issued by a host end.
7. A thread adaptive allocation device for a solid state disk, the device comprising:
The data acquisition module is used for acquiring input and output characteristic data in a preset time interval;
the range determining module is used for determining the range of the input and output feature vectors which belong to a thread allocation parameter mapping table according to the input and output feature data, and the thread allocation parameter mapping table maps the thread allocation parameters with optimal performance corresponding to the range of the input and output feature vectors;
the distribution parameter acquisition module is used for acquiring a first thread distribution parameter from the thread distribution parameter mapping table according to the input/output characteristic vector range;
the comparison module is used for comparing whether the current thread allocation parameters are consistent with the first thread allocation parameters or not;
and the parameter adjustment module is used for adjusting the current thread allocation parameters to the first thread allocation parameters when the current thread allocation parameters are inconsistent, wherein the mapping relation determination mode of the thread allocation parameter mapping table comprises the steps of sequentially selecting the preselected thread allocation parameters from a preselected thread allocation parameter set as target thread allocation parameters, adjusting the thread allocation parameters in the first solid state disk according to the target thread allocation parameters, simulating each different application scene to perform performance test on the input and output requests issued by the first solid state disk, acquiring performance results of the first solid state disk under each application scene, collecting corresponding input and output characteristic parameters of the first solid state disk under each application scene, returning to the step of sequentially selecting the target thread allocation parameters from the preselected thread allocation parameter set until all the preselected thread allocation parameters in the preselected thread allocation parameter set are selected, obtaining performance result data, wherein the performance result data comprises the performance results of each preselected thread allocation parameter under each application scene when the preselected thread allocation parameters are used as the target thread allocation parameters, analyzing according to the performance result data, determining initial preferred performance parameters of each application scene, determining the initial preferred performance of each application scene according to the initial performance parameters, collecting the corresponding to the input and output characteristic vectors of each application scene, and determining the optimal performance vectors according to the application scene, and the input characteristic vectors of each application scene.
8. A solid state disk having a computer program stored thereon, which when executed by a processor performs the steps of the method of any of claims 1 to 7.
9. A computer device comprising a memory, a processor and a solid state disk, the firmware of the solid state disk implementing the steps of the method of any of claims 1 to 7 when run.
CN202111354779.3A 2021-11-16 2021-11-16 Thread self-adaptive distribution method and device for solid state disk and solid state disk Active CN114138469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111354779.3A CN114138469B (en) 2021-11-16 2021-11-16 Thread self-adaptive distribution method and device for solid state disk and solid state disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111354779.3A CN114138469B (en) 2021-11-16 2021-11-16 Thread self-adaptive distribution method and device for solid state disk and solid state disk

Publications (2)

Publication Number Publication Date
CN114138469A CN114138469A (en) 2022-03-04
CN114138469B true CN114138469B (en) 2023-11-14

Family

ID=80393367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111354779.3A Active CN114138469B (en) 2021-11-16 2021-11-16 Thread self-adaptive distribution method and device for solid state disk and solid state disk

Country Status (1)

Country Link
CN (1) CN114138469B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843559A (en) * 2016-03-28 2016-08-10 乐视控股(北京)有限公司 Read-write optimization method and system of disk cache system
CN107463441A (en) * 2017-06-30 2017-12-12 大唐软件技术股份有限公司 A kind of number of threads control method and equipment
CN108073356A (en) * 2016-11-10 2018-05-25 杭州海康威视系统技术有限公司 A kind of data storage, lookup method, device and data handling system
CN109582521A (en) * 2018-12-10 2019-04-05 浪潮(北京)电子信息产业有限公司 Test method, apparatus, equipment and the medium of storage system readwrite performance
CN113467933A (en) * 2021-06-15 2021-10-01 济南浪潮数据技术有限公司 Thread pool optimization method, system, terminal and storage medium for distributed file system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9092161B2 (en) * 2012-12-05 2015-07-28 Red Hat Israel, Ltd. Selection of allocation policy and format for virtual machine disk images

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843559A (en) * 2016-03-28 2016-08-10 乐视控股(北京)有限公司 Read-write optimization method and system of disk cache system
CN108073356A (en) * 2016-11-10 2018-05-25 杭州海康威视系统技术有限公司 A kind of data storage, lookup method, device and data handling system
CN107463441A (en) * 2017-06-30 2017-12-12 大唐软件技术股份有限公司 A kind of number of threads control method and equipment
CN109582521A (en) * 2018-12-10 2019-04-05 浪潮(北京)电子信息产业有限公司 Test method, apparatus, equipment and the medium of storage system readwrite performance
CN113467933A (en) * 2021-06-15 2021-10-01 济南浪潮数据技术有限公司 Thread pool optimization method, system, terminal and storage medium for distributed file system

Also Published As

Publication number Publication date
CN114138469A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
JP7629257B2 (en) Elastic execution of machine learning workloads with application-based profiling
US11994934B2 (en) Failure prediction method and device for a storage device
EP4078380A1 (en) Behavior-driven die management on solid-state drives
CN117435451A (en) Method for establishing power consumption and performance model of virtual computing unit in mobile edge computing
CN104503909A (en) Method and device for testing IO (input/output) performance of magnetic disk
WO2021258512A1 (en) Data aggregation processing apparatus and method, and storage medium
US20240160511A1 (en) Failure prediction apparatus and method for storage devices
EP3846037B1 (en) Storage device configured to support multi-streams and operation method thereof
CN116069571A (en) Storage device performance automatic test method, device, equipment and storage medium
CN119847900B (en) Solid state disk load test method, system, electronic equipment and medium
CN118132357A (en) Storage system testing method and device
WO2018140300A1 (en) Techniques for statistical frequency enhancement of statically timed designs
CN114138469B (en) Thread self-adaptive distribution method and device for solid state disk and solid state disk
US10606601B2 (en) Method, system and non-transitory computer-readable storage medium for analyzing access to storage device
CN114444804A (en) Method, device, server and storage medium for predicting post matching degree
US20150149418A1 (en) Estimation of query input/output (i/o) cost in database
US11954569B2 (en) Techniques for parallel model training
WO2021092784A1 (en) Data writing, consistency checking and reading method and apparatus
Bhimani et al. Automatic stream identification to improve flash endurance in data centers
CN116755660A (en) Methods, devices, computer equipment and storage media for determining the resources required for the project
US8966133B2 (en) Determining a mapping mode for a DMA data transfer
Zou et al. Revisiting temporal storage i/o behaviors of smartphone applications: Analysis and synthesis
CN115408221B (en) A method, device, equipment and medium for testing performance of compressed volumes of storage devices
CN119541597B (en) Storage device performance testing method, device, equipment, medium and product
US20230214258A1 (en) Storage controller and storage device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 215168 Jiangsu Province, Suzhou City, Wuzhong Economic Development Zone, Guoqiang Street, Guanpu Road No. 1, Building 9

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: 215168 Jiangsu Province, Suzhou City, Wuzhong Economic Development Zone, Guoqiang Street, Guanpu Road No. 1, Building 9

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China