CN113204406A - Server resource management method, system, device and storage medium - Google Patents
Server resource management method, system, device and storage medium Download PDFInfo
- Publication number
- CN113204406A CN113204406A CN202110378724.XA CN202110378724A CN113204406A CN 113204406 A CN113204406 A CN 113204406A CN 202110378724 A CN202110378724 A CN 202110378724A CN 113204406 A CN113204406 A CN 113204406A
- Authority
- CN
- China
- Prior art keywords
- cluster server
- preset
- target
- server
- migrated
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000007726 management method Methods 0.000 title claims abstract description 41
- 238000012544 monitoring process Methods 0.000 claims abstract description 12
- 238000013508 migration Methods 0.000 claims description 60
- 230000005012 migration Effects 0.000 claims description 60
- 238000000034 method Methods 0.000 claims description 17
- 238000012163 sequencing technique Methods 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 2
- 230000010076 replication Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003362 replicative effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- 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
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- 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
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- 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/50—Network services
- H04L67/56—Provisioning of proxy services
-
- 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/4557—Distribution of virtual machine instances; Migration and load balancing
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computer And Data Communications (AREA)
Abstract
The disclosure provides a server resource management method, a system, equipment and a storage medium, relates to the technical field of cloud computing, and can solve the problems of overweight load and performance reduction of an existing cloud server. The specific technical scheme is as follows: the proxy server manages the cluster servers, monitors the resource use state of each cluster server, and adjusts and reasonably distributes user resources according to the monitoring result. The invention is used for resource management.
Description
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a server resource management method, system, device, and storage medium.
Background
The existing cloud office system mainly comprises a zero terminal and a cloud server, wherein the zero terminal is used for receiving a virtual desktop image from the cloud, transmitting local mouse and keyboard information to the cloud in a reverse mode, injecting virtual desktops corresponding to the current zero terminal from the cloud, and generating the virtual desktops for virtual machines distributed to the current zero terminal by the cloud server; a plurality of virtual machines run in the cloud server and provide a running hardware environment for the virtual machines. In the cloud office scenario, generally, a user can log in to a corresponding virtual machine by inputting a user name and a password at a zero terminal, and then perform required office operations in the virtual machine. However, if the number of virtual machines connected to one cloud server is too large, the load of the cloud server is too heavy, and the performance of the cloud server is reduced, so that the use experience of a user is directly affected.
Disclosure of Invention
The embodiment of the disclosure provides a server resource management method, a server resource management system, a server resource management device and a storage medium, which can solve the problems of heavy load and performance reduction of an existing cloud server. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a server resource management method, including:
the method comprises the steps that a proxy server receives a connection request sent by target terminal equipment, wherein the connection request comprises login information of a target user;
acquiring the resource occupation condition of a preset cluster server corresponding to the login information, and judging whether the resource occupation condition of the preset cluster server meets preset requirements or not;
when the resource occupation condition of the preset cluster server does not meet the preset requirement, sending inquiry information whether to perform data migration to the target terminal equipment, and receiving user operation information fed back by the target terminal equipment;
when the user operation information indicates that data migration is carried out, copying preset virtual machine data corresponding to a target user in a preset cluster server into a target virtual machine in the target cluster server;
and after the data migration is finished, binding the login information of the target user to the target virtual machine of the target cluster server.
The resource using state of each cluster server is monitored by managing the cluster servers, and user resources are adjusted and reasonably distributed according to monitoring results, so that the purpose of reasonably utilizing the resources is achieved, and the user experience is improved.
In one embodiment, the determining whether the resource occupation status of the preset cluster server meets the preset requirement includes:
judging whether the CPU occupancy rate of a preset cluster server exceeds a first preset threshold value or not;
and/or judging whether the memory occupancy rate of the preset cluster server exceeds a second preset threshold value.
In an embodiment, before the data of the preset virtual machine corresponding to the target user in the preset cluster server is copied to the target virtual machine in the target cluster server, the method further includes:
and determining a target cluster server from the at least one cluster server to be migrated.
In one embodiment, determining a target cluster server from the at least one cluster server to be migrated comprises:
acquiring position information of each cluster server to be migrated and a preset cluster server, calculating the distance between each cluster server to be migrated and the preset cluster server, and sequencing the cluster servers to be migrated according to the sequence of the distances from small to large;
judging whether a cluster server to be migrated closest to the cluster server to be migrated has spare resources, wherein the spare resources are used for indicating that the CPU occupancy rate of the cluster server to be migrated is less than a third preset threshold and/or the memory occupancy rate of the cluster server to be migrated is less than a fourth preset threshold, the third preset threshold is less than or equal to a first preset threshold, and the fourth preset threshold is less than or equal to a second preset threshold;
when spare resources exist in the cluster server to be migrated which is closest to the target cluster server, determining the cluster server to be migrated which is closest to the target cluster server;
and when the cluster server to be migrated which is closest to the cluster server to be migrated has no vacant resources, judging whether the next cluster server to be migrated has vacant resources according to the sequence until the found cluster server to be migrated with vacant resources is determined as the target cluster server.
In one embodiment, determining a target cluster server from the at least one cluster server to be migrated comprises:
monitoring the CPU occupancy rate and the memory occupancy rate of each cluster server to be migrated;
determining a target set from all cluster servers to be migrated according to the CPU occupancy rate and the memory occupancy rate of each cluster server to be migrated, wherein the target set comprises at least one cluster server to be migrated with spare resources;
acquiring position information of each cluster server to be migrated and a preset cluster server in a target set, and calculating the distance between each cluster server to be migrated and the preset cluster server in the target set;
and determining the cluster server to be migrated with the spare resources closest to the preset cluster server in the target set as the target cluster server.
In one embodiment, the copying virtual machine data corresponding to a user in a preset cluster server to a target virtual machine in a target cluster server includes:
sending first migration information to a preset cluster server, wherein the first migration information comprises a preset virtual machine identifier and/or an identifier of a target cluster server;
receiving configuration information of a preset virtual machine sent by a preset cluster server;
sending second migration information to the target cluster server, wherein the second migration information comprises configuration information of a preset virtual machine;
receiving distribution information fed back by a target cluster server, wherein the distribution information comprises a target virtual machine identifier;
and copying the data on the preset virtual machine to the target virtual machine according to the preset virtual machine identifier and the target virtual machine identifier.
In one embodiment, the method further comprises: and after the data migration is completed, sending a migration completed notification message to the preset cluster server so that the preset cluster server resets the preset virtual machine and logs out the binding relationship between the preset virtual machine and the login information of the target user.
According to a second aspect of the embodiments of the present disclosure, there is provided a server resource management system including: the system comprises a proxy server, a plurality of cluster servers and a plurality of terminal devices, wherein the proxy server is respectively connected with each cluster server and each terminal device;
the terminal equipment is used for acquiring the login information of the target user, generating a connection request and sending the connection request to the proxy server, wherein the connection request comprises the login information of the target user;
the proxy server is used for acquiring the resource occupation condition of the preset cluster server corresponding to the login information of the target user, judging whether the resource occupation condition of the preset cluster server meets the preset requirement or not, and sending inquiry information whether to perform data migration or not to the terminal equipment when the resource occupation condition of the preset cluster server does not meet the preset requirement;
the terminal equipment is used for feeding back the user operation information to the proxy server;
the proxy server is used for copying preset virtual machine data corresponding to the target user in the preset cluster server to a target virtual machine in the target cluster server when the user operation information indicates to perform data migration, and binding login information of the target user to the target virtual machine of the target cluster server after the data migration is completed.
According to a third aspect of the embodiments of the present disclosure, there is provided a server resource management device, which includes a processor and a memory, where at least one computer instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the steps performed in the server resource management method described in the first aspect and any embodiment of the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, in which at least one computer instruction is stored, the instruction being loaded and executed by a processor to implement the steps performed in the server resource management method described in the first aspect and any embodiment of the first aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a server resource management method provided by an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a server resource system provided by an embodiment of the present disclosure;
fig. 3 is a block diagram of a server resource management device according to an embodiment of the present disclosure;
fig. 4 is a structural diagram of a server resource management device according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
An embodiment of the present disclosure provides a server resource management method, as shown in fig. 1, the server resource management method includes the following steps:
101. and the proxy server receives the connection request sent by the target terminal equipment.
The connection request comprises login information of a target user, the login information comprises a login account and password information, the login information corresponds to a preset virtual machine of a preset cluster server, and the connection request is used for indicating the establishment of the connection between the target terminal device and the preset virtual machine in the preset cluster server. In the embodiment of the present disclosure, the target terminal device may be a zero terminal device, or may be an intelligent terminal device installed with a soft R, such as a mobile phone, a PC, a notebook, a tablet, and the like. Specifically, a target user inputs a corresponding login account and password information in target terminal equipment, and the target terminal equipment generates a connection request according to the login information of the target user and sends the connection request to a proxy server. It should be noted that the target terminal device is any terminal device, and the present disclosure only takes the target terminal device as an example for description, and the target does not represent any limitation.
102. And acquiring the resource occupation condition of the preset cluster server corresponding to the login information, and judging whether the resource occupation condition of the preset cluster server meets the preset requirement.
In the embodiment of the present disclosure, the proxy server stores the corresponding relationship between the login information of different users and the corresponding cluster server in advance, so that the proxy server can determine the preset cluster server corresponding to the login information according to the login information sent by the target terminal device, further obtain the resource occupation condition of the preset cluster server corresponding to the login account, and determine whether the resource occupation condition of the preset cluster server meets the preset requirement.
Wherein, judging whether the resource occupation condition of the preset cluster server meets the preset requirement comprises: judging whether the CPU occupancy rate of a preset cluster server exceeds a first preset threshold value or not; and/or judging whether the memory occupancy rate of the preset cluster server exceeds a second preset threshold value. When at least one judgment result in the two judgment conditions is yes, determining that the resource occupation condition of the preset cluster server does not meet the preset requirement; otherwise, determining that the resource occupation condition of the preset cluster server meets the preset requirement. When the resource occupation condition of the preset cluster server meets the preset requirement, establishing the connection between the target terminal equipment and a preset virtual machine in the preset cluster server; and when the resource occupation condition of the preset cluster server does not meet the preset requirement, continuing to execute the step 103.
103. And when the resource occupation condition of the preset cluster server does not meet the preset requirement, sending inquiry information about whether to perform data migration to the target terminal equipment, and receiving user operation information fed back by the target terminal equipment.
According to the description in step 102, when the resource occupation condition of the preset cluster server does not meet the preset requirement, query information is sent to the target terminal device, the target terminal device displays the query information to the target user, the target user can choose to continue to connect with the preset cluster server, or choose to migrate data to other cluster servers, so that the target terminal device obtains user operation information and feeds back the user operation information to the proxy server. If the target user selects to continue to connect the preset cluster server, establishing connection between the target terminal equipment and a preset virtual machine in the preset cluster server; if the target user chooses to migrate the data to other cluster servers, then step 104 continues.
104. When the user operation information indicates that data migration is performed, copying preset virtual machine data corresponding to a target user in a preset cluster server to a target virtual machine in the target cluster server.
Since the proxy server is connected to the plurality of cluster servers at the same time, and the plurality of cluster servers include the preset cluster server and other cluster servers (i.e., at least one cluster server to be migrated) except the preset cluster server, when the user operation information indicates to perform data migration, the proxy server needs to determine a target cluster server for performing data migration from the at least one cluster server to be migrated, so that data migration can be performed.
In this disclosure, the target cluster server may be a cluster server that is closest to the preset cluster server and has spare resources. In the following, two different ways are listed to exemplify how to determine the target cluster server from the at least one cluster server to be migrated.
In a first example, determining a target cluster server from among the at least one cluster server to be migrated includes:
acquiring position information of each cluster server to be migrated and a preset cluster server, calculating the distance between each cluster server to be migrated and the preset cluster server, and sequencing the cluster servers to be migrated according to the sequence of the distances from small to large;
judging whether a cluster server to be migrated closest to the cluster server to be migrated has spare resources, wherein the spare resources are used for indicating that the CPU occupancy rate of the cluster server to be migrated is less than a third preset threshold and/or the memory occupancy rate of the cluster server to be migrated is less than a fourth preset threshold, the third preset threshold is less than or equal to a first preset threshold, and the fourth preset threshold is less than or equal to a second preset threshold;
when spare resources exist in the cluster server to be migrated which is closest to the target cluster server, determining the cluster server to be migrated which is closest to the target cluster server;
and when the cluster server to be migrated which is closest to the cluster server to be migrated has no vacant resources, judging whether the next cluster server to be migrated has vacant resources according to the sequence until the found cluster server to be migrated with vacant resources is determined as the target cluster server.
And if the position information of the cluster server to be migrated and the preset cluster server adopts the longitude and latitude information of the actual physical position. If the longitude and latitude information of the preset cluster server is (λ a, Φ a) and the longitude and latitude information of a certain cluster server to be migrated is (λ B, Φ B), a calculation formula of the distance d between the preset cluster server and the cluster server to be migrated is as follows:
d is 111.12cos {1/[ sin Φ Asin Φ B ten cos Φ Acos Φ Bcos (λ B- λ a) ] }.
And calculating to obtain the distance between each cluster server to be migrated and the preset cluster server according to the formula and the analogy, and sequencing the cluster servers to be migrated according to the sequence of the distances from small to large. And then starting to judge whether the cluster server to be migrated has vacant resources from the cluster server to be migrated closest to the cluster server to be migrated, if so, determining the cluster server to be a target cluster server, if not, continuously judging whether the next cluster server has vacant resources, and so on until the cluster server meeting the requirements is found.
In a second example, determining a target cluster server from the at least one cluster server to be migrated comprises:
monitoring the CPU occupancy rate and the memory occupancy rate of each cluster server to be migrated;
determining a target set from all cluster servers to be migrated according to the CPU occupancy rate and the memory occupancy rate of each cluster server to be migrated, wherein the target set comprises at least one cluster server to be migrated with spare resources;
acquiring position information of each cluster server to be migrated of the vacant resources in the target set and a preset cluster server, and calculating the distance between each cluster server to be migrated of the vacant resources in the target set and the preset cluster server;
and determining the cluster server to be migrated with the spare resources closest to the preset cluster server in the target set as a target cluster server.
Specifically, the proxy server monitors the CPU occupancy rate and the memory occupancy rate of each cluster server to be migrated, and updates the monitoring result in real time; when the target cluster server needs to be selected, the cluster servers to be migrated with all the resources being free are directly determined, and then the cluster server closest to the preset cluster service is selected from the cluster servers with the free resources as the target cluster server.
After the target cluster server is determined, copying preset virtual machine data corresponding to the target user in the preset cluster server to a target virtual machine in the target cluster server. Specifically, the proxy server sends first migration information to a preset cluster server, wherein the first migration information comprises a preset virtual machine identifier and/or an identifier of a target cluster server; receiving configuration information of a preset virtual machine sent by a preset cluster server; sending second migration information to the target cluster server, wherein the second migration information comprises configuration information of a preset virtual machine; receiving allocation information fed back by a target cluster server, wherein the allocation information comprises a target virtual machine identifier and is used for indicating that a target virtual machine meeting configuration requirements is allocated according to configuration information of a preset virtual machine; and copying the data on the preset virtual machine to the target virtual machine according to the preset virtual machine identifier and the target virtual machine identifier.
That is to say, the preset cluster server is connected to the target cluster server through the proxy server, and the target cluster server needs to allocate a target virtual machine meeting configuration requirements from a local creation or an existing idle virtual machine according to configuration information of the preset virtual machine, to serve as a new virtual machine of a target user, and further, copy data of the preset virtual machine to the target virtual machine.
105. And after the data migration is finished, binding the login information of the target user to the target virtual machine of the target cluster server.
After all data on the preset virtual machine are migrated to the target virtual machine, the proxy server needs to bind login information of the target user to the target virtual machine on the target cluster server, so that the proxy server can send a notification message of completion of data migration to the target terminal device to inform that the target user can log in again, and the target user can log in to the target virtual machine on the target cluster server through the original account password.
In the server resource management method provided by the embodiment of the disclosure, a proxy server receives a connection request sent by a target terminal device; acquiring the resource occupation condition of a preset cluster server corresponding to the login information, and judging whether the resource occupation condition of the preset cluster server meets preset requirements or not; when the resource occupation condition of the preset cluster server does not meet the preset requirement, sending inquiry information whether to perform data migration to the target terminal equipment, and receiving user operation information fed back by the target terminal equipment; when the user operation information indicates that data migration is carried out, copying preset virtual machine data corresponding to a target user in a preset cluster server into a target virtual machine in the target cluster server; and after the data migration is finished, binding the login information of the target user to the target virtual machine of the target cluster server. The load detection is carried out on each cluster server, and the resources of each cluster server are reasonably distributed, so that the purpose of reasonably utilizing the resources is achieved, and the user experience is improved.
Based on the server resource management method provided by the embodiment corresponding to fig. 1, another embodiment of the present disclosure provides a server resource management method, which may be applied to the server resource management system shown in fig. 2, where the server resource management system includes: the system comprises a proxy server, at least one cluster server and at least one terminal device, wherein the proxy server is respectively connected with each cluster server and each terminal device; at least one cluster server comprises a cluster server 1, a cluster server 2, … … and a cluster server N, and at least one terminal device comprises a terminal device 1, a terminal device 2, … … and a terminal device N. Fig. 2 shows a server resource management system in a wide area network, where the system is based on a spoke architecture, a proxy server (i.e., a spoke server) manages a plurality of cluster servers, each cluster server runs a plurality of virtual machines, and the spoke server monitors the resource usage state of each cluster server and adjusts user resources according to the monitoring result.
Specifically, the terminal device is configured to obtain login information of a target user, generate a connection request, and send the connection request to the proxy server, where the connection request includes the login information of the target user; the proxy server is used for acquiring the resource occupation condition of the preset cluster server corresponding to the login information of the target user, judging whether the resource occupation condition of the preset cluster server meets the preset requirement or not, and sending inquiry information whether to perform data migration or not to the terminal equipment when the resource occupation condition of the preset cluster server does not meet the preset requirement; the terminal equipment is used for feeding back the user operation information to the proxy server; the proxy server is used for copying preset virtual machine data corresponding to the target user in the preset cluster server to a target virtual machine in the target cluster server when the user operation information indicates to perform data migration, and binding login information of the target user to the target virtual machine of the target cluster server after the data migration is completed.
According to the server resource management system shown in fig. 2, the server resource management method provided by this embodiment includes the following steps:
201. the terminal equipment initiates a connection request aiming at a certain cluster server through the browser server.
Specifically, the terminal device may be a zero terminal device, or may be an intelligent terminal device installed with a soft R, such as a mobile phone, a PC, a notebook, a tablet, and the like.
The connection request initiated by the terminal device to the browser server comprises the following steps: a login account and a password; the login account corresponds to the cluster server, so that the brooker server can determine the cluster server corresponding to the account according to the login account.
202. When the broker server receives a connection request of the terminal equipment, firstly, judging whether the resource occupation condition of a cluster server which is requested to be connected by the terminal equipment meets the requirement or not, if so, agreeing to the connection request of the current terminal equipment, if not, informing a user that the resources of the current cluster server are in shortage, and inquiring the user whether to continue to connect the current cluster server or transfer data to other cluster servers; and if the user selects to continue to connect the current cluster server, the connection request of the current user is agreed, and if the user selects to migrate the data to other cluster servers, the data migration is carried out according to the selection of the user.
Specifically, the determining whether the resource occupation condition of the current cluster server meets the requirement includes:
1) judging whether the CPU occupancy rate of the current cluster server exceeds a preset threshold value a (for example, 70%);
2) judging whether the occupancy rate of the current cluster server exceeds a preset threshold b (for example, 80%);
and when at least one judgment result in the two judgment conditions is yes, determining that the current resource occupation condition does not meet the requirement, otherwise, determining that the current resource occupation condition meets the requirement.
203. When the user chooses to migrate data to other cluster servers, the data migration process is performed in the following manner.
In actual implementation, the brooker server is connected to a plurality of cluster servers at the same time, and the position information of the actual location where each cluster server is deployed can be predetermined and recorded in the brooker server.
When the user selects to migrate the data to other cluster servers, the cluster server which is closest to the current cluster server and has spare resources can be determined to be used as a target server for migrating the data of the current user.
The distance between two cluster servers can be determined by the following method:
if the position information of the cluster server adopts longitude and latitude information of the actual physical position of the cluster server, assuming that the longitude and latitude information of the cluster server a is (lambda A, phi A) and the longitude and latitude information of the cluster server B is (lambda B, phi B), a calculation formula of the distance d between the cluster server a and the cluster server B is as follows: d is 111.12cos {1/[ sin Φ Asin Φ B ten cos Φ Acos Φ Bcos (λ B — λ a) ] }, and then the distance between the current cluster server and other cluster servers is calculated.
In an alternative embodiment, the target cluster server may be determined as follows: firstly, the distance between each other cluster server and the current cluster server is respectively calculated according to the formula, and the cluster servers are sorted according to the sequence of the distances from small to small. Then starting to judge whether the cluster server closest to the cluster server has vacant resources or not, if so, determining the cluster server as a target cluster server, if not, continuously judging whether the next cluster server has vacant resources or not, and repeating the steps until the cluster server meeting the requirements is found; the spare resources here refer to: the CPU occupancy rate of the cluster server is smaller than a preset threshold c and/or the memory occupancy rate is smaller than a preset threshold d; wherein c may be equal to a, d may be equal to b; preferably, the values of c, d may be set smaller than a, b.
In another implementation, the target cluster server may be determined as follows:
the Broker server monitors the CPU and memory occupancy rates of all the cluster servers and updates the monitoring result in real time; when the target cluster server needs to be selected, the cluster servers with vacant resources are directly determined, if the cluster servers with vacant resources exist, the cluster server closest to the current cluster service is selected from the cluster servers to serve as the target cluster server. If not, the terminal equipment is informed that no migratable server resources exist currently.
And after the target cluster server is determined, the data migration of the current user can be carried out. Specifically, the broker server initiates a host migration application to the current cluster server, where the application includes: the identification information of the host to be migrated (that is, the identification information of the virtual machine that the current user requests to log in), or may further include: identification information of the target cluster server to be migrated. The current cluster server receiving the host migration application firstly returns the configuration information of the local host to the broker server.
The browser server also initiates a host migration application to the target cluster server, wherein the application comprises: and the host configuration information is determined according to the configuration information of the host returned by the current cluster server. And the target cluster server receiving the host migration application locally creates or directly allocates a virtual machine meeting the configuration requirement from the existing idle virtual machines, and the virtual machine is used as a new host of the current user.
When a new host (target virtual machine) in the target cluster server is ready, data replication from the old host to the new host can be started, and data replication between the current cluster server and the target cluster server is performed by the proxy server.
Specifically, the current cluster server and the target cluster server are connected through a browser server; replicating data is synchronizing data on an old host to a new host. Specifically, after the connection is successful, the data of the old host is copied to the new host; in actual implementation, the data in the two hosts can be compared and then the data with the difference copied to the new host.
204. And after the data copying of the old host and the new host is finished, the proxy server sends a notification message of finishing the host migration to the current user and asks the user to log in again.
After the host migration is completed, the proxy server binds the original account password of the user to the target virtual machine on the target cluster server, so that the user can log in to the target host on the target cluster server through the original account password.
Further, the proxy server will also send a notification message that the host migration is successful to the old cluster server (the current), and the old cluster server receiving the notification message will reset the old host and log out the login account and password information bound with the current old host.
According to the server resource management method provided by the embodiment of the disclosure, the proxy server can manage a plurality of cluster servers in a wide area network, monitor the resource use state of each cluster server, and adjust and reasonably distribute user resources according to the monitoring result, so that the purpose of reasonably utilizing the resources is achieved, and the user experience is improved.
Based on the server resource management method described in the embodiment corresponding to fig. 1, the following is an embodiment of the apparatus of the present disclosure, which may be used to execute an embodiment of the method of the present disclosure.
The embodiment of the present disclosure provides a server resource management device, as shown in fig. 3, where the server resource management device 30 includes: a receiving module 301, an obtaining module 302, a judging module 303, a sending module 304, a copying module 305 and a binding module 306;
a receiving module 301, configured to receive a connection request sent by a target terminal device, where the connection request includes login information of a target user;
an obtaining module 302, configured to obtain a resource occupation situation of a preset cluster server corresponding to the login information;
the judging module 303 is configured to judge whether a resource occupation condition of a preset cluster server meets a preset requirement;
a sending module 304, configured to send query information on whether to perform data migration to a target terminal device when a resource occupation condition of a preset cluster server does not meet a preset requirement;
a receiving module 301, configured to receive user operation information fed back by a target terminal device;
the copying module 305 is configured to copy, when the user operation information indicates to perform data migration, preset virtual machine data corresponding to a target user in a preset cluster server to a target virtual machine in the target cluster server;
and a binding module 306, configured to bind, after the data migration is completed, the login information of the target user to the target virtual machine of the target cluster server.
In an embodiment, the determining module 303 is configured to determine whether the CPU occupancy rate of the preset cluster server exceeds a first preset threshold; and/or judging whether the memory occupancy rate of the preset cluster server exceeds a second preset threshold value.
As shown in fig. 4, the server resource management device 30 further includes: a determination module 307, a calculation module 308, and a monitoring module 309;
in one embodiment, the determining module 307 is configured to determine a target cluster server from the at least one cluster server to be migrated.
In an embodiment, the obtaining module 302 is configured to obtain location information of each cluster server to be migrated and a preset cluster server;
the calculating module 308 is configured to calculate a distance between each cluster server to be migrated and a preset cluster server, and sort the cluster servers to be migrated according to a sequence of the distances from small to large;
the determining module 303 is configured to determine whether a cluster server to be migrated that is closest to the cluster server to be migrated has spare resources, where the spare resources are used to indicate that the CPU occupancy rate of the cluster server to be migrated is less than a third preset threshold and/or the memory occupancy rate is less than a fourth preset threshold, the third preset threshold is less than or equal to a first preset threshold, and the fourth preset threshold is less than or equal to a second preset threshold;
a determining module 307, configured to determine, when there are spare resources in the cluster server to be migrated that is closest to the target cluster server, the cluster server to be migrated that is closest to the target cluster server;
the determining module 307 is configured to, when there is no spare resource in the cluster server to be migrated closest to the target cluster server, sequentially determine whether there is spare resource in the next cluster server to be migrated until the found cluster server to be migrated having spare resource is determined as the target cluster server.
In one embodiment, the monitoring module 309 is configured to monitor a CPU occupancy rate and a memory occupancy rate of each cluster server to be migrated;
a determining module 307, configured to determine a target set from all to-be-migrated cluster servers according to the CPU occupancy rate and the memory occupancy rate of each to-be-migrated cluster server, where the target set includes at least one to-be-migrated cluster server with spare resources;
an obtaining module 302, configured to obtain location information of each cluster server to be migrated and a preset cluster server in a target set;
a calculating module 308, configured to calculate a distance between each cluster server to be migrated in the target set and a preset cluster server;
the determining module 307 is configured to determine, as a target cluster server, a cluster server to be migrated that has spare resources closest to a preset cluster server in the target set.
In an embodiment, the sending module 304 is configured to send first migration information to a preset cluster server, where the first migration information includes a preset virtual machine identifier and/or an identifier of a target cluster server;
a receiving module 301, configured to receive configuration information of a preset virtual machine sent by a preset cluster server;
a sending module 304, configured to send second migration information to the target cluster server, where the second migration information includes configuration information of a preset virtual machine;
a receiving module 301, configured to receive allocation information fed back by a target cluster server, where the allocation information includes a target virtual machine identifier;
the copying module 305 is configured to copy data on the preset virtual machine to the target virtual machine according to the preset virtual machine identifier and the target virtual machine identifier.
In an embodiment, the sending module 304 is configured to send a migration completion notification message to the preset cluster server after the data migration is completed, so that the preset cluster server resets the preset virtual machine and logs out a binding relationship between the preset virtual machine and the login information of the target user.
The resource management device provided by the embodiment of the disclosure monitors the resource use state of each cluster server by managing the plurality of cluster servers, and adjusts and reasonably distributes user resources according to the monitoring result, thereby achieving the purpose of reasonably utilizing the resources and improving the user experience.
The embodiment of the present disclosure further provides a server resource management device, where the processing device for furnace pressure abnormality includes a receiver, a transmitter, a memory and a processor, where the transmitter and the memory are respectively connected to the processor, the memory stores at least one computer instruction, and the processor is configured to load and execute the at least one computer instruction, so as to implement the server resource management method described in the embodiment corresponding to fig. 1.
Based on the server resource management method described in the embodiment corresponding to fig. 1, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the server resource management method described in the embodiment corresponding to fig. 1, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Claims (10)
1. A method for server resource management, the method comprising:
the method comprises the steps that a proxy server receives a connection request sent by target terminal equipment, wherein the connection request comprises login information of a target user;
acquiring the resource occupation condition of a preset cluster server corresponding to the login information, and judging whether the resource occupation condition of the preset cluster server meets preset requirements or not;
when the resource occupation condition of the preset cluster server does not meet the preset requirement, sending inquiry information whether to perform data migration to the target terminal equipment, and receiving user operation information fed back by the target terminal equipment;
when the user operation information indicates that data migration is carried out, copying preset virtual machine data corresponding to a target user in the preset cluster server to a target virtual machine in a target cluster server;
and after the data migration is finished, binding the login information of the target user to the target virtual machine of the target cluster server.
2. The method according to claim 1, wherein the determining whether the resource occupation status of the preset cluster server meets a preset requirement comprises:
judging whether the CPU occupancy rate of the preset cluster server exceeds a first preset threshold value or not;
and/or judging whether the memory occupancy rate of the preset cluster server exceeds a second preset threshold value.
3. The method according to claim 1, wherein before copying the preset virtual machine data corresponding to the target user in the preset cluster server to the target virtual machine in the target cluster server, the method further comprises:
and determining the target cluster server from at least one cluster server to be migrated.
4. The method of claim 3, wherein the determining the target cluster server from the at least one cluster server to be migrated comprises:
acquiring position information of each cluster server to be migrated and the preset cluster server, calculating the distance between each cluster server to be migrated and the preset cluster server, and sequencing the cluster servers to be migrated according to the sequence of the distances from small to large;
judging whether a cluster server to be migrated which is closest to the cluster server to be migrated has spare resources, wherein the spare resources are used for indicating that the CPU occupancy rate of the cluster server to be migrated is less than a third preset threshold and/or the memory occupancy rate of the cluster server to be migrated is less than a fourth preset threshold, the third preset threshold is less than or equal to the first preset threshold, and the fourth preset threshold is less than or equal to the second preset threshold;
when the cluster server to be migrated which is closest to the target cluster server has spare resources, determining the cluster server to be migrated which is closest to the target cluster server;
and when the cluster server to be migrated closest to the target cluster server has no vacant resources, judging whether the next cluster server to be migrated has vacant resources according to the sequence until the found cluster server to be migrated with vacant resources is determined as the target cluster server.
5. The method of claim 3, wherein the determining the target cluster server from the at least one cluster server to be migrated comprises:
monitoring the CPU occupancy rate and the memory occupancy rate of each cluster server to be migrated;
determining a target set from all cluster servers to be migrated according to the CPU occupancy rate and the memory occupancy rate of each cluster server to be migrated, wherein the target set comprises at least one cluster server to be migrated with spare resources;
acquiring position information of each cluster server to be migrated and the preset cluster server in the target set, and calculating the distance between each cluster server to be migrated and the preset cluster server in the target set;
and determining the cluster server to be migrated with the spare resources closest to the preset cluster server in the target set as the target cluster server.
6. The method according to claim 1, wherein the copying virtual machine data corresponding to the user in the preset cluster server to a target virtual machine in the target cluster server comprises:
sending first migration information to the preset cluster server, wherein the first migration information comprises a preset virtual machine identifier and/or an identifier of a target cluster server;
receiving configuration information of the preset virtual machine sent by the preset cluster server;
sending second migration information to the target cluster server, wherein the second migration information comprises configuration information of the preset virtual machine;
receiving allocation information fed back by the target cluster server, wherein the allocation information comprises the target virtual machine identifier;
and copying the data on the preset virtual machine to the target virtual machine according to the preset virtual machine identifier and the target virtual machine identifier.
7. The method of claim 1, further comprising:
and after the data migration is completed, sending a migration completed notification message to the preset cluster server so that the preset cluster server resets the preset virtual machine and logs out the binding relationship between the preset virtual machine and the login information of the target user.
8. A server resource management system, comprising: the system comprises a proxy server, a plurality of cluster servers and a plurality of terminal devices, wherein the proxy server is respectively connected with each cluster server and each terminal device;
the terminal equipment is used for acquiring login information of a target user, generating a connection request and sending the connection request to the proxy server, wherein the connection request comprises the login information of the target user;
the proxy server is used for acquiring the resource occupation condition of a preset cluster server corresponding to the login information of the target user, judging whether the resource occupation condition of the preset cluster server meets a preset requirement, and sending inquiry information whether to perform data migration to the terminal equipment when the resource occupation condition of the preset cluster server does not meet the preset requirement;
the terminal equipment is used for feeding back user operation information to the proxy server;
the proxy server is used for copying the preset virtual machine data corresponding to the target user in the preset cluster server to the target virtual machine in the target cluster server when the user operation information indicates to perform data migration, and binding the login information of the target user to the target virtual machine of the target cluster server after the data migration is completed.
9. A server resource management device, comprising a processor and a memory, the memory having stored therein at least one computer instruction, the instruction being loaded and executed by the processor to perform the steps performed in the server resource management method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon at least one computer instruction, which is loaded and executed by a processor to perform the steps performed in the server resource management method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110378724.XA CN113204406A (en) | 2021-04-08 | 2021-04-08 | Server resource management method, system, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110378724.XA CN113204406A (en) | 2021-04-08 | 2021-04-08 | Server resource management method, system, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113204406A true CN113204406A (en) | 2021-08-03 |
Family
ID=77026428
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110378724.XA Pending CN113204406A (en) | 2021-04-08 | 2021-04-08 | Server resource management method, system, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113204406A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114124969A (en) * | 2021-11-25 | 2022-03-01 | 广州市昊链信息科技股份有限公司 | Data copying method, device, equipment and storage medium |
CN115567588A (en) * | 2022-10-28 | 2023-01-03 | 深圳市瑞云科技股份有限公司 | Cloud desktop configuration method based on space station |
-
2021
- 2021-04-08 CN CN202110378724.XA patent/CN113204406A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114124969A (en) * | 2021-11-25 | 2022-03-01 | 广州市昊链信息科技股份有限公司 | Data copying method, device, equipment and storage medium |
CN115567588A (en) * | 2022-10-28 | 2023-01-03 | 深圳市瑞云科技股份有限公司 | Cloud desktop configuration method based on space station |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7441033B2 (en) | On demand node and server instance allocation and de-allocation | |
WO2018149221A1 (en) | Device management method and network management system | |
KR101544483B1 (en) | Replication server apparatus and method for creating replica in distribution storage system | |
US7437460B2 (en) | Service placement for enforcing performance and availability levels in a multi-node system | |
TWI344090B (en) | Management of a scalable computer system | |
EP1654649B1 (en) | On demand node and server instance allocation and de-allocation | |
CN113204406A (en) | Server resource management method, system, device and storage medium | |
US20060200469A1 (en) | Global session identifiers in a multi-node system | |
US10250482B2 (en) | Distributed task execution in different locations with dynamic formation of testing groups | |
CN106716385A (en) | Application centric distributed storage system and method | |
CN109416646B (en) | Optimization method for container allocation and processing equipment | |
CN107005452B (en) | Network function virtualization resource processing method and virtual network function manager | |
CN107872499B (en) | Service creation method, device and system | |
CN111061432B (en) | Service migration method, device, equipment and readable storage medium | |
EP3402123B1 (en) | Method and apparatus for transmitting request message | |
CN110008029B (en) | ceph metadata cluster directory distribution method, system, device and readable storage medium | |
JP2021033854A (en) | Information processing device, information processing system and information processing program | |
CN108874947B (en) | Data processing system and data processing method | |
JP5735899B2 (en) | Service providing system, file update method, and distributed management apparatus | |
CN108200151B (en) | ISCSI Target load balancing method and device in distributed storage system | |
CN103095759B (en) | Recover the method and apparatus of resource environment | |
WO2021013185A1 (en) | Virtual machine migration processing and strategy generation method, apparatus and device, and storage medium | |
CN115378962B (en) | High-availability communication method and system for storage cluster based on iSCSI protocol | |
CN102200928A (en) | Computation resource control apparatus, computation resource control method, and non-transitory computer-readable recording medium | |
CN115904640A (en) | Distributed task processing system and method |
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 |