WO2022257304A1 - Server tuning method, system and apparatus - Google Patents

Server tuning method, system and apparatus Download PDF

Info

Publication number
WO2022257304A1
WO2022257304A1 PCT/CN2021/121915 CN2021121915W WO2022257304A1 WO 2022257304 A1 WO2022257304 A1 WO 2022257304A1 CN 2021121915 W CN2021121915 W CN 2021121915W WO 2022257304 A1 WO2022257304 A1 WO 2022257304A1
Authority
WO
WIPO (PCT)
Prior art keywords
performance
target
server
tuning
target component
Prior art date
Application number
PCT/CN2021/121915
Other languages
French (fr)
Chinese (zh)
Inventor
贾猛
Original Assignee
苏州浪潮智能科技有限公司
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 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2022257304A1 publication Critical patent/WO2022257304A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present application discloses a server tuning method, system and apparatus. The method comprises: setting in advance a performance tuning policy for a target component within a server which affects server performance; acquiring performance parameters of the target component, and automatically determining whether the performance parameters are within a target parameter range of the target component; if not, then automatically performing performance tuning on the target component according to the performance tuning policy. Hence, in the present application, when the performance parameters of a target component is not within a target parameter range of the target component, performance tuning can be automatically performed on the target component, so as to improve the overall performance of the server. The operation speed of said type of automatic tuning means is relatively fast, allowing the real-time performance of whole server tuning to be relatively good.

Description

一种服务器调优方法、系统及装置A server tuning method, system and device
本申请要求在2021年6月9日提交中国专利局、申请号为202110642462.3、发明名称为“一种服务器调优方法、系统及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110642462.3 and the title of the invention "a server optimization method, system and device" submitted to the China Patent Office on June 9, 2021, the entire contents of which are incorporated by reference In this application.
技术领域technical field
本申请涉及服务器性能优化领域,特别是涉及一种服务器调优方法、系统及装置。The present application relates to the field of server performance optimization, in particular to a server optimization method, system and device.
背景技术Background technique
在服务器领域,对业务处理性能及用户体验感都有较高要求。目前,为了提高业务处理性能及用户体验感,通常需要提高服务器的整机性能,而为了提高服务器的整机性能,通常需要对服务器整机进行系统性能调优。In the server field, there are high requirements for business processing performance and user experience. At present, in order to improve business processing performance and user experience, it is usually necessary to improve the overall performance of the server, and in order to improve the overall performance of the server, it is usually necessary to perform system performance tuning on the entire server.
现有技术中,对于服务器整机的系统性能调优,通常都是由工程师手动调优,比如服务器的内存过高时,手动关闭系统中不必要的进程,但是,这种手动调优方式的操作速度较慢,导致服务器整机调优的实时性较差。In the prior art, the system performance tuning of the whole server is usually manually tuned by engineers. For example, when the memory of the server is too high, unnecessary processes in the system are manually closed. However, this manual tuning method The operation speed is slow, resulting in poor real-time performance of server tuning.
因此,如何提供一种解决上述技术问题的方案是本领域的技术人员目前需要解决的问题。Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present.
发明内容Contents of the invention
本申请的目的是提供一种服务器调优方法、系统及装置,在目标组件的性能参数不在目标组件的目标参数范围内时,可自动对目标组件进行性能调优处理,以提高服务器的整机性能,这种自动调优方式的操作速度较快,使得服务器整机调优的实时性较好。The purpose of this application is to provide a server tuning method, system and device, which can automatically perform performance tuning on the target component when the performance parameters of the target component are not within the target parameter range of the target component, so as to improve the overall performance of the server. Performance, the operation speed of this automatic tuning method is faster, which makes the real-time performance of the whole server tuning better.
为解决上述技术问题,本申请提供了一种服务器调优方法,包括:In order to solve the above technical problems, the application provides a server tuning method, including:
预先为服务器内影响服务器性能的目标组件设定性能调优策略;Pre-set performance tuning strategies for target components in the server that affect server performance;
获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;Obtaining the performance parameters of the target component, and automatically judging whether the performance parameters are within the target parameter range of the target component;
若否,则按照所述性能调优策略自动对所述目标组件进行性能调优处理。If not, automatically perform performance tuning on the target component according to the performance tuning policy.
优选地,所述目标组件包括所述服务器的中央处理器;Preferably, said target component comprises a central processing unit of said server;
相应的,获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;若否,则按照所述性能调优策略自动对所述目标组件进行性能调优处理的过程,包括:Correspondingly, obtain the performance parameter of the target component, and automatically judge whether the performance parameter is within the target parameter range of the target component; if not, automatically perform performance on the target component according to the performance tuning strategy The tuning process includes:
获取所述中央处理器的第一使用率,并判断所述第一使用率是否处于所述中央处理器的第一使用率目标范围内;Acquiring a first usage rate of the central processing unit, and judging whether the first usage rate is within the target range of the first usage rate of the central processing unit;
若否,则通过控制所述中央处理器的接收请求数,将所述第一使用率调整在所述第一使用率目标范围内。If not, adjusting the first usage rate within the first usage rate target range by controlling the number of received requests of the central processing unit.
优选地,所述中央处理器的接收请求包括http请求和非http请求;Preferably, the receiving request of the central processor includes http request and non-http request;
相应的,通过控制所述中央处理器的接收请求数,将所述第一使用率调整在所述第一使用率目标范围内的过程,包括:Correspondingly, the process of adjusting the first utilization rate within the target range of the first utilization rate by controlling the number of received requests of the central processing unit includes:
通过调整系统的TCP协议参数,控制所述中央处理器的非http请求接收数量,并通过调整系统的TCP协议参数和IP协议参数,控制所述中央处理器的http请求接收数量,以将所述第一使用率调整在所述第一使用率目标范围内。By adjusting the TCP protocol parameters of the system, the number of non-http requests received by the central processor is controlled, and by adjusting the TCP protocol parameters and IP protocol parameters of the system, the number of http requests received by the central processor is controlled, so that the A first usage adjustment is within the first usage target range.
优选地,所述服务器调优方法还包括:Preferably, the server tuning method also includes:
预先设置通过调整系统的TCP协议参数和IP协议参数,使所述中央处理器同时处理的请求数量最大且所述第一使用率在所述第一使用率目标范围内的爬山算法;Pre-set by adjusting the TCP protocol parameters and IP protocol parameters of the system, so that the number of requests processed by the central processing unit at the same time is the largest and the hill climbing algorithm that the first utilization rate is within the first utilization rate target range;
相应的,通过调整系统的TCP协议参数,控制所述中央处理器的非http请求接收数量,并通过调整系统的TCP协议参数和IP协议参数,控制所述中央处理器的http请求接收数量,以将所述第一使用率调整在所述第一使用率目标范围内的过程,包括:Correspondingly, by adjusting the TCP protocol parameters of the system, the number of non-http requests received by the central processor is controlled, and by adjusting the TCP protocol parameters and IP protocol parameters of the system, the number of http requests received by the central processor is controlled, so that The process of adjusting the first usage rate within the target range of the first usage rate includes:
利用所述爬山算法,逐步调整所述TCP协议参数和所述IP协议参数的值,直至找到使所述中央处理器同时处理的请求数量最大,且所述第一使用率在所述第一使用率目标范围内的最优值。Using the hill-climbing algorithm, gradually adjust the values of the TCP protocol parameters and the IP protocol parameters until the maximum number of requests processed by the central processing unit at the same time is found, and the first usage rate is at the first usage rate. The optimal value within the rate target range.
优选地,所述目标组件还包括所述服务器的内存;Preferably, the target component also includes memory of the server;
相应的,获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;若否,则按照所述性能调优策略自动对所述目标组件进行性能调优处理的过程,还包括:Correspondingly, obtain the performance parameter of the target component, and automatically judge whether the performance parameter is within the target parameter range of the target component; if not, automatically perform performance on the target component according to the performance tuning strategy The process of tuning processing also includes:
获取所述内存的第二使用率,并判断所述第二使用率是否处于所述内存的第二使用率目标范围内;Obtaining the second usage rate of the memory, and judging whether the second usage rate is within the target range of the second usage rate of the memory;
若否,则通过关闭占用所述内存的系统进程,将所述第二使用率调整在所述第二使用率目标范围内。If not, adjusting the second utilization ratio within the second utilization ratio target range by closing the system process occupying the memory.
优选地,通过关闭占用所述内存的系统进程,将所述第二使用率调整在所述第二使用率目标范围内的过程,包括:Preferably, the process of adjusting the second utilization rate within the target range of the second utilization rate by closing the system process occupying the memory includes:
将系统进程按照占用内存的空间大小从大到小进行排序;Sort the system processes from large to small according to the space occupied by memory;
从占用内存空间最大的系统进程开始,依次判断各系统进程与所述服务器当前运行的业务是否有关;Starting from the system process that takes up the largest memory space, determine whether each system process is related to the business currently running on the server;
若存在与所述服务器当前运行的业务无关的目标系统进程,则关闭所述目标系统进程,直至所述第二使用率调整至所述第二使用率目标范围内。If there is a target system process unrelated to the service currently running on the server, shut down the target system process until the second usage rate is adjusted to be within the second usage rate target range.
优选地,所述目标组件还包括所述服务器的网络组件;Preferably, the target component also includes a network component of the server;
相应的,获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;若否,则按照所述性能调优策略自动对所述目标组件进行性能调优处理的过程,还包括:Correspondingly, obtain the performance parameter of the target component, and automatically judge whether the performance parameter is within the target parameter range of the target component; if not, automatically perform performance on the target component according to the performance tuning strategy The process of tuning processing also includes:
获取所述网络组件的带宽占用率,并判断所述带宽占用率是否处于所述网络组件的带宽占用率目标范围内;Obtaining the bandwidth occupancy rate of the network component, and judging whether the bandwidth occupancy rate is within the target range of the bandwidth occupancy rate of the network component;
若否,则通过更换更大带宽的网络组件,将所述带宽占用率调整在所述带宽占用率目标范围内。If not, the bandwidth occupancy rate is adjusted within the bandwidth occupancy rate target range by replacing a network component with a larger bandwidth.
优选地,所述目标组件还包括所述服务器的磁盘;Preferably, the target component also includes a disk of the server;
相应的,获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;若否,则按照所述性能调优策略自动对所述目标组件进行性能调优处理的过程,还包括:Correspondingly, obtain the performance parameter of the target component, and automatically judge whether the performance parameter is within the target parameter range of the target component; if not, automatically perform performance on the target component according to the performance tuning strategy The process of tuning processing also includes:
获取所述磁盘的第三使用率,并判断所述第三使用率是否处于所述磁盘的第三使用率目标范围内;Acquiring a third usage rate of the disk, and judging whether the third usage rate is within the target range of the third usage rate of the disk;
若否,则通过升级所述服务器的磁盘驱动或调整所述磁盘的RAID方式为非备份存储方式,将所述第三使用率调整在所述第三使用率目标范围内。If not, adjusting the third usage rate within the target range of the third usage rate by upgrading the disk drive of the server or adjusting the RAID mode of the disk to a non-backup storage mode.
为解决上述技术问题,本申请还提供了一种服务器调优系统,包括:In order to solve the above technical problems, the present application also provides a server tuning system, including:
预设模块,用于预先为服务器内影响服务器性能的目标组件设定性能调优策略;The preset module is used to pre-set performance tuning strategies for target components affecting server performance in the server;
判断模块,用于获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;若否,则执行调优模块;A judging module, configured to obtain the performance parameters of the target component, and automatically judge whether the performance parameters are within the target parameter range of the target component; if not, execute the tuning module;
调优模块,用于按照所述性能调优策略自动对所述目标组件进行性能调优处理;An tuning module, configured to automatically perform performance tuning on the target component according to the performance tuning strategy;
其中,所述目标组件包括所述服务器的中央处理器;Wherein, the target component includes a central processing unit of the server;
相应的,所述判断模块具体用于获取所述中央处理器的第一使用率,并判断所述第一使用率是否处于所述中央处理器的第一使用率目标范围内;若否,则执行所述调优模块;Correspondingly, the judging module is specifically configured to obtain the first usage rate of the central processing unit, and judge whether the first usage rate is within the target range of the first usage rate of the central processing unit; if not, then Execute the tuning module;
所述调优模块具体用于通过控制所述中央处理器的接收请求数,将所述第一使用率调整在所述第一使用率目标范围内。The tuning module is specifically configured to adjust the first utilization ratio within the first utilization ratio target range by controlling the number of received requests of the central processing unit.
为解决上述技术问题,本申请还提供了一种服务器调优装置,包括:In order to solve the above technical problems, the present application also provides a server tuning device, including:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于在执行所述计算机程序时实现上述任一种服务器调优方法的步骤。A processor, configured to implement the steps of any one of the above server tuning methods when executing the computer program.
本申请提供了一种服务器调优方法,预先为服务器内影响服务器性能的目标组件设定性能调优策略;获取目标组件的性能参数,并自动判断性能参数是否处于目标组件的目标参数范围内;若否,则按照性能调优策略自动对目标组件进行性能调优处理。可见,本申请在目标组件的性能参数不在目标组件的目标参数范围内时,可自动对目标组件进行性能调优处理,以提高服务器的整机性能,这种自动调优方式的操作速度较快,使得服务器整机调优的实时性较好。The present application provides a server tuning method, which pre-sets a performance tuning strategy for a target component in the server that affects server performance; obtains performance parameters of the target component, and automatically determines whether the performance parameter is within the target parameter range of the target component; If not, automatically perform performance tuning on the target component according to the performance tuning strategy. It can be seen that, when the performance parameters of the target component are not within the target parameter range of the target component, the application can automatically perform performance tuning processing on the target component to improve the overall performance of the server, and the operation speed of this automatic tuning method is relatively fast , so that the real-time performance of server tuning is better.
本申请还提供了一种服务器调优系统及装置,与上述调优方法具有相同的有益效果。The present application also provides a server optimization system and device, which have the same beneficial effect as the above optimization method.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对现有技术和实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the prior art and the accompanying drawings that need to be used in the embodiments. Obviously, the accompanying drawings in the following description are only some of the present application. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为本申请实施例提供的一种服务器调优方法的流程图;FIG. 1 is a flowchart of a server tuning method provided in an embodiment of the present application;
图2为本申请实施例提供的一种服务器调优方法的具体原理图;FIG. 2 is a specific schematic diagram of a server tuning method provided in an embodiment of the present application;
图3为本申请实施例提供的一种服务器的中央处理器的调优逻辑图;FIG. 3 is an optimization logic diagram of a central processing unit of a server provided in an embodiment of the present application;
图4为本申请实施例提供的一种服务器的内存的调优逻辑图;FIG. 4 is a logic diagram for tuning the memory of a server provided in an embodiment of the present application;
图5为本申请实施例提供的一种服务器调优系统的结构示意图。FIG. 5 is a schematic structural diagram of a server tuning system provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请的核心是提供一种服务器调优方法、系统及装置,在目标组件的性能参数不在目标组件的目标参数范围内时,可自动对目标组件进行性能调优处理,以提高服务器的整机性能,这种自动调优方式的操作速度较快,使得服务器整机调优的实时性较好。The core of this application is to provide a server tuning method, system and device, which can automatically perform performance tuning on the target component when the performance parameters of the target component are not within the target parameter range of the target component, so as to improve the overall performance of the server. Performance, the operation speed of this automatic tuning method is faster, which makes the real-time performance of the whole server tuning better.
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
请参照图1,图1为本申请实施例提供的一种服务器调优方法的流程图。Please refer to FIG. 1 . FIG. 1 is a flowchart of a server tuning method provided by an embodiment of the present application.
该服务器调优方法包括:The server tuning methods include:
步骤S1:预先为服务器内影响服务器性能的目标组件设定性能调优策略。Step S1: Pre-set performance tuning strategies for target components in the server that affect server performance.
具体地,本申请首先根据服务器内各组件的工作原理,从服务器内各组件中确定影响服务器性能的组件(称为目标组件),然后为目标组件设定用于指导目标组件性能调优的性能调优策略,以便于后续优化目标组件的性能。Specifically, this application first determines the components that affect the performance of the server (called target components) from the components in the server according to the working principles of the components in the server, and then sets the performance for the target components to guide the performance tuning of the target components. Tuning strategy to facilitate subsequent optimization of the performance of the target component.
步骤S2:获取目标组件的性能参数,并自动判断性能参数是否处于目标组件的目标参数范围内;若否,则执行步骤S3。步骤S3:按照性能调优策略自动对目标组件进行性能调优处理。Step S2: Obtain the performance parameter of the target component, and automatically judge whether the performance parameter is within the target parameter range of the target component; if not, execute step S3. Step S3: automatically perform performance tuning processing on the target component according to the performance tuning policy.
具体地,在服务器工作过程中,本申请实时获取目标组件的性能参数,具体可通过监测工具监测得到,然后自动将目标组件的性能参数与目标组件的目标参数范围作比较,以自动判断目标组件的性能参数是否处于目标组件的目标参数范围内,若目标组件的性能参数在目标组件的目标参数范围内,说明目标组件的性能较好,无需优化;若目标组件的性能参数不在目标组件的目标参数范围内,说明目标组件的性能不够好,需优化目标组件的性能,则按照预先为目标组件设定的性能调优策略自动对目标组件进行性能调优处理,从而优化目标组件的性能,进而提高服务器的整机性能。Specifically, during the working process of the server, the application obtains the performance parameters of the target component in real time, which can be monitored by monitoring tools, and then automatically compares the performance parameters of the target component with the target parameter range of the target component to automatically determine the target component Whether the performance parameter of the target component is within the target parameter range of the target component, if the performance parameter of the target component is within the target parameter range of the target component, it means that the performance of the target component is better and no optimization is needed; If it is within the parameter range, it means that the performance of the target component is not good enough, and the performance of the target component needs to be optimized, then the performance tuning process of the target component will be automatically performed according to the performance tuning strategy set in advance for the target component, so as to optimize the performance of the target component, and then Improve the overall performance of the server.
本申请提供了一种服务器调优方法,预先为服务器内影响服务器性能的目标组件设定性能调优策略;获取目标组件的性能参数,并自动判断性能参数是否处于目标组件的目标参数范围内;若否,则按照性能调优策略自动对目标组件进行性能调优处理。可见,本申请在目标组件的性能参数不在目标组件的目标参数范围内时,可自动对目标组件进行性能调优处理,以提高服务器的整机性能,这种自动调优方式的操作速度较快,使得服务器整机调优的实时性较好。The present application provides a server tuning method, which pre-sets a performance tuning strategy for a target component in the server that affects server performance; obtains performance parameters of the target component, and automatically determines whether the performance parameter is within the target parameter range of the target component; If not, automatically perform performance tuning on the target component according to the performance tuning policy. It can be seen that, when the performance parameters of the target component are not within the target parameter range of the target component, the application can automatically perform performance tuning processing on the target component to improve the overall performance of the server, and the operation speed of this automatic tuning method is relatively fast , so that the real-time performance of server tuning is better.
在上述实施例的基础上:On the basis of above-mentioned embodiment:
请参照图2,图2为本申请实施例提供的一种服务器调优方法的具体原理图。Please refer to FIG. 2 . FIG. 2 is a specific schematic diagram of a server tuning method provided in an embodiment of the present application.
作为一种可选的实施例,目标组件包括服务器的中央处理器;As an optional embodiment, the target component includes a central processing unit of a server;
相应的,获取目标组件的性能参数,并自动判断性能参数是否处于目标组件的目标参数范围内;若否,则按照性能调优策略自动对目标组件进行性能调优处理的过程,包括:Correspondingly, obtain the performance parameters of the target component, and automatically judge whether the performance parameters are within the target parameter range of the target component; if not, automatically perform the performance tuning process on the target component according to the performance tuning strategy, including:
获取中央处理器的第一使用率,并判断第一使用率是否处于中央处理器的第一使用率目标范围内;Acquiring the first utilization rate of the central processing unit, and judging whether the first utilization rate is within the target range of the first utilization rate of the central processing unit;
若否,则通过控制中央处理器的接收请求数,将第一使用率调整在第一使用率目标范围内。If not, the first usage rate is adjusted within the first usage rate target range by controlling the number of received requests of the central processing unit.
具体地,本申请的影响服务器性能的目标组件包括服务器的中央处理器(CPU),则中央处理器的调优逻辑为:获取中央处理器的使用率(称为第一使用率),具体可通过top命令(一种服务器指令)检测中央处理器的整体使用情况,得到中央处理器的第一使用率,然后判断中央处理器的第一使用率是否处于中央处理器的第一使用率目标范围(如0-80%)内,若中央处理器的第一使用率在中央处理器的第一使用率目标范围内,说明中央处理器的性能较好,无需优化;若中央处理器的第一使用率不在中央处理器的第一使用率目标范围内(超过80%),说明中央处理器的性能不够好,需优化中央处理器的性能,则按照预先为中央处理器设定的性能调优策略自动对中央处理器进行性能调优处理,从而优化中央处理器的性能。Specifically, the target component that affects server performance in this application includes the central processing unit (CPU) of the server, and then the tuning logic of the central processor is: to obtain the utilization rate of the central processing unit (called the first utilization rate), which can be specifically Use the top command (a server command) to detect the overall usage of the CPU, get the first usage rate of the CPU, and then judge whether the first usage rate of the CPU is within the target range of the first usage rate of the CPU (such as 0-80%), if the first utilization rate of the central processing unit is within the target range of the first utilization rate of the central processing unit, it indicates that the performance of the central processing unit is better and no optimization is needed; if the first utilization rate of the central processing unit The utilization rate is not within the target range of the first utilization rate of the CPU (more than 80%), indicating that the performance of the CPU is not good enough, and the performance of the CPU needs to be optimized, then it should be tuned according to the performance set in advance for the CPU The policy automatically performs performance tuning processing on the CPU, thereby optimizing the performance of the CPU.
更具体地,为中央处理器设定的性能调优策略为:通过控制中央处理器的接收请求数来调整中央处理器的第一使用率,以将中央处理器的第一使用率调整在中央处理器的第一使用率目标范围内,从而实现中央处理器的性能优化。More specifically, the performance tuning strategy set for the central processing unit is: adjust the first utilization rate of the central processing unit by controlling the number of received requests of the central processing unit, so as to adjust the first utilization rate of the central processing unit at the central processing unit The processor's first utilization rate target range, so as to realize the performance optimization of the central processing unit.
请参照图3,图3为本申请实施例提供的一种服务器的中央处理器的调优逻辑图。Please refer to FIG. 3 . FIG. 3 is a logic diagram for tuning a central processing unit of a server provided in an embodiment of the present application.
作为一种可选的实施例,中央处理器的接收请求包括http请求和非http请求;As an optional embodiment, the receiving request of the central processor includes http request and non-http request;
相应的,通过控制中央处理器的接收请求数,将第一使用率调整在第一使用率目标范围内的过程,包括:Correspondingly, the process of adjusting the first utilization rate within the target range of the first utilization rate by controlling the number of received requests of the central processing unit includes:
通过调整系统的TCP协议参数,控制中央处理器的非http请求接收数量,并通过调整系统的TCP协议参数和IP协议参数,控制中央处理器的http请求接收数量,以将第一使用率调整在第一使用率目标范围内。By adjusting the TCP protocol parameters of the system, the number of non-http requests received by the central processor is controlled, and by adjusting the TCP protocol parameters and IP protocol parameters of the system, the number of http requests received by the central processor is controlled to adjust the first usage rate at Within the first usage target range.
具体地,本申请的中央处理器的接收请求包括http请求(网页请求)和非http请求(非网页请求),非http请求需要经过TCP(Transmission Control Protocol,传输控制协议)协议解析后提供给中央处理器处理,http请求需要经过TCP协议及IP(Internet Protocol,网际互连协议)协议解析后提供给中央处理器处理,所以通过调整系统的TCP协议参数(net.ipv4.tcp_max_tw_buckets参数),可以控制非http请求的解析数量,从而控制提供给中央处理器处理的非http请求数量,即控制中央处理器的非http 请求接收数量;通过调整系统的TCP协议参数和IP协议参数(net.ipv4.ip_local_port_range参数),可以控制http请求的解析数量,从而控制提供给中央处理器处理的http请求数量,即控制中央处理器的http请求接收数量,从而控制中央处理器的接收请求数量,进而实现将中央处理器的第一使用率调整在中央处理器的第一使用率目标范围内(具体低于80%)。Specifically, the receiving request of the central processing unit of the present application includes http request (web page request) and non-http request (non-web page request), and non-http request needs to be provided to the center after TCP (Transmission Control Protocol, transmission control protocol) protocol analysis Processor processing, http requests need to be provided to the central processor for processing after being analyzed by the TCP protocol and IP (Internet Protocol) protocol, so by adjusting the TCP protocol parameters (net.ipv4.tcp_max_tw_buckets parameter) of the system, you can control The number of resolutions of non-http requests, so as to control the number of non-http requests provided to the central processor for processing, that is, to control the number of non-http requests received by the central processor; by adjusting the system's TCP protocol parameters and IP protocol parameters (net.ipv4.ip_local_port_range parameters), can control the number of http requests parsed, thereby controlling the number of http requests provided to the central processor for processing, that is, controlling the number of http requests received by the central processor, thereby controlling the number of received requests of the central processor, and then realizing the central processing The first utilization rate of the processor is adjusted to be within the first utilization rate target range of the CPU (specifically lower than 80%).
作为一种可选的实施例,服务器调优方法还包括:As an optional embodiment, the server tuning method also includes:
预先设置通过调整系统的TCP协议参数和IP协议参数,使中央处理器同时处理的请求数量最大且第一使用率在第一使用率目标范围内的爬山算法;Preset the hill-climbing algorithm by adjusting the TCP protocol parameters and IP protocol parameters of the system, so that the number of requests processed by the central processor at the same time is the largest and the first utilization rate is within the target range of the first utilization rate;
相应的,通过调整系统的TCP协议参数,控制中央处理器的非http请求接收数量,并通过调整系统的TCP协议参数和IP协议参数,控制中央处理器的http请求接收数量,以将第一使用率调整在第一使用率目标范围内的过程,包括:Correspondingly, by adjusting the TCP protocol parameters of the system, the number of non-http requests received by the central processor is controlled, and by adjusting the TCP protocol parameters and IP protocol parameters of the system, the number of http requests received by the central processor is controlled, so that the first use The process of rate adjustment within the first utilization target range, including:
利用爬山算法,逐步调整TCP协议参数和IP协议参数的值,直至找到使中央处理器同时处理的请求数量最大,且第一使用率在第一使用率目标范围内的最优值。Using the hill-climbing algorithm, the values of the TCP protocol parameters and the IP protocol parameters are gradually adjusted until an optimal value is found that maximizes the number of requests processed by the central processing unit at the same time and the first utilization rate is within the target range of the first utilization rate.
进一步地,本申请提前设置一个爬山算法(爬山算法是一种局部择优的方法,采用启发式方法,是对深度优先搜索的一种改进,它利用反馈信息帮助生成解的决策),其具体算法逻辑为:通过调整系统的TCP协议参数和IP协议参数,同时实现:中央处理器同时处理的请求数量最大,且中央处理器的第一使用率在中央处理器的第一使用率目标范围内。Further, the application sets a hill-climbing algorithm in advance (the hill-climbing algorithm is a method of local selection, which adopts a heuristic method, and is an improvement to depth-first search, and uses feedback information to help generate a decision-making solution), and its specific algorithm The logic is: by adjusting the parameters of the TCP protocol and the IP protocol of the system, at the same time, the number of requests processed by the central processing unit is the largest, and the first utilization rate of the central processing unit is within the target range of the first utilization rate of the central processing unit.
则中央处理器的调优逻辑具体为:获取中央处理器的第一使用率,然后判断中央处理器的第一使用率是否处于中央处理器的第一使用率目标范围内,若中央处理器的第一使用率不在中央处理器的第一使用率目标范围(0-80%)内,则利用爬山算法,逐步调整系统的TCP协议参数和IP协议参数的值,直至找到使中央处理器同时处理的请求数量最大,且中央处理器的第一使用率在中央处理器的第一使用率目标范围内的最优值,即在中央处理器满足使用率要求的情况下(中央处理器的第一使用率低于80%),中央处理器的性能实现最优化。Then the tuning logic of the central processing unit is specifically: obtain the first utilization rate of the central processing unit, and then judge whether the first utilization rate of the central processing unit is within the target range of the first utilization rate of the central processing unit, if the first utilization rate of the central processing unit The first utilization rate is not within the first utilization rate target range (0-80%) of the central processing unit, then utilizes the hill climbing algorithm to gradually adjust the values of the TCP protocol parameters and the IP protocol parameters of the system until the central processing unit is found to process simultaneously The number of requests is the largest, and the first utilization rate of the central processing unit is within the optimal value of the first utilization rate target range of the central processing unit, that is, under the condition that the central processing unit meets the utilization rate requirement (the first utilization rate of the central processing unit The utilization rate is less than 80%), and the performance of the CPU is optimized.
请参照图4,图4为本申请实施例提供的一种服务器的内存的调优逻辑图。Please refer to FIG. 4 . FIG. 4 is a logic diagram for tuning a memory of a server provided in an embodiment of the present application.
作为一种可选的实施例,目标组件还包括服务器的内存;As an optional embodiment, the target component also includes the memory of the server;
相应的,获取目标组件的性能参数,并自动判断性能参数是否处于目标组件的目标参数范围内;若否,则按照性能调优策略自动对目标组件进行性能调优处理的过程,还包括:Correspondingly, the performance parameter of the target component is obtained, and it is automatically judged whether the performance parameter is within the target parameter range of the target component; if not, the process of automatically performing performance tuning on the target component according to the performance tuning strategy also includes:
获取内存的第二使用率,并判断第二使用率是否处于内存的第二使用率目标范围内;Obtaining the second usage rate of the memory, and judging whether the second usage rate is within the target range of the second usage rate of the memory;
若否,则通过关闭占用内存的系统进程,将第二使用率调整在第二使用率目标范围内。If not, the second utilization rate is adjusted within the second utilization rate target range by closing the system process that occupies the memory.
具体地,本申请的影响服务器性能的目标组件还包括服务器的内存,则内存的调优逻辑为:获取内存的使用率(称为第二使用率),具体可通过free–g命令(一种服务器指令)检测内存的整体使用情况,得到内存的第二使用率,然后判断内存的第二使用率是否处于内存的第二使用率目标范围(0-90%)内,若内存的第二使用率在内存的第二使用率目标范围内,说明内存的性能较好,无需优化;若内存的第二使用率不在内存的第二使用率目标范围内(超过90%),说明内存的性能不够好,需优化内存的性能,则按照预先为内存设定的性能调优策略自动对内存进行性能调优处理,从而优化内存的性能。Specifically, the target component affecting the performance of the server in this application also includes the memory of the server, and the tuning logic of the memory is: to obtain the usage rate of the memory (called the second usage rate), which can be specifically obtained through the free-g command (a Server command) detects the overall usage of the memory, obtains the second usage of the memory, and then judges whether the second usage of the memory is within the target range (0-90%) of the second usage of the memory, if the second usage of the memory If the memory rate is within the target range of the second memory usage rate, it means that the memory performance is good and no optimization is needed; if the second memory usage rate is not within the second memory usage rate target range (more than 90%), it means that the memory performance is not enough Well, if the performance of the memory needs to be optimized, the memory performance is automatically tuned according to the performance tuning policy set in advance for the memory, so as to optimize the performance of the memory.
更具体地,为内存设定的性能调优策略为:通过关闭占用内存的系统进程来调整内存的第二使用率,以将内存的第二使用率调整在内存的第二使用率目标范围内,从而实现内存的性能优化。More specifically, the performance tuning strategy set for the memory is: adjust the second usage rate of the memory by shutting down the system process that occupies the memory, so as to adjust the second usage rate of the memory within the target range of the second usage rate of the memory , so as to achieve memory performance optimization.
作为一种可选的实施例,通过关闭占用内存的系统进程,将第二使用率调整在第二使用率目标范围内的过程,包括:As an optional embodiment, the process of adjusting the second usage rate within the target range of the second usage rate by closing the system process that occupies the memory includes:
将系统进程按照占用内存的空间大小从大到小进行排序;Sort the system processes from large to small according to the space occupied by memory;
从占用内存空间最大的系统进程开始,依次判断各系统进程与服务器当前运行的业务是否有关;Starting from the system process that occupies the largest memory space, determine whether each system process is related to the business currently running on the server;
若存在与服务器当前运行的业务无关的目标系统进程,则关闭目标系统进程,直至第二使用率调整至第二使用率目标范围内。If there is a target system process unrelated to the service currently running on the server, the target system process is shut down until the second usage rate is adjusted to be within the second usage rate target range.
具体地,为内存设定的性能调优策略具体为:将系统进程按照占用内存的空间大小从大到小进行排序,具体可通过ps aux--sort-rss|head命令(一种服务器指令)确定系统进程占用内存的空间大小,并按照占用内存的空间大小从大到小的顺序对系统进程进行排序,可以理解的是,关闭占用内存空间越大的 系统进程,对降低内存的第二使用率越有利,但关闭与服务器当前运行的业务有关的系统进程又会影响服务器当前业务的运行,所以本申请从占用内存空间最大的系统进程开始,依次判断各系统进程与服务器当前运行的业务是否有关,若当前判断的系统进程与服务器当前运行的业务有关,则不关闭此与服务器当前运行的业务有关的系统进程;若当前判断的系统进程与服务器当前运行的业务无关,则关闭此与服务器当前运行的业务无关的系统进程(称为目标系统进程),直至内存的第二使用率调整至内存的第二使用率目标范围内(具体可低于80%),结束关闭系统进程。Specifically, the performance tuning strategy set for the memory is as follows: sort the system processes according to the space occupied by the memory from large to small, specifically through the ps aux --sort-rss|head command (a server command) Determine the size of the memory space occupied by the system processes, and sort the system processes in descending order of the space occupied by the memory space. It is understandable that closing the system process that occupies a larger memory space will reduce the second use of memory. The higher the rate, the more favorable it is, but shutting down the system processes related to the current business running on the server will affect the running of the server's current business. Therefore, this application starts with the system process that occupies the largest memory space, and sequentially judges whether each system process is related to the business currently running on the server. Related, if the currently judged system process is related to the business currently running on the server, the system process related to the current business running on the server will not be closed; The currently running business-independent system process (referred to as the target system process) ends and closes the system process until the second usage rate of the memory is adjusted to within the target range of the second usage rate of the memory (specifically, it may be lower than 80%).
作为一种可选的实施例,目标组件还包括服务器的网络组件;As an optional embodiment, the target component also includes a network component of the server;
相应的,获取目标组件的性能参数,并自动判断性能参数是否处于目标组件的目标参数范围内;若否,则按照性能调优策略自动对目标组件进行性能调优处理的过程,还包括:Correspondingly, the performance parameter of the target component is obtained, and it is automatically judged whether the performance parameter is within the target parameter range of the target component; if not, the process of automatically performing performance tuning on the target component according to the performance tuning strategy also includes:
获取网络组件的带宽占用率,并判断带宽占用率是否处于网络组件的带宽占用率目标范围内;Obtaining the bandwidth occupancy rate of the network component, and judging whether the bandwidth occupancy rate is within the target range of the bandwidth occupancy rate of the network component;
若否,则通过更换更大带宽的网络组件,将带宽占用率调整在带宽占用率目标范围内。If not, the bandwidth occupancy rate is adjusted within the target range of the bandwidth occupancy rate by replacing a network component with a larger bandwidth.
具体地,本申请的影响服务器性能的目标组件还包括服务器的网络组件(如交换机、光纤等为服务器提供网络环境的组件),则网络组件的调优逻辑为:获取网络组件的带宽占用率,具体可通过sar-n DEV命令(一种服务器指令)查看网络组件的整体使用情况,得到网络组件的带宽占用率,然后判断网络组件的带宽占用率是否处于网络组件的带宽占用率目标范围(0-90%)内,若网络组件的带宽占用率在网络组件的带宽占用率目标范围内,说明网络组件的性能较好,无需优化;若网络组件的带宽占用率不在网络组件的带宽占用率目标范围内(超过90%),说明网络组件的性能不够好,需优化网络组件的性能,则按照预先为网络组件设定的性能调优策略自动对网络组件进行性能调优处理,从而优化网络组件的性能。Specifically, the target components affecting server performance of the present application also include network components of the server (such as switches, optical fibers, etc. that provide the server with a network environment), and then the tuning logic of the network components is: to obtain the bandwidth occupancy rate of the network components, Specifically, you can use the sar-n DEV command (a server command) to view the overall usage of network components, obtain the bandwidth occupancy rate of the network component, and then determine whether the bandwidth occupancy rate of the network component is within the target range of the bandwidth occupancy rate of the network component (0 -90%), if the bandwidth occupancy rate of the network component is within the target range of the bandwidth occupancy rate of the network component, it indicates that the performance of the network component is good and no optimization is required; if the bandwidth occupancy rate of the network component is not within the target bandwidth occupancy rate of the network component range (more than 90%), indicating that the performance of the network components is not good enough, and the performance of the network components needs to be optimized, then the performance of the network components will be automatically tuned according to the performance tuning strategy set in advance for the network components, thereby optimizing the network components performance.
更具体地,为网络组件设定的性能调优策略为:通过更换更大带宽的网络组件来调整网络组件的带宽占用率(具体可触发告警系统提示工程师需要更换更大带宽的网络组件,或者提前设计服务器连接好不同带宽的网络组件,若服 务器在较小带宽的网络组件下不满足带宽占用要求(较小带宽的网络组件的带宽占用率不在此网络组件的带宽占用率目标范围内)时,自动切换到较大带宽的网络组件),以将网络组件的带宽占用率调整在网络组件的带宽占用率目标范围内,从而实现网络组件的性能优化。More specifically, the performance tuning strategy set for the network component is: adjust the bandwidth occupancy rate of the network component by replacing a network component with a larger bandwidth (specifically, an alarm system can be triggered to prompt engineers to replace a network component with a larger bandwidth, or Design the server in advance to connect network components with different bandwidths. If the server does not meet the bandwidth occupancy requirements under the network components with smaller bandwidths (the bandwidth occupancy rate of the network components with smaller bandwidths is not within the bandwidth occupancy target range of this network component) , automatically switch to a network component with a larger bandwidth), so as to adjust the bandwidth occupancy rate of the network component within the target range of the bandwidth occupancy rate of the network component, so as to realize the performance optimization of the network component.
作为一种可选的实施例,目标组件还包括服务器的磁盘;As an optional embodiment, the target component also includes a disk of the server;
相应的,获取目标组件的性能参数,并自动判断性能参数是否处于目标组件的目标参数范围内;若否,则按照性能调优策略自动对目标组件进行性能调优处理的过程,还包括:Correspondingly, the performance parameter of the target component is obtained, and it is automatically judged whether the performance parameter is within the target parameter range of the target component; if not, the process of automatically performing performance tuning on the target component according to the performance tuning strategy also includes:
获取磁盘的第三使用率,并判断第三使用率是否处于磁盘的第三使用率目标范围内;Obtaining the third usage rate of the disk, and judging whether the third usage rate is within the target range of the third usage rate of the disk;
若否,则通过升级服务器的磁盘驱动或调整磁盘的RAID方式为非备份存储方式,将第三使用率调整在第三使用率目标范围内。If not, by upgrading the disk drive of the server or adjusting the RAID mode of the disk to a non-backup storage mode, the third utilization rate is adjusted within the target range of the third utilization rate.
具体地,本申请的影响服务器性能的目标组件还包括服务器的磁盘,则磁盘的调优逻辑为:获取磁盘的第三使用率,具体可通过iostat命令(一种服务器指令)查看磁盘的整体使用情况,得到磁盘的第三使用率,然后判断磁盘的第三使用率是否处于磁盘的第三使用率目标范围(0-90%)内,若磁盘的第三使用率在磁盘的第三使用率目标范围内,说明磁盘的性能较好,无需优化;若磁盘的第三使用率不在磁盘的第三使用率目标范围内(超过90%),说明磁盘的性能不够好,需优化磁盘的性能,则按照预先为磁盘设定的性能调优策略自动对磁盘进行性能调优处理,从而优化磁盘的性能。Specifically, the target component affecting server performance in this application also includes the disk of the server, then the tuning logic of the disk is: obtain the third usage rate of the disk, specifically, the overall usage of the disk can be viewed through the iostat command (a server command) In this case, get the third usage rate of the disk, and then judge whether the third usage rate of the disk is within the target range (0-90%) of the third usage rate of the disk, if the third usage rate of the disk is within the third usage rate of the disk If it is within the target range, it means that the performance of the disk is good and there is no need to optimize it; if the third usage rate of the disk is not within the target range of the third usage rate of the disk (more than 90%), it means that the performance of the disk is not good enough, and the performance of the disk needs to be optimized. Then, according to the pre-set performance tuning strategy for the disk, the performance tuning process is automatically performed on the disk, thereby optimizing the performance of the disk.
更具体地,为磁盘设定的性能调优策略为:通过升级服务器的磁盘驱动来调整磁盘的第三使用率,或通过调整磁盘的RAID(Redundant Arrays of Independent Disks,磁盘阵列)方式为非备份存储方式来调整磁盘的第三使用率,以将磁盘的第三使用率调整在磁盘的第三使用率目标范围内,从而实现磁盘的性能优化。More specifically, the performance tuning strategy set for the disk is: adjust the third utilization rate of the disk by upgrading the disk driver of the server, or adjust the RAID (Redundant Arrays of Independent Disks, disk array) mode of the disk to non-backup The storage mode is used to adjust the third usage ratio of the disk, so as to adjust the third usage ratio of the disk within the target range of the third usage ratio of the disk, so as to realize the performance optimization of the disk.
请参照图5,图5为本申请实施例提供的一种服务器调优系统的结构示意图。Please refer to FIG. 5 , which is a schematic structural diagram of a server tuning system provided by an embodiment of the present application.
该服务器调优系统包括:This server tuning system includes:
预设模块1,用于预先为服务器内影响服务器性能的目标组件设定性能调优策略;The preset module 1 is used to pre-set performance tuning strategies for target components affecting server performance in the server;
判断模块2,用于获取目标组件的性能参数,并自动判断性能参数是否处于目标组件的目标参数范围内;若否,则执行调优模块3; Judgment module 2, used to obtain the performance parameters of the target component, and automatically determine whether the performance parameters are within the target parameter range of the target component; if not, then execute the tuning module 3;
调优模块3,用于按照性能调优策略自动对目标组件进行性能调优处理;The tuning module 3 is used to automatically perform performance tuning processing on the target component according to the performance tuning strategy;
其中,目标组件包括服务器的中央处理器;Wherein, the target component includes the central processing unit of the server;
相应的,判断模块2具体用于获取中央处理器的第一使用率,并判断第一使用率是否处于中央处理器的第一使用率目标范围内;若否,则执行调优模块3;Correspondingly, the judging module 2 is specifically used to acquire the first utilization rate of the central processing unit, and judge whether the first utilization rate is within the target range of the first utilization rate of the central processing unit; if not, execute the tuning module 3;
调优模块3具体用于通过控制中央处理器的接收请求数,将第一使用率调整在第一使用率目标范围内。The tuning module 3 is specifically configured to adjust the first utilization rate within the first utilization rate target range by controlling the number of received requests of the central processing unit.
本申请提供的调优系统的介绍请参考上述调优方法的实施例,本申请在此不再赘述。For the introduction of the tuning system provided in this application, please refer to the above embodiments of the tuning method, and the present application will not repeat them here.
本申请还提供了一种服务器调优装置,包括:The present application also provides a server tuning device, including:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于在执行计算机程序时实现上述任一种服务器调优方法的步骤。The processor is configured to realize the steps of any one of the above server tuning methods when executing the computer program.
本申请可以使用基于海光CPU的国产服务器CS5280H为测试样机,在服务器CS5280H上部署此服务器调优装置,并对服务器调优装置进行测试,以检验服务器调优装置的调优性能。This application can use the domestic server CS5280H based on Haiguang CPU as a test prototype, deploy the server tuning device on the server CS5280H, and test the server tuning device to verify the tuning performance of the server tuning device.
本申请提供的调优装置的介绍请参考上述调优方法的实施例,本申请在此不再赘述。For the introduction of the tuning device provided in the present application, please refer to the above-mentioned embodiments of the tuning method, and the present application will not repeat them here.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出 的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is no such actual relationship or order between the operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其他实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

  1. 一种服务器调优方法,其特征在于,包括:A server tuning method, characterized in that, comprising:
    预先为服务器内影响服务器性能的目标组件设定性能调优策略;Pre-set performance tuning strategies for target components in the server that affect server performance;
    获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;Obtaining the performance parameters of the target component, and automatically judging whether the performance parameters are within the target parameter range of the target component;
    若否,则按照所述性能调优策略自动对所述目标组件进行性能调优处理;If not, automatically perform performance tuning processing on the target component according to the performance tuning strategy;
    其中,所述目标组件包括所述服务器的中央处理器;Wherein, the target component includes a central processing unit of the server;
    相应的,获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;若否,则按照所述性能调优策略自动对所述目标组件进行性能调优处理的过程,包括:Correspondingly, obtain the performance parameter of the target component, and automatically judge whether the performance parameter is within the target parameter range of the target component; if not, automatically perform performance on the target component according to the performance tuning strategy The tuning process includes:
    获取所述中央处理器的第一使用率,并判断所述第一使用率是否处于所述中央处理器的第一使用率目标范围内;Acquiring a first usage rate of the central processing unit, and judging whether the first usage rate is within the target range of the first usage rate of the central processing unit;
    若否,则通过控制所述中央处理器的接收请求数,将所述第一使用率调整在所述第一使用率目标范围内;If not, adjusting the first utilization rate within the first utilization rate target range by controlling the number of received requests of the central processing unit;
    所述中央处理器的接收请求包括http请求和非http请求;The receiving request of the central processing unit includes http request and non-http request;
    相应的,通过控制所述中央处理器的接收请求数,将所述第一使用率调整在所述第一使用率目标范围内的过程,包括:Correspondingly, the process of adjusting the first utilization rate within the target range of the first utilization rate by controlling the number of received requests of the central processing unit includes:
    通过调整系统的TCP协议参数,控制所述中央处理器的非http请求接收数量,并通过调整系统的TCP协议参数和IP协议参数,控制所述中央处理器的http请求接收数量,以将所述第一使用率调整在所述第一使用率目标范围内。By adjusting the TCP protocol parameters of the system, the number of non-http requests received by the central processor is controlled, and by adjusting the TCP protocol parameters and IP protocol parameters of the system, the number of http requests received by the central processor is controlled, so that the A first usage adjustment is within the first usage target range.
  2. 如权利要求1所述的服务器调优方法,其特征在于,所述服务器调优方法还包括:The server tuning method according to claim 1, further comprising:
    预先设置通过调整系统的TCP协议参数和IP协议参数,使所述中央处理器同时处理的请求数量最大且所述第一使用率在所述第一使用率目标范围内的爬山算法;Presetting the hill-climbing algorithm by adjusting the TCP protocol parameters and IP protocol parameters of the system, so that the number of requests processed by the central processing unit at the same time is the largest and the first utilization rate is within the target range of the first utilization rate;
    相应的,通过调整系统的TCP协议参数,控制所述中央处理器的非http请求接收数量,并通过调整系统的TCP协议参数和IP协议参数,控制所述中央处理器的http请求接收数量,以将所述第一使用率调整在所述第一使用率目 标范围内的过程,包括:Correspondingly, by adjusting the TCP protocol parameters of the system, the number of non-http requests received by the central processor is controlled, and by adjusting the TCP protocol parameters and IP protocol parameters of the system, the number of http requests received by the central processor is controlled, so that The process of adjusting the first usage rate within the target range of the first usage rate includes:
    利用所述爬山算法,逐步调整所述TCP协议参数和所述IP协议参数的值,直至找到使所述中央处理器同时处理的请求数量最大,且所述第一使用率在所述第一使用率目标范围内的最优值。Using the hill-climbing algorithm, gradually adjust the values of the TCP protocol parameters and the IP protocol parameters until the maximum number of requests processed by the central processing unit at the same time is found, and the first usage rate is at the first usage rate. The optimal value within the rate target range.
  3. 如权利要求1所述的服务器调优方法,其特征在于,所述目标组件还包括所述服务器的内存;The server tuning method according to claim 1, wherein the target component further comprises the memory of the server;
    相应的,获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;若否,则按照所述性能调优策略自动对所述目标组件进行性能调优处理的过程,还包括:Correspondingly, obtain the performance parameter of the target component, and automatically judge whether the performance parameter is within the target parameter range of the target component; if not, automatically perform performance on the target component according to the performance tuning strategy The process of tuning processing also includes:
    获取所述内存的第二使用率,并判断所述第二使用率是否处于所述内存的第二使用率目标范围内;Obtaining the second usage rate of the memory, and judging whether the second usage rate is within the target range of the second usage rate of the memory;
    若否,则通过关闭占用所述内存的系统进程,将所述第二使用率调整在所述第二使用率目标范围内。If not, adjusting the second utilization ratio within the second utilization ratio target range by closing the system process occupying the memory.
  4. 如权利要求3所述的服务器调优方法,其特征在于,通过关闭占用所述内存的系统进程,将所述第二使用率调整在所述第二使用率目标范围内的过程,包括:The server tuning method according to claim 3, wherein the process of adjusting the second utilization rate within the target range of the second utilization rate by closing the system process occupying the memory comprises:
    将系统进程按照占用内存的空间大小从大到小进行排序;Sort the system processes from large to small according to the space occupied by memory;
    从占用内存空间最大的系统进程开始,依次判断各系统进程与所述服务器当前运行的业务是否有关;Starting from the system process that takes up the largest memory space, determine whether each system process is related to the business currently running on the server;
    若存在与所述服务器当前运行的业务无关的目标系统进程,则关闭所述目标系统进程,直至所述第二使用率调整至所述第二使用率目标范围内。If there is a target system process unrelated to the service currently running on the server, shut down the target system process until the second usage rate is adjusted to be within the second usage rate target range.
  5. 如权利要求1所述的服务器调优方法,其特征在于,所述目标组件还包括所述服务器的网络组件;The server tuning method according to claim 1, wherein the target component further comprises a network component of the server;
    相应的,获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;若否,则按照所述性能调优策略自动对所述目标组件进行性能调优处理的过程,还包括:Correspondingly, obtain the performance parameter of the target component, and automatically judge whether the performance parameter is within the target parameter range of the target component; if not, automatically perform performance on the target component according to the performance tuning strategy The process of tuning processing also includes:
    获取所述网络组件的带宽占用率,并判断所述带宽占用率是否处于所述网络组件的带宽占用率目标范围内;Obtaining the bandwidth occupancy rate of the network component, and judging whether the bandwidth occupancy rate is within the target range of the bandwidth occupancy rate of the network component;
    若否,则通过更换更大带宽的网络组件,将所述带宽占用率调整在所述带 宽占用率目标范围内。If not, the bandwidth occupancy rate is adjusted within the bandwidth occupancy rate target range by replacing a network component with a larger bandwidth.
  6. 如权利要求1-5任一项所述的服务器调优方法,其特征在于,所述目标组件还包括所述服务器的磁盘;The server tuning method according to any one of claims 1-5, wherein the target component further comprises a disk of the server;
    相应的,获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;若否,则按照所述性能调优策略自动对所述目标组件进行性能调优处理的过程,还包括:Correspondingly, obtain the performance parameter of the target component, and automatically judge whether the performance parameter is within the target parameter range of the target component; if not, automatically perform performance on the target component according to the performance tuning strategy The process of tuning processing also includes:
    获取所述磁盘的第三使用率,并判断所述第三使用率是否处于所述磁盘的第三使用率目标范围内;Acquiring a third usage rate of the disk, and judging whether the third usage rate is within the target range of the third usage rate of the disk;
    若否,则通过升级所述服务器的磁盘驱动或调整所述磁盘的RAID方式为非备份存储方式,将所述第三使用率调整在所述第三使用率目标范围内。If not, adjusting the third usage rate within the target range of the third usage rate by upgrading the disk drive of the server or adjusting the RAID mode of the disk to a non-backup storage mode.
  7. 一种服务器调优系统,其特征在于,包括:A server tuning system, characterized in that it comprises:
    预设模块,用于预先为服务器内影响服务器性能的目标组件设定性能调优策略;The preset module is used to pre-set performance tuning strategies for target components affecting server performance in the server;
    判断模块,用于获取所述目标组件的性能参数,并自动判断所述性能参数是否处于所述目标组件的目标参数范围内;若否,则执行调优模块;A judging module, configured to obtain the performance parameters of the target component, and automatically judge whether the performance parameters are within the target parameter range of the target component; if not, execute the tuning module;
    调优模块,用于按照所述性能调优策略自动对所述目标组件进行性能调优处理;An tuning module, configured to automatically perform performance tuning on the target component according to the performance tuning strategy;
    其中,所述目标组件包括所述服务器的中央处理器;Wherein, the target component includes a central processing unit of the server;
    相应的,所述判断模块具体用于获取所述中央处理器的第一使用率,并判断所述第一使用率是否处于所述中央处理器的第一使用率目标范围内;若否,则执行所述调优模块;Correspondingly, the judging module is specifically configured to obtain the first usage rate of the central processing unit, and judge whether the first usage rate is within the target range of the first usage rate of the central processing unit; if not, then Execute the tuning module;
    所述调优模块具体用于通过控制所述中央处理器的接收请求数,将所述第一使用率调整在所述第一使用率目标范围内;The tuning module is specifically configured to adjust the first utilization rate within the target range of the first utilization rate by controlling the number of received requests of the central processing unit;
    所述中央处理器的接收请求包括http请求和非http请求;The receiving request of the central processing unit includes http request and non-http request;
    相应的,通过控制所述中央处理器的接收请求数,将所述第一使用率调整在所述第一使用率目标范围内的过程,包括:Correspondingly, the process of adjusting the first utilization rate within the target range of the first utilization rate by controlling the number of received requests of the central processing unit includes:
    通过调整系统的TCP协议参数,控制所述中央处理器的非http请求接收数量,并通过调整系统的TCP协议参数和IP协议参数,控制所述中央处理器的http请求接收数量,以将所述第一使用率调整在所述第一使用率目标范围 内。By adjusting the TCP protocol parameters of the system, the number of non-http requests received by the central processor is controlled, and by adjusting the TCP protocol parameters and IP protocol parameters of the system, the number of http requests received by the central processor is controlled, so that the A first usage adjustment is within the first usage target range.
  8. 一种服务器调优装置,其特征在于,包括:A server tuning device, characterized in that it comprises:
    存储器,用于存储计算机程序;memory for storing computer programs;
    处理器,用于在执行所述计算机程序时实现如权利要求1-6任一项所述的服务器调优方法的步骤。A processor, configured to implement the steps of the server tuning method according to any one of claims 1-6 when executing the computer program.
PCT/CN2021/121915 2021-06-09 2021-09-29 Server tuning method, system and apparatus WO2022257304A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110642462.3 2021-06-09
CN202110642462.3A CN113098724A (en) 2021-06-09 2021-06-09 Server tuning method, system and device

Publications (1)

Publication Number Publication Date
WO2022257304A1 true WO2022257304A1 (en) 2022-12-15

Family

ID=76666006

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/121915 WO2022257304A1 (en) 2021-06-09 2021-09-29 Server tuning method, system and apparatus

Country Status (2)

Country Link
CN (1) CN113098724A (en)
WO (1) WO2022257304A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932417A (en) * 2023-09-18 2023-10-24 新华三信息技术有限公司 Performance tuning method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113098724A (en) * 2021-06-09 2021-07-09 苏州浪潮智能科技有限公司 Server tuning method, system and device
CN114138597B (en) * 2021-11-12 2023-11-03 苏州浪潮智能科技有限公司 Operating system performance tuning device, method, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375328A (en) * 2016-09-19 2017-02-01 中国人民解放军国防科学技术大学 Adaptive optimization operation method of large-scale data distribution system
CN107092551A (en) * 2017-06-22 2017-08-25 郑州云海信息技术有限公司 A kind of server system performance optimization method and device
US20190034236A1 (en) * 2017-07-31 2019-01-31 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method For Resource Allocation And Terminal Device
CN111352815A (en) * 2020-02-26 2020-06-30 苏州浪潮智能科技有限公司 Performance balance detection method, system and device of server system
CN113098724A (en) * 2021-06-09 2021-07-09 苏州浪潮智能科技有限公司 Server tuning method, system and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110633194B (en) * 2019-09-26 2023-03-28 中国民用航空总局第二研究所 Performance evaluation method of hardware resources in specific environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375328A (en) * 2016-09-19 2017-02-01 中国人民解放军国防科学技术大学 Adaptive optimization operation method of large-scale data distribution system
CN107092551A (en) * 2017-06-22 2017-08-25 郑州云海信息技术有限公司 A kind of server system performance optimization method and device
US20190034236A1 (en) * 2017-07-31 2019-01-31 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method For Resource Allocation And Terminal Device
CN111352815A (en) * 2020-02-26 2020-06-30 苏州浪潮智能科技有限公司 Performance balance detection method, system and device of server system
CN113098724A (en) * 2021-06-09 2021-07-09 苏州浪潮智能科技有限公司 Server tuning method, system and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932417A (en) * 2023-09-18 2023-10-24 新华三信息技术有限公司 Performance tuning method and device
CN116932417B (en) * 2023-09-18 2023-12-22 新华三信息技术有限公司 Performance tuning method and device

Also Published As

Publication number Publication date
CN113098724A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
WO2022257304A1 (en) Server tuning method, system and apparatus
US7840652B2 (en) System and method for determining network configuration settings that provide optimal network performance
WO2021036512A1 (en) Method and apparatus for controlling smart home device
US7412516B1 (en) Using a network bandwidth setting based on determining the network environment
US7460556B2 (en) Autonomic adjustment of connection keep-alives
US11523288B2 (en) Data analysis apparatus, system, and method
US8627147B2 (en) Method and computer program product for system tuning based on performance measurements and historical problem data and system thereof
US20030191854A1 (en) Method and apparatus for reducing power consumption in network linking system
WO2016165242A1 (en) Method of adjusting number of nodes in system and device utilizing same
WO2022151783A1 (en) Processor parameter adjustment method, apparatus, electronic device, and storage medium
CN112020098B (en) Load balancing method, device, computing equipment and computer storage medium
US11695629B2 (en) Method and apparatus for configuring a network parameter
CN109348486B (en) Heterogeneous wireless network resource allocation method
US11388623B2 (en) Method, device and apparatus for controlling congestion window in internet of vehicles
CN116599858A (en) Response time guarantee type cluster system and scale adjustment method thereof
CN109617636B (en) Anti-interference method and system for WIFI equipment, user equipment and storage medium
CN107846294A (en) A kind of active and standby service switch method and device
CN112214303A (en) Kubernetes cluster automatic scaling system
CN110442786A (en) A kind of method, apparatus, equipment and the storage medium of prompt information push
CN110046143B (en) Integrated architecture optimization system and optimization method of integrated data platform
IL296591A (en) System and methods for server power management
Sugiki et al. Tuning mechanisms for two major parameters of Apache web servers
CN109525446B (en) Processing method and electronic equipment
CN117407250B (en) Computer performance control system based on real-time processing of running environment
CN111132196B (en) Method based on heterogeneous network scheduling optimization

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21944804

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE