CN110046026A - Cloud host specifies virtual disk method for limiting speed, calculates equipment and cloud platform - Google Patents
Cloud host specifies virtual disk method for limiting speed, calculates equipment and cloud platform Download PDFInfo
- Publication number
- CN110046026A CN110046026A CN201910322563.5A CN201910322563A CN110046026A CN 110046026 A CN110046026 A CN 110046026A CN 201910322563 A CN201910322563 A CN 201910322563A CN 110046026 A CN110046026 A CN 110046026A
- Authority
- CN
- China
- Prior art keywords
- virtual disk
- api
- nova
- specified
- speed
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 67
- 239000003818 cinder Substances 0.000 claims abstract description 7
- 230000008569 process Effects 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 12
- 238000013507 mapping Methods 0.000 claims description 11
- 230000000977 initiatory effect Effects 0.000 claims description 4
- 238000002955 isolation Methods 0.000 abstract description 4
- 239000008186 active pharmaceutical agent Substances 0.000 description 19
- 230000006870 function Effects 0.000 description 13
- 230000006872 improvement Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 101100263760 Caenorhabditis elegans vms-1 gene Proteins 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011010 flushing procedure Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 238000013468 resource allocation Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
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
- 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/45575—Starting, stopping, suspending or resuming virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a kind of cloud hosts to specify virtual disk method for limiting speed, a kind of calculating equipment and the cloud platform based on Openstack framework, method includes the following steps: step S1, calling Cinder API setting carry out the virtual disk specification of speed limit operation to specified virtual disk;Step S2, to virtual disk specification set by specified virtual disk based on determined by Nova API Calls step S1;Step S3, the virtual disk specification acquired in the Cinder API is loaded onto the specified virtual disk of cloud host based on Libvirt API by Nova API.Virtual disk method for limiting speed is specified by cloud host disclosed herein, calculates equipment and cloud platform, it realizes and speed limit is carried out to the specified virtual disk of the virtual machine of the cloud platform based on Openstack framework, and speed limit operation will not impact its other virtual disk, specified tenant to effectively prevent in cloud platform excessively occupies the virtual disk resource formed in cloud platform, improves the isolation that cloud platform was grasped.
Description
Technical Field
The invention relates to the technical field of cloud computing, in particular to a method for specifying a virtual disk speed limit by a cloud host, computing equipment and a cloud platform.
Background
In the cloud computing platform based on the Openstack, a plurality of cloud hosts (VMs) can be formed through Physical Machine (PM) virtualization, and respond to a user with the cloud hosts. In a cloud computing application scenario, storage resources are typically deployed to users in a virtualized manner. In order to ensure efficient utilization of cluster resources and fairness allocation among users, it is required to ensure that the use of IO resources of other users is not affected on the premise of meeting the maximum IO resource requirement of a single user. IO request control is performed for each user, generally referred to as Quality of Service (QoS).
Currently, QoS control of virtual disk IO of Cgroup generally adopted in the industry cannot perform effective QoS control on IO of a Page Cache layer. However, in some application scenarios, some parameters are difficult to estimate, and operation and maintenance personnel cannot simply and effectively implement QoS control of virtual disk IO, so that the isolation methods are not widely applied in actual production.
Particularly, when a plurality of different types of scenes exist in a virtual disk of a cloud platform or a cluster server, if a Cgroup mechanism is used to limit the speed of a specified disk associated with a specific user, the responses of other cloud hosts configured in the whole cloud platform or the cluster server to other users are caused, and thus "isolated operation" cannot be realized when the speed of the specified virtual disk of a plurality of cloud hosts (VMs) formed by virtualization of a Physical Machine (PM) is limited.
Disclosure of Invention
The invention aims to disclose a method for limiting the speed of a cloud host appointed virtual disk, and a computing device and a cloud platform based on the method, which are used for realizing independent speed-limiting configuration of a virtual disk of a cloud host configured by using an OpenStack architecture as a bottom layer virtualization technology, preventing the speed-limiting operation of the virtual disk allocated by an appointed tenant from influencing the virtual disks allocated by other tenants, and being capable of adapting to different types of virtual disks, so that the appointed tenant in the cloud platform is prevented from excessively occupying virtual disk resources formed in the cloud platform, and the isolation of the cloud platform is improved. Meanwhile, based on the first invention purpose, the application also discloses a computing device and a cloud platform.
In order to achieve the first object, the invention provides a method for specifying a virtual disk speed limit by a cloud host, which comprises the following steps:
step S1, calling a render API to set the virtual disk specification for speed-limiting operation on the specified virtual disk;
step S2, calling the virtual disk specification set for the specified virtual disk determined in the step S1 based on the Nova API;
step S3, the Nova API loads the virtual disk specification obtained from the shader API to the specified virtual disk of the cloud host based on the Libvirt API.
As a further improvement of the present invention, the steps S1 and S2 are controlled by a control system based on HTTP request, the render API runs in a render module, the Nova API runs in a Nova module, and the control system is logically independent from the render module and the Nova module.
As a further improvement of the present invention, the step S1 further includes: the sender API writes the IO parameters of the virtual disk issued by the control system into a sender database of the sender API; wherein,
the IO parameters written into the circular database are stored by using a first form and a second form respectively, the first form records the mapping relation formed by the volume _ id and the virtual disk specification id, and the second form records the mapping relation formed by the volume _ id, the virtual disk specification id and the virtual disk specification;
the virtual disk specification comprises a sequential read bandwidth upper limit parameter, a sequential write bandwidth upper limit parameter, a random write IOPS upper limit parameter and a random read IOPS upper limit parameter, and the virtual disk specification is stored in a key-value pair mode.
As a further improvement of the present invention, the step S2 specifically includes the following sub-steps:
s21, the control system initiates a process of refreshing the specification of the virtual disk to the appointed virtual disk to the Nova API based on the HTTP request;
s22, calling the specification of the virtual disk in the second form stored in the render database through the Nova API;
and S23, writing the called virtual disk specification in the second form into a Nova database associated with the Nova API to form a third form, wherein the virtual disk specification recorded by the third form is determined by the virtual disk specification associated with the volume _ id in the first form and the virtual disk specification id in the second form.
As a further improvement of the present invention, the control system is controlled by a main body initiating a speed limit operation to a specified virtual disk through a Dashboard, and the main body is a robot program, an administrator, a user, or a cluster server.
As a further improvement of the present invention, the step S3 specifically includes the following sub-steps:
s31, calling a virtual disk specification corresponding to a virtual disk of the cloud host from the Nova database based on the Libvirt API to modify the specified virtual disk;
and S32, after the Nova API loads the virtual disk specification obtained from the Cinder API to the specified virtual disk, dynamically increasing the iotube node and the key value matched with the iotube node by using the instance file, and loading the key value corresponding to the virtual disk specification obtained from the Cinder API to the cloud host corresponding to the specified virtual disk based on the Libvirt API according to the Nova API.
As a further improvement of the present invention, the key value matched by the ioture node is at least one parameter of the virtual disk specification.
As a further improvement of the present invention, after the step S3, the method further includes: judging whether the operation of limiting the speed of the specified virtual disk of the cloud host is successful or not, and specifically:
using a virsh dumpxml command to inquire whether at least one mapping relation formed by the volume _ id of the second form record, the specification id of the virtual disk and the specification of the virtual disk exists in the ioture node associated with the specified virtual disk,
if yes, indicating that the speed limiting operation on the specified virtual disk is successful;
if not, the speed limiting operation on the specified virtual disk is not successful.
Based on the same inventive concept, the present application also discloses a computing device, comprising:
the cloud host virtual disk speed limiting method is characterized by comprising a processor, a memory and a computer program which is stored in the memory and can run on the processor, wherein the processor executes the computer program to execute the cloud host virtual disk speed limiting method disclosed by any invention creation above.
In addition, based on the same invention idea, the present application further provides a cloud platform based on an Openstack architecture, including:
the cloud host virtual disk speed limiting method is characterized by comprising a processor, a memory and a computer program which is stored in the memory and can run on the processor, wherein the processor executes the computer program to execute the cloud host virtual disk speed limiting method disclosed by any invention creation above.
Compared with the prior art, the invention has the beneficial effects that: by the cloud host appointed virtual disk speed limiting method, the computing equipment and the cloud platform, speed limitation is carried out on the appointed virtual disk of the virtual machine of the cloud platform based on the Openstack architecture, and speed limiting operation cannot affect other virtual disks of the cloud platform, so that the oriented and accurate control of the service quality of the virtual disk is realized, designated tenants in the cloud platform are effectively prevented from excessively occupying virtual disk resources formed in the cloud platform, and the isolation of cloud platform operation is improved.
Drawings
FIG. 1 is a flowchart of a method for specifying a virtual disk speed limit by a cloud host according to the present invention;
fig. 2 is a topological diagram of a speed limiting system on which the cloud platform implementing the speed limiting operation on the specified virtual disk by the cloud host specified virtual disk speed limiting method of the present invention depends;
FIG. 3 is a timing diagram illustrating a method for specifying a virtual disk speed limit by a cloud host according to the present invention;
FIG. 4 is a topological diagram formed by the speed limiting system shown in FIG. 2 after being connected with a main body initiating a speed limiting operation instruction;
FIG. 5 is a topology diagram of a computing device of the present invention;
FIG. 6 is a topology diagram of the shader module.
Detailed Description
The present invention is described in detail with reference to the embodiments shown in the drawings, but it should be understood that these embodiments are not intended to limit the present invention, and those skilled in the art should understand that functional, methodological, or structural equivalents or substitutions made by these embodiments are within the scope of the present invention.
The first embodiment is as follows:
fig. 1 is a flowchart of a method for specifying a virtual disk speed limit by a cloud host according to the present invention. The speed limiting method for the cloud host to designate the virtual disk (hereinafter referred to as "speed limiting method") disclosed in this embodiment can be independently or simultaneously applied to local storage or different-place storage of a Linux operating system, and performs speed limiting operation on a designated virtual disk formed by virtualization of storage equipment at an opposite end through a tenant, an APP, a robot program, or even another cluster server logically independent from the local storage. Meanwhile, the method for limiting the speed of the virtual disk specified by the cloud host shown in fig. 1 can be implemented by the speed limiting system shown in fig. 2.
It should be noted that, in the embodiments of the present application, the local storage and the remote storage are only in a relative relationship formed on a computer logic level, and do not constitute a limitation to the technical solution implied by the embodiments of the present invention. For example, the local storage may perform speed-limiting operation on a virtual disk formed in the remote storage; conversely, the remote storage may also be controlled by a main body (shown in fig. 4) capable of sending out the virtual disk speed limit operation to perform the speed limit operation on the virtual disk formed in the local storage.
Meanwhile, in the present embodiment, the term "designated virtual disk" is one or more virtual disks allocated by one designated tenant in the cloud platform. The term "quality of service" has technical meaning equivalent to the term "QoS". The term "user" has an equivalent technical meaning to the term "tenant", the term "Client", or the term "tente".
Referring to fig. 2 to 4 and 6, the method for specifying a virtual disk speed limit by a cloud host according to the present embodiment includes the following steps S1 to S3, which are specifically described as follows.
Preferably, the step S1 further includes the render API20 writing IO parameters of the virtual disk issued by the control system 10 into the render database 21 mounted in the render API20, wherein the step S1 specifically corresponds to the operation process shown by sequence number ① to sequence number ② in fig. 2.
The virtual disk specification may be composed of a sequential read _ bytes _ sec, a sequential write _ bytes _ sec, a random write IOPS _ sec, and a random read IOPS _ sec, which are stored in a key-value pair. Meanwhile, the virtual disk specification may further include the following parameters: total _ bytes _ sec (the total allowed bandwidth for the rule permitted) and/or total _ IOPS _ sec (the total allowed IOPS for the rule permitted second), with IOPS meaning the number of reads and writes per second. Setting the QoS (quality of service) of the virtual disk may enable limiting the read and/or write rate of the virtual disk, in units of IOPS or bytes, and have an equivalent technical effect to each other.
The control system 10 is located in an upper layer device, and the upper layer device is configured to execute a session through an HTTP/POST request by the main body 12 in fig. 4 through APIs with respect to network components such as virtual storage, virtual network, virtual computing, and the like formed by pooling through a virtualization technology, so as to issue an instruction for executing a speed limit operation on a specified virtual disk to the control system 10 through the main body 12, and to feed back the service quality of the virtual disk in a current state that the specified virtual disk has after executing the speed limit method disclosed in this embodiment. In the present embodiment, the control system 10 may be understood as a device, system or software capable of invoking HTTP/POST requests.
Referring to fig. 6, a renderer API20 is logically located in a renderer module 2, where the renderer module 2 is an abstraction that introduces a layer of "logical storage volume" between a virtual machine and a specific storage device, the renderer module itself is not a storage technology, but provides an intermediate abstraction layer, and the renderer module manages corresponding backend storage by calling drive interfaces of different storage backend types, so as to provide a uniform storage interface of "volume operation" for a user or a tenant. The sender module 2 mainly comprises a plurality of services, such as a sender Client22, a sender API20, a sender-scheduler 23, a sender-volume 24, and a sender-backup 25, and the plurality of services communicate with each other through a Message Queue (Message Queue). The function of the CinderAPI20 is mainly to provide a Restful style interface for a user, receive a Client request, check the authority of the user and the input parameters in advance in the service, deliver the request information to a message queue only after no error, and process the request information by other subsequent services according to the message queue information. The different Storage back-end types called by the renderer can be Ceph, ISCSI, and other Storage systems with various Storage types and supporting Block Storage (Block Storage).
More specifically, the operation process shown by the serial number ① is specifically as follows, after the control system 10 receives an instruction for performing speed limit operation on a specified virtual disk, which is issued by the main body 12 of the upper device, the control system 10 may send the instruction to a sender api 20. HTTP/POST request carrying ID. for performing speed limit operation on the specified virtual disk, where the HTTP/POST request includes a URL associated to the specified virtual disk, and the URL is specifically as follows:
http://{cinder_api_ip}:{cinder_api_port}/v2/{tenant_id}/volumes/{volume_i d}/action;
wherein,
cinder _ api _ ip: a circular api server IP;
circular _ api _ port: a circumferentially api server port;
tent _ id: tenant ID (remark: in the cloud platform based on Openstack architecture, storage resources corresponding to virtual disks are all hung on corresponding tenant names);
volume _ id: virtual disk ID (note: for distinguishing virtual disks of different users or for distinguishing different virtual disks assigned to the same user).
The message body data formed by the HTTP/POST request is as follows:
step S1 is controlled by the control system 10 based on the HTTP request, the render API20 runs in the render module 2, and the control system 10 and the render module 2 are logically independent from each other. The role of circle module 2 in the whole cloud platform is defined as a storage module.
The operation process shown by sequence number ② is specifically as follows, where the circle API21 writes the IO parameters of the virtual disk issued by the control system 10 into the circle database 21 mounted in the circle API20, where,
the IO parameters written into the render database 21 are stored by using a first form and a second form respectively, the first form records the mapping relationship formed by the volume _ id and the virtual disk specification id, and the second form records the mapping relationship formed by the volume _ id, the virtual disk specification id and the virtual disk specification; the virtual disk specification comprises a sequential read bandwidth upper limit parameter, a sequential write bandwidth upper limit parameter, a random write IOPS upper limit parameter and a random read IOPS upper limit parameter, and the virtual disk specification is stored in a key-value pair mode.
Specifically, the first form in the render database 21 is used to store the mapping relationship formed between the volume _ id and the virtual disk specification, and is shown as the following first form:
first form instance
The second form in the render database 21 is used to store the specific virtual disk that needs to execute the speed-limiting operation and the mapping relationship corresponding to the qos _ specs _ id, and is shown as the following second form:
second form instance
The 'specs _ id' of the second form corresponds to the qos _ specs _ id field value in the first form, and the 'Key' stores a specific virtual disk specification required to execute the speed-limiting operation.
Then, step S2 is executed, and the virtual disk specification set for the specified virtual disk determined in step S1 is called based on the Nova API 30. Specifically, the step S2 specifically includes the following sub-steps: substep S21, the control system 10 initiates a process of refreshing the specification of the virtual disk to the specified virtual disk based on the HTTP request to the novapi 30; substep S22, calling the virtual disk specification in the second form stored in the render database 21 through NovaAPI 30; and a substep S23, writing the called virtual disk specification in the second form into the Nova database 31 associated with the Nova API30 to form a third form, where the virtual disk specification recorded in the third form is determined by the virtual disk specification associated with the volume _ id in the first form and the virtual disk specification id in the second form.
Referring to fig. 2, in the present embodiment, steps S1 and S2 are controlled by the control system 10 based on HTTP request, the shader API20 runs in the shader module 2, the Nova API30 runs in the Nova module 3, and the control system 10, the shader module 2 and the Nova module 3 are logically independent from each other, the role of the Nova module 3 in the whole cloud platform is defined as a computing module (shown in connection with fig. 4), the role of the shader module 2 in the whole cloud platform is defined as a storage module (shown in connection with fig. 4), the specific process of step S2 refers to the operation processes shown by reference numbers ③ to ⑤, and corresponds to the sub-steps S21, S22 and S23, respectively.
The operational procedure illustrated by sequence number ③ (i.e., sub-step S21 in which the control system 10 initiates a process to the Nova API30 for flushing the virtual disk specification for a specified virtual disk based on an HTTP request) is specifically as follows,
the HTTP/POST request contains a URL associated to the specified virtual disk, which is specifically shown below:
http://{nova_api_ip}:{nova_api_port}/v2/{tenant_id}/servers/{server_id}/o s-reload_qos_specs;
the URL contains a specific cloud host ID, and the message body data thereof contains a virtual disk ID. The requested interface address needs to contain a specific cloud host ID, and then a specific parameter is provided with a virtual disk ID:
wherein,
nova _ api _ ip: nova api server IP;
nova _ api _ port: a nova api server port;
tent _ id: a tenant ID;
server _ id: a cloud host ID;
os-load _ qos _ specs: the specific interface name of the virtual disk.
The message body data formed by the HTTP/POST request is as follows:
the operation shown by the sequence number ④ (i.e., the sub-step S22, which calls the virtual disk size in the second form stored in the circle database 21 through the Nova API 30) is specifically as follows, the Nova API30 calls the circle client to obtain the virtual disk size in the second form stored in the circle database 21 corresponding to the circle API 20. specifically, in the present embodiment, the virtual disk size selects "write _ bytes _ sec" having a value of 1024000 (unit: byte/second), "read _ iops _ sec" having a value of 50 (unit: read/write times/second), "read _ bytes _ sec" (unit: byte/second), and "write _ iops _ sec" (unit: read/write times/second).
The operation procedure shown by sequence number ⑤ (i.e., the sub-step S23 of writing the called virtual disk specification in the second form into the Nova database 31 associated with the Nova API30 to form a third form) is specifically as follows, and the data structure of the third form is as follows:
and the virtual disk specification recorded by the third form is determined by the virtual disk specification associated with the volume _ id in the first form and the virtual disk specification id in the second form. I.e., via the UUID of the virtual disk in the first form: (22d06898- 268c-445b-ad6c-fb0506bcf3e8) The "qos _ specs _ id" in the second form matches the ids corresponding to the four "qos _ specs _ id" in the bold black box, i.e.) "22d06898-268c-445b-ad6c-fb0506bcf3e8". So far, the NovaAPI30 matches the virtual disk specification parameters of the specified virtual disk needing to execute the speed limiting operation based on the Client22 in the circle module 2, and stores the parameters in NoIn the va database 31, the virtual disk specification parameters are to be finally called and set up through the Libvirt API function by the Nova API 30. In this embodiment, in the process of performing the speed-limiting operation on the specified virtual disk, by introducing the volume _ id, the entire speed-limiting operation can perform the speed-limiting on the specified virtual disk and be associated to the specified virtual disk, so that the speed-limiting method can ensure that the speed-limiting operation does not affect other virtual disks of the specified virtual disk, thereby realizing the directional and accurate control on the service quality of the virtual disk; meanwhile, scenes with various different types of virtual disks can be ignored, and the adaptability of the speed limiting method in different scenes is further improved.
Referring to fig. 2, the VMs 1 to 3 may be packaged independently or in combination as a cloud host providing services to upper-layer devices, and may finally implement a speed limit operation performed on a specified virtual disk of the cloud host through the subsequent step S3. One or more virtual machines such as VM1 through VM3 constitute a virtual machine cluster 32.
Finally, step S3 is executed, and the Nova API30 loads the virtual disk specification obtained from the shader API20 to the specified virtual disk of the cloud host based on the Libvirt API.
The management of the storage volume (volume) by Libvirt is mainly the management of the mirror image file of the domain, and the mirror image file can be in various formats such as raw, qcow2, vmdk and qed. Management of a storage volume by Libvirt first requires creation of an object for the storage volume, virStorageVolPtr, before it can be queried or controlled. Libvirt provides three functions to obtain storage volume objects in different ways, such as: the virStorage VolLookupByKey function can acquire a storage volume object according to a globally unique key value, the virStorage VolLookupByName function can acquire a storage volume object in a storage resource pool (storage pool) according to a name, and the virStorage VolLookupByPath function can acquire a storage volume object according to a path of the storage volume object on a node. There are some functions for querying the storage volume for information, such as: the virStorageVolGetInfo function can query the use condition of a certain storage volume, the virStorageVolGetName function can acquire the name of the storage volume, the virStorageVolGetPath function can acquire the path of the storage volume, and the virStorageVolGetConnect function can query the connection of the storage volume. Other types of Libvirt API functions are used to create and modify storage volumes, such as: the virStorageVolCreateXML function may create a storage volume based on the provided XML file description.
Specifically, the step S3 specifically includes the following sub-steps:
substep S31 calls a virtual disk specification corresponding to a virtual disk of the cloud host from the Nova database 31 based on the Libvirt API to modify the specified virtual disk, and substep S32, the Nova API30 loads the virtual disk specification obtained from the renderer API20 to the specified virtual disk, and then dynamically adds the iotube node and the key value matched with the iotube node using the instance file, so as to load the key value corresponding to the virtual disk specification obtained from the renderer API20 to the cloud host corresponding to the specified virtual disk based on the Libvirt API according to the Nova API30, the step S3 is an operation process shown as a serial number ⑥.
The Libvirt API can be used for adjusting the virtual disk specification parameters corresponding to the virtual disk of the cloud host. The cloud host has instance-00000002.xml (i.e. the "instance file" disclosed above) in the cloud platform based on the Openstack architecture, so as to store the virtual disk specification parameters corresponding to the specified cloud host virtual disk through the instance file, and record the virtual disk specification parameters before and after modification, so as to provide a basis for later retrieval of the history modification record.
When the Libvirt API is called to set the virtual disk specification parameters of the specified virtual disk of the cloud host to be successfully modified, the instance-00000002.xml file increases the ioture node and the value of the node corresponding to the corresponding virtual disk specification parameters. The Iotune node represents a child node of the virtual disk IO read-write limit corresponding to the specified virtual disk.
In this embodiment, the child nodes are: read _ bytes _ sec, write _ bytes _ sec, read _ iops _ sec, or write _ iops _ sec. Message body data of the Iotune node is as follows:
preferably, in this embodiment, after step S3, the method further includes: judging whether the operation of limiting the speed of the specified virtual disk of the cloud host is successful or not, and specifically:
using a virsh dumpxml command to inquire whether at least one mapping relation formed by the volume _ id of the second form record, the specification id of the virtual disk and the specification of the virtual disk exists in the ioture node associated with the specified virtual disk,
if yes, indicating that the speed limiting operation on the specified virtual disk is successful;
if not, the speed limiting operation on the specified virtual disk is not successful.
The key value matched by the itune node is at least one parameter of the virtual disk specification. Specifically, the key value matched by the itune node may be: any one of read _ bytes _ sec, write _ bytes _ sec, read _ iops _ sec, and write _ iops _ sec, or a combination of any two or three of them, or a combination of all of them. If an iodotune node and a corresponding child node exist, the designated virtual disk speed limit is successful. For example: virsh dumpxml instance-00000002.
In this embodiment, focusing on the matching condition of the iotube node, whether the child node has the Key-value pair (Key-value) of the virtual disk specification parameter set in step S1 to step S2 is determined, and the determination may be performed by performing fast scanning through the database index. Meanwhile, both the circle API20 and the Nova API30 may independently provide feedback to the control system 10. The render API20 feeds back to the control system 10 the processing result whether the instruction for performing the speed limiting operation on the specified virtual disk is called by the Nova module 3, and the Nova API30 feeds back to the control system 10 the result whether the speed limiting operation on the specified virtual disk is successful.
Example two:
referring to fig. 4, this embodiment shows a modification of the method for specifying a virtual disk speed limit by a cloud host. In this embodiment, the control system 10 mounts the calculation module, the storage module, and the network module; wherein the computing module can be selected from Nova module 3 disclosed in the first embodiment, the storage module can be selected from circle module 2 disclosed in the first embodiment, and the network module can be selected from NEUTRON module.
The Nova module 3 comprises Nova API30, Nova-scheduler and Nova-computer; the Nova API30 is located at the presentation level and is primarily responsible for handling external requests, and the Nova-scheduler is located at the logical control level and is primarily responsible for creating VMs for selected HOSTs (HOSTs), Nova-computer virtual machine creation and resource allocation, providing no virtualization functionality, but supporting KVM, LXC, Xen, etc. The three components, Nova API30, Nova-scheduler and Nova-computer, are in message passing through a rabbitMQ.
Compared with the first embodiment, the main difference of the speed limiting method disclosed in this embodiment is that, in this embodiment, the control system 10 is controlled by a main body 12 initiating a speed limiting operation on a specified virtual disk through a Dashboard11, where the main body 12 is a robot program, an administrator, a user, or a cluster server. A bot may be understood as any program capable of automatic execution, such as an APP, digital signature, plug-in, digital certificate, or other various programs or logic operable in a computer device or system. In this embodiment, the Dashboard11 is set to enable the virtual machine cluster 32 to support multi-node control, so that the speed-limiting operation of the specified virtual disk of the virtual machine on the cloud platform is more flexible, and the adaptability of the speed-limiting method is further improved. In particular, as another variation, the main body 12, the Dashboard11 and the control system 10 may be taken as an integrated logic or a component to perform the speed limiting operation on the specified virtual disk of the cloud host according to the technical solution shown in fig. 2.
The speed limiting method disclosed in this embodiment is a technical solution of the same part as that of the embodiment, please refer to the embodiment one, and will not be described herein again.
Example three:
referring to fig. 5, a computing device disclosed in the present embodiment includes: the cloud host specified virtual disk speed limit method comprises a processor 5, a memory 6 and a computer program which is stored on the memory 6 and can run on the processor 5, wherein the processor 5 executes the computer program to execute the cloud host specified virtual disk speed limit method according to any one of the first embodiment or the second embodiment.
The processor 5 is controlled by the main body 12 through hardware or software. The memory 6 forms virtual disks 61 to 6i based on the OpenStack architecture (parameter i takes a positive integer larger than 1). The virtual disks 61 to 6i execute a speed limit operation on one or more virtual disks under the control of the main body 12. The specific implementation process of the speed limiting operation is shown in the first embodiment and/or the second embodiment. The storage 6 is one or more selected from mechanical hard disk, solid state disk, Ceph storage, NAS storage, SAN storage, NVDIMM, RAID or data bank.
Please refer to the first embodiment and/or the second embodiment for technical solutions of the same parts of the computing apparatus and the first embodiment and/or the second embodiment, which are not described herein again.
Example four:
referring to fig. 5 in a matching manner, the embodiment discloses a cloud platform based on an Openstack architecture, including:
the cloud host specified virtual disk speed limit method comprises a processor 5, a memory 6 and a computer program stored on the memory 6 and capable of running on the processor, wherein the processor executes the computer program to execute the cloud host specified virtual disk speed limit method according to any one of the first embodiment or the second embodiment. The specific implementation process of the method for limiting the speed of the virtual disk specified by the cloud host is shown in the first embodiment to the second embodiment. The method for limiting the speed of the virtual disk specified by the cloud host is realized by the speed limiting system shown in figure 2.
The cloud platform based on the Openstack architecture disclosed in this embodiment and the technical solutions of the same parts in the first to third embodiments please refer to the descriptions in the first to third embodiments, which are not repeated herein.
It should be understood that the system, apparatus and method disclosed in the several embodiments provided in this application may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-listed detailed description is only a specific description of a possible embodiment of the present invention, and they are not intended to limit the scope of the present invention, and equivalent embodiments or modifications made without departing from the technical spirit of the present invention should be included in the scope of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.
Claims (10)
1. A method for limiting the speed of a virtual disk designated by a cloud host is characterized by comprising the following steps:
step S1, calling a render API to set the virtual disk specification for speed-limiting operation on the specified virtual disk;
step S2, calling the virtual disk specification set for the specified virtual disk determined in the step S1 based on the Nova API;
step S3, the Nova API loads the virtual disk specification obtained from the shader API to the specified virtual disk of the cloud host based on the Libvirt API.
2. The method as claimed in claim 1, wherein the steps S1 and S2 are controlled by a control system based on HTTP request, the render API is run in a render module, the Nova API is run in a Nova module, and the control system is logically independent from the render module and the Nova module.
3. The method according to claim 2, wherein the step S1 further comprises: the sender API writes the IO parameters of the virtual disk issued by the control system into a sender database of the sender API; wherein,
the IO parameters written into the circular database are stored by using a first form and a second form respectively, the first form records the mapping relation formed by the volume _ id and the virtual disk specification id, and the second form records the mapping relation formed by the volume _ id, the virtual disk specification id and the virtual disk specification;
the virtual disk specification comprises a sequential read bandwidth upper limit parameter, a sequential write bandwidth upper limit parameter, a random write IOPS upper limit parameter and a random read IOPS upper limit parameter, and the virtual disk specification is stored in a key-value pair mode.
4. The method according to claim 2, wherein the step S2 specifically comprises the following sub-steps:
s21, the control system initiates a process of refreshing the specification of the virtual disk to the appointed virtual disk to the Nova API based on the HTTP request;
s22, calling the specification of the virtual disk in the second form stored in the render database through the Nova API;
and S23, writing the called virtual disk specification in the second form into a Nova database associated with the Nova API to form a third form, wherein the virtual disk specification recorded by the third form is determined by the virtual disk specification associated with the volume _ id in the first form and the virtual disk specification id in the second form.
5. The method of claim 2, wherein the control system is controlled by a body initiating speed limit operation on the designated virtual disk through the Dashboard, and the body is a robot program, an administrator, a user or a cluster server.
6. The method according to claim 5, wherein the step S3 comprises the following sub-steps:
s31, calling a virtual disk specification corresponding to a virtual disk of the cloud host from the Nova database based on the Libvirt API to modify the specified virtual disk;
and S32, after the Nova API loads the virtual disk specification obtained from the Cinder API to the specified virtual disk, dynamically increasing the iotube node and the key value matched with the iotube node by using the instance file, and loading the key value corresponding to the virtual disk specification obtained from the Cinder API to the cloud host corresponding to the specified virtual disk based on the Libvirt API according to the Nova API.
7. The method as claimed in claim 6, wherein the key value matched by the iotube node is at least one parameter of a virtual disk specification.
8. The method according to claim 6, wherein the step S3 is further followed by: judging whether the operation of limiting the speed of the specified virtual disk of the cloud host is successful or not, and specifically:
using a virsh dumpxml command to inquire whether at least one mapping relation formed by the volume _ id of the second form record, the specification id of the virtual disk and the specification of the virtual disk exists in the ioture node associated with the specified virtual disk,
if yes, indicating that the speed limiting operation on the specified virtual disk is successful;
if not, the speed limiting operation on the specified virtual disk is not successful.
9. A computing device, comprising:
the cloud host specified virtual disk speed limit method comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to execute the cloud host specified virtual disk speed limit method according to any one of claims 1 to 8.
10. A cloud platform based on Openstack architecture, comprising:
the cloud host specified virtual disk speed limit method comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to execute the cloud host specified virtual disk speed limit method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910322563.5A CN110046026B (en) | 2019-04-22 | 2019-04-22 | Method for specifying virtual disk speed limit by cloud host, computing equipment and cloud platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910322563.5A CN110046026B (en) | 2019-04-22 | 2019-04-22 | Method for specifying virtual disk speed limit by cloud host, computing equipment and cloud platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110046026A true CN110046026A (en) | 2019-07-23 |
CN110046026B CN110046026B (en) | 2020-05-12 |
Family
ID=67278252
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910322563.5A Active CN110046026B (en) | 2019-04-22 | 2019-04-22 | Method for specifying virtual disk speed limit by cloud host, computing equipment and cloud platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110046026B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110795210A (en) * | 2019-10-18 | 2020-02-14 | 北京浪潮数据技术有限公司 | Bare equipment management system and method |
CN111240800A (en) * | 2020-01-03 | 2020-06-05 | 华云数据有限公司 | Hardware acceleration equipment mounting method and cloud platform |
CN111352592A (en) * | 2020-02-27 | 2020-06-30 | 腾讯科技(深圳)有限公司 | Disk read-write control method, device, equipment and computer readable storage medium |
CN111796773A (en) * | 2020-07-07 | 2020-10-20 | 浪潮云信息技术股份公司 | Method for automatically setting IOPS and BW |
CN111901385A (en) * | 2020-06-30 | 2020-11-06 | 广东浪潮大数据研究有限公司 | Cloud hard disk speed limiting method, system and device and computer readable storage medium |
CN114253463A (en) * | 2020-09-25 | 2022-03-29 | 华为云计算技术有限公司 | Cloud disk management method and device of cloud host, computer equipment and storage medium |
WO2022257388A1 (en) * | 2021-06-08 | 2022-12-15 | 深圳前海微众银行股份有限公司 | Speed limiting method and apparatus for virtual machine, and device, storage medium and program |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106598692A (en) * | 2015-10-20 | 2017-04-26 | 中兴通讯股份有限公司 | Method for creating mirror image file in logical volume and starting virtual machine, and server |
CN108804201A (en) * | 2018-06-07 | 2018-11-13 | 郑州云海信息技术有限公司 | A kind of expansion method and device of the virtual-machine data volume based on cloud platform |
-
2019
- 2019-04-22 CN CN201910322563.5A patent/CN110046026B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106598692A (en) * | 2015-10-20 | 2017-04-26 | 中兴通讯股份有限公司 | Method for creating mirror image file in logical volume and starting virtual machine, and server |
CN108804201A (en) * | 2018-06-07 | 2018-11-13 | 郑州云海信息技术有限公司 | A kind of expansion method and device of the virtual-machine data volume based on cloud platform |
Non-Patent Citations (4)
Title |
---|
HTTP://WWW.TALKWITHTREND.COM/QUESTION/419047: "如何在openstack环境下实现磁盘、网络的QoS?", 《HTTP://WWW.TALKWITHTREND.COM/QUESTION/419047》 * |
HTTPS://BLOG.CSDN.NET/ISCLOUDER/ARTICLE/DETAILS/79578615: "OpenStack问题集锦", 《HTTPS://BLOG.CSDN.NET/ISCLOUDER/ARTICLE/DETAILS/79578615》 * |
HTTPS://BLOG.CSDN.NET/XIONGWENWU/ARTICLE/DETAILS/37562185: "ova挂载cinder卷流程分析", 《HTTPS://BLOG.CSDN.NET/XIONGWENWU/ARTICLE/DETAILS/37562185》 * |
HTTPS://CEPH.COM/PLANET/OPENSTACK-CEPH-RBD-AND-QOS/: "OpenStack, Ceph RBD and QoS", 《HTTPS://CEPH.COM/PLANET/OPENSTACK-CEPH-RBD-AND-QOS/》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110795210A (en) * | 2019-10-18 | 2020-02-14 | 北京浪潮数据技术有限公司 | Bare equipment management system and method |
CN110795210B (en) * | 2019-10-18 | 2022-03-22 | 北京浪潮数据技术有限公司 | Bare equipment management system and method |
CN111240800A (en) * | 2020-01-03 | 2020-06-05 | 华云数据有限公司 | Hardware acceleration equipment mounting method and cloud platform |
CN111240800B (en) * | 2020-01-03 | 2022-12-27 | 华云数据有限公司 | Hardware acceleration equipment mounting method and cloud platform |
CN111352592A (en) * | 2020-02-27 | 2020-06-30 | 腾讯科技(深圳)有限公司 | Disk read-write control method, device, equipment and computer readable storage medium |
CN111901385A (en) * | 2020-06-30 | 2020-11-06 | 广东浪潮大数据研究有限公司 | Cloud hard disk speed limiting method, system and device and computer readable storage medium |
CN111901385B (en) * | 2020-06-30 | 2023-05-23 | 广东浪潮大数据研究有限公司 | Cloud hard disk speed limiting method, system, device and computer readable storage medium |
CN111796773A (en) * | 2020-07-07 | 2020-10-20 | 浪潮云信息技术股份公司 | Method for automatically setting IOPS and BW |
CN114253463A (en) * | 2020-09-25 | 2022-03-29 | 华为云计算技术有限公司 | Cloud disk management method and device of cloud host, computer equipment and storage medium |
WO2022257388A1 (en) * | 2021-06-08 | 2022-12-15 | 深圳前海微众银行股份有限公司 | Speed limiting method and apparatus for virtual machine, and device, storage medium and program |
Also Published As
Publication number | Publication date |
---|---|
CN110046026B (en) | 2020-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110046026B (en) | Method for specifying virtual disk speed limit by cloud host, computing equipment and cloud platform | |
US11740818B2 (en) | Dynamic data compression | |
US9645764B2 (en) | Techniques for migrating active I/O connections with migrating servers and clients | |
US9413683B2 (en) | Managing resources in a distributed system using dynamic clusters | |
US8312471B2 (en) | File system independent content aware cache | |
US10990441B2 (en) | Multi-level job processing queues | |
US9146766B2 (en) | Consistent unmapping of application data in presence of concurrent, unquiesced writers and readers | |
US20170344291A1 (en) | Provisioning data volumes for containers running in virtual machines in which storage for the virtual machines are backed by heterogeneous storage devices | |
US8301848B2 (en) | Virtualizing storage for WPAR clients using node port ID virtualization | |
CN107943556B (en) | KMIP and encryption card based virtualized data security method | |
US10824369B2 (en) | Elastic method of remote direct memory access memory advertisement | |
CN111722786A (en) | Storage system based on NVMe equipment | |
US11379405B2 (en) | Internet small computer interface systems extension for remote direct memory access (RDMA) for distributed hyper-converged storage systems | |
US10164835B2 (en) | Accessing peripheral devices from a container within virtual machines running on different host computing systems | |
US11256577B2 (en) | Selective snapshot creation using source tagging of input-output operations | |
US11513830B2 (en) | Introspection into workloads running within virtual machines | |
WO2024103912A1 (en) | Request processing method and apparatus, and device and non-volatile readable storage medium | |
US20230222092A1 (en) | Method of managing storage space based on robust determinations of durations for deleting snapshots | |
US20230136522A1 (en) | Method and system for implementing metadata compression in a virtualization environment | |
US20190258420A1 (en) | Managing multi-tiered swap space | |
US11221865B2 (en) | Batch management of operations over virtualized entities | |
US11194758B1 (en) | Data archiving using a compute efficient format in a service provider environment | |
US20210026552A1 (en) | Migrating virtual tapes between different virtual tape storages without host involvement | |
US10209923B2 (en) | Coalescing configuration engine, coalescing configuration tool and file system for storage system | |
US11740918B2 (en) | Method for accessing application logs within virtual machines based on operator-defined criteria |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 214000, science and software park, Binhu District, Jiangsu, Wuxi 6 Patentee after: Huayun data holding group Co., Ltd Address before: 214000, science and software park, Binhu District, Jiangsu, Wuxi 6 Patentee before: WUXI CHINAC DATA TECHNICAL SERVICE Co.,Ltd. |