WO2024113925A1 - Storage optimization method and system, device, and readable storage medium - Google Patents

Storage optimization method and system, device, and readable storage medium Download PDF

Info

Publication number
WO2024113925A1
WO2024113925A1 PCT/CN2023/109987 CN2023109987W WO2024113925A1 WO 2024113925 A1 WO2024113925 A1 WO 2024113925A1 CN 2023109987 W CN2023109987 W CN 2023109987W WO 2024113925 A1 WO2024113925 A1 WO 2024113925A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
disk
operation request
processor
response
Prior art date
Application number
PCT/CN2023/109987
Other languages
French (fr)
Chinese (zh)
Inventor
贾猛
Original Assignee
苏州元脑智能科技有限公司
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 苏州元脑智能科技有限公司 filed Critical 苏州元脑智能科技有限公司
Publication of WO2024113925A1 publication Critical patent/WO2024113925A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Definitions

  • the present application belongs to the field of computers, and specifically relates to a storage optimization method, system, device and non-volatile readable storage medium.
  • the present application proposes a storage optimization method, including:
  • the nodes that perform operations on the disk are allocated based on the allocation policy, and the allocation policy is optimized based on the load of the network card.
  • establishing a node and disk allocation strategy based on the node distribution and the number of disks on the server includes:
  • At least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
  • allocating nodes that perform operations on disks based on an allocation strategy includes:
  • the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
  • the method further comprises:
  • the method further comprises:
  • the operation request is assigned to the disk-first node for execution.
  • the method further comprises:
  • the operation request is assigned to the disk-first node for execution.
  • optimizing the allocation strategy based on the load of the network card includes:
  • Identify the nodes that process network card tasks monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
  • the usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
  • allocating an operation request to a node according to a predetermined strategy includes:
  • the operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
  • the method further comprises:
  • the method further comprises:
  • the utilization rate of the node is obtained in real time
  • Another aspect of the present application further provides a storage optimization system, comprising:
  • the policy formulation module is used to establish node and disk allocation strategies based on the node distribution and the number of disks on the server;
  • the optimized execution module is used to allocate nodes that perform operations on the disk based on an allocation strategy, and optimize the allocation strategy based on the load of the network card.
  • the policy formulation module is further configured to:
  • At least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
  • the policy formulation module is further configured to:
  • the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
  • the policy formulation module is further configured to:
  • the policy formulation module is further configured to:
  • the operation request is assigned to the disk-first node for execution.
  • the policy formulation module is further configured to:
  • the operation request is assigned to the disk-first node for execution.
  • the optimization execution module is further configured to:
  • Identify the nodes that process network card tasks monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
  • the usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
  • the optimization execution module is further configured to:
  • the operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
  • the optimization execution module is further configured to:
  • the optimization execution module is further configured to:
  • the utilization rate of the node is obtained in real time
  • Another aspect of the present application also provides a computer device, comprising:
  • the memory stores computer instructions executable on the processor, and when the instructions are executed by the processor, the steps of any one of the methods in the above-mentioned implementation manner are implemented.
  • Another aspect of the present application further provides a computer non-volatile readable storage medium, which stores a computer program.
  • a computer program When the computer program is executed by a processor, the steps of any one of the methods in the above-mentioned embodiments are implemented.
  • NVME Non-Volatile Memory Express
  • NUMA Non-Uniform Memory Access
  • FIG1 is a schematic diagram of an embodiment of a storage optimization method provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of the structure of a storage optimization system provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of the structure of a computer non-volatile readable storage medium provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a scheduling method strategy for an existing NVME hard disk provided in an embodiment of the present application
  • FIG6 is a schematic diagram of a scheduling method for an NVME hard disk proposed in the present application provided in an embodiment of the present application.
  • This application provides an optimization solution for all-flash storage, aiming to optimize the problem of insufficient utilization of hardware resources in existing storage solutions.
  • All-flash uses solid-state drives (SSDs) or other flash media to replace Replace the traditional hard disk (HDD). The most obvious feature is its high IOPS.
  • All-flash technology was initially due to the use of higher-performance SSD (Solid State Drive) hard disks to achieve higher IOPS.
  • Solid State Drive Solid State Drive
  • the storage performance of the all-flash system is usually improved by "stacking". That is, by increasing the hardware bandwidth of the all-flash platform, selecting SSDs with higher IOPS, or equipping a CPU platform with higher bandwidth and faster processing speed to improve the IOPS of the all-flash platform.
  • the present application proposes a storage optimization method, including:
  • Step S1 Establish a node and disk allocation strategy based on the node distribution and the number of disks on the server;
  • Step S2 Allocate nodes that perform operations on the disk based on an allocation strategy, and optimize the allocation strategy based on the load of the network card.
  • a node on a server refers to a unit containing several processor cores in the server CPU.
  • server-level multi-core processors they are generally far more than the multi-core processors used at the desktop level.
  • the number of cores is more than 32 cores as the manufacturing process is improved.
  • multiple cores are divided into one node for arrangement. Therefore, the node in the present application refers to a module containing multiple processor cores.
  • the number of disks refers to the number of solid-state hard disks mounted on the server, which are generally solid-state hard disks with NVME protocol, and of course, other types of storage media can also be used.
  • step S1 the number of NVME hard disks mounted on the server and the node distribution of the CPU on the server are determined, and the so-called node distribution includes the number of nodes and the number of cores, and then a strategy for allocating NVME solid-state hard disk data processing is formulated according to the number of CPU nodes and the number of cores. That is, which processor cores access the NVME solid-state hard disk and which access strategies are set.
  • the node closest to the NVME hard disk interface is responsible for the data operation of the NVME solid-state drive.
  • a CPU with a certain scale of cores uses several cores as a node, and a CPU contains several nodes.
  • the CPU selected in the embodiment of the present application is Haiguang CS5250H, which has 128 processing cores, which are compiled into 8 nodes, each of which is 16 processor cores, and the interface connected to the NVME solid-state drive by node 1 and node 4 is the closest.
  • node 1 and node 4 will be used as the processing nodes of the NVME solid-state drive. That is, all operations on the NVME solid-state drive will be processed by the cores on node 1 and node 4.
  • the corresponding storage software When an operation on the NVME solid-state drive is generated, the corresponding storage software will send the operation request to node 1 or node 4.
  • NUMA Non Uniform Memory Access, which enables many servers to operate as a single system
  • step S1 the corresponding allocation strategy needs to be determined according to the number of nodes on the server and the number of mounted NVME hard disks.
  • the number of nodes and cores of the processor on the server can be obtained by software detection, and then an allocation strategy suitable for the server can be generated according to a general allocation method, or the user can manually set the allocation strategy of the processor node and NVME solid-state hard disk as needed.
  • step S2 after the corresponding allocation strategy is formulated according to the server node and NVME solid state drive, when the production When an operation request for a solid state drive is generated, the corresponding operation request is sent to the processor node specified by the allocation strategy.
  • the processor core in the processor node executes the operation request.
  • the server is a server for all-flash business.
  • the business on the server is not just between NVME solid-state drives.
  • Most of the data of the all-flash server comes from the network, and the network data needs to be received and sent through the network card.
  • the data of the network card must also be processed by the CPU. Processing the data of the network card requires the CPU load. Therefore, after the processor nodes are allocated based on NUMA technology and allocation strategy, when the network card load changes, some processor nodes will be occupied, and the network card and NVME solid-state drive will compete for processor computing resources. Therefore, it is necessary to dynamically adjust the NVME hard drive allocation strategy according to the load of the network card. For example, when the load of the network card is high, the operation request of the NVME solid-state drive that shares a processor node with the network card is allocated to its processor node.
  • establishing a node and disk allocation strategy based on the node distribution and the number of disks on the server includes:
  • At least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
  • allocating nodes that perform operations on disks based on an allocation strategy includes:
  • the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
  • the system or upper-layer application when the system or upper-layer application generates an operation request for a certain NVME solid-state drive, the NVME solid-state drive accessed by the operation request is confirmed based on the operation request, and then the processing node corresponding to the NVME solid-state drive is found according to the mapping table, and the operation request is allocated to the corresponding processor node through NUMA technology.
  • the method further comprises:
  • the processor node closest to the NVME solid-state drive interface is used as the disk priority node.
  • the method further comprises:
  • the operation request is assigned to the disk-first node for execution.
  • an operation request for any NVME solid-state drive when received, it can be determined whether the application generating the operation request is sensitive to delay. For example, if it is a query service of a database type application, the operation request can be sent to the disk priority node for processing. Even if the NVME solid-state drive to be accessed by the operation request is not bound to the disk priority node in the pre-allocation strategy, the operation request can still be allocated to the disk priority node. The operation request is directed to the corresponding disk priority node through the NUMA command.
  • the method further comprises:
  • the operation request is assigned to the disk-first node for execution.
  • the so-called confirmation of whether the operation request is sensitive to the delay requirement from the operation request to the data operation mode refers to whether the operation request occupies the processor node for a long time to complete the corresponding operation request when it is executed. For example, for writing or reading, it is determined whether the size of the written or read data meets the preset value. If it is small data, the corresponding operation request can be processed according to the usage rate of the disk priority node. If the write data is large, such as transferring a large number of files, such a request is rejected to use the disk priority node.
  • optimizing the allocation strategy based on the load of the network card includes:
  • Identify the nodes that process network card tasks monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
  • the usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
  • allocating an operation request to a node according to a predetermined strategy includes:
  • the operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
  • the present application binds the processor node to the corresponding NVME hard disk through NUMA. If a processor node also performs processing tasks on the network card after being assigned to the task of the corresponding NVME solid-state hard disk, the utilization rate of each core of the processor node is obtained, and the utilization rate of the processor node is confirmed. If the utilization rate of the processor node is lower than 50%, the number of allocations of the processor node to the corresponding NVME solid-state hard disk is adjusted through NUMA based on the binary method. Assuming that the processor node has 16 cores, 8 cores are allocated to the NVME solid-state hard disk for binding.
  • the remaining 4 processor cores can be allocated to the corresponding NVME solid-state drives through NUMA.
  • the method further comprises:
  • the method further comprises:
  • the utilization rate of the node is obtained in real time
  • the state of the processor node is monitored, and if the utilization rate of the processor node exceeds 90%, the allocation of operation requests to the processor node is suspended.
  • NVME solid-state drive and processor core binding strategy based on NUMA technology is proposed.
  • the performance optimization of the all-flash server is achieved, and the existing resources are reasonably used.
  • the read and write IOPS and latency performance of the storage server can be effectively and significantly improved, which is more conducive to cost saving, reasonable use of resources, and maximizing the value of existing resources.
  • FIG. 2 another aspect of the present application further provides a storage optimization system, including:
  • Strategy formulation module 1 strategy formulation module 1 is used to establish node and disk allocation strategy according to node distribution and disk number on the server;
  • the optimized execution module 2 is used to allocate nodes that perform operations on the disk based on an allocation strategy, and optimize the allocation strategy based on the load of the network card.
  • the policy formulation module 1 is further configured to:
  • At least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
  • the policy formulation module 1 is further configured to:
  • the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
  • the policy formulation module 1 is further configured to:
  • the policy formulation module 1 is further configured to:
  • the operation request is assigned to the disk-first node for execution.
  • the policy formulation module 1 is further configured to:
  • the operation request is assigned to the disk-first node for execution.
  • the optimization execution module 2 is further configured to:
  • Identify the nodes that process network card tasks monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
  • the usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
  • the optimization execution module 2 is further configured to:
  • the operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
  • the optimization execution module 2 is further configured to:
  • the optimization execution module 2 is further configured to:
  • the utilization rate of the node is obtained in real time
  • FIG. 3 another aspect of the present application further provides a computer device, comprising:
  • the memory 22 stores computer instructions 23 that can be run on the processor 21.
  • a storage optimization method is implemented, including:
  • the nodes that perform operations on the disk are allocated based on the allocation policy, and the allocation policy is optimized based on the load of the network card.
  • a node and disk partition is established based on the node distribution and the number of disks on the server.
  • Matching strategies include:
  • At least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
  • allocating nodes that perform operations on disks based on an allocation strategy includes:
  • the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
  • the method further comprises:
  • the method further comprises:
  • the operation request is assigned to the disk-first node for execution.
  • the method further comprises:
  • the operation request is assigned to the disk-first node for execution.
  • optimizing the allocation strategy based on the load of the network card includes:
  • Identify the nodes that process network card tasks monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
  • the usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
  • allocating an operation request to a node according to a predetermined strategy includes:
  • the operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
  • the method further comprises:
  • the method further comprises:
  • the utilization rate of the node is obtained in real time
  • FIG. 4 another aspect of the present application further provides a computer non-volatile readable storage medium 401, wherein the computer non-volatile readable storage medium 401 stores a computer program 402, and when the computer program 402 is executed by a processor, a storage optimization method is implemented, including:
  • the nodes that perform operations on the disk are allocated based on the allocation policy, and the allocation policy is optimized based on the load of the network card.
  • establishing a node and disk allocation strategy based on the node distribution and the number of disks on the server includes:
  • At least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
  • allocating nodes that perform operations on disks based on an allocation strategy includes:
  • the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
  • the method further comprises:
  • the method further comprises:
  • the operation request is assigned to the disk-first node for execution.
  • the method further comprises:
  • the operation request is assigned to the disk-first node for execution.
  • optimizing the allocation strategy based on the load of the network card includes:
  • Identify the nodes that process network card tasks monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
  • the usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
  • allocating an operation request to a node according to a predetermined strategy includes:
  • the operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
  • the method further comprises:
  • the method further comprises:
  • the utilization rate of the node is obtained in real time

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present application relates to the field of computers, and in particular, to a storage optimization method and system, a device, and a non-volatile readable storage medium. The method comprises: establishing a node and disk allocation policy according to node distribution and the number of disks on a server; and on the basis of the allocation policy, allocating the nodes that execute operations on the disks, and optimizing the allocation policy on the basis of a load of a network interface card. By means of the storage optimization method provided by the present application, an NVME solid-state drive and processor core binding policy based on NUMA technology is provided. By means of the policy, performance optimization of an all-flash server is achieved, existing resources are reasonably utilized, there is no need to upgrade to better hardware, and the read/write IOPS, latency and other performance of a storage server can be effectively and greatly improved, thereby better facilitating cost saving and reasonable use of resources, and maximizing the value of the existing resources.

