CN112019583A - Method, device and storage medium for determining utilization rate of server cluster resources - Google Patents

Method, device and storage medium for determining utilization rate of server cluster resources Download PDF

Info

Publication number
CN112019583A
CN112019583A CN201910470431.7A CN201910470431A CN112019583A CN 112019583 A CN112019583 A CN 112019583A CN 201910470431 A CN201910470431 A CN 201910470431A CN 112019583 A CN112019583 A CN 112019583A
Authority
CN
China
Prior art keywords
resource utilization
server
state
utilization rate
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910470431.7A
Other languages
Chinese (zh)
Inventor
马晓越
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910470431.7A priority Critical patent/CN112019583A/en
Publication of CN112019583A publication Critical patent/CN112019583A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Abstract

The application discloses a method, a device and a storage medium for determining the utilization rate of server cluster resources, and relates to a server performance evaluation technology. The specific scheme comprises the following steps: acquiring the resource utilization rate of hardware resources of each server in the server cluster every other preset time period, and acquiring at least one resource utilization rate of the server in a preset time range aiming at each server; determining a resource utilization index of the server according to each resource utilization, and determining a resource utilization state of the server according to the resource utilization index; and determining the percentage of the number of the servers belonging to the resource utilization state in the total number of the servers in the server cluster aiming at each resource utilization state, and taking the percentage corresponding to each resource utilization state as the resource utilization rate of the server cluster. The method and the device can truly and comprehensively reflect the load pressure of the server cluster, and are favorable for comprehensively analyzing the overall resource utilization rate of the server cluster.

Description

