CN117519604A - SPDK-based virtual machine disk performance adjustment method, device, equipment and memory - Google Patents

SPDK-based virtual machine disk performance adjustment method, device, equipment and memory Download PDF

Info

Publication number
CN117519604A
CN117519604A CN202311693313.5A CN202311693313A CN117519604A CN 117519604 A CN117519604 A CN 117519604A CN 202311693313 A CN202311693313 A CN 202311693313A CN 117519604 A CN117519604 A CN 117519604A
Authority
CN
China
Prior art keywords
performance
resources
performance resources
allocated
working
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311693313.5A
Other languages
Chinese (zh)
Inventor
芦志朋
张友加
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongdian Cloud Computing Technology Co ltd
Original Assignee
Zhongdian Cloud Computing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongdian Cloud Computing Technology Co ltd filed Critical Zhongdian Cloud Computing Technology Co ltd
Priority to CN202311693313.5A priority Critical patent/CN117519604A/en
Publication of CN117519604A publication Critical patent/CN117519604A/en
Pending legal-status Critical Current

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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to 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/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

A method, a device, equipment and a memory for adjusting the disk performance of a virtual machine based on SPDK (specific virtual DK), which comprises the following steps: obtaining the maximum IO performance resource of the storage side; according to the maximum IO performance resource and the set initial allocation proportion, IO performance resource allocation is carried out on a plurality of working threads for processing IO requests; periodically acquiring actual use requirements of each working thread on IO performance resources, and judging whether the IO performance resources allocated to each working thread are too many or too few according to the actual use requirements; the distributed IO performance resources of the working threads with excessive IO performance resources are reduced, and/or the distributed IO performance resources of the working threads with insufficient IO performance resources are increased. Under the condition that resource utilization waste exists or resource allocation is insufficient in some working threads, the allocated IO performance resources of the working threads with excessive IO performance resources and the allocated IO performance resources of the working threads with insufficient IO performance resources can be automatically reduced.

Description

SPDK-based virtual machine disk performance adjustment method, device, equipment and memory
Technical Field
The application relates to the field of SPDK, in particular to a method, a device, equipment and a memory for adjusting the disk performance of a virtual machine based on SPDK.
Background
SPDK (Storage performance development kit) is an application acceleration library initiated by Intel for using NVMe SSD as back-end storage. The core of the software library is NVMe driving which realizes a user mode, asynchronous mode, lock-free mode and polling mode. SPDK provides several targets: NVMeOF Target, iscsi Target, vhost Target, etc., where Vhost Target is commonly used for virtual machine IO acceleration. The Vhost target exposes a standard virtio block device to the virtual machine by implementing the Vhost user block protocol.
The SPDK adopts a polling IO mode to replace an interrupt mode, and can provide high-performance magnetic disks for the virtual machine. However, the storage bandwidth of the whole storage cluster is limited, the number of virtual machines deployed on the cluster is different, and the requirements of the service running in the virtual machines on the storage bandwidth are different, so that a method for adjusting the disk performance of the virtual machine based on spdk is needed, and the disk bandwidth of the virtual machine can be dynamically adjusted according to the specific storage service requirements.
In the related art, the QoS of the SPDK native may limit the storage performance of a certain disk of the virtual machine, but it needs to be manually set, that is, it needs to manually know the storage requirement of the current service of the virtual machine, and then call the SPDK interface to set the QoS of the disk. This approach cannot meet QoS changes with changes in traffic demand at any time, and human operation is not practical.
Disclosure of Invention
The application provides a method, a device, equipment and a memory for adjusting the disk performance of a virtual machine based on SPDK, which can solve the technical problems in the prior art.
In a first aspect, an embodiment of the present application provides a method for adjusting performance of a virtual machine disk based on SPDK, which adopts the following technical scheme:
a virtual machine disk performance adjustment method based on SPDK comprises the following steps:
obtaining the maximum IO performance resource of the storage side; wherein the IO performance resources comprise bandwidth, bps, wbps and rbps;
according to the maximum IO performance resource and the set initial allocation proportion, IO performance resource allocation is carried out on a plurality of working threads for processing IO requests;
periodically acquiring actual use requirements of each working thread on IO performance resources, and judging whether the IO performance resources allocated to each working thread are too many or too few according to the actual use requirements;
the allocated IO performance resources of the working threads with excessive IO performance resources are reduced, and the allocated IO performance resources of the working threads with insufficient IO performance resources are increased.
With reference to the first aspect, in an implementation manner, the reducing allocated IO performance resources of the working thread with excessive IO performance resources and increasing allocated IO performance resources of the working thread with insufficient IO performance resources include:
reducing allocated IO performance resources of the working thread with excessive IO performance resources to correspond to the actual use requirements;
and increasing the IO performance resources allocated to the working threads with too few IO performance resources based on the unassigned IO performance resources of the storage side.
With reference to the first aspect, in an implementation manner, the increasing the IO performance resources allocated by the working threads with too few IO performance resources based on the IO performance resources not allocated by the storage side,
and according to the set priority among the plurality of working threads, firstly distributing the unallocated IO performance resources of the storage side to the working thread with higher priority until the actual use requirement of the working thread is met.
With reference to the first aspect, in an implementation manner, in the increasing the allocation proportion of the work threads with too few allocated IO performance resources based on the IO performance resources not allocated on the storage side,
and distributing the IO performance resources which are not distributed on the storage side among the working threads with too few IO performance resources according to the distribution weights among the set plurality of working threads.
In combination with the first aspect, in one implementation manner, the determining whether the IO performance resources allocated to each working thread are too many or too few,
if the actual use requirements acquired by the working thread for single time or multiple times are lower than the set proportion of the allocated IO performance resources, determining that the IO performance resources allocated by the working thread are excessive;
if the actual use requirements obtained by the working thread are higher than the allocated IO performance resources, determining that the allocated IO performance resources of the working thread are too few.
With reference to the first aspect, in one implementation manner, the allocated IO performance resources of the working threads with too many IO performance resources are reduced, and among the allocated IO performance resources of the working threads with too few IO performance resources are increased,
reducing the IO performance resources of the set proportion of the working threads with excessive IO performance resources;
and increasing the IO performance resources allocated to the working threads with too few IO performance resources based on the unassigned IO performance resources of the storage side.
With reference to the first aspect, in one implementation manner, the method for adjusting the disk performance of the virtual machine based on the SPDK further includes the following steps:
and if the working thread is newly added, the IO performance resources are allocated to the newly added working thread layer based on the IO performance resources which are not allocated by the storage side.
In a second aspect, an embodiment of the present application provides an SPDK-based virtual machine disk performance adjustment apparatus.
An SPDK-based virtual machine disk performance adjustment apparatus, the SPDK-based virtual machine disk performance adjustment apparatus comprising:
the acquisition module is configured to acquire the maximum IO performance resource of the storage side; wherein the IO performance resources comprise bandwidth, bps, wbps and rbps;
the allocation module is configured to allocate IO performance resources to a plurality of working threads for processing IO requests according to the maximum IO performance resources and the set initial allocation proportion;
periodically acquiring actual use requirements of each working thread on IO performance resources, and judging whether the IO performance resources allocated to each working thread are too many or too few according to the actual use requirements;
the allocated IO performance resources of the working threads with excessive IO performance resources are reduced, and the allocated IO performance resources of the working threads with insufficient IO performance resources are increased.
In a third aspect, an embodiment of the present application provides an SPDK-based virtual machine disk performance adjustment apparatus, which adopts the following technical scheme:
an SPDK-based virtual machine disk performance adjustment apparatus comprising a processor, a memory, and an SPDK-based virtual machine disk performance adjustment program stored on the memory and executable by the processor, wherein the SPDK-based virtual machine disk performance adjustment program, when executed by the processor, implements the steps of the SPDK-based virtual machine disk performance adjustment method as described above.
In a fourth aspect, an embodiment of the present application provides a memory, which adopts the following technical scheme:
a memory, on which a virtual machine disk performance adjustment program based on an SPDK is stored, wherein the step of the virtual machine disk performance adjustment method based on an SPDK is implemented when the virtual machine disk performance adjustment program based on an SPDK is executed by a processor.
The beneficial effects that technical scheme that this application embodiment provided include:
by periodically acquiring the actual use requirement of each working thread on IO performance resources after the initial IO performance resource allocation is finished in the initial allocation proportion, the current IO performance resource utilization condition of each working thread can be acquired, and under the condition that resource utilization waste or insufficient resource allocation exists in some working threads, the allocated IO performance resources of the working threads with excessive IO performance resources and the allocated IO performance resources of the working threads with insufficient IO performance resources are automatically reduced, so that the technical problem that the IO requests of the working threads in the related technology are difficult to manually adjust according to rapidness is solved.
Drawings
Fig. 1 is a flowchart of an embodiment of a method for adjusting the disk performance of a virtual machine based on SPDK according to the present application;
fig. 2 is a schematic functional block diagram of an embodiment of a virtual machine disk performance adjustment device based on SPDK according to the present application;
fig. 3 is a schematic hardware structure of an SPDK-based virtual machine disk performance adjustment device according to the embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
SPDK (Storage performance development kit) is an application acceleration library initiated by Intel for using NVMe SSD as back-end storage. The core of the software library is NVMe driving which realizes a user mode, asynchronous mode, lock-free mode and polling mode. SPDK provides several targets: NVMeOF Target, iscsi Target, vhost Target, etc., where Vhost Target is commonly used for virtual machine IO acceleration. The Vhost target exposes a standard virtio block device to the virtual machine by implementing the Vhost user block protocol.
The SPDK adopts a polling IO mode to replace an interrupt mode, and can provide high-performance magnetic disks for the virtual machine. However, the storage bandwidth of the whole storage cluster is limited, the number of virtual machines deployed on the cluster is different, and the requirements of the service running in the virtual machines on the storage bandwidth are different, so that a method for adjusting the disk performance of the virtual machine based on spdk is needed, and the disk bandwidth of the virtual machine can be dynamically adjusted according to the specific storage service requirements.
In the related art, the QoS of the SPDK native may limit the storage performance of a certain disk of the virtual machine, but it needs to be manually set, that is, it needs to manually know the storage requirement of the current service of the virtual machine, and then call the SPDK interface to set the QoS of the disk. This approach cannot meet QoS changes with changes in traffic demand at any time, and human operation is not practical.
Based on the above problems, the embodiments of the present application provide a method, an apparatus, a device, and a memory for adjusting disk performance of a virtual machine based on SPDK, which are characterized in that, after initial allocation of IO performance resources is completed in an initial allocation proportion, actual usage requirements of each working thread for IO performance resources are periodically obtained, so that current utilization conditions of IO performance resources of each working thread can be obtained, and when resource utilization waste or insufficient resource allocation exists in some working threads, allocated IO performance resources of working threads with excessive IO performance resources can be reduced and/or allocated IO performance resources of working threads with excessive IO performance resources are increased, thereby solving the technical problem that in related technologies, IO requests of working threads are difficult to be manually adjusted according to speed.
In a first aspect, an embodiment of the present application provides a method for adjusting disk performance of a virtual machine based on SPDK.
In an embodiment, referring to fig. 1, fig. 1 is a flowchart of a first embodiment of a method for adjusting the performance of a virtual machine disk based on SPDK according to the present application. As shown in fig. 1, the method for adjusting the disk performance of the virtual machine based on the SPDK includes:
s100, acquiring the maximum IO performance resource of a storage side; wherein the IO performance resources comprise bandwidth, bps, wbps and rbps;
the maximum IO performance resource of the storage side comprises the maximum bandwidth (iops), the maximum bps (read-write bi-directional), the maximum wbps (write data) and the maximum rbps (read data).
S200, according to the maximum IO performance resources and the set initial allocation proportion, IO performance resources are allocated to a plurality of working threads for processing IO requests;
each working thread processing the IO request can correspondingly set an initial allocation proportion, and the addition of the initial allocation proportions of the working threads can be smaller than the maximum IO performance resource, i.e. unallocated IO performance resources can exist. In this embodiment, the initial allocation ratio of each work thread is set to be the same, and in other embodiments, different initial allocation ratios may be set according to the priority or weight of each work thread.
S300, periodically acquiring actual use requirements of each working thread on IO performance resources, and judging whether the IO performance resources allocated to each working thread are too many or too few according to the actual use requirements;
specifically, after the initial IO performance resource allocation is completed according to the initial allocation proportion, each working thread executes a vhost qos poller function at the end of each interval period, so as to judge whether the IO performance resources currently allocated to each working thread are too many or too few according to the acquired actual use requirements, and further perform further adjustment of the allocated IO performance resources in the subsequent steps.
S400, reducing allocated IO performance resources of the working threads with excessive IO performance resources and/or increasing allocated IO performance resources of the working threads with insufficient IO performance resources.
Specifically, since only the work threads with excessive allocated IO performance resources may exist after the determination in step S300, the allocated IO performance resources of the work threads with excessive IO performance resources reduced will be performed in step S400; in the case where only the work thread with too few allocated IO performance resources exists, in this case, in step S400, the adjustment of increasing the IO performance resources allocated to the work thread with too few IO performance resources is performed; for the working threads with too few and too large allocated IO performance resources, according to the maximum IO performance and respective actual use requirements, the allocated IO performance resources of the working threads with too many IO performance resources are reduced, and the allocated IO performance resources of the working threads with too few IO performance resources are increased at least partially.
In this embodiment, after the initial IO performance resource allocation is completed in the initial allocation proportion, the actual use requirement of each working thread on the IO performance resource is periodically acquired, so that the current IO performance resource utilization condition of each working thread can be obtained, and when resource utilization waste or insufficient resource allocation exists in some working threads, the allocated IO performance resources of the working threads with excessive IO performance resources can be reduced, and/or the allocated IO performance resources of the working threads with insufficient IO performance resources can be increased, so that the technical problem that the IO requests of the working threads in the related art are difficult to manually adjust according to the rapidness is solved.
The step S400, reducing allocated IO performance resources of the working thread with excessive IO performance resources and/or increasing allocated IO performance resources of the working thread with insufficient IO performance resources, includes:
s410, reducing allocated IO performance resources of the working thread with excessive IO performance resources to correspond to the actual use requirements;
s420, based on the unassigned IO performance resources of the storage side, increasing the assigned IO performance resources of the working threads with too few IO performance resources.
The setting is that the excessive IO performance resources are released by adjusting the excessive IO performance resources of the working threads, and then the excessive IO performance resources are changed into unallocated IO performance resources of the storage side, and then the IO performance resources are increased and allocated to the working threads with the excessively low IO performance resources according to the unallocated IO performance resources of the current storage side.
Further, in an embodiment, step S420 increases the IO performance resources allocated to the working thread with too few IO performance resources based on the IO performance resources not allocated to the storage side,
and according to the set priority among the plurality of working threads, firstly distributing the unallocated IO performance resources of the storage side to the working thread with higher priority until the actual use requirement of the working thread is met.
In this way, when there are a plurality of worker threads with too few IO performance resources, the IO performance resources not allocated on the storage side can be allocated according to the priority set in advance or temporarily. Specifically, firstly, the unallocated IO performance resources of the storage side are allocated to the working thread with higher priority, and after the storage side meets the actual use requirement, the remaining IO performance resources are allocated to the working thread with the next priority.
Further, in another embodiment, in the step S420, based on the IO performance resources not allocated on the storage side, the allocation proportion of the worker threads with too few allocated IO performance resources is increased,
and distributing the IO performance resources which are not distributed on the storage side among the working threads with too few IO performance resources according to the distribution weights among the set plurality of working threads.
In this way, when there are a plurality of worker threads with too few IO performance resources, the IO performance resources not allocated on the storage side can be allocated according to the allocation weights set in advance or temporarily. Specifically, the unallocated IO performance resources of the storage side are simultaneously allocated to a plurality of working threads with too few IO performance resources according to allocation weights.
Further, in an embodiment, in the step S300, it is determined whether the IO performance resources allocated to each working thread are too many or too few,
if the actual use requirements acquired by the working thread for single time or multiple times are lower than the set proportion of the allocated IO performance resources, determining that the IO performance resources allocated by the working thread are excessive;
specifically, in this embodiment, it is preferable that if the actual usage requirement of the work thread obtained for 4 consecutive times is lower than 80% of the allocated IO performance resources, that is, there is a waste of 20% of the allocated IO resource performance, and then it is determined that the allocated IO performance resources of the work thread are too many.
If the actual use requirements obtained by the working thread are higher than the allocated IO performance resources, determining that the allocated IO performance resources of the working thread are too few.
Specifically, for a working thread with actual use requirement higher than the allocated IO performance resources, the embodiment directly determines that the allocated IO performance resources are too few, thereby ensuring that the allocated IO performance resources of the working thread can be adjusted quickly and being beneficial to data transmission in actual use.
Further, in an embodiment, in the step S400, in the allocated IO performance resources of the working thread with too many IO performance resources and/or the allocated IO performance resources of the working thread with too few IO performance resources are reduced and/or the allocated IO performance resources of the working thread with too few IO performance resources are increased,
s410, reducing the IO performance resources of the set proportion of the working threads with excessive IO performance resources;
in this embodiment, after determining that the allocated IO performance resources of the working thread are too many by facilitating the setting of the ratio, the IO performance resources of the setting ratio are further reduced for the working thread with too many allocated IO performance resources, so as to gradually reduce the IO performance resources allocated by the working thread, and finally make the IO performance resources approach to the actual use requirements of the working thread.
S420, based on the unassigned IO performance resources of the storage side, increasing the assigned IO performance resources of the working threads with too few IO performance resources.
Further, in an embodiment, the method for adjusting the disk performance of the virtual machine based on the SPDK further includes the following steps:
s500, if the working thread is newly added, the IO performance resources are allocated to the newly added working thread layer based on the unassigned IO performance resources at the storage side.
By the arrangement, when the work thread is newly added, IO performance resources are allocated from the unallocated IO performance resources of the storage side, the subsequent periodic judgment process is participated, and dynamic adjustment of the IO performance resources together with other work threads is realized.
In a second aspect, an embodiment of the present application further provides an SPDK-based virtual machine disk performance adjustment apparatus.
In an embodiment, referring to fig. 2, fig. 2 is a schematic functional block diagram of an embodiment of a virtual machine disk performance adjustment device based on SPDK in the present application. As shown in fig. 2, the SPDK-based virtual machine disk performance adjustment apparatus includes:
the acquisition module is configured to acquire the maximum IO performance resource of the storage side; wherein the IO performance resources comprise bandwidth, bps, wbps and rbps;
the allocation module is configured to allocate IO performance resources to a plurality of working threads for processing IO requests according to the maximum IO performance resources and the set initial allocation proportion; periodically acquiring actual use requirements of each working thread on IO performance resources, and judging whether the IO performance resources allocated to each working thread are too many or too few according to the actual use requirements; the allocated IO performance resources of the working threads with excessive IO performance resources are reduced, and the allocated IO performance resources of the working threads with insufficient IO performance resources are increased.
Further, in an embodiment, the allocating module when reducing the allocated IO performance resources of the working thread with too many IO performance resources and/or increasing the allocated IO performance resources of the working thread with too few IO performance resources includes:
reducing allocated IO performance resources of the working thread with excessive IO performance resources to correspond to the actual use requirements;
and increasing the IO performance resources allocated to the working threads with too few IO performance resources based on the unassigned IO performance resources of the storage side.
Further, in an embodiment, the allocation module increases, based on the IO performance resources not allocated on the storage side, the IO performance resources allocated to the working threads with too few IO performance resources, and allocates, according to the set priorities among the multiple working threads, the IO performance resources not allocated on the storage side to the working threads with higher priorities first to meet the actual use requirement of the working threads.
Further, in an embodiment, the allocation module increases the allocation proportion of the work threads with too few allocated IO performance resources based on the IO performance resources not allocated on the storage side,
and distributing the IO performance resources which are not distributed on the storage side among the working threads with too few IO performance resources according to the distribution weights among the set plurality of working threads.
Further, in an embodiment, the allocation module determines whether the IO performance resources allocated to each worker thread are too many or too few,
if the actual use requirements acquired by the working thread for single time or multiple times are lower than the set proportion of the allocated IO performance resources, determining that the IO performance resources allocated by the working thread are excessive;
if the actual use requirements obtained by the working thread are higher than the allocated IO performance resources, determining that the allocated IO performance resources of the working thread are too few.
Further, in an embodiment, the allocation module is configured to allocate IO performance resources in a work thread with too many IO performance resources being reduced and/or in a work thread with too few IO performance resources being increased,
reducing the IO performance resources of the set proportion of the working threads with excessive IO performance resources;
and increasing the IO performance resources allocated to the working threads with too few IO performance resources based on the unassigned IO performance resources of the storage side.
Further, in an embodiment, the allocation module is further configured to:
and if the working thread is newly added, the IO performance resources are allocated to the newly added working thread layer based on the IO performance resources which are not allocated by the storage side.
The function implementation of each module in the virtual machine disk performance adjustment device based on the SPDK corresponds to each step in the virtual machine disk performance adjustment method embodiment based on the SPDK, and the function and implementation process thereof are not described in detail herein.
In a third aspect, an embodiment of the present application provides an SPDK-based virtual machine disk performance adjustment apparatus, which may be a device having a data processing function, such as a personal computer (personal computer, PC), a notebook computer, or a server.
Referring to fig. 3, fig. 3 is a schematic hardware structure of an SPDK-based virtual machine disk performance adjustment apparatus according to the embodiment of the present application. In the embodiment of the application, the virtual machine disk performance adjustment device based on the SPDK may include a processor, a memory, a communication interface, and a communication bus.
The communication bus may be of any type for implementing the processor, memory, and communication interface interconnections.
The communication interfaces include input/output (I/O) interfaces, physical interfaces, logical interfaces, and the like for implementing device interconnection inside the SPDK-based virtual machine disk performance adjustment apparatus, and interfaces for implementing interconnection of the SPDK-based virtual machine disk performance adjustment apparatus with other apparatuses (e.g., other computing apparatuses or user apparatuses). The physical interface may be an ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device may be a Display, a Keyboard (Keyboard), or the like.
The memory may be various types of storage media such as random access memory (randomaccess memory, RAM), read-only memory (ROM), nonvolatile RAM (non-volatileRAM, NVRAM), flash memory, optical memory, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (electrically erasable PROM, EEPROM), and the like.
The processor may be a general-purpose processor, and the general-purpose processor may call the SPDK-based virtual machine disk performance adjustment program stored in the memory, and execute the SPDK-based virtual machine disk performance adjustment method provided in the embodiments of the present application. For example, the general purpose processor may be a central processing unit (central processing unit, CPU). The method executed when the SPDK-based virtual machine disk performance adjustment program is called may refer to various embodiments of the SPDK-based virtual machine disk performance adjustment method of the present application, which are not described herein.
Those skilled in the art will appreciate that the hardware configuration shown in fig. 3 is not limiting of the application and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
In a fourth aspect, embodiments of the present application further provide a memory.
The memory of the application stores an SPDK-based virtual machine disk performance adjustment program, wherein when the SPDK-based virtual machine disk performance adjustment program is executed by a processor, the steps of the SPDK-based virtual machine disk performance adjustment method are realized.
The method implemented when the SPDK-based virtual machine disk performance adjustment program is executed may refer to various embodiments of the SPDK-based virtual machine disk performance adjustment method of the present application, which are not described herein.
It should be noted that, the foregoing embodiment numbers are merely for describing the embodiments, and do not represent the advantages and disadvantages of the embodiments.
The terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the foregoing drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. The terms "first," "second," and "third," etc. are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order, and are not limited to the fact that "first," "second," and "third" are not identical.
In the description of embodiments of the present application, "exemplary," "such as," or "for example," etc., are used to indicate an example, instance, or illustration. Any embodiment or design described herein as "exemplary," "such as" or "for example" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "such as" or "for example," etc., is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; the text "and/or" is merely an association relation describing the associated object, and indicates that three relations may exist, for example, a and/or B may indicate: the three cases where a exists alone, a and B exist together, and B exists alone, and in addition, in the description of the embodiments of the present application, "plural" means two or more than two.
In some of the processes described in the embodiments of the present application, a plurality of operations or steps occurring in a particular order are included, but it should be understood that these operations or steps may be performed out of the order in which they occur in the embodiments of the present application or in parallel, the sequence numbers of the operations merely serve to distinguish between the various operations, and the sequence numbers themselves do not represent any order of execution. In addition, the processes may include more or fewer operations, and the operations or steps may be performed in sequence or in parallel, and the operations or steps may be combined.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising several instructions for causing a terminal device to perform the method described in the various embodiments of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (10)

1. The method for adjusting the disk performance of the virtual machine based on the SPDK is characterized by comprising the following steps of:
obtaining the maximum IO performance resource of the storage side; wherein the IO performance resources comprise bandwidth, bps, wbps and rbps;
according to the maximum IO performance resource and the set initial allocation proportion, IO performance resource allocation is carried out on a plurality of working threads for processing IO requests;
periodically acquiring actual use requirements of each working thread on IO performance resources, and judging whether the IO performance resources allocated to each working thread are too many or too few according to the actual use requirements;
the distributed IO performance resources of the working threads with excessive IO performance resources are reduced, and/or the distributed IO performance resources of the working threads with insufficient IO performance resources are increased.
2. The SPDK-based virtual machine disk performance adjustment method as set forth in claim 1, wherein the reducing IO performance resources of the excessive IO performance resource worker threads and/or increasing IO performance resources of the excessive IO performance resource worker threads comprises:
reducing allocated IO performance resources of the working thread with excessive IO performance resources to correspond to the actual use requirements;
and increasing the IO performance resources allocated to the working threads with too few IO performance resources based on the unassigned IO performance resources of the storage side.
3. The method for adjusting disk performance of an SPDK-based virtual machine according to claim 2, wherein the increasing IO performance resources of a work thread with too few IO performance resources is performed based on the IO performance resources not allocated on the storage side,
and according to the set priority among the plurality of working threads, firstly distributing the unallocated IO performance resources of the storage side to the working thread with higher priority until the actual use requirement of the working thread is met.
4. The method for adjusting disk performance of an SPDK-based virtual machine according to claim 2, wherein the allocation ratio of the work thread with too few allocated IO performance resources is increased based on the IO performance resources not allocated on the storage side,
and distributing the IO performance resources which are not distributed on the storage side among the working threads with too few IO performance resources according to the distribution weights among the set plurality of working threads.
5. The method for adjusting disk performance of an SPDK-based virtual machine as recited in claim 1, wherein said determining whether IO performance resources allocated to each worker thread are excessive or insufficient,
if the actual use requirements acquired by the working thread for single time or multiple times are lower than the set proportion of the allocated IO performance resources, determining that the IO performance resources allocated by the working thread are excessive;
if the actual use requirements obtained by the working thread are higher than the allocated IO performance resources, determining that the allocated IO performance resources of the working thread are too few.
6. The method for adjusting disk performance of an SPDK-based virtual machine according to claim 5, wherein in the allocated IO performance resources of the work threads with too many IO performance resources and/or the allocated IO performance resources of the work threads with too few IO performance resources,
reducing the IO performance resources of the set proportion of the working threads with excessive IO performance resources;
and increasing the IO performance resources allocated to the working threads with too few IO performance resources based on the unassigned IO performance resources of the storage side.
7. The method for adjusting the disk performance of the virtual machine based on the SPDK according to claim 1, wherein the method for adjusting the disk performance of the virtual machine based on the SPDK further comprises the steps of:
and if the working thread is newly added, the IO performance resources are allocated to the newly added working thread layer based on the IO performance resources which are not allocated by the storage side.
8. The utility model provides a virtual machine disk performance adjusting device based on SPDK which characterized in that, virtual machine disk performance adjusting device based on SPDK includes:
the acquisition module is configured to acquire the maximum IO performance resource of the storage side; wherein the IO performance resources comprise bandwidth, bps, wbps and rbps;
the allocation module is configured to allocate IO performance resources to a plurality of working threads for processing IO requests according to the maximum IO performance resources and the set initial allocation proportion; periodically acquiring actual use requirements of each working thread on IO performance resources, and judging whether the IO performance resources allocated to each working thread are too many or too few according to the actual use requirements; the allocated IO performance resources of the working threads with excessive IO performance resources are reduced, and the allocated IO performance resources of the working threads with insufficient IO performance resources are increased.
9. An SPDK-based virtual machine disk performance adjustment apparatus, comprising a processor, a memory, and an SPDK-based virtual machine disk performance adjustment program stored on the memory and executable by the processor, wherein the SPDK-based virtual machine disk performance adjustment program, when executed by the processor, implements the steps of the SPDK-based virtual machine disk performance adjustment method according to any one of claims 1 to 7.
10. A memory, wherein the memory has stored thereon an SPDK-based virtual machine disk performance adjustment program, wherein the SPDK-based virtual machine disk performance adjustment program, when executed by a processor, implements the steps of the SPDK-based virtual machine disk performance adjustment method according to any one of claims 1-7.
CN202311693313.5A 2023-12-08 2023-12-08 SPDK-based virtual machine disk performance adjustment method, device, equipment and memory Pending CN117519604A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311693313.5A CN117519604A (en) 2023-12-08 2023-12-08 SPDK-based virtual machine disk performance adjustment method, device, equipment and memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311693313.5A CN117519604A (en) 2023-12-08 2023-12-08 SPDK-based virtual machine disk performance adjustment method, device, equipment and memory

Publications (1)

Publication Number Publication Date
CN117519604A true CN117519604A (en) 2024-02-06

Family

ID=89745693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311693313.5A Pending CN117519604A (en) 2023-12-08 2023-12-08 SPDK-based virtual machine disk performance adjustment method, device, equipment and memory

Country Status (1)

Country Link
CN (1) CN117519604A (en)

Similar Documents

Publication Publication Date Title
US11194626B2 (en) Dynamic resource allocation based on data transferring to a tiered storage
CN108701059B (en) Multi-tenant resource allocation method and system
US7266823B2 (en) Apparatus and method of dynamically repartitioning a computer system in response to partition workloads
EP1607863A2 (en) System and method for memory allocation
KR101651871B1 (en) Job Allocation Method on Multi-core System and Apparatus thereof
EP1970805A1 (en) Multi-objective allocation of computational jobs in client-server or hosting environments
WO2022247105A1 (en) Task scheduling method and apparatus, computer device and storage medium
JP2013515991A (en) Method, information processing system, and computer program for dynamically managing accelerator resources
WO2001023974A2 (en) Workload management in a computing environment
CN104598298A (en) Virtual machine dispatching algorithm based on task load and current work property of virtual machine
US10733022B2 (en) Method of managing dedicated processing resources, server system and computer program product
CN117170882B (en) Resource allocation method and device, electronic equipment and storage medium
KR102045125B1 (en) Resource assignment method using Continuous Double Auction protocol in distributed processing environment, recording medium and distributed processing device applying the same
CN115705247A (en) Process running method and related equipment
CN115640113A (en) Multi-plane flexible scheduling method
JP4121525B2 (en) Method and computer system for controlling resource utilization
US20140245300A1 (en) Dynamically Balanced Credit for Virtual Functions in Single Root Input/Output Virtualization
CN117519604A (en) SPDK-based virtual machine disk performance adjustment method, device, equipment and memory
CN116302327A (en) Resource scheduling method and related equipment
JP6732693B2 (en) Resource allocation control system, resource allocation control method, and program
CN115098269A (en) Resource allocation method, device, electronic equipment and storage medium
CN114675973A (en) Resource management method, device, storage medium, and program product
CN107153578B (en) Method and device for improving CPU utilization rate
CN114281516A (en) Resource allocation method and device based on NUMA attribute
KR102419015B1 (en) Interrupt distribution method for numa-based devices, recording medium storing program for executing the same, and recording medium storing program for executing the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination