CN114020406A - Method, device and system for accelerating I/O of virtual machine by cloud platform - Google Patents
Method, device and system for accelerating I/O of virtual machine by cloud platform Download PDFInfo
- Publication number
- CN114020406A CN114020406A CN202111264278.6A CN202111264278A CN114020406A CN 114020406 A CN114020406 A CN 114020406A CN 202111264278 A CN202111264278 A CN 202111264278A CN 114020406 A CN114020406 A CN 114020406A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- user
- controller
- target volume
- protocol
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 230000001133 acceleration Effects 0.000 claims abstract description 13
- 230000008569 process Effects 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 11
- 230000009286 beneficial effect Effects 0.000 abstract description 5
- 238000005516 engineering process Methods 0.000 description 10
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 239000003818 cinder Substances 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0658—Controller construction arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0665—Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45579—I/O management, e.g. providing access to device drivers or storage
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45583—Memory management, e.g. access or allocation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
The invention discloses a method, a device and a system for accelerating I/O of a virtual machine by a cloud platform and a computer readable storage medium, wherein the method comprises the steps of pre-creating the virtual machine sharing a large-page memory and acquiring a protocol and connection information of a target volume; sending a request for creating a controller to an SPDK (session description language) ghost-user service on a host corresponding to the virtual machine so as to create a ghost-user-scsi controller; enabling the SPDKbdve to take over the target volume according to the protocol and the connection information of the target volume, and adding the SPDK bdve to the vhost-user-scsi controller; associating the virtual machine with the vsost-user-scsi controller so that the QUME in the virtual machine performs an acceleration operation on the target volume by calling the vsost-user-scsi controller; the invention is beneficial to improving the acceleration efficiency and the system performance.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device and a system for accelerating I/O of a virtual machine by a cloud platform and a computer readable storage medium.
Background
On a cloud platform operating system, a user can conveniently create a cloud hard disk through a finder service and mount the cloud hard disk to a cloud host for use, Virtio is a current universal semi-virtualization scheme and can be used for accelerating I/O of a virtual machine, Virtio provides a communication universal interface for the front end and the rear end of a Guest kernel, and the front end of the Guest kernel and the rear end of the Guest kernel can carry out data transmission through Virtioes in the Virtio. Firstly, the front end of the Guest kernel writes data into Virtqueues of Virtio, then QEMU calls a system interface after acquiring the data from the Virtqueues and writes the data into a kernel state, then QEMU is used as the rear end of the Guest kernel to read and write equipment according to the data, and the front end of the Guest kernel is informed after the reading and writing are finished.
With the development of the technology, the Hypervisor gradually introduced the Vhost-user technology, which can make the back end of the Guest kernel directly interact with the front end of the Guest kernel through Virtqueue, reduce the repeated copying of data from the user state to the kernel state, and reduce vm _ exit by the polling mode of the Vhost-user. The Vhost-user technology can enable the back end of the Guest kernel to be in a user state, and the flexibility of back end program development is improved while the downtime probability is reduced. The back-end programs of the Guest kernel which are widely applied at present are dpdk, spdk and the like, and the programs can improve the performance of the network and the I/O by several times.
However, since the Vhost-user technology requires certain preconditions and limiting factors, for example, a virtual machine needs to use a large page of memory completely, one or more CPUs need to be monopolized, and remote disks of multiple protocols cannot be automatically docked, the Vhost-user technology cannot be applied to the OpenStack cloud platform at present.
In view of this, how to implement application of the Vhost-user technology to the OpenStack cloud platform to accelerate virtual machine I/O becomes a problem to be solved by those skilled in the art.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a system, and a computer-readable storage medium for accelerating I/O of a virtual machine on a cloud platform, which can implement application of a Vhost-user technology to an OpenStack cloud platform to accelerate I/O of the virtual machine during use, and are beneficial to improvement of acceleration efficiency and system performance.
In order to solve the above technical problem, an embodiment of the present invention provides a method for accelerating I/O of a virtual machine on a cloud platform, including:
pre-creating a virtual machine sharing a large-page memory, and acquiring a protocol and connection information of a target volume;
sending a request for creating a controller to an SPDK (session description language) ghost-user service on a host machine corresponding to the virtual machine so as to create a ghost-user-scsi controller;
enabling an SPDK bdve to take over the target volume according to the protocol and the connection information of the target volume, and adding the SPDK bdve to the vhost-user-scsi controller;
associating the virtual machine with the vsost-user-scsi controller so that the QUME in the virtual machine performs accelerated operation on the target volume by calling the vsost-user-scsi controller.
Optionally, the process of acquiring the protocol and connection information of the target volume is as follows:
calling a Nova mount volume interface according to the mount volume request;
sending an REST API request to the renderer through the Nova mounted volume interface so that the renderer can acquire a protocol and connection information of a target volume according to the REST API request;
and receiving the protocol and connection information of the target volume through the Nova mounted volume interface.
Optionally, the sending a request for creating a controller to the SPDK ghost-user service on the host corresponding to the virtual machine, where a process of creating the ghost-user-scsi controller is as follows:
checking metadata of a virtual machine through Nova, judging whether the virtual machine sharing a large-page memory exists, and if so, sending a connection volume request to cyborg through Nova; the connection volume request comprises the protocol and connection information of the target volume;
and judging whether a vhost-user-scsi controller corresponding to the virtual machine exists or not through the cyborg, and if not, sending a request for creating the controller to an SPDK vhost-user service on a host corresponding to the virtual machine so as to create the vhost-user-scsi controller.
Optionally, the associating the virtual machine with the host-user-sci controller so that the process of the QUME in the virtual machine to perform the acceleration operation on the target volume by calling the host-user-sci controller is as follows:
and acquiring path information of the vhost-user-scsi controller, and returning the path information to the Nova through the cyborg, so that the Nova outputs Libvirt xml through the vhost-user-scsi controller according to the path information to call QUME to perform acceleration operation on the target volume in the virtual machine.
Optionally, the creating of the ghost-user-scsi controller is:
the ghost-user-scsi controller is created by the ghost _ create _ scsi _ controller command.
Optionally, the protocol is one oF an iSCSI protocol, an rbd protocol, and an NVMe-oF protocol.
The embodiment of the invention also provides a device for accelerating the I/O of the virtual machine by the cloud platform, which comprises the following steps:
the creating module is used for creating a virtual machine sharing a large-page memory in advance;
the acquisition module is used for acquiring the protocol and the connection information of the target volume;
a sending module, configured to send a request for creating a controller to an SPDK ghost-user service on a host corresponding to the virtual machine, so as to create a ghost-user-scii controller;
the control module is used for enabling the SPDK bdve to take over the target volume according to the protocol and the connection information of the target volume and adding the SPDK bdve to the vhost-user-sci controller;
and the association module is used for associating the virtual machine with the vsost-user-scsi controller so that the QUME in the virtual machine can accelerate the target volume by calling the vsost-user-scsi controller.
Optionally, the obtaining module includes:
the calling unit is used for calling a Nova mounting volume interface according to the mounting volume request;
the sending unit is used for sending an REST API request to the renderer through the Nova mounted volume interface so that the renderer can acquire the protocol and the connection information of the target volume according to the REST API request;
and the receiving unit is used for receiving the protocol and the connection information of the target volume through the Nova mounted volume interface.
The embodiment of the invention also provides a system for accelerating the I/O of the virtual machine by the cloud platform, which comprises the following steps:
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for accelerating the I/O of the virtual machine by the cloud platform when the computer program is executed.
The embodiment of the invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for accelerating the I/O of the virtual machine by the cloud platform are realized.
The embodiment of the invention provides a method, a device and a system for accelerating I/O of a virtual machine by a cloud platform and a computer readable storage medium, wherein the method comprises the following steps: pre-creating a virtual machine sharing a large-page memory, and acquiring a protocol and connection information of a target volume; sending a request for creating a controller to an SPDK (session description language) ghost-user service on a host corresponding to the virtual machine so as to create a ghost-user-scsi controller; enabling the SPDK bdve to take over the target volume according to the protocol and the connection information of the target volume, and adding the SPDK bdve to the vhost-user-scsi controller; the virtual machine is associated with the vsost-user-scsi controller so that the QUME within the virtual machine operates to speed up the target volume by calling the vsost-user-scsi controller.
It can be seen that, in the embodiment of the present invention, a virtual machine sharing a large page memory is created in advance, a protocol and connection information of a target volume are obtained, then a vsast-user-sci controller is created on an SPDK vsost-user service on a host corresponding to the virtual machine, the SPDK bdve is made to take over the target volume, then the SPDK bdve is added to the vsast-user-sci controller, so as to bind the target volume with the vsast-user-sci controller, and then the virtual machine is associated with the vsast-user-sci controller, so that the target volume can be accelerated by calling the vsast-user-sci controller through a QUME in the virtual machine; the method and the device can realize that the Vhost-user technology is applied to the OpenStack cloud platform to accelerate the I/O of the virtual machine, and are beneficial to improving the acceleration efficiency and the system performance.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for accelerating I/O of a virtual machine by a cloud platform according to an embodiment of the present invention;
fig. 2 is a schematic diagram of another method for accelerating I/O of a virtual machine by a cloud platform according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for accelerating I/O of a virtual machine by a cloud platform according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a device and a system for accelerating I/O of a virtual machine by a cloud platform and a computer readable storage medium, wherein the Vhost-user technology can be applied to an OpenStack cloud platform to accelerate the I/O of the virtual machine in the using process, and the acceleration efficiency and the system performance are favorably improved.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for accelerating I/O of a virtual machine by a cloud platform according to an embodiment of the present invention. The method comprises the following steps:
s110: pre-creating a virtual machine sharing a large-page memory, and acquiring a protocol and connection information of a target volume;
it should be noted that, in the embodiment of the present invention, computer nodes are all deployed with an SPDK host-user service that is installed and started, and a cloud platform may create a virtual machine sharing a large-page memory when receiving a virtual machine creation instruction, specifically, may create a virtual machine sharing a large-page memory through a Nova interface (for example, the process in fig. 2), and a host user driver shares the large-page memory, so that a host device may directly locate the shared large-page memory, and reduce data copying from a user state to a kernel state.
Specifically, after the virtual machine is successfully created, the virtual machine information may also be obtained through an interface of Nova (as shown in fig. 2, a process), where the virtual machine information may include a virtual machine name, a virtual machine ID, user information, hardware information, network card information, state information, attribute information (for example, whether the virtual machine is a shared large-page memory), and the like.
It should be noted that, in the embodiment of the present invention, a process of acquiring the protocol and connection information of the target volume may specifically be:
calling a Nova mount volume interface according to the mount volume request;
sending an REST API request to the renderer through a Nova mount volume interface so that the renderer can obtain a protocol and connection information of the target volume according to the REST API request;
and receiving the protocol and connection information of the target volume through the Nova mounted volume interface.
Specifically, the cloud platform according to the embodiment of the present invention may call the Nova mount volume interface according to the mount volume request when receiving the mount volume request, the REST API request is sent to circle through circle (process (c) in figure 2), wherein the mount volume request may include a target volume ID and may further include an identifier, wherein the identifier may indicate whether acceleration of the target volume is required, and may, upon identifying from the representation that acceleration of the target volume is required, call the Nova mount volume interface, and transmits a REST API request to the circle through the circle, wherein the REST API request comprises the ID of the target volume, after the circle receives the REST API request, the render API requests the driver corresponding to the target volume ID to obtain the protocol and connection information of the target volume according to the REST API (see procedure r in fig. 2), the protocol and connection information for the target volume is then returned to Nova through the render API (e.g., # process in fig. 2). The protocol in the embodiment oF the present invention may be, but is not limited to, one oF an iSCSI protocol, an rbd protocol, and an NVMe-af protocol.
S120: sending a request for creating a controller to an SPDK (session description language) ghost-user service on a host corresponding to the virtual machine so as to create a ghost-user-scsi controller;
it should be noted that, in the embodiment of the present invention, after acquiring the protocol and connection information of the target volume, a request for creating a controller may be sent to the SPDK ghost-user service on the host corresponding to the virtual machine, specifically, before sending the request for creating the controller to the SPDK ghost-user service on the host corresponding to the virtual machine, it may also be determined whether there is a ghost-user-scii controller corresponding to the virtual machine sharing more than the memory, and if not, the request for creating the controller may be sent to the SPDK ghost-user service on the host corresponding to the virtual machine, so as to create a ghost-user-scii controller (also called ghost-user-scii-controller).
Specifically, the process may be:
checking metadata of the virtual machine through Nova, judging whether the virtual machine sharing the large-page memory exists, and if so, sending a volume connection request to cyborg through Nova; the connection volume request comprises a protocol and connection information of the target volume;
and judging whether a vhost-user-scsi controller corresponding to the virtual machine exists or not through the cyborg, and if not, sending a request for creating the controller to the SPDK vhost-user service on the host corresponding to the virtual machine so as to create the vhost-user-scsi controller.
That is, firstly for Nova, Nova does not know whether a virtual machine sharing a larger memory is already established, so after Nova receives a protocol and connection information of a target volume, the Nova can detect virtual machine metadata (or a virtual machine metadata base), of course, after a virtual machine sharing a larger memory is established in advance and successfully created, the virtual machine metadata is recorded, that is, the virtual machine information is recorded, specifically, the virtual machine metadata base can be recorded, when Nova determines that a virtual machine sharing a large page memory exists by detecting the virtual machine metadata, the Nova sends a connection volume request to cyborg (like a seventh process in fig. 2), and then the cyborg determines whether a vhost-user-si controller corresponding to the virtual machine sharing the large page memory exists on a host corresponding to the virtual machine after receiving the connection volume request, when the command does not exist, a request for creating the controller may be sent to the SPDK ghost-user service on the virtual machine sharing the large page memory (for example, the (procedure) in fig. 2), the cyborg may specifically send the request for creating the controller through json _ rpc, and the SPDK ghost-user service may create the ghost-user-scsi controller through a ghost _ create _ scsi _ controller command after receiving the request for creating the controller.
S130: enabling the SPDK bdve to take over the target volume according to the protocol and the connection information of the target volume, and adding the SPDK bdve to the vhost-user-scsi controller;
specifically, after the vhost-user-scsi controller is created, the target volume may be taken over by the SPDK bdve through the protocol and connection information of the target volume, and then the SPDK bdve may be added to the corresponding vhost-user-scsi controller through vhost _ create _ scsi _ controller _ add _ target.
S140: the virtual machine is associated with the vsost-user-scsi controller so that the QUME within the virtual machine operates to speed up the target volume by calling the vsost-user-scsi controller.
Specifically, in the embodiment of the present invention, after the vsost-user-sci controller is created, path information of the vsost-user-sci controller may be obtained through cyborg (e.g., ninu process in fig. 2), and the path information is returned to Nova (e.g., r process in fig. 2) through cyborg, so that Nova outputs Libvirt xml through the vsost-user-sci controller according to the path information to call the QUME to perform acceleration operation on the target volume in the virtual machine.
According to the invention, when the cloud platform is used for linearly mounting the cloud hard disk (namely mounting the volume), the user can perform I/O acceleration on the virtual machine with the shared large-page memory through the SPDK vhost-user service on the remote disk with the common protocol by expanding the Cinder, Nova and Cyborg interfaces, and the creation of the vhost-sci-controller and the SPDK bdev is realized through the original mounting volume interface of Nova and the automation of the self-developed Cyborg driver, so that the user can use the vhost-user to accelerate the I/O of the virtual machine.
It can be seen that, in the embodiment of the present invention, a virtual machine sharing a large page memory is created in advance, a protocol and connection information of a target volume are obtained, then a vsast-user-sci controller is created on an SPDK vsost-user service on a host corresponding to the virtual machine, the SPDK bdve is made to take over the target volume, then the SPDK bdve is added to the vsast-user-sci controller, so as to bind the target volume with the vsast-user-sci controller, and then the virtual machine is associated with the vsast-user-sci controller, so that the target volume can be accelerated by calling the vsast-user-sci controller through a QUME in the virtual machine; the method and the device can realize that the Vhost-user technology is applied to the OpenStack cloud platform to accelerate the I/O of the virtual machine, and are beneficial to improving the acceleration efficiency and the system performance.
On the basis of the foregoing embodiment, an embodiment of the present invention further provides a device for accelerating I/O of a virtual machine on a cloud platform, and specifically refer to fig. 3, the device includes:
a creating module 21, configured to create a virtual machine sharing a large-page memory in advance;
an obtaining module 22, configured to obtain a protocol and connection information of a target volume;
a sending module 23, configured to send a request for creating a controller to an SPDK ghost-user service on a host corresponding to a virtual machine, so as to create a ghost-user-scii controller;
the control module 24 is configured to enable the SPDK bdve to take over the target volume according to the protocol and the connection information of the target volume, and add the SPDK bdve to the vhost-user-sci controller;
and the association module 25 is used for associating the virtual machine with the vsost-user-scsi controller, so that the QUME in the virtual machine can accelerate the target volume by calling the vsost-user-scsi controller.
Further, the obtaining module 22 includes:
the calling unit is used for calling a Nova mounting volume interface according to the mounting volume request;
the sending unit is used for sending the REST API request to the renderer through the Nova mounted volume interface so that the renderer can obtain the protocol and the connection information of the target volume according to the REST API request;
and the receiving unit is used for receiving the protocol and the connection information of the target volume through the Nova mounted volume interface.
It should be noted that the method for accelerating I/O of a virtual machine by a cloud platform in the embodiment of the present invention has the same beneficial effects as the method for accelerating I/O of a virtual machine by a cloud platform provided in the foregoing embodiment, and for specific description of the method for accelerating I/O of a virtual machine by a cloud platform in the embodiment of the present invention, reference is made to the foregoing embodiment, and details of the present invention are not repeated herein.
On the basis of the above embodiments, an embodiment of the present invention further provides a system for accelerating I/O of a virtual machine by a cloud platform, where the system includes:
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for accelerating the I/O of the virtual machine by the cloud platform when executing the computer program.
For example, the processor in the embodiment of the present invention may be specifically configured to implement pre-creating a virtual machine sharing a large-page memory, and obtain a protocol and connection information of a target volume; sending a request for creating a controller to an SPDK (session description language) ghost-user service on a host corresponding to the virtual machine so as to create a ghost-user-scsi controller; enabling the SPDK bdve to take over the target volume according to the protocol and the connection information of the target volume, and adding the SPDK bdve to the vhost-user-scsi controller; the virtual machine is associated with the vsost-user-scsi controller so that the QUME within the virtual machine operates to speed up the target volume by calling the vsost-user-scsi controller.
On the basis of the foregoing embodiments, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for accelerating I/O of a virtual machine according to the foregoing cloud platform.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A method for accelerating I/O of a virtual machine by a cloud platform is characterized by comprising the following steps:
pre-creating a virtual machine sharing a large-page memory, and acquiring a protocol and connection information of a target volume;
sending a request for creating a controller to an SPDK (session description language) ghost-user service on a host machine corresponding to the virtual machine so as to create a ghost-user-scsi controller;
enabling an SPDK bdve to take over the target volume according to the protocol and the connection information of the target volume, and adding the SPDK bdve to the vhost-user-scsi controller;
associating the virtual machine with the vsost-user-scsi controller so that the QUME in the virtual machine performs accelerated operation on the target volume by calling the vsost-user-scsi controller.
2. The method for accelerating I/O of a virtual machine by a cloud platform according to claim 1, wherein the process of acquiring the protocol and connection information of the target volume is as follows:
calling a Nova mount volume interface according to the mount volume request;
sending an REST API request to the renderer through the Nova mounted volume interface so that the renderer can acquire a protocol and connection information of a target volume according to the REST API request;
and receiving the protocol and connection information of the target volume through the Nova mounted volume interface.
3. The method for accelerating I/O of a virtual machine by the cloud platform according to claim 2, wherein the step of sending a request for creating a controller to the SPDK vhost-user service on the host corresponding to the virtual machine to create the vhost-user-scsi controller comprises:
checking metadata of a virtual machine through Nova, judging whether the virtual machine sharing a large-page memory exists, and if so, sending a connection volume request to cyborg through Nova; the connection volume request comprises the protocol and connection information of the target volume;
and judging whether a vhost-user-scsi controller corresponding to the virtual machine exists or not through the cyborg, and if not, sending a request for creating the controller to an SPDK vhost-user service on a host corresponding to the virtual machine so as to create the vhost-user-scsi controller.
4. The method for accelerating I/O of a virtual machine by a cloud platform according to claim 3, wherein the process of associating the virtual machine with the vhost-user-sci controller so that QUME in the virtual machine accelerates the target volume by calling the vhost-user-sci controller is as follows:
and acquiring path information of the vhost-user-scsi controller, and returning the path information to the Nova through the cyborg, so that the Nova outputs Libvirt xml through the vhost-user-scsi controller according to the path information to call QUME to perform acceleration operation on the target volume in the virtual machine.
5. The method for accelerating I/O of a virtual machine by a cloud platform according to claim 3, wherein the creating of a ghost-user-scsi controller is:
the ghost-user-scsi controller is created by the ghost _ create _ scsi _ controller command.
6. The method for accelerating I/O oF a virtual machine by a cloud platform as recited in claim 1, wherein the protocol is one oF iSCSI protocol, rbd protocol and NVMe-oF protocol.
7. An apparatus for accelerating I/O of a virtual machine by a cloud platform, comprising:
the creating module is used for creating a virtual machine sharing a large-page memory in advance;
the acquisition module is used for acquiring the protocol and the connection information of the target volume;
a sending module, configured to send a request for creating a controller to an SPDK ghost-user service on a host corresponding to the virtual machine, so as to create a ghost-user-scii controller;
the control module is used for enabling the SPDK bdve to take over the target volume according to the protocol and the connection information of the target volume and adding the SPDK bdve to the vhost-user-sci controller;
and the association module is used for associating the virtual machine with the vsost-user-scsi controller so that the QUME in the virtual machine can accelerate the target volume by calling the vsost-user-scsi controller.
8. The apparatus for accelerating I/O of a virtual machine according to claim 7, wherein the acquiring module comprises:
the calling unit is used for calling a Nova mounting volume interface according to the mounting volume request;
the sending unit is used for sending an REST API request to the renderer through the Nova mounted volume interface so that the renderer can acquire the protocol and the connection information of the target volume according to the REST API request;
and the receiving unit is used for receiving the protocol and the connection information of the target volume through the Nova mounted volume interface.
9. A system for accelerating I/O of a virtual machine by a cloud platform is characterized by comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for accelerating I/O of a virtual machine by a cloud platform according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the steps of the method for accelerating I/O of a virtual machine by a cloud platform as claimed in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111264278.6A CN114020406A (en) | 2021-10-28 | 2021-10-28 | Method, device and system for accelerating I/O of virtual machine by cloud platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111264278.6A CN114020406A (en) | 2021-10-28 | 2021-10-28 | Method, device and system for accelerating I/O of virtual machine by cloud platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114020406A true CN114020406A (en) | 2022-02-08 |
Family
ID=80058451
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111264278.6A Pending CN114020406A (en) | 2021-10-28 | 2021-10-28 | Method, device and system for accelerating I/O of virtual machine by cloud platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114020406A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114584541A (en) * | 2022-03-07 | 2022-06-03 | 浪潮云信息技术股份公司 | Method for accelerating virtual machine network |
CN114710366A (en) * | 2022-05-31 | 2022-07-05 | 阿里巴巴(中国)有限公司 | Cross-safe-area resource access method in cloud computing system and electronic equipment |
CN117573041A (en) * | 2024-01-16 | 2024-02-20 | 麒麟软件有限公司 | Method for improving virtualized storage performance by improving vhost-scsi |
CN117666963A (en) * | 2023-12-13 | 2024-03-08 | 湖南承希科技有限公司 | Data IO acceleration method of CPU cloud computing platform |
-
2021
- 2021-10-28 CN CN202111264278.6A patent/CN114020406A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114584541A (en) * | 2022-03-07 | 2022-06-03 | 浪潮云信息技术股份公司 | Method for accelerating virtual machine network |
CN114710366A (en) * | 2022-05-31 | 2022-07-05 | 阿里巴巴(中国)有限公司 | Cross-safe-area resource access method in cloud computing system and electronic equipment |
CN117666963A (en) * | 2023-12-13 | 2024-03-08 | 湖南承希科技有限公司 | Data IO acceleration method of CPU cloud computing platform |
CN117573041A (en) * | 2024-01-16 | 2024-02-20 | 麒麟软件有限公司 | Method for improving virtualized storage performance by improving vhost-scsi |
CN117573041B (en) * | 2024-01-16 | 2024-04-09 | 麒麟软件有限公司 | Method for improving virtualized storage performance by improving vhost-scsi |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114020406A (en) | Method, device and system for accelerating I/O of virtual machine by cloud platform | |
CN109634718B (en) | Method and system for creating mirror image by cloud platform | |
CN102419803B (en) | Method, system and device for searching and killing computer virus | |
CN110046026B (en) | Method for specifying virtual disk speed limit by cloud host, computing equipment and cloud platform | |
US20120278796A1 (en) | Automatically installing device drivers | |
US20230004411A1 (en) | Method, apparatus and device for generating bare metal server linux system | |
WO2022041507A1 (en) | 3d rendering method and system | |
CN108475201B (en) | Data acquisition method in virtual machine starting process and cloud computing system | |
CN113127228A (en) | Graphic rendering method, server, and computer-readable storage medium | |
WO2017177892A1 (en) | Installation of operating system | |
CN113703672A (en) | Super-fusion system, IO request issuing method thereof and physical server | |
CN109639827B (en) | Client upgrading method and device | |
CN109375874B (en) | Method, device and equipment for calling distributed storage | |
CN115576654B (en) | Request processing method, device, equipment and storage medium | |
CN112202855A (en) | Communication device for storing bare metal server and elastic block, intelligent network card and system | |
CN111737223B (en) | File copying method, device, equipment and storage medium | |
CN111399753B (en) | Method and device for writing pictures | |
CN114003520A (en) | Data transmission method, device, system and medium between host and equipment | |
CN113760465A (en) | Transaction execution method, device, server, equipment and storage medium | |
CN116991542B (en) | Virtual machine snapshot method, system, electronic equipment and computer storage medium | |
CN112231290A (en) | Method, device and equipment for processing local log and storage medium | |
CN112269542B (en) | NVME hard disk storage space distribution method, device and storage medium | |
US20090177911A1 (en) | Apparatus, system, and method to prevent queue stalling | |
CN111124882B (en) | Method and device for realizing application test, computer storage medium and terminal | |
CN112286626B (en) | Method, system, device and medium for fast and safe cloning of cross-storage disk |
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 |