Description

一种存储优化方法、系统、设备及可读存储介质A storage optimization method, system, device and readable storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2022年11月30日提交中国专利局,申请号为202211515911.9,申请名称为“一种存储优化方法、系统、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on November 30, 2022, with application number 202211515911.9, and application name “A Storage Optimization Method, System, Device and Readable Storage Medium”, all contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请属于计算机领域,具体涉及一种存储优化方法、系统、设备及非易失性可读存储介质。The present application belongs to the field of computers, and specifically relates to a storage optimization method, system, device and non-volatile readable storage medium.
背景技术Background technique
随着科技洪流的推动,闪存存储时代已经全面开启,闪存阵列的大规模普及已经势不可挡。人工智能、大数据、云计算、5G(Fifth Generation,第五代移动通信技术)、物联网等落地推进,随之带来了海量数据的爆发和对极致性能前所未有的需求。Driven by the tide of science and technology, the era of flash storage has been fully opened, and the large-scale popularization of flash arrays has become unstoppable. The implementation of artificial intelligence, big data, cloud computing, 5G (Fifth Generation, the fifth generation of mobile communication technology), and the Internet of Things has brought about the explosion of massive data and unprecedented demand for extreme performance.
随着全闪存储的需求量逐渐增加,如何将提升全闪服务器的性能,发挥全闪服务器的最大能力,成为各大存储厂商需要面对的巨大挑战。As the demand for all-flash storage gradually increases, how to improve the performance of all-flash servers and maximize their capabilities has become a huge challenge that major storage manufacturers need to face.
发明内容Summary of the invention
为解决上述问题,本申请提出一种存储优化方法,包括:To solve the above problems, the present application proposes a storage optimization method, including:
根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略;Establish node and disk allocation strategy based on node distribution and number of disks on the server;
基于分配策略分配对磁盘执行操作的节点,并基于网卡的负载对分配策略进行优化。The nodes that perform operations on the disk are allocated based on the allocation policy, and the allocation policy is optimized based on the load of the network card.
在本申请的一些实施方式中,根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略包括:In some implementations of the present application, establishing a node and disk allocation strategy based on the node distribution and the number of disks on the server includes:
响应于节点个数大于等于磁盘个数,为每个磁盘分配至少一个节点,并基于磁盘与节点的分配关系建立对应的映射表。In response to the number of nodes being greater than or equal to the number of disks, at least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
在本申请的一些实施方式中,基于分配策略分配对磁盘执行操作的节点包括:In some implementations of the present application, allocating nodes that perform operations on disks based on an allocation strategy includes:
响应于接收到对磁盘的操作请求,通过映射表确认分配给磁盘的节点,将操作请求分配给节点执行。In response to receiving an operation request for a disk, the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
确认服务器上的节点中与磁盘接口最近的节点,并将节点作为磁盘优先节点。Identify the node on the server that is closest to the disk interface and set it as the disk priority node.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于接收到对磁盘的操作请求,从产生请操作求的应用类型确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, determining whether the operation request is sensitive to a delay requirement based on the type of application generating the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于接收到对磁盘的操作请求,从操作请求对数据操作方式确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, confirming whether the operation request is sensitive to a delay requirement based on a data operation mode of the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本申请的一些实施方式中,基于网卡的负载对分配策略进行优化包括:In some implementations of the present application, optimizing the allocation strategy based on the load of the network card includes:
确认处理网卡任务的节点,实时监控节点内各个核心的使用率,并基于各个核心的使用率确认节点的使用率; Identify the nodes that process network card tasks, monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
将节点的使用率与第一预定阈值进行比较,响应于节点的使用率小于第一预定阈值,按照预定策略向节点分配操作请求。The usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
在本申请的一些实施方式中,按照预定策略向节点分配操作请求包括:In some implementations of the present application, allocating an operation request to a node according to a predetermined strategy includes:
按照预定算法基于节点的使用率向节点的部分核心分配操作请求。The operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于节点的使用率大于第一预定阈值,判断节点的使用率是否大于第二预定值;In response to the usage rate of the node being greater than a first predetermined threshold, determining whether the usage rate of the node is greater than a second predetermined value;
响应于节点的使用率大于第二预定阈值,禁止向节点分配操作请求。In response to the usage rate of the node being greater than a second predetermined threshold, allocating the operation request to the node is prohibited.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
向节点的部分核心分配操作请求后,实时获取节点的使用率;After allocating operation requests to some cores of a node, the utilization rate of the node is obtained in real time;
响应于节点的使用率超过第二预定阈值,且网卡对节点的任务请求增加,则暂停向节点分配操作请求,优先处理网卡对节点的任务请求。In response to the usage rate of the node exceeding the second predetermined threshold and the task requests of the network card to the node increasing, the allocation of operation requests to the node is suspended, and the task requests of the network card to the node are processed preferentially.
本申请的另一方面还提出一种存储优化系统,包括:Another aspect of the present application further provides a storage optimization system, comprising:
策略制定模块,策略制定模块用于根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略;The policy formulation module is used to establish node and disk allocation strategies based on the node distribution and the number of disks on the server;
优化执行模块,所优化执行模块用于基于分配策略分配对磁盘执行操作的节点,并基于网卡的负载对分配策略进行优化。The optimized execution module is used to allocate nodes that perform operations on the disk based on an allocation strategy, and optimize the allocation strategy based on the load of the network card.
在本申请的一些实施方式中,策略制定模块进一步配置用于:In some embodiments of the present application, the policy formulation module is further configured to:
响应于节点个数大于等于磁盘个数,为每个磁盘分配至少一个节点,并基于磁盘与节点的分配关系建立对应的映射表。In response to the number of nodes being greater than or equal to the number of disks, at least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
在本申请的一些实施方式中,策略制定模块进一步配置用于:In some embodiments of the present application, the policy formulation module is further configured to:
响应于接收到对磁盘的操作请求,通过映射表确认分配给磁盘的节点,将操作请求分配给节点执行。In response to receiving an operation request for a disk, the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
在本申请的一些实施方式中,策略制定模块进一步配置用于:In some embodiments of the present application, the policy formulation module is further configured to:
确认服务器上的节点中与磁盘接口最近的节点,并将节点作为磁盘优先节点。Identify the node on the server that is closest to the disk interface and set it as the disk priority node.
在本申请的一些实施方式中,策略制定模块进一步配置用于:In some embodiments of the present application, the policy formulation module is further configured to:
响应于接收到对磁盘的操作请求,从产生操作请求的应用类型确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, confirming whether the operation request is sensitive to a delay requirement based on a type of application generating the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本申请的一些实施方式中,策略制定模块进一步配置用于:In some embodiments of the present application, the policy formulation module is further configured to:
响应于接收到对磁盘的操作请求,从操作请求对数据操作方式确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, confirming whether the operation request is sensitive to a delay requirement based on a data operation mode of the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本申请的一些实施方式中,优化执行模块进一步配置用于:In some embodiments of the present application, the optimization execution module is further configured to:
确认处理网卡任务的节点,实时监控节点内各个核心的使用率,并基于各个核心的使用率确认节点的使用率;Identify the nodes that process network card tasks, monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
将节点的使用率与第一预定阈值进行比较,响应于节点的使用率小于第一预定阈值,按照预定策略向节点分配操作请求。The usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
在本申请的一些实施方式中,优化执行模块进一步配置用于:In some embodiments of the present application, the optimization execution module is further configured to:
按照预定算法基于节点的使用率向节点的部分核心分配操作请求。 The operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
在本申请的一些实施方式中,优化执行模块进一步配置用于:In some embodiments of the present application, the optimization execution module is further configured to:
响应于节点的使用率大于第一预定阈值,判断节点的使用率是否大于第二预定值;In response to the usage rate of the node being greater than a first predetermined threshold, determining whether the usage rate of the node is greater than a second predetermined value;
响应于节点的使用率大于第二预定阈值,禁止向节点分配操作请求。In response to the usage rate of the node being greater than a second predetermined threshold, allocating the operation request to the node is prohibited.
在本申请的一些实施方式中,优化执行模块进一步配置用于:In some embodiments of the present application, the optimization execution module is further configured to:
向节点的部分核心分配操作请求后,实时获取节点的使用率;After allocating operation requests to some cores of a node, the utilization rate of the node is obtained in real time;
响应于节点的使用率超过第二预定阈值,且网卡对节点的任务请求增加,则暂停向节点分配操作请求,优先处理网卡对节点的任务请求。In response to the usage rate of the node exceeding the second predetermined threshold and the task requests of the network card to the node increasing, the allocation of operation requests to the node is suspended, and the task requests of the network card to the node are processed preferentially.
本申请的又一方面还提出一种计算机设备,包括:Another aspect of the present application also provides a computer device, comprising:
至少一个处理器;以及at least one processor; and
存储器,存储器存储有可在处理器上运行的计算机指令,指令由处理器执行时实现上述实施方式中任意一项方法的步骤。The memory stores computer instructions executable on the processor, and when the instructions are executed by the processor, the steps of any one of the methods in the above-mentioned implementation manner are implemented.
本申请的再一方面还提出一种计算机非易失性可读存储介质,计算机非易失性可读存储介质存储有计算机程序,计算机程序被处理器执行时实现上述实施方式中任意一项方法的步骤。Another aspect of the present application further provides a computer non-volatile readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of any one of the methods in the above-mentioned embodiments are implemented.
通过本申请提出的一种存储优化方法,提出了一种基于NUMA(Non-Uniform Memory Access,非一致性内存访问架构)技术的NVME(Non-Volatile Memory Express,非易失性内存体系结构)固态硬盘和处理器内核绑定策略。通过该策略实现了全闪服务器的性能优化,合理利用现有资源,无需升级更好的硬件,能够有效的大幅提升存储服务器的读写IOPS(Input/Output Operations Per Second,每秒输入/输出操作数)和时延等性能,更有利于节约成本、合理利用资源,发挥现有资源的最大价值。Through a storage optimization method proposed in this application, a NVME (Non-Volatile Memory Express) solid-state drive and processor core binding strategy based on NUMA (Non-Uniform Memory Access) technology is proposed. Through this strategy, the performance optimization of the all-flash server is achieved, and the existing resources are reasonably used. Without upgrading to better hardware, the read and write IOPS (Input/Output Operations Per Second) and latency performance of the storage server can be effectively and significantly improved, which is more conducive to saving costs, reasonably using resources, and maximizing the value of existing resources.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
图1为本申请实施例提供的一种存储优化方法的实施例流程示意图;FIG1 is a schematic diagram of an embodiment of a storage optimization method provided in an embodiment of the present application;
图2为本申请实施例提供的一种存储优化系统的结构示意图;FIG2 is a schematic diagram of the structure of a storage optimization system provided in an embodiment of the present application;
图3为本申请实施例提供的一种计算机设备的结构示意图;FIG3 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application;
图4为本申请实施例提供的一种计算机非易失性可读存储介质的结构示意图;FIG4 is a schematic diagram of the structure of a computer non-volatile readable storage medium provided in an embodiment of the present application;
图5为本申请实施例提供的现有的NVME硬盘的调度方法策略示意图;FIG5 is a schematic diagram of a scheduling method strategy for an existing NVME hard disk provided in an embodiment of the present application;
图6为本申请实施例提供的本申请提出的NVME硬盘的调度方法示意图。FIG6 is a schematic diagram of a scheduling method for an NVME hard disk proposed in the present application provided in an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本申请实施例进一步详细说明。In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the embodiments of the present application are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
需要说明的是,本申请实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本申请实施例的限定,后续实施例对此不再一一说明。It should be noted that all expressions using "first" and "second" in the embodiments of the present application are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present application. The subsequent embodiments will not explain this one by one.
本申请提供一种全闪存存储的优化方案,旨在优化现有的存储方案中对硬件资源的利用不充分的问题。全闪存,顾名思义,在存储子系统中用固态硬盘(SSD)或其他闪存介质代 替传统硬盘(HDD)。最显而易见的特性在于它的高IOPS。全闪存技术起初是由于使用更高性能的SSD(Solid State Drive,固态硬盘)硬盘实现更高的IOPS,传统的全闪存方案中通常以“堆料”来提升全闪存系统的存储性能。即通过提升全闪存平台的硬件带宽、选择IOPS更高的SSD或则搭载带宽更高处理速度更快的CPU平台来实现提升全闪存平台的IOPS。这种情况下并没有有效根据选搭载的平台的硬件资源的特性进行优化。诚然,在固态硬盘领域发展迅速,家用级的固态硬盘的写入速度已达7000MB/S,而且随着闪存颗粒的快速迭代,PCIE(Peripheral Component Interconnect Express,外设组件互连快速版)总线带宽的升级。全闪存存储的提升只需提供更好的固态硬盘也可带来更高的IOPS性能。着力压榨平台性能的研发不如直接搭配新型的固态硬盘带来的性能提升。但这样“暴力”堆料方式则造成全闪存平台其他资源的浪费,但同时新型的固态硬盘代表着更高的成本。This application provides an optimization solution for all-flash storage, aiming to optimize the problem of insufficient utilization of hardware resources in existing storage solutions. All-flash, as the name suggests, uses solid-state drives (SSDs) or other flash media to replace Replace the traditional hard disk (HDD). The most obvious feature is its high IOPS. All-flash technology was initially due to the use of higher-performance SSD (Solid State Drive) hard disks to achieve higher IOPS. In traditional all-flash solutions, the storage performance of the all-flash system is usually improved by "stacking". That is, by increasing the hardware bandwidth of the all-flash platform, selecting SSDs with higher IOPS, or equipping a CPU platform with higher bandwidth and faster processing speed to improve the IOPS of the all-flash platform. In this case, there is no effective optimization based on the characteristics of the hardware resources of the selected platform. It is true that the field of solid-state drives has developed rapidly, and the write speed of home-grade solid-state drives has reached 7000MB/S. In addition, with the rapid iteration of flash memory particles, the bandwidth of the PCIE (Peripheral Component Interconnect Express) bus has been upgraded. The improvement of all-flash storage only requires providing better solid-state drives to bring higher IOPS performance. Focusing on the research and development of squeezing platform performance is not as good as the performance improvement brought by directly matching new solid-state drives. However, this "violent" stacking method causes waste of other resources of the all-flash platform, but at the same time, new solid-state drives represent higher costs.
如图1所示,为解决上述问题,本申请提出一种存储优化方法,包括:As shown in FIG1 , to solve the above problem, the present application proposes a storage optimization method, including:
步骤S1、根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略;Step S1: Establish a node and disk allocation strategy based on the node distribution and the number of disks on the server;
步骤S2、基于分配策略分配对磁盘执行操作的节点,并基于网卡的负载对分配策略进行优化。Step S2: Allocate nodes that perform operations on the disk based on an allocation strategy, and optimize the allocation strategy based on the load of the network card.
在本申请的实施例中,服务器上的节点是指服务器CPU中包含若干个处理器核心的一个单元,对于服务器级别的多核处理器,一般都远超桌面级使用的多核处理器,例如核心数量随着制作工艺的提升都在32核以上,在设计是将多个核心分为一个节点进行排布,因此,本申请中的节点是指包含多个处理器核心的模块。磁盘个数是指服务器上挂载的固态硬盘个数,一般为NVME协议的固态硬盘,当然也可以是其他类型的存储介质。In the embodiments of the present application, a node on a server refers to a unit containing several processor cores in the server CPU. For server-level multi-core processors, they are generally far more than the multi-core processors used at the desktop level. For example, the number of cores is more than 32 cores as the manufacturing process is improved. In the design, multiple cores are divided into one node for arrangement. Therefore, the node in the present application refers to a module containing multiple processor cores. The number of disks refers to the number of solid-state hard disks mounted on the server, which are generally solid-state hard disks with NVME protocol, and of course, other types of storage media can also be used.
因此,在步骤S1中,确定服务器上挂载的NVME硬盘个数和服务器上CPU的节点分布,所谓节点分布包括节点个数、核心个数,然后根据CPU节点个数、核心个数,制定分配NVME固态硬盘数据处理的策略。即设定访问NVME固态硬盘的处理器核心有哪些,访问的策略有哪些。Therefore, in step S1, the number of NVME hard disks mounted on the server and the node distribution of the CPU on the server are determined, and the so-called node distribution includes the number of nodes and the number of cores, and then a strategy for allocating NVME solid-state hard disk data processing is formulated according to the number of CPU nodes and the number of cores. That is, which processor cores access the NVME solid-state hard disk and which access strategies are set.
需要说明的是,在传统的技术实现上,是通过与NVME硬盘接口最近的节点负责对NVME固态硬盘的数据操作。如前,具有一定规模核心的CPU是将几个核心作为一个节点,同时一个CPU包含若干节点,在CPU芯片的排布上,定然有一个或多个节点与外设接口的距离最近。例如,如图5所示,在本申请实施例中选用的CPU为海光CS5250H,该CPU拥有128个处理核心,共编为8个节点,每个节点为16处理器核心,其中节点1和节点4与NVME固态硬盘连接的接口最近。按照传统的实现方法,会将节点1和节点4作为NVME固态硬盘的处理节点。即所有的对NVME固态硬盘的操作都会经由节点1和节点4上的核心处理。当产生对NVME固态硬盘的操作时,对应的存储软件会将操作请求发送到节点1或节点4。It should be noted that in the traditional technical implementation, the node closest to the NVME hard disk interface is responsible for the data operation of the NVME solid-state drive. As before, a CPU with a certain scale of cores uses several cores as a node, and a CPU contains several nodes. In the arrangement of the CPU chip, there must be one or more nodes closest to the peripheral interface. For example, as shown in Figure 5, the CPU selected in the embodiment of the present application is Haiguang CS5250H, which has 128 processing cores, which are compiled into 8 nodes, each of which is 16 processor cores, and the interface connected to the NVME solid-state drive by node 1 and node 4 is the closest. According to the traditional implementation method, node 1 and node 4 will be used as the processing nodes of the NVME solid-state drive. That is, all operations on the NVME solid-state drive will be processed by the cores on node 1 and node 4. When an operation on the NVME solid-state drive is generated, the corresponding storage software will send the operation request to node 1 or node 4.
而在本申请中,本申请基于NUMA(Non Uniform Memory Access,非一致性内存访问架构,可以使众多服务器像单一系统那样运转)软件的核心绑定技术,通过NUMA将处理器节点与对应的固态硬盘进行绑定。In the present application, the core binding technology of NUMA (Non Uniform Memory Access, which enables many servers to operate as a single system) software is used to bind the processor node with the corresponding solid-state drive through NUMA.
因此在步骤S1中需要根据服务器上的节点数量和挂载的NVME硬盘数量确定对应的分配策略。在该步骤中可以通过软件检测的方式获取服务器上的处理器的节点以及核心数量,然后按照通用的分配方式生成适合该服务器的分配策略,也可以由用户根据需要手动设定处理器节点和NVME固态硬盘的分配策略。Therefore, in step S1, the corresponding allocation strategy needs to be determined according to the number of nodes on the server and the number of mounted NVME hard disks. In this step, the number of nodes and cores of the processor on the server can be obtained by software detection, and then an allocation strategy suitable for the server can be generated according to a general allocation method, or the user can manually set the allocation strategy of the processor node and NVME solid-state hard disk as needed.
在步骤S2中,在根据服务器的节点和NVME固态硬盘制定好对应的分配策略之后,当产 生对某个固态硬盘的操作请求后,将对应的操作请求发送给分配策略规定的处理器节点。由处理器节点中的处理器核心执行该操作请求。In step S2, after the corresponding allocation strategy is formulated according to the server node and NVME solid state drive, when the production When an operation request for a solid state drive is generated, the corresponding operation request is sent to the processor node specified by the allocation strategy. The processor core in the processor node executes the operation request.
进一步,本申请中服务器是用于全闪存业务的服务器,服务器上的业务并不只是与NVME固态硬盘之间,全闪存服务器的数据大多来源于网络,需要通过网卡实现网络数据的接收与发送,同时网卡的数据也要有CPU进行处理,处理网卡的数据需要占用CPU的负载,因此,在基于NUMA技术以及分配策略将处理器的节点进行分配之后,在网卡负载变化时会对部分处理器的节点产生占用,出现网卡和NVME固态硬盘争夺处理器计算资源的情况,因此需要根据网卡的负载动态调整对NVME硬盘分配策略。例如,当网卡的负载较高时,将与网卡共用一个处理器节点的NVME固态硬盘的操作请求分配到其处理器节点。Furthermore, in this application, the server is a server for all-flash business. The business on the server is not just between NVME solid-state drives. Most of the data of the all-flash server comes from the network, and the network data needs to be received and sent through the network card. At the same time, the data of the network card must also be processed by the CPU. Processing the data of the network card requires the CPU load. Therefore, after the processor nodes are allocated based on NUMA technology and allocation strategy, when the network card load changes, some processor nodes will be occupied, and the network card and NVME solid-state drive will compete for processor computing resources. Therefore, it is necessary to dynamically adjust the NVME hard drive allocation strategy according to the load of the network card. For example, when the load of the network card is high, the operation request of the NVME solid-state drive that shares a processor node with the network card is allocated to its processor node.
在本申请的一些实施方式中,根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略包括:In some implementations of the present application, establishing a node and disk allocation strategy based on the node distribution and the number of disks on the server includes:
响应于节点个数大于等于磁盘个数,为每个磁盘分配至少一个节点,并基于磁盘与节点的分配关系建立对应的映射表。In response to the number of nodes being greater than or equal to the number of disks, at least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
在本实施例中,如果处理器的节点个数超过或者等于NVME固态硬盘的个数,推荐对每个NVME固态硬盘分配一个处理器节点。例如,如图6所示,图6示出的是处理器节点与挂载的NVEM恰好匹配的情况,一个节点与一个NVME固态硬盘通过NUMA技术进行绑定。进一步创建关于处理器节点与NVME固态硬盘的映射表。In this embodiment, if the number of processor nodes exceeds or equals the number of NVME solid-state drives, it is recommended to allocate a processor node to each NVME solid-state drive. For example, as shown in Figure 6, Figure 6 shows the situation where the processor node and the mounted NVEM just match, and one node is bound to one NVME solid-state drive through NUMA technology. A mapping table between the processor node and the NVME solid-state drive is further created.
在本申请的一些实施方式中,基于分配策略分配对磁盘执行操作的节点包括:In some implementations of the present application, allocating nodes that perform operations on disks based on an allocation strategy includes:
响应于接收到对磁盘的操作请求,通过映射表确认分配给磁盘的节点,将操作请求分配给节点执行。In response to receiving an operation request for a disk, the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
在本实施例中,当系统或上层应用产生对某个NVME固态硬盘的操作请求后,基于该操作请求确认该操作请求访问的NVME固态硬盘,然后根据映射表找到对应处理该NVME固态硬盘的处理节点,通过NUMA技术将操作请求分配到对应的处理器节点。In this embodiment, when the system or upper-layer application generates an operation request for a certain NVME solid-state drive, the NVME solid-state drive accessed by the operation request is confirmed based on the operation request, and then the processing node corresponding to the NVME solid-state drive is found according to the mapping table, and the operation request is allocated to the corresponding processor node through NUMA technology.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
确认服务器上的节点中与磁盘接口最近的节点,并将节点作为磁盘优先节点。Identify the node on the server that is closest to the disk interface and set it as the disk priority node.
在本实施例中,如前,服务器上的处理器存在多个处理节点,在排布这些处理节点时,必然存在着与NVME固态硬盘接口最近的节点,因此,在本实施例中将与NVME固态硬盘接口最近的处理器节点作为磁盘优先节点。In this embodiment, as before, there are multiple processing nodes in the processor on the server. When arranging these processing nodes, there must be a node closest to the NVME solid-state drive interface. Therefore, in this embodiment, the processor node closest to the NVME solid-state drive interface is used as the disk priority node.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于接收到对磁盘的操作请求,从产生请操作求的应用类型确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, determining whether the operation request is sensitive to a delay requirement based on the type of application generating the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本实施例中,在接收到对任一的NVME固态硬盘的操作请求时,可判断产生该操作请求应用程序对延迟是否敏感。例如,如果是数据库类型应用的查询服务,可将该操作请求发送交由磁盘优先节点来处理。即便该操作请求所要访问的NVME固态硬盘在预先的分配策略中并不是与磁盘优先节点绑定,仍然可以将操作请求分配到磁盘优先节点。通过NUMA命令对该操作请求指向到对应的磁盘优先节点。In this embodiment, when an operation request for any NVME solid-state drive is received, it can be determined whether the application generating the operation request is sensitive to delay. For example, if it is a query service of a database type application, the operation request can be sent to the disk priority node for processing. Even if the NVME solid-state drive to be accessed by the operation request is not bound to the disk priority node in the pre-allocation strategy, the operation request can still be allocated to the disk priority node. The operation request is directed to the corresponding disk priority node through the NUMA command.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于接收到对磁盘的操作请求,从操作请求对数据操作方式确认操作请求对延迟的要 求是否敏感;In response to receiving an operation request for a disk, confirming a delay requirement of the operation request from the operation request to the data operation mode. Ask whether it is sensitive;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本实施例中,所谓从操作请求对数据操作方式确认操作请求对延迟的要求是否敏感,是指操作请求在执行时是否在长时间占用处理器节点来完成对应的操作请求。例如写入或读取、对于写入或读取则判断写入获取读取数据的大小是否满足预设值,如果是小数据则可将对应的操作请求根据磁盘优先节点的使用率。如果写入数据很大,例如传输大量的文件,则拒绝这样的请求使用磁盘优先节点。In this embodiment, the so-called confirmation of whether the operation request is sensitive to the delay requirement from the operation request to the data operation mode refers to whether the operation request occupies the processor node for a long time to complete the corresponding operation request when it is executed. For example, for writing or reading, it is determined whether the size of the written or read data meets the preset value. If it is small data, the corresponding operation request can be processed according to the usage rate of the disk priority node. If the write data is large, such as transferring a large number of files, such a request is rejected to use the disk priority node.
在本申请的一些实施方式中,基于网卡的负载对分配策略进行优化包括:In some implementations of the present application, optimizing the allocation strategy based on the load of the network card includes:
确认处理网卡任务的节点,实时监控节点内各个核心的使用率,并基于各个核心的使用率确认节点的使用率;Identify the nodes that process network card tasks, monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
将节点的使用率与第一预定阈值进行比较,响应于节点的使用率小于第一预定阈值,按照预定策略向节点分配操作请求。The usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
在本申请的一些实施方式中,按照预定策略向节点分配操作请求包括:In some implementations of the present application, allocating an operation request to a node according to a predetermined strategy includes:
按照预定算法基于节点的使用率向节点的部分核心分配操作请求。The operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
在本实施例中,如前,本申请通过NUMA将处理器节点与对应的NVME硬盘进行绑定。如果某个处理器节点在分配到对应的NVME固态硬盘的任务后,还执行有对网卡的处理任务,则获取该处理器节点每个核心的使用率,并确认该处理器节点使用率。如果该处理器节点的使用率低于50%,则基于2分法通过NUMA调整处理器节点的与对应的NVME固态硬盘的分配数量,假设该处理器节点有16个核心,则分配8个核心给NVME固态硬盘进行绑定,In this embodiment, as before, the present application binds the processor node to the corresponding NVME hard disk through NUMA. If a processor node also performs processing tasks on the network card after being assigned to the task of the corresponding NVME solid-state hard disk, the utilization rate of each core of the processor node is obtained, and the utilization rate of the processor node is confirmed. If the utilization rate of the processor node is lower than 50%, the number of allocations of the processor node to the corresponding NVME solid-state hard disk is adjusted through NUMA based on the binary method. Assuming that the processor node has 16 cores, 8 cores are allocated to the NVME solid-state hard disk for binding.
如果该处理器节点使用率仍然偏低,例如低于25%,则可以将剩下的4个处理器核心通过NUMA分配给对应的NVME固态硬盘。If the processor node usage is still low, for example, less than 25%, the remaining 4 processor cores can be allocated to the corresponding NVME solid-state drives through NUMA.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于节点的使用率大于第一预定阈值,判断节点的使用率是否大于第二预定值;In response to the usage rate of the node being greater than a first predetermined threshold, determining whether the usage rate of the node is greater than a second predetermined value;
响应于节点的使用率大于第二预定阈值,禁止向节点分配操作请求。In response to the usage rate of the node being greater than a second predetermined threshold, allocating the operation request to the node is prohibited.
在本实施例中,如果该处理器节点的使用率超过90%,则在此情况下,将停止对该处理器节点发送操作请求。In this embodiment, if the usage rate of the processor node exceeds 90%, in this case, sending operation requests to the processor node will be stopped.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
向节点的部分核心分配操作请求后,实时获取节点的使用率;After allocating operation requests to some cores of a node, the utilization rate of the node is obtained in real time;
响应于节点的使用率超过第二预定阈值,且网卡对节点的任务请求增加,则暂停向节点分配操作请求,优先处理网卡对节点的任务请求。In response to the usage rate of the node exceeding the second predetermined threshold and the task requests of the network card to the node increasing, the allocation of operation requests to the node is suspended, and the task requests of the network card to the node are processed preferentially.
在本实施例中,在向处理网卡网络数据的处理器节点分配操作请求后,监控该处理器节点的状态,如果该处理器节点的使用率超过90%,则暂停向该处理器节点分配操作请求。In this embodiment, after allocating operation requests to the processor node processing the network data of the network card, the state of the processor node is monitored, and if the utilization rate of the processor node exceeds 90%, the allocation of operation requests to the processor node is suspended.
通过本申请提出的一种存储优化方法,提出了一种基于NUMA技术的NVME固态硬盘和处理器内核绑定策略。通过该策略实现了全闪服务器的性能优化,合理利用现有资源,无需升级更好的硬件,能够有效的大幅提升存储服务器的读写IOPS和时延等性能,更有利于节约成本、合理利用资源,发挥现有资源的最大价值。Through a storage optimization method proposed in this application, a NVME solid-state drive and processor core binding strategy based on NUMA technology is proposed. Through this strategy, the performance optimization of the all-flash server is achieved, and the existing resources are reasonably used. Without upgrading to better hardware, the read and write IOPS and latency performance of the storage server can be effectively and significantly improved, which is more conducive to cost saving, reasonable use of resources, and maximizing the value of existing resources.
如图2所示,本申请的另一方面还提出一种存储优化系统,包括:As shown in FIG. 2 , another aspect of the present application further provides a storage optimization system, including:
策略制定模块1,策略制定模1块用于根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略; Strategy formulation module 1, strategy formulation module 1 is used to establish node and disk allocation strategy according to node distribution and disk number on the server;
优化执行模块2,所优化执行模块2用于基于分配策略分配对磁盘执行操作的节点,并基于网卡的负载对分配策略进行优化。The optimized execution module 2 is used to allocate nodes that perform operations on the disk based on an allocation strategy, and optimize the allocation strategy based on the load of the network card.
在本申请的一些实施方式中,策略制定模块1进一步配置用于:In some embodiments of the present application, the policy formulation module 1 is further configured to:
响应于节点个数大于等于磁盘个数,为每个磁盘分配至少一个节点,并基于磁盘与节点的分配关系建立对应的映射表。In response to the number of nodes being greater than or equal to the number of disks, at least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
在本申请的一些实施方式中,策略制定模块1进一步配置用于:In some embodiments of the present application, the policy formulation module 1 is further configured to:
响应于接收到对磁盘的操作请求,通过映射表确认分配给磁盘的节点,将操作请求分配给节点执行。In response to receiving an operation request for a disk, the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
在本申请的一些实施方式中,策略制定模块1进一步配置用于:In some embodiments of the present application, the policy formulation module 1 is further configured to:
确认服务器上的节点中与磁盘接口最近的节点,并将节点作为磁盘优先节点。Identify the node on the server that is closest to the disk interface and set it as the disk priority node.
在本申请的一些实施方式中,策略制定模块1进一步配置用于:In some embodiments of the present application, the policy formulation module 1 is further configured to:
响应于接收到对磁盘的操作请求,从产生操作请求的应用类型确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, confirming whether the operation request is sensitive to a delay requirement based on a type of application generating the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本申请的一些实施方式中,策略制定模块1进一步配置用于:In some embodiments of the present application, the policy formulation module 1 is further configured to:
响应于接收到对磁盘的操作请求,从操作请求对数据操作方式确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, confirming whether the operation request is sensitive to a delay requirement based on a data operation mode of the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本申请的一些实施方式中,优化执行模块2进一步配置用于:In some embodiments of the present application, the optimization execution module 2 is further configured to:
确认处理网卡任务的节点,实时监控节点内各个核心的使用率,并基于各个核心的使用率确认节点的使用率;Identify the nodes that process network card tasks, monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
将节点的使用率与第一预定阈值进行比较,响应于节点的使用率小于第一预定阈值,按照预定策略向节点分配操作请求。The usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
在本申请的一些实施方式中,优化执行模块2进一步配置用于:In some embodiments of the present application, the optimization execution module 2 is further configured to:
按照预定算法基于节点的使用率向节点的部分核心分配操作请求。The operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
在本申请的一些实施方式中,优化执行模块2进一步配置用于:In some embodiments of the present application, the optimization execution module 2 is further configured to:
响应于节点的使用率大于第一预定阈值,判断节点的使用率是否大于第二预定值;In response to the usage rate of the node being greater than a first predetermined threshold, determining whether the usage rate of the node is greater than a second predetermined value;
响应于节点的使用率大于第二预定阈值,禁止向节点分配操作请求。In response to the usage rate of the node being greater than a second predetermined threshold, allocating the operation request to the node is prohibited.
在本申请的一些实施方式中,优化执行模块2进一步配置用于:In some embodiments of the present application, the optimization execution module 2 is further configured to:
向节点的部分核心分配操作请求后,实时获取节点的使用率;After allocating operation requests to some cores of a node, the utilization rate of the node is obtained in real time;
响应于节点的使用率超过第二预定阈值,且网卡对节点的任务请求增加,则暂停向节点分配操作请求,优先处理网卡对节点的任务请求。In response to the usage rate of the node exceeding the second predetermined threshold and the task requests of the network card to the node increasing, the allocation of operation requests to the node is suspended, and the task requests of the network card to the node are processed preferentially.
如图3所示,本申请的又一方面还提出一种计算机设备,包括:As shown in FIG3 , another aspect of the present application further provides a computer device, comprising:
至少一个处理器21;以及at least one processor 21; and
存储器22,存储器22存储有可在处理器21上运行的计算机指令23,指令23由处理器21执行时实现一种存储优化方法,包括:The memory 22 stores computer instructions 23 that can be run on the processor 21. When the instructions 23 are executed by the processor 21, a storage optimization method is implemented, including:
根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略;Establish node and disk allocation strategy based on node distribution and number of disks on the server;
基于分配策略分配对磁盘执行操作的节点,并基于网卡的负载对分配策略进行优化。The nodes that perform operations on the disk are allocated based on the allocation policy, and the allocation policy is optimized based on the load of the network card.
在本申请的一些实施方式中,根据服务器上的节点分布和磁盘个数建立节点与磁盘的分 配策略包括:In some embodiments of the present application, a node and disk partition is established based on the node distribution and the number of disks on the server. Matching strategies include:
响应于节点个数大于等于磁盘个数,为每个磁盘分配至少一个节点,并基于磁盘与节点的分配关系建立对应的映射表。In response to the number of nodes being greater than or equal to the number of disks, at least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
在本申请的一些实施方式中,基于分配策略分配对磁盘执行操作的节点包括:In some implementations of the present application, allocating nodes that perform operations on disks based on an allocation strategy includes:
响应于接收到对磁盘的操作请求,通过映射表确认分配给磁盘的节点,将操作请求分配给节点执行。In response to receiving an operation request for a disk, the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
确认服务器上的节点中与磁盘接口最近的节点,并将节点作为磁盘优先节点。Identify the node on the server that is closest to the disk interface and set it as the disk priority node.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于接收到对磁盘的操作请求,从产生请操作求的应用类型确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, determining whether the operation request is sensitive to a delay requirement based on the type of application generating the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于接收到对磁盘的操作请求,从操作请求对数据操作方式确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, confirming whether the operation request is sensitive to a delay requirement based on a data operation mode of the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本申请的一些实施方式中,基于网卡的负载对分配策略进行优化包括:In some implementations of the present application, optimizing the allocation strategy based on the load of the network card includes:
确认处理网卡任务的节点,实时监控节点内各个核心的使用率,并基于各个核心的使用率确认节点的使用率;Identify the nodes that process network card tasks, monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
将节点的使用率与第一预定阈值进行比较,响应于节点的使用率小于第一预定阈值,按照预定策略向节点分配操作请求。The usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
在本申请的一些实施方式中,按照预定策略向节点分配操作请求包括:In some implementations of the present application, allocating an operation request to a node according to a predetermined strategy includes:
按照预定算法基于节点的使用率向节点的部分核心分配操作请求。The operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于节点的使用率大于第一预定阈值,判断节点的使用率是否大于第二预定值;In response to the usage rate of the node being greater than a first predetermined threshold, determining whether the usage rate of the node is greater than a second predetermined value;
响应于节点的使用率大于第二预定阈值,禁止向节点分配操作请求。In response to the usage rate of the node being greater than a second predetermined threshold, allocating the operation request to the node is prohibited.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
向节点的部分核心分配操作请求后,实时获取节点的使用率;After allocating operation requests to some cores of a node, the utilization rate of the node is obtained in real time;
响应于节点的使用率超过第二预定阈值,且网卡对节点的任务请求增加,则暂停向节点分配操作请求,优先处理网卡对节点的任务请求。In response to the usage rate of the node exceeding the second predetermined threshold and the task requests of the network card to the node increasing, the allocation of operation requests to the node is suspended, and the task requests of the network card to the node are processed preferentially.
如图4所示,本申请的再一方面还提出一种计算机非易失性可读存储介质401,计算机非易失性可读存储介质401存储有计算机程序402,计算机程序402被处理器执行时实现一种存储优化方法,包括:As shown in FIG. 4 , another aspect of the present application further provides a computer non-volatile readable storage medium 401, wherein the computer non-volatile readable storage medium 401 stores a computer program 402, and when the computer program 402 is executed by a processor, a storage optimization method is implemented, including:
根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略;Establish node and disk allocation strategy based on node distribution and number of disks on the server;
基于分配策略分配对磁盘执行操作的节点,并基于网卡的负载对分配策略进行优化。The nodes that perform operations on the disk are allocated based on the allocation policy, and the allocation policy is optimized based on the load of the network card.
在本申请的一些实施方式中,根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略包括:In some implementations of the present application, establishing a node and disk allocation strategy based on the node distribution and the number of disks on the server includes:
响应于节点个数大于等于磁盘个数,为每个磁盘分配至少一个节点,并基于磁盘与节点的分配关系建立对应的映射表。 In response to the number of nodes being greater than or equal to the number of disks, at least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
在本申请的一些实施方式中,基于分配策略分配对磁盘执行操作的节点包括:In some implementations of the present application, allocating nodes that perform operations on disks based on an allocation strategy includes:
响应于接收到对磁盘的操作请求,通过映射表确认分配给磁盘的节点,将操作请求分配给节点执行。In response to receiving an operation request for a disk, the node assigned to the disk is confirmed through a mapping table, and the operation request is assigned to the node for execution.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
确认服务器上的节点中与磁盘接口最近的节点,并将节点作为磁盘优先节点。Identify the node on the server that is closest to the disk interface and set it as the disk priority node.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于接收到对磁盘的操作请求,从产生请操作求的应用类型确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, determining whether the operation request is sensitive to a delay requirement based on the type of application generating the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于接收到对磁盘的操作请求,从操作请求对数据操作方式确认操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, confirming whether the operation request is sensitive to a delay requirement based on a data operation mode of the operation request;
响应于操作请求对延迟的要求敏感,将操作请求分配到磁盘优先节点执行。In response to the fact that the operation request is sensitive to the latency requirement, the operation request is assigned to the disk-first node for execution.
在本申请的一些实施方式中,基于网卡的负载对分配策略进行优化包括:In some implementations of the present application, optimizing the allocation strategy based on the load of the network card includes:
确认处理网卡任务的节点,实时监控节点内各个核心的使用率,并基于各个核心的使用率确认节点的使用率;Identify the nodes that process network card tasks, monitor the utilization of each core in the node in real time, and confirm the utilization of the node based on the utilization of each core;
将节点的使用率与第一预定阈值进行比较,响应于节点的使用率小于第一预定阈值,按照预定策略向节点分配操作请求。The usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
在本申请的一些实施方式中,按照预定策略向节点分配操作请求包括:In some implementations of the present application, allocating an operation request to a node according to a predetermined strategy includes:
按照预定算法基于节点的使用率向节点的部分核心分配操作请求。The operation requests are distributed to some cores of the node based on the utilization of the node according to a predetermined algorithm.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
响应于节点的使用率大于第一预定阈值,判断节点的使用率是否大于第二预定值;In response to the usage rate of the node being greater than a first predetermined threshold, determining whether the usage rate of the node is greater than a second predetermined value;
响应于节点的使用率大于第二预定阈值,禁止向节点分配操作请求。In response to the usage rate of the node being greater than a second predetermined threshold, allocating the operation request to the node is prohibited.
在本申请的一些实施方式中,方法还包括:In some embodiments of the present application, the method further comprises:
向节点的部分核心分配操作请求后,实时获取节点的使用率;After allocating operation requests to some cores of a node, the utilization rate of the node is obtained in real time;
响应于节点的使用率超过第二预定阈值,且网卡对节点的任务请求增加,则暂停向节点分配操作请求,优先处理网卡对节点的任务请求。In response to the usage rate of the node exceeding the second predetermined threshold and the task requests of the network card to the node increasing, the allocation of operation requests to the node is suspended, and the task requests of the network card to the node are processed preferentially.
以上是本申请公开的示例性实施例,但是应当注意,在不背离权利要求限定的本申请实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本申请实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。The above are exemplary embodiments disclosed in the present application, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present application as defined in the claims. The functions, steps and/or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present application may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and/or" refers to any and all possible combinations including one or more of the associated listed items.
上述本申请实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments disclosed in the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,的程序可以存储于一种计算机非易失性可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer non-volatile readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗 示本申请实施例公开的范围(包括权利要求)被限于这些例子;在本申请实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本申请实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本申请实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本申请实施例的保护范围之内。 It should be understood by those skilled in the art that the discussion of any of the above embodiments is only exemplary and is not intended to imply The scope of the disclosure of the embodiments of the present application (including the claims) is limited to these examples; under the idea of the embodiments of the present application, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present application as above, which are not provided in detail for the sake of simplicity. Therefore, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.

Claims (20)

  1. 一种存储优化方法,其特征在于,包括:A storage optimization method, characterized by comprising:
    根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略;Establish node and disk allocation strategy based on node distribution and number of disks on the server;
    基于所述分配策略分配对磁盘执行操作的节点,并基于网卡的负载对所述分配策略进行优化。The nodes that perform operations on the disk are allocated based on the allocation strategy, and the allocation strategy is optimized based on the load of the network card.
  2. 根据权利要求1所述的方法,其特征在于,所述根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略包括:The method according to claim 1, characterized in that the step of establishing a node and disk allocation strategy based on the node distribution and the number of disks on the server comprises:
    响应于所述节点个数大于等于磁盘个数,为每个磁盘分配至少一个节点,并基于磁盘与节点的分配关系建立对应的映射表。In response to the number of nodes being greater than or equal to the number of disks, at least one node is allocated to each disk, and a corresponding mapping table is established based on the allocation relationship between the disks and the nodes.
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述分配策略分配对磁盘执行操作的节点包括:The method according to claim 2, characterized in that the allocating nodes that perform operations on the disk based on the allocation strategy comprises:
    响应于接收到对磁盘的操作请求,通过所述映射表确认所述分配给所述磁盘的节点,将所述操作请求分配给所述节点执行。In response to receiving an operation request for a disk, the node assigned to the disk is confirmed through the mapping table, and the operation request is assigned to the node for execution.
  4. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    确认服务器上的节点中与磁盘接口最近的节点,并将所述节点作为磁盘优先节点。A node closest to the disk interface among the nodes on the server is identified, and the node is used as a disk priority node.
  5. 根据权利要求4所述的方法,其特征在于,还包括:The method according to claim 4, further comprising:
    响应于接收到对磁盘的操作请求,从产生操作请求的应用类型确认所述操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, confirming whether the operation request is sensitive to a delay requirement based on the type of application generating the operation request;
    响应于所述操作请求对延迟的要求敏感,将所述操作请求分配到所述磁盘优先节点执行。In response to the fact that the operation request is sensitive to a delay requirement, the operation request is allocated to the disk priority node for execution.
  6. 根据权利要求5所述的方法,其特征在于,还包括:The method according to claim 5, further comprising:
    响应于接收到对磁盘的操作请求,从所述操作请求对数据操作方式确认所述操作请求对延迟的要求是否敏感;In response to receiving an operation request for a disk, confirming whether the operation request is sensitive to a delay requirement based on a data operation mode of the operation request;
    响应于所述操作请求对延迟的要求敏感,将所述操作请求分配到所述磁盘优先节点执行。In response to the fact that the operation request is sensitive to a delay requirement, the operation request is allocated to the disk priority node for execution.
  7. 根据权利要求1所述的方法,其特征在于,所述基于网卡的负载对所述分配策略进行优化包括:The method according to claim 1, characterized in that the optimizing the allocation strategy based on the load of the network card comprises:
    确认处理网卡任务的节点,实时监控所述节点内各个核心的使用率,并基于各个核心的使用率确认所述节点的使用率;Confirm the node that processes the network card task, monitor the utilization rate of each core in the node in real time, and confirm the utilization rate of the node based on the utilization rate of each core;
    将所述节点的使用率与第一预定阈值进行比较,响应于所述节点的使用率小于所述第一预定阈值,按照预定策略向所述节点分配操作请求。The usage rate of the node is compared with a first predetermined threshold, and in response to the usage rate of the node being less than the first predetermined threshold, the operation request is allocated to the node according to a predetermined policy.
  8. 根据权利要求7所述的方法,其特征在于,所述按照预定策略向所述节点分配操作请求包括:The method according to claim 7, characterized in that the allocating operation requests to the nodes according to a predetermined strategy comprises:
    按照预定算法基于所述节点的使用率向所述节点的部分核心分配操作请求。The operation requests are distributed to part of the cores of the node based on the utilization rate of the node according to a predetermined algorithm.
  9. 根据权利要求7所述的方法,其特征在于,还包括:The method according to claim 7, further comprising:
    响应于所述节点的使用率大于第一预定阈值,判断所述节点的使用率是否大于第二预定值;In response to the usage rate of the node being greater than a first predetermined threshold, determining whether the usage rate of the node is greater than a second predetermined value;
    响应于所述节点的使用率大于第二预定阈值,禁止向所述节点分配操作请求。In response to the usage rate of the node being greater than a second predetermined threshold, allocating operation requests to the node is prohibited.
  10. 根据权利要求8所述的方法,其特征在于,还包括:The method according to claim 8, further comprising:
    向所述节点的部分核心分配操作请求后,实时获取所述节点的使用率; After allocating the operation request to some cores of the node, obtaining the utilization rate of the node in real time;
    响应于所述节点的使用率超过第二预定阈值,且所述网卡对所述节点的任务请求增加,则暂停向所述节点分配操作请求,优先处理网卡对所述节点的任务请求。In response to the usage rate of the node exceeding a second predetermined threshold and the task requests from the network card to the node increasing, allocating operation requests to the node is suspended, and the task requests from the network card to the node are processed preferentially.
  11. 根据权利要求1所述的方法,其特征在于,所述节点为处理器节点,所述磁盘为非易失性内存体系结构固态硬盘,所述基于网卡的负载对所述分配策略进行优化,还包括:The method according to claim 1, wherein the node is a processor node, the disk is a non-volatile memory architecture solid state disk, and the optimization of the allocation strategy based on the load of the network card further comprises:
    将与所述网卡共用一个处理器节点的所述非易失性内存体系结构固态硬盘的操作请求分配到其所述处理器节点。The operation request of the non-volatile memory architecture solid state drive that shares a processor node with the network card is allocated to the processor node.
  12. 根据权利要求5所述的方法,其特征在于,所述响应于所述操作请求对延迟的要求敏感,将所述操作请求分配到所述磁盘优先节点执行,还包括:The method according to claim 5, characterized in that, in response to the operation request being sensitive to a delay requirement, allocating the operation request to the disk priority node for execution, further comprises:
    当所述操作请求为数据库类型应用的查询服务时,将所述操作请求发送交由所述磁盘优先节点处理。When the operation request is a query service of a database type application, the operation request is sent to the disk priority node for processing.
  13. 根据权利要求8所述的方法,其特征在于,所述节点为处理器节点,所述磁盘为非易失性内存体系结构固态硬盘,所述按照预定算法基于所述节点的使用率向所述节点的部分核心分配操作请求,包括:The method according to claim 8, wherein the node is a processor node, the disk is a non-volatile memory architecture solid state disk, and the allocating operation requests to some cores of the node based on the usage rate of the node according to a predetermined algorithm comprises:
    当所述处理器节点使用率低于50%时,则基于2分法通过非一致性内存访问架构调整所述处理器节点的与对应所述非易失性内存体系结构固态硬盘的分配数量。When the utilization rate of the processor node is lower than 50%, the allocated quantity of the processor node and the solid state disk corresponding to the non-volatile memory architecture is adjusted through the non-uniform memory access architecture based on the binary method.
  14. 根据权利要求13所述的方法,其特征在于,所述当所述处理器节点的使用率低于50%时,则基于2分法通过非一致性内存访问架构调整所述处理器节点的与对应所述非易失性内存体系结构固态硬盘的分配数量,包括:The method according to claim 13, characterized in that when the utilization rate of the processor node is lower than 50%, adjusting the allocation quantity of the processor node and the solid state drive corresponding to the non-volatile memory architecture through the non-uniform memory access architecture based on the binary method comprises:
    当所述处理器节点使用率低于50%且所述处理器节点有16个核心时,则分配8个核心给所述非易失性内存体系结构固态硬盘进行绑定。When the utilization rate of the processor node is lower than 50% and the processor node has 16 cores, 8 cores are allocated to the non-volatile memory architecture solid state drive for binding.
  15. 根据权利要求14所述的方法,其特征在于,还包括:The method according to claim 14, further comprising:
    当所述处理器节点使用率低于25%时,则将剩下的4个所述核心通过非一致性内存访问架构分配给对应的所述非易失性内存体系结构固态硬盘。When the processor node utilization rate is lower than 25%, the remaining four cores are allocated to the corresponding non-volatile memory architecture solid state drives through a non-uniform memory access architecture.
  16. 根据权利要求9所述的方法,其特征在于,所述节点为处理器节点,所述响应于所述节点的使用率大于第二预定阈值,禁止向所述节点分配操作请求,还包括:The method according to claim 9, wherein the node is a processor node, and in response to the usage rate of the node being greater than a second predetermined threshold, prohibiting the allocation of operation requests to the node, further comprises:
    当所述处理器节点使用率超过90%,则停止对所述处理器节点发送所述操作请求。When the utilization rate of the processor node exceeds 90%, sending the operation request to the processor node is stopped.
  17. 根据权利要求1所述的方法,其特征在于,节点分布包括节点个数、核心个数.The method according to claim 1, characterized in that the node distribution includes the number of nodes and the number of cores.
  18. 一种存储优化系统,其特征在于,包括:A storage optimization system, characterized by comprising:
    策略制定模块,所述策略制定模块用于根据服务器上的节点分布和磁盘个数建立节点与磁盘的分配策略;A strategy formulation module, the strategy formulation module is used to establish a node and disk allocation strategy based on the node distribution and the number of disks on the server;
    优化执行模块,所优化执行模块用于基于所述分配策略分配对磁盘执行操作的节点,并基于网卡的负载对所述分配策略进行优化。The optimized execution module is used to allocate nodes that perform operations on the disk based on the allocation strategy, and optimize the allocation strategy based on the load of the network card.
  19. 一种计算机设备,其特征在于,包括:A computer device, comprising:
    至少一个处理器;以及at least one processor; and
    存储器,所述存储器存储有可在所述处理器上运行的计算机指令,所述指令由所述处理器执行时实现权利要求1-17任意一项所述方法的步骤。A memory storing computer instructions executable on the processor, wherein the instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 17.
  20. 一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-17任意一项所述方法的步骤。 A computer non-volatile readable storage medium, wherein the computer non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 17.
PCT/CN2023/109987 2022-11-30 2023-07-28 Storage optimization method and system, device, and readable storage medium WO2024113925A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211515911.9A CN115543222B (en) 2022-11-30 2022-11-30 Storage optimization method, system, equipment and readable storage medium
CN202211515911.9 2022-11-30

Publications (1)

Publication Number Publication Date
WO2024113925A1 true WO2024113925A1 (en) 2024-06-06

Family

ID=84722412

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/109987 WO2024113925A1 (en) 2022-11-30 2023-07-28 Storage optimization method and system, device, and readable storage medium

Country Status (2)

Country Link
CN (1) CN115543222B (en)
WO (1) WO2024113925A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543222B (en) * 2022-11-30 2023-03-10 苏州浪潮智能科技有限公司 Storage optimization method, system, equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199718A (en) * 2014-08-22 2014-12-10 上海交通大学 Dispatching method of virtual processor based on NUMA high-performance network cache resource affinity
CN106528488A (en) * 2016-10-09 2017-03-22 广州艾美网络科技有限公司 Computation cluster system in single machine and control method
US20210208819A1 (en) * 2020-08-24 2021-07-08 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for scheduling memory access request, device and storage medium
CN115022336A (en) * 2022-05-31 2022-09-06 苏州浪潮智能科技有限公司 Server resource load balancing method, system, terminal and storage medium
CN115543222A (en) * 2022-11-30 2022-12-30 苏州浪潮智能科技有限公司 Storage optimization method, system, equipment and readable storage medium
CN116088758A (en) * 2022-12-30 2023-05-09 曙光信息产业(北京)有限公司 Optimization method, optimization device, optimization computer device, optimization storage medium, and optimization program product

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224253A (en) * 2015-09-29 2016-01-06 浪潮电子信息产业股份有限公司 Method for optimizing performance of solid state disk
CN112379825B (en) * 2019-09-24 2021-07-06 北京城建设计发展集团股份有限公司 Distributed data storage method and device based on data feature sub-pools
CN111338580B (en) * 2020-02-29 2021-12-21 苏州浪潮智能科技有限公司 Method and equipment for optimizing disk performance
CN112256433B (en) * 2020-10-30 2022-04-05 上海哔哩哔哩科技有限公司 Partition migration method and device based on Kafka cluster

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199718A (en) * 2014-08-22 2014-12-10 上海交通大学 Dispatching method of virtual processor based on NUMA high-performance network cache resource affinity
CN106528488A (en) * 2016-10-09 2017-03-22 广州艾美网络科技有限公司 Computation cluster system in single machine and control method
US20210208819A1 (en) * 2020-08-24 2021-07-08 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for scheduling memory access request, device and storage medium
CN115022336A (en) * 2022-05-31 2022-09-06 苏州浪潮智能科技有限公司 Server resource load balancing method, system, terminal and storage medium
CN115543222A (en) * 2022-11-30 2022-12-30 苏州浪潮智能科技有限公司 Storage optimization method, system, equipment and readable storage medium
CN116088758A (en) * 2022-12-30 2023-05-09 曙光信息产业(北京)有限公司 Optimization method, optimization device, optimization computer device, optimization storage medium, and optimization program product

Also Published As

Publication number Publication date
CN115543222A (en) 2022-12-30
CN115543222B (en) 2023-03-10

Similar Documents

Publication Publication Date Title
US10120586B1 (en) Memory transaction with reduced latency
WO2023082560A1 (en) Task processing method and apparatus, device, and medium
US11726701B2 (en) Memory expander, heterogeneous computing device using memory expander, and operation method of heterogenous computing
JP6172649B2 (en) Information processing apparatus, program, and information processing method
CN111722786A (en) Storage system based on NVMe equipment
Tavakkol et al. Performance evaluation of dynamic page allocation strategies in SSDs
WO2024113925A1 (en) Storage optimization method and system, device, and readable storage medium
WO2019062202A1 (en) Method, hard disk, and storage medium for executing hard disk operation instruction
US11740812B2 (en) Data storage device idle time processing
US11556391B2 (en) CPU utilization for service level I/O scheduling
CN115033188B (en) Storage hardware acceleration module system based on ZNS solid state disk
US20240241639A1 (en) Method and Apparatus for Processing Access Request, Storage Apparatus, and Storage Medium
KR20220084844A (en) Storage device and operating method thereof
WO2024109489A1 (en) Solid state disk and data writing method and apparatus therefor, and host and storage medium
TWI797022B (en) Storage controller, computational storage device, and operational method of computational storage device
US20240241826A1 (en) Computing node cluster, data aggregation method, and related device
Kim et al. FAST I/O: QoS supports for urgent I/Os in NVMe SSDs
WO2024078012A1 (en) Solid-state drive configuration method, garbage collection method and related device
WO2023185639A1 (en) Data interaction system and method based on nvme hard disk
EP4148572B1 (en) Computational storage device and storage system including the computational storage device
CN115658328A (en) Device and method for managing storage space, computing equipment and chip
CN108762682B (en) Thread model
US20230214258A1 (en) Storage controller and storage device
Wu et al. I/O stack optimization for efficient and scalable access in FCoE-based SAN storage
Yu et al. Analysis of CPU pinning and storage configuration in 100 Gbps network data transfer

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23896088

Country of ref document: EP

Kind code of ref document: A1