Method, device and storage medium for determining utilization rate of server cluster resources
Technical Field
The present application relates to server performance evaluation technologies, and in particular, to a method, an apparatus, and a storage medium for determining a utilization rate of a server cluster resource.
Background
With the development of distributed technology, most of the servers are selected to be deployed in one or more server clusters by adopting the distributed technology. The distributed technology is beneficial to the distribution and optimization of calculation or storage tasks in the whole server cluster, and overcomes the defects of central host hardware resource shortage and response bottleneck caused by the traditional centralized system.
In a distributed server cluster, how to accurately evaluate the resource utilization rate of hardware resources is important, so that the redundancy of the hardware resources is avoided, and the reliability of a system is ensured. Resource utilization in the prior art is generally calculated by summing resource utilization of a single server to calculate resource utilization of the server cluster as a whole. However, a simple summing manner cannot truly and comprehensively reflect the load pressure of the server cluster, and the resource utilization calculation method of the server cluster cannot comprehensively analyze the overall situation of the cluster.
Disclosure of Invention
In view of this, a main object of the present application is to provide a method for determining resource utilization rate of a server cluster, which can truly and comprehensively reflect load pressure of the server cluster, and is beneficial to comprehensively analyzing the resource utilization rate of the whole server cluster.
In order to achieve the purpose, the technical scheme provided by the application is as follows:
in a first aspect, an embodiment of the present application provides a method for determining a resource utilization rate of a server cluster, including the following steps:
acquiring the resource utilization rate of hardware resources of each server in the server cluster every other preset time period, and acquiring at least one resource utilization rate of the server in a preset time range aiming at each server;
determining a resource utilization index of the server according to each resource utilization, and determining a resource utilization state of the server according to the resource utilization index; the resource utilization rate index is used for measuring the resource utilization condition of the server in the preset time range; the resource utilization state is at least one state identifier used for representing the busy degree of the server, which is obtained by dividing according to the resource utilization condition;
and determining the percentage of the number of the servers belonging to the resource utilization state in the total number of the servers in the server cluster aiming at each resource utilization state, and taking the percentage corresponding to each resource utilization state as the resource utilization rate of the server cluster.
In one possible embodiment, the resource utilization state includes: idle, normal, and busy; each resource utilization state comprises a preset resource utilization range;
the step of determining the resource utilization state of the server according to the resource utilization index comprises the following steps:
and determining the resource utilization state of the server according to the resource utilization range in which the resource utilization index of the server falls.
In a possible implementation manner, the step of determining the resource utilization index of the server according to each resource utilization rate includes:
and determining the maximum value, the minimum value, the median value or the average value of the resource utilization rate of the server as the resource utilization rate index of the server.
In a possible implementation manner, the step of determining the resource utilization index of the server according to each resource utilization rate includes:
and acquiring at least one target resource utilization rate meeting preset conditions from the resource utilization rates of the server, and determining the average value of the target resource utilization rates as a resource utilization rate index of the server.
In a possible implementation manner, the step of determining the resource utilization index of the server according to each resource utilization rate includes:
and acquiring at least one target resource utilization rate meeting preset conditions from the resource utilization rates of the server, and determining the variance of the target resource utilization rates as the resource utilization rate index of the server.
In a possible embodiment, the step of obtaining at least one target resource utilization satisfying a preset condition from each resource utilization of the server includes:
acquiring a resource utilization rate larger than a preset numerical threshold value from each resource utilization rate of the server as a target resource utilization rate;
or, obtaining the resource utilization rates with the maximum value of the former preset number from each resource utilization rate of the server as target resource utilization rates;
or, the resource utilization rate with the maximum value in the previous preset proportion is obtained from the resource utilization rates of the server and is used as the target resource utilization rate.
In a possible implementation manner, after the step of determining the percentage of the number of servers belonging to the resource utilization state to the total number of servers in the server cluster, the method further includes a step of evaluating the resource utilization condition of the server cluster:
judging whether the percentage of the number of the servers in the idle state to the total number of the servers in the server cluster is larger than a preset idle percentage threshold value or not;
if the resource utilization rate of the server cluster is larger than a preset idle percentage threshold value, evaluating the resource utilization rate condition of the server cluster as an idle state;
judging whether the percentage of the number of the servers in the busy state to the total number of the servers in the server cluster is larger than a preset busy percentage threshold value or not;
if the number of the server clusters is larger than a preset busy percentage threshold value, evaluating the resource utilization rate condition of the server clusters as a busy state;
and if the percentage of the number of the servers in the idle state to the total number of the servers in the server cluster is not more than a preset idle percentage threshold value, and the percentage of the number of the servers in the busy state to the total number of the servers in the server cluster is not more than a preset busy percentage threshold value, evaluating the resource utilization rate condition of the server cluster as a normal state.
In a possible embodiment, after the step of determining the percentage of the number of servers belonging to the resource utilization state to the total number of servers in the server cluster, the method further includes the step of evaluating a resource utilization distribution trend of the server cluster:
and aiming at each resource utilization state, comparing each percentage of the resource utilization state according to the time sequence to obtain the distribution trend of each percentage value.
In a possible embodiment, after the step of determining the percentage of the number of servers belonging to the resource utilization state to the total number of servers in the server cluster, the method further includes the step of evaluating the selection of hardware resources of each server in the server cluster:
and evaluating the selection of the hardware resource of the server according to the resource utilization state of each server in the server cluster.
In a second aspect, based on the same design concept, an embodiment of the present application further provides an apparatus for determining a utilization rate of a server cluster resource, including:
the acquisition module is used for acquiring the resource utilization rate of the hardware resource of each server in the server cluster every other preset time period, and acquiring at least one resource utilization rate of the server in a preset time range aiming at each server;
the index determining module is used for determining the resource utilization index of the server according to the resource utilization rate; the resource utilization rate index is used for measuring the resource utilization condition of the server in the preset time range;
the state determining module is used for determining the resource utilization state of the server according to the resource utilization rate index; the resource utilization state is at least one state identifier used for representing the busy degree of the server, which is obtained by dividing according to the resource utilization condition;
and the utilization rate determining module is used for determining the percentage of the number of the servers belonging to the resource utilization state in the total number of the servers in the server cluster according to each resource utilization state, and taking the percentage corresponding to each resource utilization state as the resource utilization rate of the server cluster.
In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which can truly and comprehensively reflect the load pressure of a server cluster. The specific scheme is as follows:
a computer readable storage medium storing computer instructions which, when executed by a processor, may implement the steps of any one of the possible embodiments of the first aspect and the first aspect as described above.
In a fourth aspect, an embodiment of the present application further provides an electronic device, which can truly and comprehensively reflect the load pressure of a server cluster. The specific scheme is as follows:
an electronic device comprising the computer-readable storage medium described above, further comprising a processor that can execute the computer-readable storage medium.
In summary, embodiments of the present application provide a method, an apparatus, and a storage medium for determining a resource utilization rate of a server cluster. And determining the resource utilization rate index of the server according to the resource utilization rate of each server within a preset time range, and determining the resource utilization state of the server according to the resource utilization rate index. The percentage of the number of servers included in each resource utilization state is used as the resource utilization rate of the server cluster. The resource utilization state of each server is evaluated, and the percentage of each resource utilization state is determined, so that the specific occupation ratio condition of the servers in different resource utilization states in one server cluster is reflected specifically, the resource utilization rate condition of the server cluster is reflected more truly and comprehensively, the specific occupation ratio condition of the servers in different resource utilization states is further analyzed, the comprehensive analysis of the overall resource utilization rate condition of the server cluster can be facilitated, and a more accurate and more instructive resource utilization rate analysis result is obtained.
Drawings
FIG. 1 is a schematic flow chart according to a first embodiment of the present disclosure;
FIG. 2 is a system architecture diagram of a method according to a second embodiment of the present application;
FIG. 3 is a schematic diagram of a process for evaluating resource utilization of a server cluster;
FIG. 4 is a resource utilization state diagram;
FIG. 5 is a schematic structural diagram of a third embodiment of the present application;
fig. 6 is a schematic structural diagram of a fifth embodiment of the present application.
Detailed Description
The method and the device for determining the resource utilization rate are applied to determining the resource utilization rate of any distributed server cluster comprising a plurality of servers.
The resource utilization rate calculation method of the server cluster in the prior art cannot perform comprehensive analysis aiming at the overall situation of the cluster:
for example, the resource utilization rate of the whole server cluster is calculated by summing the resource utilization rates of the single servers, and a simple summing mode cannot truly and comprehensively reflect the load pressure of the server cluster.
Or, the resource utilization rate of the whole server cluster is calculated by weighting and summing the resource utilization rates of the single servers. The resource utilization rate of the whole server cluster is calculated in a weighted summation mode, the weight is difficult to determine, and the actual load pressure of the server cluster can be further distorted by the wrong weight; and different weights need to be selected according to different situations, so the weighted summation method has no universality.
In view of this, the resource utilization state of each server is evaluated, and the percentage of each resource utilization state is determined, so that the specific occupation ratio of the servers in different resource utilization states in one server cluster is reflected specifically, the resource utilization rate of the server cluster is reflected more truly and comprehensively, and the specific occupation ratio of the servers in different resource utilization states is further analyzed, so that the overall resource utilization rate of the server cluster can be analyzed more favorably, and a more accurate and more instructive resource utilization rate analysis result is obtained.
To make the objects, technical solutions and advantages of the present application more clear, the present application will be further described in detail with reference to the accompanying drawings and specific embodiments.
Example one
Fig. 1 is a schematic flow chart of a first embodiment of the present application, as shown in fig. 1, the first embodiment mainly includes:
s101: the method comprises the steps of obtaining the resource utilization rate of hardware resources of each server in a server cluster every other preset time period, and obtaining at least one resource utilization rate of the server in a preset time range aiming at each server.
Here, a server cluster includes a plurality of servers, each of which has a unique server identifier, for example, each of which is identified by a unique server serial number. The hardware resources of each server include each hardware resource providing an operation, storage, or interface function in the server, for example, a Central Processing Unit (CPU), a memory, a hard disk, a magnetic disk, an Input/Output (IO), a load resource, a network resource, and the like, and each hardware resource can obtain a resource utilization rate in a preset time period.
Specifically, the preset time range may be equal to the preset time period, or may be greater than the preset time period. When the preset time range is equal to the preset time period, for example, the preset time period is 1 minute, and the preset time range is also 1 minute, acquiring the resource utilization rate of the server for 1 minute; for example, when the preset time period is 1 minute and the preset time range is 1 day, the resource utilization rate of the server per minute within 1 day is obtained.
S102: determining a resource utilization index of the server according to each resource utilization, and determining a resource utilization state of the server according to the resource utilization index; the resource utilization rate index is used for measuring the resource utilization condition of the server in the preset time range; the resource utilization state is at least one state identifier used for representing the busy degree of the server, which is obtained by dividing according to the resource utilization condition.
Specifically, the resource utilization rate index integrates each resource utilization rate within a preset time range, and the obtained resource utilization rate index can measure the resource utilization condition of the server within the preset time range. According to the resource utilization index, the resource utilization condition of each server can be divided into at least one different resource utilization state, each resource utilization state can represent the busy degree of the server, specifically can represent that the server is in a plurality of busy or idle states, and the expression form of each resource utilization state can be an identifier for measuring the busy degree of the server.
S103: and determining the percentage of the number of the servers belonging to the resource utilization state in the total number of the servers in the server cluster aiming at each resource utilization state, and taking the percentage corresponding to each resource utilization state as the resource utilization rate of the server cluster.
The percentage of the number of servers included in each resource utilization state is used as the resource utilization rate of the server cluster. The resource utilization state of each server is evaluated, and the percentage of each resource utilization state is determined, so that the specific occupation ratio condition of the servers in different resource utilization states in one server cluster is reflected specifically, the resource utilization rate condition of the server cluster is reflected more truly and comprehensively, the specific occupation ratio condition of the servers in different resource utilization states is further analyzed, the comprehensive analysis of the overall resource utilization rate condition of the server cluster can be facilitated, and a more accurate and more instructive resource utilization rate analysis result is obtained.
Example two
Fig. 2 is a system architecture diagram of a method for determining resource utilization of a server cluster according to a second embodiment of the present application, and as shown in fig. 2, the method according to the second embodiment of the present application specifically includes:
s201: and acquiring the resource utilization rate of the hardware resource of each server in the server cluster every other preset time period.
In order to more accurately analyze the resource utilization rate of each server, the preset time period may be set to a shorter time period, for example, 1 minute or 1 second, and the resource utilization rate of the hardware resource of each server is obtained at a higher frequency. Of course, in different application scenarios, a longer time period, such as 1 hour or 1 day, may also be set.
In actual implementation, the resource utilization rate of each hardware resource in each server may be obtained, including: CPU, memory (Mem in fig. 2), hard Disk (Disk in fig. 2), IO, Load resource (Load in fig. 2), and network resource (Net in fig. 2).
For convenience of storage, query, reading, and utilization, the resource utilization rate for each preset Time period of each hardware resource of each server may be stored in a Time Series and Spatial-Temporal Database (TSDB). The TSDB is mainly used for processing time sequence data, the time sequence data are acquired and stored according to a time sequence, and the stored data carry time tags which can be inquired and read according to the time sequence.
S202: and aiming at each server, acquiring at least one resource utilization rate of the server within a preset time range.
If the preset time period is set to a short time period, for example, 1 minute, the amount of data to be calculated and analyzed for the resource utilization rate of each server per minute is large, a large amount of calculation and time resources are consumed, and the evaluation and analysis of the resource utilization rate of the server is a routine task that needs to be performed for a long time, and therefore, a long preset time range, for example, 1 day, can be set. At least one resource utilization rate of each server within a longer preset time range is obtained, for example, at least one resource utilization rate of each server per minute within 1 day is obtained, and at least one resource utilization rate within 1 day is firstly integrated.
For example, when at least one resource utilization rate of each server per minute in 1 day is obtained, assuming that the preset time period is 1 minute, the resource utilization rate of the CPU in each server per minute is obtained, and there are 1440 minutes in 1 day, where taking the resource utilization rate of the CPU per minute of the server a as an example, these resources can be respectively denoted as CPU _1, CPU _2, CPU _3, … …, and CPU _ 1440.
S203: and determining the resource utilization rate index of the server according to each resource utilization rate.
Illustratively, according to the resource utilization per minute CPU of server a: and the CPU _1, the CPU _2, the CPU _3, the … … and the CPU _1440 determine the resource utilization index of the server A within 1 day.
Specifically, the following possible embodiments may be adopted to determine the resource utilization index of the server according to each resource utilization:
a: in a possible embodiment, the maximum value, the minimum value, the median value, or the average value of the resource utilization rates of the server is determined as the resource utilization rate index of the server.
Taking the maximum value of the resource utilization rate of the server as the resource utilization rate index of the server as an example, according to the resource utilization rate of the CPU per minute of the server a: CPU _1, CPU _2, CPU _3, … …, and CPU _1440, and a _ CPU _ Day is max (CPU _1: CPU _1440) as a method of determining the resource utilization index of server a in 1 Day.
Determining a resource utilization index of the server according to the maximum value of each resource utilization, wherein the resource utilization index can be used for evaluating the instantaneous peak value of the resource utilization of the server; determining a resource utilization index of the server according to the minimum value of each resource utilization, wherein the resource utilization index can be used for evaluating the instantaneous valley value of the resource utilization of the server; determining a resource utilization index of the server according to the median value in each resource utilization, wherein the resource utilization index can be used for evaluating the general condition of the resource utilization of the server; and determining the resource utilization index of the server according to the average value in each resource utilization rate, wherein the resource utilization index can be used for evaluating the continuous load condition of the resource utilization rate of the server.
b: in another possible implementation manner, at least one target resource utilization rate that meets a preset condition may be obtained from each resource utilization rate of the server, and an average value of the target resource utilization rates may be determined as a resource utilization rate index of the server.
The preset condition may be that the preset value is greater than a preset numerical threshold; or the resource utilization rate of the front preset number with the maximum value; alternatively, the resource utilization rate may be a predetermined percentage of the maximum value.
For example, a resource utilization rate greater than a preset threshold value may be taken as the target resource utilization rate. In addition, the maximum 60 resource utilization rates of cpu _1 to cpu _1440 may be taken as target resource utilization rates; alternatively, the resource utilization rate of 5% having the largest numerical value among the cpu _1 to cpu _1440 may be set as the target resource utilization rate.
Specifically, the cpu _1 to the cpu _1440 may be sorted from large to small, and the first 60 resource utilization rates are taken as target resource utilization rates. It may be calculated according to a predetermined ratio, and assuming that 5% is the largest, and 1440 × 5% is 72, cpu _1 to cpu _1440 may be sorted from large to small, and the first 72 resource utilization rates may be taken as the target resource utilization rates.
Alternatively, cpu _1 to cpu _1440 may be sorted from small to large, and the last 60 resource utilization rates may be taken as the target resource utilization rates. It may be calculated according to a predetermined ratio, and assuming that 5% is the largest, and 1440 × 5% is 72, cpu _1 to cpu _1440 may be sorted from small to large, and the last 72 resource utilization rates may be taken as the target resource utilization rates.
Calculating the average value of the 60 resource utilization rates with the largest values in the cpu _1 to the cpu _1440, and determining the average value as the resource utilization rate index of the server; or calculating the average value of the resource utilization rate of 5% with the largest value in the cpu _1 to the cpu _1440, and determining the average value as the resource utilization rate index of the server.
c: in another possible implementation manner, at least one target resource utilization rate that satisfies a preset condition may be obtained from each resource utilization rate of the server, and a variance of the target resource utilization rate may be determined as a resource utilization rate indicator of the server.
The step of obtaining at least one target resource utilization satisfying the preset condition from each resource utilization of the server is the same as the step of obtaining the target resource utilization in embodiment b.
Assuming that 60 resource utilization rates with the largest values in the cpu _1 to cpu _1440 can be taken as target resource utilization rates; alternatively, the resource utilization rate of 5% having the largest numerical value among the cpu _1 to cpu _1440 may be set as the target resource utilization rate. Calculating the variance of 60 resource utilization rates with the largest values from the cpu _1 to the cpu _1440, and determining the variance as the resource utilization rate index of the server; or calculating the variance of the resource utilization rate with the largest value of 5% from the cpu _1 to the cpu _1440, and determining the variance as the resource utilization rate index of the server.
The resource utilization index is determined according to each resource utilization rate of other hardware resources of the server a by using the same calculation method, for example, a resource utilization index a _ Mem _ Day of a storage in the server a, a resource utilization index a _ Disk _ Day of a hard Disk, a resource utilization index a _ IO _ Day of a IO Day, a resource utilization index a _ Load _ Day of a Load resource, and a resource utilization index a _ NET _ Day of a network resource are obtained, and the resource utilization index of the CPU, the storage, the hard Disk, the IO, the Load resource and the network resource represents the resource utilization index of the server a in one Day.
Similarly, the same calculation method is also used to determine the resource utilization index according to each resource utilization of the hardware resources of other servers, for example, server B to server X:
A_CPU_Day、A_Mem_Day、A_Disk_Day、A_IO_Day、A_Load_Day、A_NET_Day;
B_CPU_Day、B_Mem_Day、B_Disk_Day、B_IO_Day、B_Load_Day、B_NET_Day;
X_CPU_Day、X_Mem_Day、X_Disk_Day、X_IO_Day、X_Load_Day、X_NET_Day。
s204: and determining the resource utilization state of the server according to the resource utilization index.
In order to characterize the busy degree of the server, in one possible implementation, the resource utilization state may be divided into three states of idle, normal and busy, or may be further subdivided into six states of particularly idle, relatively idle, normally relatively busy, relatively busy and particularly busy.
Each resource utilization state is represented as a resource utilization state identification, e.g., L1 for extra idle, L2 for less idle, L3 for normal less idle, L4 for normally less busy, L5 for less busy, and L6 for extra busy, respectively. Each resource utilization state includes a preset resource utilization range, the resource utilization range included in each resource utilization state is determined according to actual conditions, and the resource utilization ranges included in each resource utilization state do not need to be the same. An example of resource utilization state partitioning is shown in table 1. The division of the resource utilization state may be specifically defined according to the actual use case.
Table 1: example of resource utilization status partitioning
Figure BDA0002080677220000121
Figure BDA0002080677220000131
Specifically, the resource utilization state of the server may be determined according to the resource utilization index according to the following steps:
and determining the resource utilization state of the server according to the resource utilization range in which the resource utilization index of the server falls.
S205: and determining the percentage of the number of the servers belonging to the resource utilization state in the total number of the servers in the server cluster aiming at each resource utilization state, and taking the percentage corresponding to each resource utilization state as the resource utilization rate of the server cluster.
For example, as shown in table 2, assuming that there are 1000 servers in a server cluster, taking the resource utilization rate of the CPU as an example, the number of servers belonging to each resource utilization state in the server cluster can be obtained, and according to the number of servers belonging to each resource utilization state and the total number of servers in the server cluster, the percentage of the number of servers belonging to the resource utilization state to the total number of servers in the server cluster can be obtained.
Table 2 resource utilization for a server cluster with 1000 servers
Figure BDA0002080677220000132
S206: and recording and analyzing the resource utilization rate of the server cluster.
Specifically, for convenience of storage, query, reading and utilization, the resource utilization rate of each preset time range of the server cluster may be stored in the TSDB, for example, the resource utilization rate of each day of the server cluster having 1000 servers may be stored in the TSDB for subsequent analysis of utilization.
First, the resource utilization of the server cluster can be evaluated according to the resource utilization of the server cluster. The server cluster has a better resource utilization condition that most of the servers in the server cluster are in a normal state, and the servers in an idle state and a busy state are fewer, so that the resource utilization condition of the server cluster can be evaluated by setting an idle percentage threshold and a busy percentage threshold. Specifically, the steps shown in fig. 3 may be adopted to evaluate the resource utilization of the server cluster:
s301: and judging whether the percentage of the number of the servers in the idle state in the total number of the servers in the server cluster is larger than a preset idle percentage threshold value or not.
S302: and if the idle percentage is larger than a preset idle percentage threshold value, evaluating the resource utilization rate condition of the server cluster as an idle state.
The idle percentage threshold may be set according to actual conditions, for example, the idle percentage threshold is set to 50%, and when the resource utilization state of more than 50% of the servers is in the idle state, the resource utilization condition of the server cluster is evaluated as the idle state. In subdividing the resource utilization state into six levels, the percentage thresholds for the six states L1 through L6, respectively, may be set, for example, the percentage threshold for the L1 state is set to 20%, and the percentage threshold for the L2 state is set to 30%. An idle percentage threshold may also be set for the sum of the percentages of servers whose resource utilization states are in the L1 and L2 states, such as when the sum of the percentages of servers whose resource utilization states are in the L1 and L2 states is greater than 50%, evaluating the resource utilization condition of a cluster of servers as idle.
S303: and judging whether the percentage of the number of the servers in the busy state in the total number of the servers in the server cluster is larger than a preset busy percentage threshold value or not.
S304: and if the number of the server clusters is larger than a preset busy percentage threshold value, evaluating the resource utilization rate condition of the server clusters as a busy state.
Similarly, a busy percentage threshold may be set according to actual situations, for example, the busy percentage threshold is set to 20%, and when the resource utilization status of more than 20% of the servers is in a busy state, the resource utilization status of the server cluster is evaluated as a busy state. In subdividing the resource utilization state into six levels, the percentage thresholds for the six states L1 through L6, respectively, may be set, for example, the percentage threshold for the L5 state is set to 15%, and the percentage threshold for the L6 state is set to 5%. A busy percentage threshold may also be set for the sum of the percentages of servers whose resource utilization states are in the L5 and L6 states, such as when the sum of the percentages of servers whose resource utilization states are in the L5 and L6 states is greater than 20%, evaluating the resource utilization condition of the server cluster as busy.
S305: and if the percentage of the number of the servers in the idle state to the total number of the servers in the server cluster is not more than a preset idle percentage threshold value, and the percentage of the number of the servers in the busy state to the total number of the servers in the server cluster is not more than a preset busy percentage threshold value, evaluating the resource utilization rate condition of the server cluster as a normal state.
And if the percentage of the number of the servers in the idle state to the total number of the servers in the server cluster is larger than a preset idle percentage threshold value, and the percentage of the number of the servers in the busy state to the total number of the servers in the server cluster is also larger than a preset busy percentage threshold value, evaluating the resource utilization rate condition of the server cluster as an extreme state.
Secondly, the resource utilization rate distribution trend of the server cluster can be evaluated.
Specifically, the resource utilization state of each hardware resource in the server cluster may be drawn into a resource utilization state diagram as shown in fig. 4. In order to evaluate the resource utilization rate distribution trend of the server cluster, the resource utilization state diagrams of each hardware resource can be respectively drawn and arranged according to the time sequence. Therefore, the distribution trend of each percentage value can be obtained, and the distribution trend of each resource utilization rate value can be visually seen.
If the resource utilization status of a certain hardware resource in the server cluster, such as a CPU, a memory, a hard disk, an IO, a load resource or a network resource, is always busy, the percentage of servers in the busy status in the certain hardware resource is continuously higher than the busy percentage threshold, or the percentage of servers in the L6 status and/or the L5 status is continuously higher than the busy percentage threshold, it indicates that the certain hardware resource in the server cluster is continuously busy.
If the resource utilization state of a certain hardware resource in the server cluster, such as a CPU, a memory, a hard disk, an IO, a load resource or a network resource, is always idle, the percentage of the servers in the idle state in the certain hardware resource is continuously higher than the idle percentage threshold, or the percentage of the servers in the L1 state and/or the L2 state is continuously higher than the idle percentage threshold, it indicates that the certain hardware resource in the server cluster is in the continuous idle state.
If the resource utilization state of a certain hardware resource in the server cluster, such as a CPU, a memory, a hard disk, an IO, a load resource or a network resource, is always in a normal state, the percentage of servers in an idle state in the certain hardware resource is not higher than the idle percentage threshold value continuously, or the percentage of servers in an L1 state and/or an L2 state is not higher than the idle percentage threshold value continuously; and if the percentage of the servers in the busy state in the hardware resource is not higher than the busy percentage threshold continuously, or the percentage of the servers in the L6 state and/or the L5 state is not higher than the busy percentage threshold continuously, the hardware resource in the server cluster is in a continuous normal state.
If the resource utilization state of a certain hardware resource in the server cluster, such as a CPU, a memory, a hard disk, an IO, a load resource or a network resource, is always in a normal state, and the hardware resource is in a busy state or an idle state in one day or several days, it indicates that the hardware resource in the server cluster is in a bursty busy state or an idle state.
Because the percentage value is used for measuring the resource utilization rate of the server cluster, even if the number of the servers in the server cluster is changed in the process of continuously monitoring the resource utilization rate of the server cluster, the monitoring, evaluation and analysis of the resource utilization rate of the server cluster are not influenced.
In addition, the type selection of the hardware resource of each server in the server cluster can be evaluated according to the resource utilization rate of the server cluster, and specifically, the type selection of the hardware resource of each server in the server cluster can be evaluated according to the resource utilization state of each server in the server cluster.
If a certain hardware resource in the server cluster is in a continuously busy state, which indicates that the load of the hardware index of the hardware resource is high, a high-performance component needs to be purchased for the hardware resource. If the hardware resource in the server cluster is in a continuous idle state, which indicates that the load of the hardware index of the hardware resource is low, the performance of the purchased component for the hardware resource can be reduced.
Based on the same design concept, the embodiment of the application also provides a device for determining the utilization rate of the server cluster resources and a readable storage medium.
EXAMPLE III
As shown in fig. 5, an apparatus 500 for determining a resource utilization rate of a server cluster according to an embodiment of the present application includes:
an obtaining module 501, configured to obtain, every preset time period, a resource utilization rate of a hardware resource of each server in a server cluster, and obtain, for each server, at least one resource utilization rate of the server within a preset time range;
an index determining module 502, configured to determine, according to the resource utilization rate, a resource utilization index of the server; the resource utilization rate index is used for measuring the resource utilization condition of the server in the preset time range;
a state determining module 503, configured to determine a resource utilization state of the server according to the resource utilization index; the resource utilization state is at least one state identifier used for representing the busy degree of the server, which is obtained by dividing according to the resource utilization condition;
a utilization determining module 504, configured to determine, for each resource utilization state, a percentage of the number of servers belonging to the resource utilization state in the total number of servers in the server cluster, and use a percentage corresponding to each resource utilization state as a resource utilization rate of the server cluster.
In one possible embodiment, the resource utilization state includes: idle, normal, and busy; each resource utilization state comprises a preset resource utilization range;
a state determining module 503, configured to determine the resource utilization state of the server according to the resource utilization range in which the resource utilization index of the server falls.
In a possible implementation manner, the index determining module 502 is specifically configured to determine a maximum value, a minimum value, a median value, or an average value of the resource utilization rates of the server as the resource utilization index of the server.
In a possible implementation, the index determining module 502 is further configured to:
and acquiring at least one target resource utilization rate meeting preset conditions from the resource utilization rates of the server, and determining the average value of the target resource utilization rates as a resource utilization rate index of the server.
In a possible implementation, the index determining module 502 is further configured to:
and acquiring at least one target resource utilization rate meeting preset conditions from the resource utilization rates of the server, and determining the variance of the target resource utilization rates as the resource utilization rate index of the server.
In a possible implementation, the index determining module 502 is further configured to:
acquiring a resource utilization rate larger than a preset numerical threshold value from each resource utilization rate of the server as a target resource utilization rate;
or, obtaining the resource utilization rates with the maximum value of the former preset number from each resource utilization rate of the server as target resource utilization rates;
or, the resource utilization rate with the maximum value in the previous preset proportion is obtained from the resource utilization rates of the server and is used as the target resource utilization rate.
In a possible embodiment, the apparatus 500 for determining a resource utilization rate of a server cluster further includes an evaluation analysis module 505 for:
judging whether the percentage of the number of the servers in the idle state to the total number of the servers in the server cluster is larger than a preset idle percentage threshold value or not;
if the resource utilization rate of the server cluster is larger than a preset idle percentage threshold value, evaluating the resource utilization rate condition of the server cluster as an idle state;
judging whether the percentage of the number of the servers in the busy state to the total number of the servers in the server cluster is larger than a preset busy percentage threshold value or not;
if the number of the server clusters is larger than a preset busy percentage threshold value, evaluating the resource utilization rate condition of the server clusters as a busy state;
and if the percentage of the number of the servers in the idle state to the total number of the servers in the server cluster is not more than a preset idle percentage threshold value, and the percentage of the number of the servers in the busy state to the total number of the servers in the server cluster is not more than a preset busy percentage threshold value, evaluating the resource utilization rate condition of the server cluster as a normal state.
In a possible implementation, the evaluation analysis module 505 is further configured to:
and aiming at each resource utilization state, comparing each percentage of the resource utilization state according to the time sequence to obtain the distribution trend of each percentage value.
In a possible implementation, the evaluation analysis module 505 is further configured to:
and evaluating the selection of the hardware resource of the server according to the resource utilization state of each server in the server cluster.
Example four
A computer readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of the method provided in embodiment one or embodiment two. In practice, the computer readable medium may be RAM, ROM, EPROM, magnetic disk, optical disk, etc., and is not intended to limit the scope of protection of this application.
The method steps described herein may be implemented in hardware, for example, logic gates, switches, Application Specific Integrated Circuits (ASICs), programmable logic controllers, embedded microcontrollers, etc., in addition to data processing programs. Such hardware capable of implementing the methods described herein may also constitute the present application.
EXAMPLE five
The embodiment of the present application further provides an electronic device, which may be a computer or a server, where the device for determining the utilization rate of the server cluster resources according to the above device embodiment of the present application may be integrated. As shown in fig. 6, an electronic device 600 according to a third embodiment of the apparatus of the present application is shown.
The electronic device 600 may include a processor 601 of one or more processing cores, one or more computer-readable storage media 602. The electronic device may further include a power supply 603 and an input-output unit 604. Those skilled in the art will appreciate that fig. 6 does not constitute a limitation of the electronic device and may include more or fewer components than illustrated, or some components may be combined, or a different arrangement of components.
Wherein:
the processor 601 is a control portion of the electronic device, connects the respective portions using various interfaces and lines, and executes the steps of the method provided in the first embodiment or the second embodiment by running or executing a software program stored in the computer-readable storage medium 602.
The computer-readable storage medium 602 may be used to store a software program, i.e., a program involved in the method provided in embodiment one or embodiment two.
The processor 601 executes various functional applications and data processing by executing software programs stored in the computer-readable storage medium 602. The computer-readable storage medium 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a real-time service index determination function, etc.), and the like; the storage data area may store data and the like (such as real-time service data, offline service indexes, real-time service indexes and the like) used according to needs of the electronic device. Further, the computer-readable storage medium 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the computer-readable storage medium 602 may also include a memory controller to provide the processor 601 with access to the computer-readable storage medium 602.
The electronic device further comprises a power supply 603 for supplying power to the various components, and preferably, the power supply 603 is logically connected to the processor 601 through a power management system, so that functions of managing charging, discharging, power consumption, and the like are realized through the power management system. The power supply 603 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The server may also include an input-output unit 604, such as may be used to receive entered numeric or character information, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control; such as various graphical user interfaces that may be used to display information entered by or provided to the user, as well as the server, which may be composed of graphics, text, icons, video, and any combination thereof.
In summary, the above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. A method for determining server cluster resource utilization, comprising:
acquiring the resource utilization rate of hardware resources of each server in the server cluster every other preset time period, and acquiring at least one resource utilization rate of the server in a preset time range aiming at each server;
determining a resource utilization index of the server according to each resource utilization, and determining a resource utilization state of the server according to the resource utilization index; the resource utilization rate index is used for measuring the resource utilization condition of the server in the preset time range; the resource utilization state is at least one state identifier used for representing the busy degree of the server, which is obtained by dividing according to the resource utilization condition;
and determining the percentage of the number of the servers belonging to the resource utilization state in the total number of the servers in the server cluster aiming at each resource utilization state, and taking the percentage corresponding to each resource utilization state as the resource utilization rate of the server cluster.
2. The method of claim 1, wherein the resource utilization state comprises: idle, normal, and busy; each resource utilization state comprises a preset resource utilization range;
the step of determining the resource utilization state of the server according to the resource utilization index comprises the following steps:
and determining the resource utilization state of the server according to the resource utilization range in which the resource utilization index of the server falls.
3. The method of claim 1, wherein the step of determining the resource utilization index of the server according to the resource utilization comprises:
and determining the maximum value, the minimum value, the median value or the average value of the resource utilization rate of the server as the resource utilization rate index of the server.
4. The method of claim 1, wherein the step of determining the resource utilization index of the server according to the resource utilization comprises:
and acquiring at least one target resource utilization rate meeting preset conditions from the resource utilization rates of the server, and determining the average value of the target resource utilization rates as a resource utilization rate index of the server.
5. The method of claim 1, wherein the step of determining the resource utilization index of the server according to the resource utilization comprises:
and acquiring at least one target resource utilization rate meeting preset conditions from the resource utilization rates of the server, and determining the variance of the target resource utilization rates as the resource utilization rate index of the server.
6. The method according to claim 4 or 5, wherein the step of obtaining at least one target resource utilization rate satisfying a preset condition from the each resource utilization rate of the server comprises:
acquiring a resource utilization rate larger than a preset numerical threshold value from each resource utilization rate of the server as a target resource utilization rate;
or, obtaining the resource utilization rates with the maximum value of the former preset number from each resource utilization rate of the server as target resource utilization rates;
or, the resource utilization rate with the maximum value in the previous preset proportion is obtained from the resource utilization rates of the server and is used as the target resource utilization rate.
7. The method of claim 2, wherein after the step of determining the percentage of the number of servers belonging to the resource utilization state to the total number of servers in the server cluster, the method further comprises the step of evaluating the resource utilization of the server cluster by:
judging whether the percentage of the number of the servers in the idle state to the total number of the servers in the server cluster is larger than a preset idle percentage threshold value or not;
if the resource utilization rate of the server cluster is larger than a preset idle percentage threshold value, evaluating the resource utilization rate condition of the server cluster as an idle state;
judging whether the percentage of the number of the servers in the busy state to the total number of the servers in the server cluster is larger than a preset busy percentage threshold value or not;
if the number of the server clusters is larger than a preset busy percentage threshold value, evaluating the resource utilization rate condition of the server clusters as a busy state;
and if the percentage of the number of the servers in the idle state to the total number of the servers in the server cluster is not more than a preset idle percentage threshold value, and the percentage of the number of the servers in the busy state to the total number of the servers in the server cluster is not more than a preset busy percentage threshold value, evaluating the resource utilization rate condition of the server cluster as a normal state.
8. The method of claim 1, wherein after the step of determining the percentage of the number of servers belonging to the resource utilization state to the total number of servers in the server cluster, the method further comprises the step of evaluating a resource utilization distribution trend of the server cluster:
and aiming at each resource utilization state, comparing each percentage of the resource utilization state according to the time sequence to obtain the distribution trend of each percentage value.
9. The method of claim 1, wherein after the step of determining the percentage of the number of servers belonging to the resource utilization state to the total number of servers in the server cluster, the method further comprises the step of evaluating the selection of hardware resources for each server in the server cluster:
and evaluating the selection of the hardware resource of the server according to the resource utilization state of each server in the server cluster.
10. An apparatus for determining server cluster resource utilization, comprising:
the acquisition module is used for acquiring the resource utilization rate of the hardware resource of each server in the server cluster every other preset time period, and acquiring at least one resource utilization rate of the server in a preset time range aiming at each server;
the index determining module is used for determining the resource utilization index of the server according to the resource utilization rate; the resource utilization rate index is used for measuring the resource utilization condition of the server in the preset time range;
the state determining module is used for determining the resource utilization state of the server according to the resource utilization rate index; the resource utilization state is at least one state identifier used for representing the busy degree of the server, which is obtained by dividing according to the resource utilization condition;
and the utilization rate determining module is used for determining the percentage of the number of the servers belonging to the resource utilization state in the total number of the servers in the server cluster according to each resource utilization state, and taking the percentage corresponding to each resource utilization state as the resource utilization rate of the server cluster.
11. A computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the method of any one of claims 1 to 9.
12. An electronic device comprising the computer-readable storage medium of claim 11, further comprising a processor that can execute the computer-readable storage medium.
CN201910470431.7A 2019-05-31 2019-05-31 Method, device and storage medium for determining utilization rate of server cluster resources Pending CN112019583A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910470431.7A CN112019583A (en) 2019-05-31 2019-05-31 Method, device and storage medium for determining utilization rate of server cluster resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910470431.7A CN112019583A (en) 2019-05-31 2019-05-31 Method, device and storage medium for determining utilization rate of server cluster resources

