CN106936874A - Physical source distributing method, apparatus and system - Google Patents
Physical source distributing method, apparatus and system Download PDFInfo
- Publication number
- CN106936874A CN106936874A CN201511026242.9A CN201511026242A CN106936874A CN 106936874 A CN106936874 A CN 106936874A CN 201511026242 A CN201511026242 A CN 201511026242A CN 106936874 A CN106936874 A CN 106936874A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- hard disk
- request
- memory capacity
- capacity
- 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 37
- 230000008859 change Effects 0.000 claims abstract description 44
- 238000012508 change request Methods 0.000 claims abstract description 30
- 238000013468 resource allocation Methods 0.000 claims description 28
- 230000014759 maintenance of location Effects 0.000 claims description 10
- 230000008901 benefit Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a kind of physical source distributing method, apparatus and system.In the method, receive user and asked by the virtual machine that terminal sends, judge whether the entrained hard-disk capacity of virtual machine request exceedes predetermined ratio with the target ratio of memory size;If it does, being that user distributes cloud virtual machine based on associated physical machine according to virtual machine request entrained hard-disk capacity and memory size;If not less than to terminal feedback on the announcement information according to predetermined ratio change hard-disk capacity and memory size;When change request is received, judge change after hard-disk capacity with change after memory size change after ratio whether exceed the predetermined ratio, if it is, being that user distributes cloud virtual machine based on associated physical machine according to memory size after hard-disk capacity after change and change.Present solution provides the configuration of the physical resource for more optimizing, the hard disk resources and the utilization rate of memory source of physical machine associated by cloud server can be improved.
Description
Technical Field
The present invention relates to the technical field of resource allocation, and in particular, to a method, an apparatus, and a system for allocating physical resources of computer hardware.
Background
Nowadays, a user may obtain computer resources by requesting a cloud server to purchase a cloud virtual machine instead of purchasing a physical machine, where the cloud virtual machine requested by the user is: the cloud server is the physical resource in the physical machine of the cloud that the user distributes, promptly: the physical machine of the cloud is a physical resource provider of the cloud virtual machine requested by the user.
In the prior art, after receiving a virtual machine request sent by a user through a terminal, a cloud server allocates virtual machines to the user according to the hard disk capacity and the memory capacity carried by the virtual machine request, and because the hard disk capacity and the memory capacity carried by the virtual machine request are various, and the user has a high demand on the memory capacity for ensuring the running speed, the cloud server can bring the following problems: the memory of the physical machine is already allocated, but the hard disk still has more capacity, and since the physical resource of the physical machine is used independently of other physical resources, this undoubtedly causes more hard disk resources of the physical machine to be wasted. For example: the hard disk capacity of the physical machine a is 500G, the memory capacity is 8G, and it is assumed that the cloud virtual machine requested by the user a is: the hard disk capacity is 50G, the memory capacity is 2G, and the cloud virtual machine requested by the user b is as follows: the hard disk capacity is 100G, the memory capacity is 2G, and the cloud virtual machine requested by the user c is: the hard disk capacity is 200G and the memory capacity is 4G, at this time, the memory of the physical machine a is completely allocated, but 150G of hard disks remain, so that the physical machine cannot be used as a physical resource provider of the cloud virtual machine requested by other users.
Therefore, in the prior art, the physical machine serving as the physical resource provider of the cloud virtual machine cannot be effectively utilized, and the resource waste phenomenon exists, so that the income of the physical machine is seriously influenced.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, and a system for allocating physical resources, so as to provide a more optimized configuration of physical resources, so as to improve utilization rates of hard disk resources and memory resources of a physical machine associated with a cloud server, thereby ensuring that the physical machine associated with the cloud server achieves maximum benefits. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a physical resource allocation method, which is applied to a cloud server, and the method includes:
receiving a virtual machine request sent by a user through a terminal, wherein the virtual machine request carries information of hard disk capacity and memory capacity of a cloud virtual machine to be requested;
judging whether the target ratio of the hard disk capacity to the memory capacity exceeds a preset ratio or not;
if the hard disk capacity and the memory capacity are not in the preset range, distributing a cloud virtual machine for the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request;
if the hard disk capacity and the memory capacity are not exceeded, feeding back notification information about changing the hard disk capacity and the memory capacity according to the preset ratio to the terminal, so that the terminal outputs change prompt information corresponding to the notification information after receiving the notification information;
when a change request which is sent by the user through the terminal and carries the changed hard disk capacity and the changed memory capacity of the requested cloud virtual machine is received, whether the changed ratio of the changed hard disk capacity and the changed memory capacity exceeds the preset ratio is judged, if yes, the cloud virtual machine is distributed to the user on the basis of the associated physical machine according to the changed hard disk capacity and the changed memory capacity, wherein the change request is sent by the user on the basis of change prompt information output by the terminal.
Optionally, the method for allocating physical resources provided in the embodiment of the present invention further includes:
when a virtual machine retention request sent by the user through the terminal is received, a cloud virtual machine is distributed to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request, and the pricing corresponding to the requested cloud virtual machine is increased according to a preset pricing strategy, wherein the virtual machine retention request is sent by the user based on change prompt information output by the terminal.
Optionally, the allocating, according to the hard disk capacity and the memory capacity carried by the virtual machine request, a cloud virtual machine for the user based on the associated physical machine includes:
determining a target physical machine for distributing a cloud virtual machine to the user from at least one physical machine with the residual hard disk capacity meeting the hard disk capacity carried by the virtual machine request and the residual memory capacity meeting the memory capacity carried by the virtual machine request;
and distributing a cloud virtual machine for the user based on the target physical machine.
Optionally, the determining a target physical machine for allocating a cloud virtual machine to the user includes:
and determining a target physical machine for distributing the cloud virtual machine for the user through a random selection mode or a preset selection mode, wherein the preset selection mode is determined based on the size of the residual physical resources.
Optionally, the notification information further includes a pricing corresponding to each ratio of the hard disk capacity to the memory capacity.
Optionally, the predetermined ratio is: 31:1.
In a second aspect, an embodiment of the present invention provides a physical resource allocation apparatus, which is applied to a cloud server, and the apparatus includes: the system comprises a virtual machine request receiving module, a ratio judging module, a resource allocation module, a notification information sending module and a change request processing module; wherein,
the virtual machine request receiving module is used for receiving a virtual machine request sent by a user through a terminal, wherein the virtual machine request carries information of the hard disk capacity and the memory capacity of a cloud virtual machine to be requested;
the ratio judging module is used for judging whether the target ratio of the hard disk capacity to the memory capacity exceeds a preset ratio or not, if so, triggering the resource allocation module, and if not, triggering the notification information sending module;
the resource allocation module is used for allocating a cloud virtual machine to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request;
the notification information sending module is configured to feed back notification information about changing the hard disk capacity and the memory capacity according to the predetermined ratio to the terminal, so that the terminal outputs change prompt information corresponding to the notification information after receiving the notification information;
the change request processing module is used for judging whether the changed ratio of the changed hard disk capacity to the changed memory capacity exceeds the preset ratio or not when receiving a change request which is sent by the user through the terminal and carries information of the changed hard disk capacity and the changed memory capacity of the cloud virtual machine to be requested, if so, distributing the cloud virtual machine for the user based on the associated physical machine according to the changed hard disk capacity and the changed memory capacity, wherein the change request is sent by the user based on change prompt information output by the terminal.
Optionally, the physical resource allocation apparatus provided in the embodiment of the present invention further includes: a reservation request processing module;
the reservation request processing module is configured to, when receiving a virtual machine reservation request sent by the user through the terminal, allocate a cloud virtual machine to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request, and increase a pricing corresponding to the requested cloud virtual machine according to a predetermined pricing strategy, where the virtual machine reservation request is sent by the user based on change prompt information output by the terminal.
Optionally, the resource allocation module includes:
a target physical machine determining unit, configured to determine a target physical machine for allocating a cloud virtual machine to the user from at least one physical machine whose remaining hard disk capacity satisfies the hard disk capacity carried by the virtual machine request and whose remaining memory capacity satisfies the memory capacity carried by the virtual machine request;
and the virtual machine distribution unit is used for distributing the cloud virtual machine for the user based on the target physical machine.
Optionally, the target physical machine determining unit is specifically configured to determine, through a random selection manner or a predetermined selection manner, a target physical machine that allocates a cloud virtual machine to the user, where the predetermined selection manner is a manner determined based on a size of remaining physical resources.
Optionally, the notification information further includes a pricing corresponding to each ratio of the hard disk capacity to the memory capacity.
Optionally, the predetermined ratio is: 31:1.
In a third aspect, an embodiment of the present invention provides a physical resource allocation system, including:
the system comprises a cloud server and at least one physical machine associated with the cloud server;
wherein, the cloud server is used for:
receiving a virtual machine request sent by a user through a terminal, wherein the virtual machine request carries information of hard disk capacity and memory capacity of a cloud virtual machine to be requested;
judging whether the target ratio of the hard disk capacity to the memory capacity exceeds a preset ratio or not;
if the hard disk capacity and the memory capacity are not in the preset range, distributing a cloud virtual machine for the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request;
if the hard disk capacity and the memory capacity are not exceeded, feeding back notification information about changing the hard disk capacity and the memory capacity according to the preset ratio to the terminal, so that the terminal outputs change prompt information corresponding to the notification information after receiving the notification information;
when a change request which is sent by the user through the terminal and carries information of changed hard disk capacity and changed memory capacity of a cloud virtual machine to be requested is received, whether the changed ratio of the changed hard disk capacity and the changed memory capacity exceeds the preset ratio is judged, if yes, the cloud virtual machine is distributed to the user on the basis of the associated physical machine according to the changed hard disk capacity and the changed memory capacity, wherein the change request is sent by the user on the basis of change prompt information output by the terminal.
Optionally, the cloud server is further configured to:
when a virtual machine retention request sent by the user through the terminal is received, a cloud virtual machine is distributed to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request, and the pricing corresponding to the requested cloud virtual machine is increased according to a preset pricing strategy, wherein the virtual machine retention request is sent by the user based on change prompt information output by the terminal.
Optionally, the cloud server is specifically configured to:
determining a target physical machine for distributing a cloud virtual machine to the user from at least one physical machine with the residual hard disk capacity meeting the hard disk capacity carried by the virtual machine request and the residual memory capacity meeting the memory capacity carried by the virtual machine request;
and distributing a cloud virtual machine for the user based on the target physical machine.
Optionally, the cloud server is specifically configured to: and determining a target physical machine for distributing the cloud virtual machine for the user through a random selection mode or a preset selection mode, wherein the preset selection mode is determined based on the size of the residual physical resources.
Optionally, the notification information further includes a pricing corresponding to each ratio of the hard disk capacity to the memory capacity.
Optionally, the predetermined ratio is: 31:1.
Compared with the prior art, in the embodiment of the invention, when the cloud server receives the virtual machine request sent by the user through the terminal, the cloud virtual machine is not directly distributed to the user according to the information of the virtual machine request, but whether the target ratio of the hard disk capacity carried by the virtual machine request to the memory capacity exceeds the preset ratio is judged, and different operations are executed according to different judgment results, so that the configuration of more optimized physical resources is provided, therefore, the utilization rate of the hard disk resources and the memory resources of the physical machine associated with the cloud server is improved through the scheme, and the physical machine associated with the cloud server is further ensured to achieve the maximum benefit.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for allocating physical resources according to an embodiment of the present invention;
fig. 2 is another flowchart of a method for allocating physical resources according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a physical resource allocation apparatus according to an embodiment of the present invention;
fig. 4 is another schematic structural diagram of a physical resource allocation apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a physical resource allocation system according to an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
In order to solve the problem of the prior art, embodiments of the present invention provide a method and an apparatus for allocating physical resources.
First, a method for allocating physical resources according to an embodiment of the present invention is described below.
It should be noted that the physical resource allocation method provided by the embodiment of the present invention is applied to a cloud server, and the cloud server allocates a cloud virtual machine to a user side; the cloud server is associated with a plurality of physical machines, the associated physical machines serve as physical resource providers of the cloud virtual machines requested by the user, and meanwhile, each cloud virtual machine allocated to the user side corresponds to a unique physical machine, namely, the physical resources of the plurality of physical machines based on the cloud virtual machines allocated to the user side are independently utilized.
As shown in fig. 1, a method for allocating physical resources provided in an embodiment of the present invention may include the following steps:
s101, receiving a virtual machine request sent by a user through a terminal, wherein the virtual machine request carries information of hard disk capacity and memory capacity of a cloud virtual machine to be requested;
the cloud server can receive a virtual machine request sent by a user through the terminal, and execute subsequent operations according to the received virtual machine request.
It can be understood that, a user may access a website corresponding to the cloud server through the terminal, and then input the required hard disk capacity and memory capacity in a virtual machine request interface provided by the website, thereby forming a virtual machine request carrying information of the hard disk capacity and memory capacity of the cloud virtual machine to be requested. Of course, the manner in which the user sends the virtual machine request through the terminal may also be implemented by using other existing technologies, which is not limited herein.
S102, judging whether the target ratio of the hard disk capacity to the memory capacity exceeds a preset ratio or not, and executing S103 if the target ratio exceeds the preset ratio; otherwise, executing S104;
the applicant determines the predetermined ratio by statistical analysis, that is, the predetermined ratio is a predetermined empirical value. Specifically, when the ratio of the hard disk capacity to the content capacity of the requested cloud virtual machine exceeds the predetermined ratio, if the cloud virtual machine is allocated according to the virtual machine request, it indicates that the request amount of the hard disk resource is greater than the predetermined degree of the memory resource, at this time, the waste rate of the hard disk resource is reduced; when the ratio of the hard disk capacity to the content capacity of the requested cloud virtual machine does not exceed the predetermined ratio, if the cloud virtual machine is allocated according to the virtual machine request, it indicates that the request amount of the hard disk resource is not greater than the predetermined degree of the memory resource, and then the hard disk resource is wasted. Specifically, the predetermined ratio may be: 31:1, although not limited thereto.
Therefore, after receiving the virtual machine request, the cloud server does not directly allocate a virtual machine to a user according to the received virtual machine request, but first determines whether a target ratio of the hard disk capacity to the memory capacity exceeds a predetermined ratio, and executes different operations according to different determination results, in order to improve the utilization rate of the hard disk resources and the memory resources of the physical machine associated with the cloud server. Specifically, when it is determined that the target ratio of the hard disk capacity to the memory capacity exceeds the predetermined ratio, it indicates that the hard disk resources and the memory resources can be effectively utilized when the cloud virtual machine is allocated according to the target ratio, and at this time, S103 may be executed; when it is determined that the target ratio of the hard disk capacity to the memory capacity does not exceed the predetermined ratio, it indicates that hard disk resources are wasted subsequently when the cloud virtual machine is allocated according to the target ratio, and at this time, S104 may be performed.
S103, distributing a cloud virtual machine for the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request;
when the target ratio of the hard disk capacity to the memory capacity is judged to exceed the preset ratio, the cloud server can allocate a cloud virtual machine to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request. It can be understood that, because the cloud server is associated with a plurality of physical machines, when the cloud virtual machine is allocated, the cloud server can select one physical machine from at least one physical machine whose remaining hard disk capacity and remaining memory capacity both satisfy the virtual machine request to allocate the cloud virtual machine to the user.
Based on the foregoing principle, specifically, the allocating, according to the hard disk capacity and the memory capacity carried by the virtual machine request, a cloud virtual machine to the user based on the associated physical machine may include:
determining a target physical machine for distributing a cloud virtual machine to the user from at least one physical machine of which the residual hard disk capacity meets the hard disk capacity carried by the virtual machine request and the residual memory capacity meets the memory capacity carried by the virtual machine request;
and distributing a cloud virtual machine for the user based on the target physical machine.
Further, the target physical machine for allocating the cloud virtual machine to the user may be determined in a random selection manner or a predetermined selection manner, which is certainly not limited to this, where the predetermined selection manner is determined based on the size of the remaining physical resource. For example, the predetermined selection manner may be: the method with the least remaining physical resources is selected preferentially, or the method with the most remaining physical resources is selected preferentially, and the like.
It should be emphasized that the above-described specific implementation manner of allocating the cloud virtual machine to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request is merely an example, and should not be construed as a limitation to the embodiment of the present invention; in addition, the specific implementation manner of allocating the cloud virtual machine to the user based on the target physical machine may be implemented by using the prior art, which is not limited herein.
S104, feeding back notification information about changing the hard disk capacity and the memory capacity according to the preset ratio to the terminal, so that the terminal outputs change prompt information corresponding to the notification information after receiving the notification information;
when the target ratio of the hard disk capacity to the memory capacity is judged not to exceed the preset ratio, in order to improve the utilization rate of the hard disk resources and the memory resources of the physical machine, the cloud server can feed back notification information about changing the hard disk capacity and the memory capacity according to the preset ratio to the terminal, so that the terminal outputs change prompt information corresponding to the notification information after receiving the notification information, and a user can make corresponding selection based on the change prompt information. It is emphasized that the change notification message may provide the user with a modification entry for the hard disk capacity and the memory capacity and a save and upload entry.
It is reasonable to understand that the content carried by the notification information and the content carried by the change prompting information may be the same or different; moreover, the specific display form of the change prompting message can be a pop-up window form or a web interface form, and the like, which is reasonable. For example: the information content of the change prompting message may include: "please change the requested hard disk capacity and memory capacity, ensure the ratio of the hard disk capacity and memory capacity is larger than the predetermined ratio"; or "please change the requested hard disk capacity and memory capacity according to the hard disk capacity/memory capacity being greater than the target ratio".
Furthermore, in order to ensure the user experience, the notification information may further include a pricing corresponding to each ratio of the hard disk capacity to the memory capacity; correspondingly, the information content of the change prompting message further comprises: and pricing is carried out corresponding to each ratio of the hard disk capacity to the memory capacity, so that a user can determine the resource information of the requested cloud virtual machine according to pricing information.
S105, when receiving a change request sent by the user through the terminal, judging whether the changed ratio of the changed hard disk capacity to the changed memory capacity exceeds the preset ratio, if so, executing S106;
the change request carries information of the changed hard disk capacity and the changed memory capacity of the cloud virtual machine to be requested; wherein, the change request is sent by the user based on the change prompt information output by the terminal.
When receiving a change request sent by the user through the terminal, the cloud server may determine whether a changed ratio of the changed hard disk capacity to the changed memory capacity exceeds the predetermined ratio, and when the ratio is determined to exceed the predetermined ratio, continue to execute S106.
And S106, distributing a cloud virtual machine for the user based on the associated physical machine according to the changed hard disk capacity and the changed memory capacity.
When the changed ratio of the changed hard disk capacity to the changed memory capacity is judged to exceed the preset ratio, the cloud virtual machine can be distributed to the user based on the associated physical machine according to the changed hard disk capacity and the changed memory capacity, so that the utilization rate of hard disk resources and memory resources of the physical machine is improved. It can be understood that, because the cloud server is associated with a plurality of physical machines, when the cloud virtual machine is allocated, the cloud server can select one physical machine from at least one physical machine whose remaining hard disk capacity and remaining memory capacity both satisfy the change request to allocate the cloud virtual machine to the user.
Based on the foregoing principle, specifically, the allocating, according to the changed hard disk capacity and the changed memory capacity, the cloud virtual machine for the user based on the associated physical machine may include:
determining a target physical machine for distributing the cloud virtual machine to the user from at least one physical machine of which the residual hard disk capacity meets the changed hard disk capacity carried by the change request and the residual memory capacity meets the changed memory capacity carried by the change request;
and distributing a cloud virtual machine for the user based on the target physical machine.
Further, the target physical machine for allocating the cloud virtual machine to the user may be determined in a random selection manner or a predetermined selection manner, which is certainly not limited to this, where the predetermined selection manner is determined based on the size of the remaining physical resource. For example, the predetermined selection manner may be: the method with the least remaining physical resources is selected preferentially, or the method with the most remaining physical resources is selected preferentially, and the like.
It can be understood that, when it is determined that the changed ratio of the changed hard disk capacity to the changed memory capacity does not exceed the predetermined ratio, the user may be prompted to modify the requested resource according to S104; or, the cloud virtual machine may be allocated to the user based on the associated physical machine according to the changed hard disk capacity and the changed memory capacity, and in order to ensure that the physical machine achieves the maximum profit, the pricing corresponding to the requested cloud virtual machine may be increased according to a predetermined pricing policy.
Compared with the prior art, in the embodiment of the invention, when the cloud server receives the virtual machine request sent by the user through the terminal, the cloud virtual machine is not directly distributed to the user according to the information of the virtual machine request, but whether the target ratio of the hard disk capacity carried by the virtual machine request to the memory capacity exceeds the preset ratio is judged, and different operations are executed according to different judgment results, so that the configuration of more optimized physical resources is provided, therefore, the utilization rate of the hard disk resources and the memory resources of the physical machine associated with the cloud server is improved through the scheme, and the physical machine associated with the cloud server is further ensured to achieve the maximum benefit.
Further, based on the S101 to S106 provided in the foregoing embodiment, the physical resource allocation method provided in the embodiment of the present invention may further include the following steps:
s107, when a virtual machine reservation request sent by the user through the terminal is received, according to the hard disk capacity and the memory capacity carried by the virtual machine request, a cloud virtual machine is distributed to the user based on the associated physical machine, and the pricing corresponding to the requested cloud virtual machine is increased according to a preset pricing strategy.
The virtual machine reservation request is sent by a user based on change prompt information output by the terminal.
It can be understood that, when a user determines not to change the ratio of the hard disk capacity to the memory capacity, the user may send a virtual machine reservation request based on the change prompt information output by the terminal, and accordingly, the cloud server may allocate a cloud virtual machine to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request when receiving the virtual machine reservation request sent by the user based on the terminal, and may increase the pricing corresponding to the requested cloud virtual machine according to a predetermined pricing policy in order to ensure that the associated physical machine achieves the maximum profit.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a physical resource allocation apparatus, which is applied to a cloud server, and as shown in fig. 3, the apparatus may include:
a virtual machine request receiving module 310, a ratio judging module 320, a resource allocation module 330, a notification information sending module 340 and a change request processing module 350;
the virtual machine request receiving module 310 is configured to receive a virtual machine request sent by a user through a terminal, where the virtual machine request carries information of a hard disk capacity and a memory capacity of a cloud virtual machine to be requested;
the ratio determining module 320 is configured to determine whether a target ratio of the hard disk capacity to the memory capacity exceeds a predetermined ratio, trigger the resource allocating module 330 if the target ratio exceeds the predetermined ratio, and trigger the notification information sending module 340 if the target ratio does not exceed the predetermined ratio;
the resource allocation module 330 is configured to allocate a cloud virtual machine to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request;
the notification information sending module 340 is configured to feed back notification information about changing the hard disk capacity and the memory capacity according to the predetermined ratio to the terminal, so that the terminal outputs change prompt information corresponding to the notification information after receiving the notification information;
the change request processing module 350 is configured to, when a change request which is sent by the user through the terminal and carries information of changed hard disk capacity and changed memory capacity of the cloud virtual machine to be requested is received, determine whether a changed ratio of the changed hard disk capacity to the changed memory capacity exceeds the predetermined ratio, and if so, allocate the cloud virtual machine to the user based on the associated physical machine according to the changed hard disk capacity and the changed memory capacity, where the change request is sent by the user based on change prompt information output by the terminal.
Compared with the prior art, in the embodiment of the invention, when the cloud server receives the virtual machine request sent by the user through the terminal, the cloud virtual machine is not directly distributed to the user according to the information of the virtual machine request, but whether the target ratio of the hard disk capacity carried by the virtual machine request to the memory capacity exceeds the preset ratio is judged, and different operations are executed according to different judgment results, so that the configuration of more optimized physical resources is provided, therefore, the utilization rate of the hard disk resources and the memory resources of the physical machine associated with the cloud server is improved through the scheme, and the physical machine associated with the cloud server is further ensured to achieve the maximum benefit.
Further, a physical resource allocation apparatus provided in an embodiment of the present invention, as shown in fig. 4, may further include: a reservation request processing module 360;
the reservation request processing module 360 is configured to, when receiving a virtual machine reservation request sent by the user through the terminal, allocate a cloud virtual machine to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request, and increase a pricing corresponding to the requested cloud virtual machine according to a predetermined pricing strategy, where the virtual machine reservation request is sent by the user based on change prompt information output by the terminal.
Further, the resource allocation module 330 may include:
a target physical machine determining unit, configured to determine a target physical machine for allocating a cloud virtual machine to the user from at least one physical machine whose remaining hard disk capacity satisfies the hard disk capacity carried by the virtual machine request and whose remaining memory capacity satisfies the memory capacity carried by the virtual machine request;
and the virtual machine distribution unit is used for distributing the cloud virtual machine for the user based on the target physical machine.
Further, the target physical machine determining unit is specifically configured to determine, through a random selection manner or a predetermined selection manner, a target physical machine that allocates the cloud virtual machine to the user, where the predetermined selection manner is a manner determined based on the size of the remaining physical resources. Furthermore, the notification information further includes a pricing corresponding to each ratio of the hard disk capacity to the memory capacity.
Specifically, the predetermined ratio is: 31:1.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a physical resource allocation system, and as shown in fig. 5, the system may include:
a cloud server 510 and at least one physical machine 520 associated with the cloud server;
wherein the cloud server 510 is configured to:
receiving a virtual machine request sent by a user through a terminal, wherein the virtual machine request carries information of hard disk capacity and memory capacity of a cloud virtual machine to be requested;
judging whether the target ratio of the hard disk capacity to the memory capacity exceeds a preset ratio or not;
if yes, distributing a cloud virtual machine for the user based on the associated physical machine 520 according to the hard disk capacity and the memory capacity carried by the virtual machine request;
if the hard disk capacity and the memory capacity are not exceeded, feeding back notification information about changing the hard disk capacity and the memory capacity according to the preset ratio to the terminal, so that the terminal outputs change prompt information corresponding to the notification information after receiving the notification information;
when a change request which is sent by the user through the terminal and carries information of changed hard disk capacity and changed memory capacity of a cloud virtual machine to be requested is received, whether the changed ratio of the changed hard disk capacity and the changed memory capacity exceeds the preset ratio is judged, if yes, the cloud virtual machine is distributed to the user on the basis of the associated physical machine 520 according to the changed hard disk capacity and the changed memory capacity, wherein the change request is sent by the user on the basis of change prompt information output by the terminal.
Compared with the prior art, in the embodiment of the invention, when the cloud server receives the virtual machine request sent by the user through the terminal, the cloud virtual machine is not directly distributed to the user according to the information of the virtual machine request, but whether the target ratio of the hard disk capacity carried by the virtual machine request to the memory capacity exceeds the preset ratio is judged, and different operations are executed according to different judgment results, so that the configuration of more optimized physical resources is provided, therefore, the utilization rate of the hard disk resources and the memory resources of the physical machine associated with the cloud server is improved through the scheme, and the physical machine associated with the cloud server is further ensured to achieve the maximum benefit.
Further, the cloud server 510 provided in the embodiment of the present invention is further configured to:
when a virtual machine retention request sent by the user through the terminal is received, a cloud virtual machine is distributed to the user based on the associated physical machine 520 according to the hard disk capacity and the memory capacity carried by the virtual machine request, and the pricing corresponding to the requested cloud virtual machine is increased according to a preset pricing strategy, wherein the virtual machine retention request is sent by the user based on change prompt information output by the terminal.
Further, the cloud server is specifically configured to:
determining a target physical machine for distributing a cloud virtual machine to the user from at least one physical machine with the residual hard disk capacity meeting the hard disk capacity carried by the virtual machine request and the residual memory capacity meeting the memory capacity carried by the virtual machine request;
and distributing a cloud virtual machine for the user based on the target physical machine.
Further, the cloud server is specifically configured to: and determining a target physical machine for distributing the cloud virtual machine for the user through a random selection mode or a preset selection mode, wherein the preset selection mode is determined based on the size of the residual physical resources. Furthermore, the notification information further includes a pricing corresponding to each ratio of the hard disk capacity to the memory capacity.
Further, the predetermined ratio is: 31:1.
It is noted that, herein, relational terms such as first and second, and the like may be 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.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (18)
1. A physical resource allocation method is applied to a cloud server, and the method comprises the following steps:
receiving a virtual machine request sent by a user through a terminal, wherein the virtual machine request carries information of hard disk capacity and memory capacity of a cloud virtual machine to be requested;
judging whether the target ratio of the hard disk capacity to the memory capacity exceeds a preset ratio or not;
if the hard disk capacity and the memory capacity are not in the preset range, distributing a cloud virtual machine for the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request;
if the hard disk capacity and the memory capacity are not exceeded, feeding back notification information about changing the hard disk capacity and the memory capacity according to the preset ratio to the terminal, so that the terminal outputs change prompt information corresponding to the notification information after receiving the notification information;
when a change request which is sent by the user through the terminal and carries information of changed hard disk capacity and changed memory capacity of a cloud virtual machine to be requested is received, whether the changed ratio of the changed hard disk capacity and the changed memory capacity exceeds the preset ratio is judged, if yes, the cloud virtual machine is distributed to the user on the basis of the associated physical machine according to the changed hard disk capacity and the changed memory capacity, wherein the change request is sent by the user on the basis of change prompt information output by the terminal.
2. The method of claim 1, further comprising:
when a virtual machine retention request sent by the user through the terminal is received, a cloud virtual machine is distributed to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request, and the pricing corresponding to the requested cloud virtual machine is increased according to a preset pricing strategy, wherein the virtual machine retention request is sent by the user based on change prompt information output by the terminal.
3. The method according to claim 1 or 2, wherein the allocating a cloud virtual machine to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request comprises:
determining a target physical machine for distributing a cloud virtual machine to the user from at least one physical machine with the residual hard disk capacity meeting the hard disk capacity carried by the virtual machine request and the residual memory capacity meeting the memory capacity carried by the virtual machine request;
and distributing a cloud virtual machine for the user based on the target physical machine.
4. The method of claim 3, wherein determining a target physical machine to which to assign a cloud virtual machine to the user comprises:
and determining a target physical machine for distributing the cloud virtual machine for the user through a random selection mode or a preset selection mode, wherein the preset selection mode is determined based on the size of the residual physical resources.
5. The method according to claim 1 or 2, wherein the notification information further includes a pricing corresponding to each ratio of the hard disk capacity to the memory capacity.
6. A method according to claim 1 or 2, characterized in that the predetermined ratio is: 31:1.
7. A physical resource allocation device applied to a cloud server, the device comprising: the system comprises a virtual machine request receiving module, a ratio judging module, a resource allocation module, a notification information sending module and a change request processing module; wherein,
the virtual machine request receiving module is used for receiving a virtual machine request sent by a user through a terminal, wherein the virtual machine request carries information of the hard disk capacity and the memory capacity of a cloud virtual machine to be requested;
the ratio judging module is used for judging whether the target ratio of the hard disk capacity to the memory capacity exceeds a preset ratio or not, if so, triggering the resource allocation module, and if not, triggering the notification information sending module;
the resource allocation module is used for allocating a cloud virtual machine to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request;
the notification information sending module is configured to feed back notification information about changing the hard disk capacity and the memory capacity according to the predetermined ratio to the terminal, so that the terminal outputs change prompt information corresponding to the notification information after receiving the notification information;
the change request processing module is used for judging whether the changed ratio of the changed hard disk capacity to the changed memory capacity exceeds the preset ratio or not when receiving a change request which is sent by the user through the terminal and carries information of the changed hard disk capacity and the changed memory capacity of the cloud virtual machine to be requested, if so, distributing the cloud virtual machine for the user based on the associated physical machine according to the changed hard disk capacity and the changed memory capacity, wherein the change request is sent by the user based on change prompt information output by the terminal.
8. The apparatus of claim 7, further comprising: a reservation request processing module;
the reservation request processing module is configured to, when receiving a virtual machine reservation request sent by the user through the terminal, allocate a cloud virtual machine to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request, and increase a pricing corresponding to the requested cloud virtual machine according to a predetermined pricing strategy, where the virtual machine reservation request is sent by the user based on change prompt information output by the terminal.
9. The apparatus of claim 7 or 8, wherein the resource allocation module comprises:
a target physical machine determining unit, configured to determine a target physical machine for allocating a cloud virtual machine to the user from at least one physical machine whose remaining hard disk capacity satisfies the hard disk capacity carried by the virtual machine request and whose remaining memory capacity satisfies the memory capacity carried by the virtual machine request;
and the virtual machine distribution unit is used for distributing the cloud virtual machine for the user based on the target physical machine.
10. The apparatus according to claim 9, wherein the target physical machine determining unit is specifically configured to determine the target physical machine that allocates the cloud virtual machine to the user through a random selection manner or a predetermined selection manner, where the predetermined selection manner is determined based on a size of the remaining physical resources.
11. The apparatus according to claim 7 or 8, wherein the notification message further comprises a pricing corresponding to each ratio of the hard disk capacity to the memory capacity.
12. The apparatus according to claim 7 or 8, wherein the predetermined ratio is: 31:1.
13. A physical resource allocation system, comprising:
the system comprises a cloud server and at least one physical machine associated with the cloud server;
wherein, the cloud server is used for:
receiving a virtual machine request sent by a user through a terminal, wherein the virtual machine request carries information of hard disk capacity and memory capacity of a cloud virtual machine to be requested;
judging whether the target ratio of the hard disk capacity to the memory capacity exceeds a preset ratio or not;
if the hard disk capacity and the memory capacity are not in the preset range, distributing a cloud virtual machine for the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request;
if the hard disk capacity and the memory capacity are not exceeded, feeding back notification information about changing the hard disk capacity and the memory capacity according to the preset ratio to the terminal, so that the terminal outputs change prompt information corresponding to the notification information after receiving the notification information;
when a change request which is sent by the user through the terminal and carries information of changed hard disk capacity and changed memory capacity of a cloud virtual machine to be requested is received, whether the changed ratio of the changed hard disk capacity and the changed memory capacity exceeds the preset ratio or not is judged, if yes, the cloud virtual machine is distributed to the user on the basis of the associated physical machine according to the changed hard disk capacity and the changed memory capacity, and the change request is sent by the user on the basis of change prompt information output by the terminal.
14. The system of claim 13, wherein the cloud server is further configured to:
when a virtual machine retention request sent by the user through the terminal is received, a cloud virtual machine is distributed to the user based on the associated physical machine according to the hard disk capacity and the memory capacity carried by the virtual machine request, and the pricing corresponding to the requested cloud virtual machine is increased according to a preset pricing strategy, wherein the virtual machine retention request is sent by the user based on change prompt information output by the terminal.
15. The system of claim 13 or 14, wherein the cloud server is specifically configured to:
determining a target physical machine for distributing a cloud virtual machine to the user from at least one physical machine with the residual hard disk capacity meeting the hard disk capacity carried by the virtual machine request and the residual memory capacity meeting the memory capacity carried by the virtual machine request;
and distributing a cloud virtual machine for the user based on the target physical machine.
16. The system of claim 15, wherein the cloud server is specifically configured to: and determining a target physical machine for distributing the cloud virtual machine for the user through a random selection mode or a preset selection mode, wherein the preset selection mode is determined based on the size of the residual physical resources.
17. The system according to claim 13 or 14, wherein the notification message further comprises a pricing corresponding to each ratio of the hard disk capacity to the memory capacity.
18. The system according to claim 13 or 14, wherein the predetermined ratio is: 31:1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511026242.9A CN106936874B (en) | 2015-12-31 | 2015-12-31 | Physical source distributing method, apparatus and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511026242.9A CN106936874B (en) | 2015-12-31 | 2015-12-31 | Physical source distributing method, apparatus and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106936874A true CN106936874A (en) | 2017-07-07 |
CN106936874B CN106936874B (en) | 2019-05-31 |
Family
ID=59441262
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511026242.9A Active CN106936874B (en) | 2015-12-31 | 2015-12-31 | Physical source distributing method, apparatus and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106936874B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108388468A (en) * | 2018-01-26 | 2018-08-10 | 杨立群 | A kind of Flase File System dispatching method and device |
CN108632354A (en) * | 2018-04-02 | 2018-10-09 | 新华三云计算技术有限公司 | Physical machine receives pipe method, apparatus and cloud desktop management platform |
CN110851529A (en) * | 2019-11-01 | 2020-02-28 | 腾讯科技(深圳)有限公司 | Computing power scheduling method and related equipment |
CN113032107A (en) * | 2021-05-24 | 2021-06-25 | 北京金山云网络技术有限公司 | Resource management method, device and system of cloud database |
CN113709241A (en) * | 2021-08-26 | 2021-11-26 | 上海德拓信息技术股份有限公司 | Scheduling distribution combination method and system of physical resources in cloud scene |
WO2022242342A1 (en) * | 2021-05-17 | 2022-11-24 | 中国移动通信有限公司研究院 | Resource request method and apparatus, computing power network element node, and terminal device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103631633A (en) * | 2012-08-20 | 2014-03-12 | 中国电信股份有限公司 | Virtual machine total-system online migration method, device and system |
CN103677960A (en) * | 2013-12-19 | 2014-03-26 | 安徽师范大学 | Game resetting method for virtual machines capable of controlling energy consumption |
CN104050008A (en) * | 2013-03-15 | 2014-09-17 | 中兴通讯股份有限公司 | Excessive distribution management system and method for memory |
-
2015
- 2015-12-31 CN CN201511026242.9A patent/CN106936874B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103631633A (en) * | 2012-08-20 | 2014-03-12 | 中国电信股份有限公司 | Virtual machine total-system online migration method, device and system |
CN104050008A (en) * | 2013-03-15 | 2014-09-17 | 中兴通讯股份有限公司 | Excessive distribution management system and method for memory |
CN103677960A (en) * | 2013-12-19 | 2014-03-26 | 安徽师范大学 | Game resetting method for virtual machines capable of controlling energy consumption |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108388468A (en) * | 2018-01-26 | 2018-08-10 | 杨立群 | A kind of Flase File System dispatching method and device |
CN108388468B (en) * | 2018-01-26 | 2022-02-22 | 杨立群 | Fast file system scheduling method and device |
CN108632354A (en) * | 2018-04-02 | 2018-10-09 | 新华三云计算技术有限公司 | Physical machine receives pipe method, apparatus and cloud desktop management platform |
CN110851529A (en) * | 2019-11-01 | 2020-02-28 | 腾讯科技(深圳)有限公司 | Computing power scheduling method and related equipment |
CN110851529B (en) * | 2019-11-01 | 2024-05-28 | 腾讯科技(深圳)有限公司 | Calculation power scheduling method and related equipment |
WO2022242342A1 (en) * | 2021-05-17 | 2022-11-24 | 中国移动通信有限公司研究院 | Resource request method and apparatus, computing power network element node, and terminal device |
CN113032107A (en) * | 2021-05-24 | 2021-06-25 | 北京金山云网络技术有限公司 | Resource management method, device and system of cloud database |
CN113709241A (en) * | 2021-08-26 | 2021-11-26 | 上海德拓信息技术股份有限公司 | Scheduling distribution combination method and system of physical resources in cloud scene |
CN113709241B (en) * | 2021-08-26 | 2024-01-23 | 上海德拓信息技术股份有限公司 | Scheduling and distributing combination method and system for physical resources in cloud scene |
Also Published As
Publication number | Publication date |
---|---|
CN106936874B (en) | 2019-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106936874B (en) | Physical source distributing method, apparatus and system | |
JP2007249470A (en) | Cluster server system, charging device and charging method | |
JP6089783B2 (en) | Control device, resource control program, and resource control method | |
CN105159782A (en) | Cloud host based method and apparatus for allocating resources to orders | |
CN106713168B (en) | Flow control method and system | |
US20140282626A1 (en) | Processing of application programming interface traffic | |
CN104239150B (en) | A kind of method and device of hardware resource adjustment | |
WO2017088393A1 (en) | Bandwidth allocation method and system | |
CN108073448B (en) | Host machine resource allocation method and device and host machine scheduling method and device | |
CN105227489B (en) | A kind of bandwidth management method and electronic equipment | |
CN107948004B (en) | Video CDN (content delivery network) calling optimization method and device | |
CN105791254B (en) | Network request processing method and device and terminal | |
CN109416646B (en) | Optimization method for container allocation and processing equipment | |
US20150135505A1 (en) | Formation of Equipment Families on Fitting Lines | |
CN109710410B (en) | Internet information resource allocation method and device | |
CN103309745B (en) | The method and device of the virtual resource configuration of cloud framework | |
CN107239347B (en) | Equipment resource allocation method and device in virtual scene | |
CN108093272B (en) | Video CDN scheduling optimization method and device | |
WO2016101996A1 (en) | Allocating cloud computing resources in a cloud computing environment | |
JP2013125548A (en) | Virtual machine allocation system and method for using the same | |
JP2018511209A5 (en) | ||
CN104021046A (en) | Method and device for processing applications | |
US20140380304A1 (en) | Methods and systems for energy management in a virtualized data center | |
CN109525991B (en) | Method, distribution server and system for network login | |
US20160139940A1 (en) | Systems and methods for creating virtual machine |
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 |