Server screening method and device, medium and equipment
By regularly collecting and adjusting the weight of server performance indicators, calculating the comprehensive score value and dividing the priority queue, the problem that traditional server selection methods are difficult to reflect the comprehensive performance is solved, and efficient resource utilization and reduced operational costs are achieved.
Patent Information
- Application Number
- CN202411405395.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-11
AI Technical Summary
Traditional server selection methods are difficult to reflect the comprehensive performance and application adaptability of the server, resulting in low resource utilization efficiency and high operating costs.
By regularly collecting performance indicators of each server, using machine learning algorithms to adjust the weight of performance indicators, calculate the comprehensive score values of each server, and divide them into multiple priority queues, so as to filter out the most according to the priority of resource request tasks Suitable server.
Personalized indicator collection is realized, which avoids the impact of redundant indicators on scores, improves the efficiency of server resources and reduces operating costs.
Smart Images

Figure CN119415249A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a server screening method, device, medium and equipment. Background Art
[0002] With the rapid development of cloud computing, big data and other technologies, the rational allocation and optimization of server resources has become an important part of enterprise operations. Traditional server selection methods are often based on a single or a few performance indicators, which are difficult to reflect the comprehensive performance and application adaptability of the server. Therefore, developing an effective server screening solution is of great significance to improving resource utilization efficiency and reducing operating costs. Summary of the invention
[0003] In view of at least one of the above technical problems, an embodiment of the present invention provides a server screening method and apparatus, medium, and equipment.
[0004] According to a first aspect, a server screening method provided by an embodiment of the present invention includes:
[0005] According to the collection strategy of each server in the server cluster, the performance indicators of each server are collected regularly. The collection strategy of each server is formulated in advance according to the role and application requirements of the server.
[0006] Determine the initial weight value of each performance indicator;
[0007] Using a machine learning algorithm, the weight of each performance indicator is adjusted based on the initial weight value of each performance indicator to obtain the optimized weight value of each performance indicator;
[0008] Performing standardization on the various performance indicators;
[0009] Calculate the comprehensive score of each server based on the standardized performance indicators and the optimization weight of each performance indicator;
[0010] According to the comprehensive score of each server, each server is divided into multiple priority queues; servers in different priority queues are used to process tasks of different priorities;
[0011] When a resource request task of an application is received, a server with the highest comprehensive score that meets the requirements of the resource request task is screened out from the corresponding priority queue according to the priority of the resource request task.
[0012] In one embodiment, the performance indicators that need to be collected set in the collection strategy of each server include at least one of CPU usage, memory occupancy, disk I / O rate, network bandwidth usage, CPU cache hit rate, memory swap rate, network delay and disk response time.
[0013] In one embodiment, the standardization of the various performance indicators includes:
[0014] Verify whether each performance indicator is within its respective preset reasonable range;
[0015] After passing the verification, the various performance indicators are cleaned; wherein the cleaning process includes processing abnormal values and removing missing values;
[0016] The performance indicators of different dimensions after cleaning treatment are converted into standard scores on a unified scale.
[0017] In one embodiment, the method further comprises:
[0018] According to the performance indicators of each server, a resource prediction model is used to predict the resource demand of each server in a preset time period in the future;
[0019] The resource allocation and scheduling strategies of each server are adjusted according to the resource requirements of each server in a future preset time period and the current resource allocation of each server.
[0020] In one embodiment, the division of each server into multiple priority queues according to the comprehensive score of each server includes:
[0021] Sort the servers in descending order according to their comprehensive scores;
[0022] Place the first N1 servers in the sorting result in the first priority queue, place the last N2 servers in the sorting result in the third priority queue, and place the remaining servers in the second priority queue; wherein the servers in the first priority queue are used to process resource request tasks of the first priority, the servers in the second priority queue are used to process resource request tasks of the second priority, and the servers in the third priority queue are used to process resource request tasks of the third priority; the priorities of the first priority, the second priority and the third priority are from high to low, and N1 and N2 are preset positive integers.
[0023] In one embodiment, before calculating the comprehensive score of each server, the method further includes:
[0024] Get pre-configured weight configuration templates for various business scenarios;
[0025] Determine the current state of the server cluster and determine the current business scenario corresponding to the server cluster;
[0026] According to the current business scenario, determine the corresponding weight configuration template;
[0027] According to the weight configuration template corresponding to the current business scenario, each performance indicator is optimized again.
[0028] In one embodiment, the method further comprises:
[0029] Monitor the running performance of applications on each server;
[0030] Evaluate user satisfaction with the performance of applications on each server;
[0031] The machine learning algorithm is adjusted based on the satisfaction level.
[0032] According to a second aspect, a server screening device provided by an embodiment of the present invention includes:
[0033] The indicator collection module is used to regularly collect performance indicators of each server in the server cluster according to the respective collection strategies of each server; wherein the collection strategy of each server is formulated in advance according to the role and application requirements of the server;
[0034] An initial value determination module is used to determine the initial weight value of each performance indicator;
[0035] A weight adjustment module is used to use a machine learning algorithm to adjust the weight of each performance indicator based on its initial weight value to obtain an optimized weight value for each performance indicator;
[0036] An indicator standardization module, used for standardizing the various performance indicators;
[0037] The scoring calculation module is used to calculate the comprehensive score of each server according to the standardized performance indicators and the optimization weight values of each performance indicator;
[0038] The server division module is used to divide each server into multiple priority queues according to the comprehensive score of each server; wherein servers in different priority queues are used to process tasks of different priorities;
[0039] The server screening module is used to screen out the server with the highest comprehensive score that meets the requirements of the resource request task from the corresponding priority queue according to the priority of the resource request task when receiving the resource request task of the application.
[0040] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method provided in the first aspect.
[0041] According to a fourth aspect, an embodiment of the present invention provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the first aspect is implemented.
[0042] The server screening method, device, medium, and equipment provided in the embodiment of the present invention collect performance indicators of each server regularly based on the respective collection strategies of each server, and use the machine learning algorithm to adjust the weight of each performance indicator on the basis of the initial weight value of each performance indicator to obtain the respective optimized weight value of each performance indicator. After the performance indicators are standardized, the comprehensive score value of each server is calculated according to the standardized performance indicators and the respective optimized weight values of each performance indicator, and then the servers are divided into multiple priority queues according to the comprehensive score value. When there is a resource request task, the server with the highest comprehensive score value that meets the requirements of the resource request task is screened from the corresponding priority queue. It can be seen that the embodiment of the present invention configures the performance indicators that need to be collected by each server through the collection strategy, realizes personalized indicator collection, and avoids the influence of redundant indicators on subsequent scoring. In addition, the weights of each performance indicator are adjusted in combination with the machine learning algorithm to obtain the optimized weight value, so as to calculate the comprehensive score value of each server according to the optimized weight value, and then divide each server into queues according to the comprehensive score value, which is conducive to the subsequent assignment of tasks to the most suitable server. It can be seen that with the regular update of performance indicator data and the dynamic adjustment of weights, the comprehensive score of the server is recalculated regularly, and the servers and sorting in each priority queue are updated regularly, so that when screening the required servers, the most suitable server can always be selected for use, which is conducive to improving the resource utilization efficiency of the server and reducing operating costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of a flow chart of a server screening method in one embodiment of the present invention;
[0044] Figure 2 It is a structural block diagram of a server screening device in one embodiment of the present invention. DETAILED DESCRIPTION
[0045] In a first aspect, an embodiment of the present invention provides a server screening method, see Figure 1 The method comprises the following steps S110 to S170:
[0046] S110, regularly collecting performance indicators of each server according to the respective collection strategies of each server in the server cluster; wherein the collection strategy of each server is formulated in advance according to the role and application requirements of the server;
[0047] Among them, regular means collecting performance indicators at a certain collection frequency. Specifically, you can set a reasonable collection frequency based on server load and application requirements, for example, collecting once every minute, hour, or day, to ensure that server status changes are reflected in a timely manner without increasing system burden due to frequent collection.
[0048] Specifically, monitoring and performance analysis tools, such as Prometheus, can be used to collect performance indicators. After collecting the performance indicators, they can be stored in a reliable database for subsequent analysis and processing. The design of the database needs to consider the scalability, security, and query efficiency of the data.
[0049] Among them, differentiated collection strategies are customized in advance according to the different roles and application requirements of the server. Roles include front-end servers, database servers, storage servers, etc. Servers with different roles have different functions, and applications have different requirements for servers. Therefore, targeted collection strategies are formulated. For example, for database servers, more emphasis should be placed on monitoring disk I / O and memory usage. Therefore, the performance indicators that need to be collected in the collection strategy of database servers include disk I / O and memory usage.
[0050] Specifically, in addition to the basic CPU usage, memory occupancy, disk I / O rate, and network bandwidth usage, the collection scope can also be expanded to include more fine-grained performance indicators such as CPU cache hit rate, memory swap rate, network delay, and disk response time to more comprehensively reflect the server performance. In other words, the performance indicators in the collection strategy of each server can be selected from the above collection scope. That is, the performance indicators that need to be collected set in the collection strategy of each server include at least one of CPU usage, memory occupancy, disk I / O rate, network bandwidth usage, CPU cache hit rate, memory swap rate, network delay, and disk response time.
[0051] In actual scenarios, during the data collection process, data protection regulations should be strictly observed, sensitive data should be encrypted, and the security of data transmission should be ensured.
[0052] S120, determining the initial weight value of each performance indicator;
[0053] Specifically, we can deeply analyze the characteristics and requirements of the application, including computing intensity, data intensity, network dependence, etc., to provide a basis for weight allocation.
[0054] Specifically, the importance of each performance indicator can be preliminarily evaluated by domain experts or based on historical experience, and the initial weight value can be set based on the preliminary evaluation results. When evaluating the importance of performance indicators, experts can deeply analyze the characteristics and requirements of applications on the server, including computing intensity, data intensity, network dependence, etc., to provide a basis for weight initialization.
[0055] S130, using a machine learning algorithm, adjusting the weight of each performance indicator based on the initial weight value of each performance indicator, to obtain an optimized weight value of each performance indicator;
[0056] Among them, machine learning algorithms, for example, reinforcement learning, genetic algorithms.
[0057] Specifically, the machine learning algorithm can automatically adjust the weight distribution according to the real-time status of the server cluster and changes in application requirements. Through continuous trial and error and optimization, the weight distribution is more in line with the actual situation.
[0058] In actual scenarios, you can also set the threshold range of each performance indicator. When a certain indicator is lower or higher than the threshold, you can give additional penalty or reward points to reflect the difference in the impact of different performance indicators on server performance. The so-called penalty or reward can be reflected in the adjustment of weights. Rewards increase weights, and penalties reduce weights.
[0059] S140, performing standardization processing on the various performance indicators;
[0060] In one embodiment, the standardization of the performance indicators in S140 may include S141 to S143:
[0061] S141, verifying whether each performance indicator is within a respective preset reasonable range;
[0062] It is understandable that before data cleaning, a data verification step is added to ensure that the performance indicator data used subsequently is within a reasonable range and to avoid evaluation bias caused by data errors.
[0063] S142, after passing the verification, performing a cleaning process on each of the performance indicators; wherein the cleaning process includes processing abnormal values and removing missing values;
[0064] For example, invalid data such as outliers and missing values can be removed to ensure the accuracy and reliability of the data. Of course, for outliers, in addition to direct removal, you can also consider using smoothing or replacing predicted values based on statistical models to reduce the impact of data loss on the evaluation results.
[0065] S143. Convert the performance indicators of different dimensions after cleaning into standard scores on a unified scale.
[0066] Among them, methods such as Z-score standardization or Min-Max normalization can be used to convert performance indicator values of different dimensions into standard scores under a unified scale to facilitate comprehensive comparison.
[0067] S150, calculating the comprehensive score of each server according to each performance indicator after standardization and the optimization weight value of each performance indicator;
[0068] It can be seen that after obtaining the optimization weight value of each performance indicator, for each server, the comprehensive score of the server is calculated according to the performance indicators and optimization weight values of the server. For example, the collection scope includes 10 performance indicators, but the collection strategy of server a sets 5 performance indicators to be collected, then the 5 performance indicators are weighted and summed to obtain the comprehensive score of server a.
[0069] It can be seen that with the regular collection of performance indicators and the dynamic adjustment of weights, the comprehensive score will also be updated regularly to reflect the current real performance status of the server.
[0070] Of course, in some cases, there may be a nonlinear relationship between performance indicators. In this case, a nonlinear weighting method can be used for scoring calculation to more accurately reflect the comprehensive performance of the server. Among them, nonlinear weighting methods include, for example, fuzzy comprehensive evaluation, neural network, etc.
[0071] S160, dividing each server into a plurality of priority queues according to the comprehensive score of each server; wherein servers in different priority queues are used to process tasks of different priorities;
[0072] In one embodiment, the step of dividing each server into a plurality of priority queues according to the comprehensive score of each server in S160 may include S161 to S162:
[0073] S161, sorting the servers in descending order according to their comprehensive scores;
[0074] S162. Place the first N1 servers in the sorting result in the first priority queue, place the last N2 servers in the sorting result in the third priority queue, and place the remaining servers in the second priority queue; wherein the servers in the first priority queue are used to process resource request tasks of the first priority, the servers in the second priority queue are used to process resource request tasks of the second priority, and the servers in the third priority queue are used to process resource request tasks of the third priority; the priorities of the first priority, the second priority and the third priority are from high to low, and N1 and N2 are preset positive integers.
[0075] For example, there are 30 servers in the server cluster, 10 servers with the highest comprehensive scores are placed in the first priority queue, 10 servers with the lowest comprehensive scores are placed in the third priority queue, and the remaining 10 servers are placed in the second priority queue.
[0076] As can be seen, three priority queues are constructed here. The servers in the first priority queue are used to process critical services, the servers in the second priority queue are used to process regular services, and the servers in the third priority queue are used to process non-real-time services. It is understandable that the urgency and importance of critical services, regular services, and non-real-time services are getting lower and lower, so their priorities are getting lower and lower.
[0077] S170. When a resource request task of an application is received, a server with the highest comprehensive score that meets the requirements of the resource request task is selected from a corresponding priority queue according to the priority of the resource request task.
[0078] It can be seen that when an application requests resources, the urgency and importance of the resource request task are determined, thereby determining the priority, and then determining which priority queue it is, and then selecting the server with the highest comprehensive score from the determined priority queue to determine whether the server meets the requirements of the resource request task. If not, determine whether the server with the second highest comprehensive score meets the requirements of the resource request task, and so on, until the server with the highest comprehensive score among all servers that meet the requirements of the resource request task is found.
[0079] It can be seen that with the regular update of performance indicator data and the dynamic adjustment of weights, the comprehensive score of the server is recalculated regularly, and the servers and rankings in each priority queue are updated regularly, so that the best server can always be selected for use when screening the required servers.
[0080] In one embodiment, the method may further include A1-A2:
[0081] A1. According to the performance indicators of each server, a resource prediction model is used to predict the resource demand of each server in a preset time period in the future;
[0082] A2. Adjust the resource allocation and scheduling strategy of each server according to the resource demand of each server in a preset time period in the future and the current resource allocation of each server.
[0083] Among them, the resource prediction model can be constructed using time series analysis algorithm and machine learning prediction algorithm.
[0084] It can be seen that the resource prediction model predicts the resource demand changes of the server in the future based on the performance indicators of each server. Therefore, the resource allocation and scheduling strategies of each server can be automatically adjusted according to the prediction results and the current resource allocation situation, such as load balancing strategy, resource expansion or reduction strategy, etc., to ensure efficient use of resources and stable operation of the system, and to deal with possible resource bottlenecks or excess situations.
[0085] In one embodiment, before calculating the comprehensive score of each server, the method may further include B1 to B4:
[0086] B1. Obtain weight configuration templates pre-configured for various business scenarios;
[0087] B2. Determine the current state of the server cluster and the current business scenario corresponding to the server cluster;
[0088] B3. Determine a corresponding weight configuration template according to the current business scenario;
[0089] B4. Optimize each performance indicator again according to the weight configuration template corresponding to the current business scenario.
[0090] Among them, business scenarios include high concurrency, big data processing, real-time computing, etc. According to the business scenarios, one or more sets of weight configuration templates can be preset, and users can quickly select or fine-tune according to actual conditions to improve the flexibility and convenience of algorithm application.
[0091] It can be seen that the current business scenario is known according to the current state of the server cluster, and then the corresponding weight configuration template is determined, and then the weight value of each performance indicator in the weight configuration template and the optimized weight value of each performance indicator are used to adjust the weight value of each performance indicator again, so that the weight of the performance indicator is consistent with the current state of the server cluster.
[0092] In one embodiment, the method may further include C1-C3:
[0093] C1. Monitor the running effect of applications on each server;
[0094] C2. Evaluate user satisfaction with the performance of applications on each server;
[0095] C3. Adjusting the machine learning algorithm according to the satisfaction level.
[0096] It can be seen that in addition to relying on expert evaluation and machine learning algorithms, an adaptive weight adjustment mechanism based on user feedback can also be introduced. By collecting user satisfaction evaluations on the running effects of applications under different server configurations, the weight distribution can be dynamically adjusted to make the algorithm closer to the actual needs of users.
[0097] It can be seen that by monitoring the actual operating results of the selected servers and evaluating the user's satisfaction with the operating results of the applications on each server, the machine learning algorithm can be adjusted according to the satisfaction, which can gradually improve the accuracy of the weight adjustment.
[0098] Of course, in actual scenarios, a comprehensive performance monitoring system can also be established to track the operating status and performance indicator changes of the selected server in real time. The monitoring data can be visualized through data analysis tools, so that users can intuitively understand the server performance status. Based on the results of operation monitoring and effect evaluation, the strategy and parameter settings of the server screening algorithm are continuously iterated and optimized. The optimization effect is verified through A / B testing, simulation and other methods, and the verified optimization strategy is applied to the actual production environment.
[0099] It is understandable that the method provided by the embodiment of the present invention is applicable to a large-scale server cluster environment, and can quickly and accurately screen out the optimal server according to specific business scenarios and application requirements, thereby achieving efficient use of resources and cost savings.
[0100] In summary, the embodiments of the present invention set the key performance indicators of the server through the collection strategy, and combine the machine learning algorithm to help users quickly and accurately screen out the server that best suits their specific application needs from a large number of server resources, thereby realizing an efficient and intelligent server screening process.
[0101] In a second aspect, an embodiment of the present invention provides a server screening device, see Figure 2 , the device 100 comprises:
[0102] The indicator collection module 110 is used to regularly collect performance indicators of each server according to the respective collection strategies of each server in the server cluster; wherein the collection strategy of each server is formulated in advance according to the role and application requirements of the server;
[0103] An initial value determination module 120 is used to determine the initial weight value of each performance indicator;
[0104] The weight adjustment module 130 is used to use a machine learning algorithm to adjust the weight of each performance indicator based on the initial weight value of each performance indicator to obtain the optimized weight value of each performance indicator;
[0105] An indicator standardization module 140 is used to perform standardization processing on each performance indicator;
[0106] The score calculation module 150 is used to calculate the comprehensive score of each server according to each performance indicator after standardization and the optimization weight value of each performance indicator;
[0107] The server partitioning module 160 is used to partition each server into a plurality of priority queues according to the comprehensive score of each server; wherein servers in different priority queues are used to process tasks of different priorities;
[0108] The server screening module 170 is used to screen out the server with the highest comprehensive score that meets the requirements of the resource request task from the corresponding priority queue according to the priority of the resource request task when receiving the resource request task of the application.
[0109] In one embodiment, the performance indicators that need to be collected set in the collection strategy of each server include at least one of CPU usage, memory occupancy, disk I / O rate, network bandwidth usage, CPU cache hit rate, memory swap rate, network delay and disk response time.
[0110] In one embodiment, the indicator standardization module is specifically used to: verify whether the various performance indicators are within their respective preset reasonable ranges; after passing the verification, clean the various performance indicators; wherein the cleaning process includes processing outliers and removing missing values; and converting the performance indicators of different dimensions after the cleaning process into standard scores under a unified scale.
[0111] In one embodiment, the apparatus further comprises:
[0112] The demand prediction module is used to predict the resource demand of each server in a future preset time period based on the performance indicators of each server and adopt a resource prediction model; according to the resource demand of each server in the future preset time period and the current resource allocation of each server, the resource allocation and scheduling strategy of each server is adjusted.
[0113] In one embodiment, the server partitioning module is specifically used to: sort the servers in order from high to low according to the comprehensive score values of each server; place the first N1 servers in the sorting result in a first priority queue, place the last N2 servers in the sorting result in a third priority queue, and place the remaining servers in a second priority queue; wherein the servers in the first priority queue are used to process resource request tasks of the first priority, the servers in the second priority queue are used to process resource request tasks of the second priority, and the servers in the third priority queue are used to process resource request tasks of the third priority; the priorities of the first priority, the second priority and the third priority are from high to low, and N1 and N2 are preset positive integers.
[0114] In one embodiment, before calculating the comprehensive score value of each server, the score calculation module is also used to: obtain a weight configuration template pre-configured for various business scenarios; determine the current state of the server cluster, and determine the current business scenario corresponding to the server cluster; determine the corresponding weight configuration template based on the current business scenario; and optimize each performance indicator again based on the weight configuration template corresponding to the current business scenario.
[0115] In one embodiment, the device may further include:
[0116] The algorithm adjustment module is used to monitor the running effect of the application on each server; evaluate the user's satisfaction with the running effect of the application on each server; and adjust the machine learning algorithm based on the satisfaction.
[0117] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0118] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.
[0119] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.
[0120] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0121] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0122] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0123] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0124] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0125] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.
[0126] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0127] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0128] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0129] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A server screening method, characterized in that: include: According to the collection strategy of each server in the server cluster, the performance indicators of each server are collected regularly. The collection strategy of each server is formulated in advance according to the role and application requirements of the server. Determine the initial weight value of each performance indicator; Using a machine learning algorithm, the weight of each performance indicator is adjusted based on the initial weight value of each performance indicator to obtain the optimized weight value of each performance indicator; Performing standardization on the various performance indicators; Calculate the comprehensive score of each server based on the standardized performance indicators and the optimization weight of each performance indicator; According to the comprehensive score of each server, each server is divided into multiple priority queues; servers in different priority queues are used to process tasks of different priorities; When a resource request task of an application is received, a server with the highest comprehensive score that meets the requirements of the resource request task is screened out from the corresponding priority queue according to the priority of the resource request task.
2. The method according to claim 1, characterized in that The performance indicators that need to be collected set in the collection strategy of each server include at least one of CPU usage, memory usage, disk I / O rate, network bandwidth usage, CPU cache hit rate, memory swap rate, network delay and disk response time.
3. The method according to claim 1, characterized in that The standardization of the various performance indicators includes: Verify whether each performance indicator is within its respective preset reasonable range; After passing the verification, the various performance indicators are cleaned; wherein the cleaning process includes processing abnormal values and removing missing values; The performance indicators of different dimensions after cleaning treatment are converted into standard scores on a unified scale.
4. The method according to claim 1, characterized in that Also includes: According to the performance indicators of each server, a resource prediction model is used to predict the resource demand of each server in a preset time period in the future; The resource allocation and scheduling strategies of each server are adjusted according to the resource requirements of each server in a future preset time period and the current resource allocation of each server.
5. The method according to claim 1, characterized in that: According to the comprehensive score of each server, each server is divided into multiple priority queues, including: Sort the servers in descending order according to their comprehensive scores; Place the first N1 servers in the sorting result in the first priority queue, place the last N2 servers in the sorting result in the third priority queue, and place the remaining servers in the second priority queue; wherein the servers in the first priority queue are used to process resource request tasks of the first priority, the servers in the second priority queue are used to process resource request tasks of the second priority, and the servers in the third priority queue are used to process resource request tasks of the third priority; the priorities of the first priority, the second priority and the third priority are from high to low, and N1 and N2 are preset positive integers.
6. The method according to claim 1, characterized in that Before calculating the comprehensive score of each server, the method further includes: Get pre-configured weight configuration templates for various business scenarios; Determine the current state of the server cluster and determine the current business scenario corresponding to the server cluster; According to the current business scenario, determine the corresponding weight configuration template; According to the weight configuration template corresponding to the current business scenario, each performance indicator is optimized again.
7. The method according to claim 1, characterized in that Also includes: Monitor the running performance of applications on each server; Evaluate user satisfaction with the performance of applications on each server; The machine learning algorithm is adjusted based on the satisfaction level.
8. A server screening device, characterized in that: include: The indicator collection module is used to regularly collect performance indicators of each server in the server cluster according to the respective collection strategies of each server; wherein the collection strategy of each server is formulated in advance according to the role and application requirements of the server; An initial value determination module is used to determine the initial weight value of each performance indicator; A weight adjustment module is used to use a machine learning algorithm to adjust the weight of each performance indicator based on its initial weight value to obtain an optimized weight value for each performance indicator; An indicator standardization module, used for standardizing the various performance indicators; The scoring calculation module is used to calculate the comprehensive score of each server according to the standardized performance indicators and the optimization weight values of each performance indicator; The server division module is used to divide each server into multiple priority queues according to the comprehensive score of each server; wherein servers in different priority queues are used to process tasks of different priorities; The server screening module is used to screen out the server with the highest comprehensive score that meets the requirements of the resource request task from the corresponding priority queue according to the priority of the resource request task when receiving the resource request task of the application.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Server data acquisition method and device
CN120821645A