Publications (1)

Publication Number Publication Date
CN112019583A true CN112019583A (en) 2020-12-01

Family

ID=73501136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910470431.7A Pending CN112019583A (en) 2019-05-31 2019-05-31 Method, device and storage medium for determining utilization rate of server cluster resources

Country Status (1)

Country Link
CN (1) CN112019583A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375419A (en) * 2016-08-31 2017-02-01 东软集团股份有限公司 Deployment method and device of distributed cluster
US20180060127A1 (en) * 2016-08-24 2018-03-01 Ca, Inc. Reservation of hardware resources in a computer system based on utilization measurements during time ranges
CN108733493A (en) * 2018-05-25 2018-11-02 北京车和家信息技术有限公司 Computational methods, computing device and the computer readable storage medium of resource utilization
CN108874640A (en) * 2018-05-07 2018-11-23 北京京东尚科信息技术有限公司 A kind of appraisal procedure and device of clustering performance
CN109343965A (en) * 2018-10-31 2019-02-15 北京金山云网络技术有限公司 Resource adjusting method, device, cloud platform and server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180060127A1 (en) * 2016-08-24 2018-03-01 Ca, Inc. Reservation of hardware resources in a computer system based on utilization measurements during time ranges
CN106375419A (en) * 2016-08-31 2017-02-01 东软集团股份有限公司 Deployment method and device of distributed cluster
CN108874640A (en) * 2018-05-07 2018-11-23 北京京东尚科信息技术有限公司 A kind of appraisal procedure and device of clustering performance
CN108733493A (en) * 2018-05-25 2018-11-02 北京车和家信息技术有限公司 Computational methods, computing device and the computer readable storage medium of resource utilization
CN109343965A (en) * 2018-10-31 2019-02-15 北京金山云网络技术有限公司 Resource adjusting method, device, cloud platform and server

Similar Documents

Publication Publication Date Title
CN109634801B (en) Data trend analysis method, system, computer device and readable storage medium
CN109684162B (en) Equipment state prediction method, system, terminal and computer readable storage medium
US8578023B2 (en) Computer resource utilization modeling for multiple workloads
DE112012002545B4 (en) Manage workloads in a multiprocessing computer system
CN110502431B (en) System service evaluation method and device and electronic equipment
CN111563014A (en) Interface service performance test method, device, equipment and storage medium
CN112148779A (en) Method, device and storage medium for determining service index
CN113763502B (en) Chart generation method, device, equipment and storage medium
CN112633542A (en) System performance index prediction method, device, server and storage medium
Lin et al. Exploring characteristics of inter-cluster machines and cloud applications on google clusters
CN116185588A (en) Task scheduling method and device, electronic equipment and readable storage medium
CN104679444A (en) Dynamic adjustment method and device for virtualized storage resources
CN111310122A (en) Model data processing method, electronic device and storage medium
US20210278986A1 (en) Management system and management method for infrastructure system
CN112019583A (en) Method, device and storage medium for determining utilization rate of server cluster resources
CN116700955A (en) Job processing method, apparatus, computer device, and readable storage medium
CN108255710B (en) Script abnormity detection method and terminal thereof
CN110287158A (en) Monitor the method, apparatus and storage medium of distributed file system IO time delay
CN105227410A (en) Based on the method and system that the server load of adaptive neural network detects
CN115564410A (en) State monitoring method and device for relay protection equipment
CN111598466B (en) Method and system for instrument resource cloud management and configuration
CN115523043A (en) Method, device, equipment and medium for determining weighted operating point of engine
CN111582679B (en) Processing method, device and equipment for application service partition and storage medium
CN111913852A (en) Health management method and device for storage system
CN113762665B (en) Real-time index related real-time data backtracking method and system

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