[go: up one dir, main page]

CN112015550B - System adaptive current limiting method based on server hardware and software indicators - Google Patents

System adaptive current limiting method based on server hardware and software indicators Download PDF

Info

Publication number
CN112015550B
CN112015550B CN202010839656.8A CN202010839656A CN112015550B CN 112015550 B CN112015550 B CN 112015550B CN 202010839656 A CN202010839656 A CN 202010839656A CN 112015550 B CN112015550 B CN 112015550B
Authority
CN
China
Prior art keywords
server
user data
current limiting
data
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010839656.8A
Other languages
Chinese (zh)
Other versions
CN112015550A (en
Inventor
朱春平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Wuji Internet Technology Co ltd
Original Assignee
Zhejiang Wuji Internet Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Wuji Internet Technology Co ltd filed Critical Zhejiang Wuji Internet Technology Co ltd
Priority to CN202010839656.8A priority Critical patent/CN112015550B/en
Publication of CN112015550A publication Critical patent/CN112015550A/en
Application granted granted Critical
Publication of CN112015550B publication Critical patent/CN112015550B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明提供一种基于服务器软硬件指标的系统自适应限流方法,包括以下步骤:1)、服务器接收用户数据并实时对服务器的状态进行监控;执行步骤2;2)、在服务器达到预设条件时,触发限流策略,执行步骤3;3)、减少服务器接收到的数据。本发明结合Load、CPU使用率、总体平均RT、入口QPS和Jmeter线程数等几个维度的监控指标,通过自适应的流控策略,让系统的入口流量和系统的负载达到一个平衡,让系统尽可能跑在最大吞吐量的同时保证系统整体的稳定性。

The present invention provides a system adaptive current limiting method based on server software and hardware indicators, comprising the following steps: 1) the server receives user data and monitors the status of the server in real time; executes step 2; 2) when the server reaches a preset condition, triggers the current limiting strategy, and executes step 3; 3) reduces the data received by the server. The present invention combines monitoring indicators of several dimensions such as Load, CPU usage, overall average RT, entry QPS, and Jmeter thread number, and through an adaptive flow control strategy, balances the system's entry flow and system load, allowing the system to run at the maximum throughput as much as possible while ensuring the overall stability of the system.

Description

System self-adaptive current limiting method based on server software and hardware indexes
Technical Field
The invention relates to a server processing method, in particular to a system self-adaptive current limiting method based on server software and hardware indexes.
Background
With the development of technology, internet applications are becoming more common, and the technical requirements on network servers are also becoming higher. For a large server, the interfaces are frequently called by the outside, and if no access flow control is added, the calling frequency of the interfaces is too high, so that the stability of the system is affected.
A server, also called a server, is a device that provides computing services. Since the server needs to respond to the service request and process it, the server should generally have the ability to afford the service and secure the service. The server includes a processor, a hard disk, a memory, a system bus, and the like, and is similar to a general-purpose computer architecture, but is required to provide highly reliable services, and thus has high demands in terms of processing capacity, stability, reliability, security, scalability, manageability, and the like.
In the server system, resources such as cpu and memory are allocated to the back-end server every time a request is processed, and under the condition of high concurrency or under the condition that the system is under flow attack, the cpu utilization rate and the memory utilization rate of the back-end server always stay high, so that the risk of breakdown exists.
Accordingly, improvements in the art are needed.
Disclosure of Invention
The invention aims to provide a system self-adaptive current limiting method based on server software and hardware indexes.
In order to solve the technical problems, the invention provides a system self-adaptive current limiting method based on server software and hardware indexes, which comprises the following steps:
1) The server receives the user data and monitors the state of the server in real time;
2) Triggering a current limiting strategy when the server reaches a preset condition, and executing the step 3;
3) And reducing the data received by the server.
As an improvement on the self-adaptive current limiting method of the system based on the software and hardware indexes of the server, the invention:
In step 1:
when the server receives the user data, the user data are marked with characteristics, such as the parameters in the CPU of the user data, the read-write speed of the IO interface, the memory size parameter and the like, if the parameters exceed the set values, the labels with larger corresponding parameters are marked, and one user data can comprise a plurality of labels, so that the parameters of certain types of user data can be quickly searched for speed limit.
The set point is twice the average value used.
As a further improvement on the self-adaptive current limiting method of the system based on the software and hardware indexes of the server:
The preset conditions in the step 2 comprise that parameters in a CPU of the server reach a parameter threshold, or reading and writing of an IO interface of the server reach a reading and writing threshold, or the memory size of the server reaches a memory threshold;
As a further improvement on the self-adaptive current limiting method of the system based on the software and hardware indexes of the server:
When the server does not trigger the current limiting strategy, the response time period rt of the data request is only less than 1% and exceeds the response threshold;
The response threshold setting method comprises the following steps:
rt threshold = minRT core number coefficient
MinRT is the minimum value of the response time rt in the historical data of the server, the core number is the total number of cores of the CPU of the server, and the coefficient can be set manually.
As a further improvement on the self-adaptive current limiting method of the system based on the software and hardware indexes of the server:
in step 3, the server reduces the received data according to the area, the user type and the user tag.
According to the regional current limiting, each region is represented by a province, a city and a district, and when the current limiting is performed, the user data of the specific province, city and district can be limited, or the user data of the province, city and district with the most data is received for current limiting;
the user type comprises member users and common users, and the user data of the common users can be limited to be limited when the user type is limited.
And according to the user label current limiting, selecting user data containing labels with larger corresponding parameters to limit the current according to the parameters reaching preset conditions.
As a further improvement on the self-adaptive current limiting method of the system based on the software and hardware indexes of the server:
the method of limiting the current includes rejecting new user data directly or the new user data is in a pending state and re-reading after the limiting policy is over.
The system self-adaptive current limiting method based on the server software and hardware indexes has the technical advantages that:
According to the invention, by combining monitoring indexes of Load, CPU utilization rate, ensemble average RT, inlet QPS, jmeter threads and the like in several dimensions, through a self-adaptive flow control strategy, the inlet flow of the system and the Load of the system are balanced, so that the system runs at the maximum throughput as much as possible and the overall stability of the system is ensured.
Drawings
The following describes the embodiments of the present invention in further detail with reference to the accompanying drawings.
FIG. 1 is a flow chart of the adaptive current limiting method of the system based on the software and hardware indexes of the server.
Detailed Description
The invention will be further described with reference to specific examples, but the scope of the invention is not limited thereto.
Embodiment 1, a system adaptive current limiting method based on server software and hardware indexes, as shown in fig. 1, includes the following steps:
1) The server receives the user data and monitors the state of the server in real time;
When the server receives the user data, the user data are marked with features, such as the parameters in the CPU of the user data, the read-write speed of the IO interface, the memory size parameter and the like, if the parameters exceed the set values (for example, the average value is doubled), the labels with larger corresponding parameters are marked, and one user data can comprise a plurality of labels, so that the parameters of certain types of user data can be quickly searched for limiting the speed.
The API on line is evaluated by a stress test (such as jmeter, etc.) to define the API type according to the stress test result, so as to classify the API.
2) Triggering a current limiting strategy when the server reaches a preset condition, and executing the step 3;
The preset conditions comprise that parameters in a CPU of the server reach a parameter threshold, or reading and writing of an IO interface of the server reach a reading and writing threshold, or when the memory size of the server reaches a memory threshold, a current limiting strategy is executed, and step 3 is executed;
parameters in the CPU of the server include CPU Load, CPU comprehensive utilization, jumps of the CPU.
The query rate QSP per second of the server has a limit value, the limit value is 1.5w, the service response time period rt is too long after the limit value is exceeded, it is required to ensure that the response time period rt of only less than 1% of data requests exceeds a response threshold, and the response threshold can be set to 3s.
The response threshold setting method comprises the following steps:
rt threshold = minRT core number coefficient
MinRT is the minimum value of the response time rt in the historical data of the server, the core number is the total number of cores of the cpu of the server, and the coefficient can be set manually, for example, 2.5 is used. By changing the magnitude of the coefficient, the magnitude of the response time period rt can be changed.
The corresponding time period rt and the query rate QSP per second are positively correlated, and the larger the corresponding time period rt is, the larger the query rate QSP per second is. The query rate QSP needs to be ensured to be within the safety range, the preset condition is set accordingly, and if the threshold value of the preset condition is not reached, the query rate QSP is within the safety range. Current limiting is required when a threshold value of a preset condition is reached.
3) And reducing user data received by the server until the server does not reach a preset condition, namely that parameters in a CPU of the server are lower than a parameter threshold, reading and writing of an IO interface of the server are lower than a reading and writing threshold, and the memory size of the server is lower than a memory threshold.
The server reduction of received data may be reduced according to region, user type, user tag, etc.
According to the regional current limiting, each region is represented by a province, a city, a district and the like, and when the current limiting is performed, the user data of the specific province, city and district can be limited, or the user data of the province, city and district with the most data received can be limited;
the user type includes member users, common users and the like, and the user data of the common users can be limited to be limited in the process of limiting the current.
And according to the user label current limiting, selecting user data containing labels with larger corresponding parameters to limit the current according to the parameters reaching preset conditions.
The method of limiting the current includes rejecting new user data directly or the new user data is in a pending state and re-reading after the limiting policy is over.
Finally, it should also be noted that the above list is merely a few specific embodiments of the present invention. Obviously, the invention is not limited to the above embodiments, but many variations are possible. All modifications directly derived or suggested to one skilled in the art from the present disclosure should be considered as being within the scope of the present invention.

Claims (2)

1.基于服务器软硬件指标的系统自适应限流方法,其特征在于:包括以下步骤:1. A system adaptive current limiting method based on server software and hardware indicators, characterized in that it includes the following steps: 1)、服务器接收用户数据并实时对服务器的状态进行监控;执行步骤2;1) The server receives user data and monitors the status of the server in real time; execute step 2; 2)、在服务器达到预设条件时,触发限流策略,执行步骤3;2) When the server reaches the preset conditions, the current limiting strategy is triggered and step 3 is executed; 3)、减少服务器接收到的数据;3) Reduce the data received by the server; 在步骤1中:In step 1: 服务器接收用户数据时,对各个用户数据进行特征标记,用户数据的CPU中的参数、IO接口的读写速度、内存大小参数超过设定值则标记上相应参数较大的标签,一个用户数据可包括若干标签,这样可以快速对某种类型的用户数据的参数进行查找限速;When the server receives user data, it will mark each user data with features. If the parameters in the CPU, the read and write speed of the IO interface, and the memory size of the user data exceed the set value, the corresponding parameter will be marked with a larger tag. One user data may include several tags, so that the parameters of a certain type of user data can be quickly searched and limited. 设定值为:使用平均值两倍;The settings are: use twice the average value; 步骤2中的预设条件包括:服务器的CPU中的参数达到参数阈值,或者服务器的IO接口的读、写达到读写阈值,或服务器的内存大小达到内存阈值;The preset conditions in step 2 include: a parameter in the CPU of the server reaches a parameter threshold, or the read and write of the IO interface of the server reaches a read and write threshold, or the memory size of the server reaches a memory threshold; 在步骤3中:服务器减少接收到的数据可以根据区域、用户类型、用户标签进行减少;In step 3: the server reduces the received data and can reduce it according to the region, user type, and user tag; 根据区域限流为:以省、市、区代表各个区域,在限流时可以对特定的省、市、区的用户数据进行限流,或者接收到数据最多的省、市、区的用户数据进行限流;The flow control is based on the region: provinces, cities, and districts represent each region. When limiting the flow, the flow of user data in a specific province, city, or district can be limited, or the flow of user data in the province, city, or district that receives the most data can be limited; 根据用户类型限流为:用户类型包括会员用户、普通用户,在限流时可以有限对普通用户的用户数据进行限流;The flow is limited according to the user type: the user type includes member users and ordinary users. When limiting the flow, the user data of ordinary users can be limited; 根据用户标签限流为:根据达到预设条件的参数,选择含有相应参数较大标签的用户数据进行限流;Limiting traffic based on user tags: Based on the parameters that meet the preset conditions, select user data with tags with larger corresponding parameters for limiting traffic; 服务器在未触发限流策略时,仅有小于1%的数据请求的响应时长rt中超过响应阈值;When the server does not trigger the current limiting strategy, only less than 1% of the data requests have a response time rt that exceeds the response threshold; 响应阈值设置方法为:The response threshold setting method is: rt阈值=minRT*核心数*系数rt threshold = minRT * number of cores * coefficient minRT为服务器历史数据中的响应时长rt最小值;核心数为服务器cpu的核心总数;系数人为设置。minRT is the minimum response time rt in the server's historical data; the number of cores is the total number of cores in the server's CPU; the coefficient is set manually. 2.根据权利要求1所述的基于服务器软硬件指标的系统自适应限流方法,其特征在于:2. The system adaptive current limiting method based on server software and hardware indicators according to claim 1 is characterized in that: 限流的方法包括直接拒收新的用户数据,或者新的用户数据进行待处理状态,在限流策略结束之后重新读取。The current limiting methods include directly rejecting new user data, or putting new user data in a pending state and re-reading it after the current limiting strategy ends.
CN202010839656.8A 2020-08-19 2020-08-19 System adaptive current limiting method based on server hardware and software indicators Active CN112015550B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010839656.8A CN112015550B (en) 2020-08-19 2020-08-19 System adaptive current limiting method based on server hardware and software indicators

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010839656.8A CN112015550B (en) 2020-08-19 2020-08-19 System adaptive current limiting method based on server hardware and software indicators

Publications (2)

Publication Number Publication Date
CN112015550A CN112015550A (en) 2020-12-01
CN112015550B true CN112015550B (en) 2024-12-10

Family

ID=73505068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010839656.8A Active CN112015550B (en) 2020-08-19 2020-08-19 System adaptive current limiting method based on server hardware and software indicators

Country Status (1)

Country Link
CN (1) CN112015550B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110290070A (en) * 2019-05-15 2019-09-27 北京三快在线科技有限公司 A kind of flow control methods, device, equipment and readable storage medium storing program for executing

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012010209A1 (en) * 2010-07-22 2012-01-26 Telefonaktiebolaget Lm Ericsson (Publ) Node selection in a packet core network
CN106304193A (en) * 2015-05-22 2017-01-04 中兴通讯股份有限公司 A kind of realize the method for flow-control, server and terminal
US10701103B2 (en) * 2017-02-16 2020-06-30 Dell Products, L.P. Securing devices using network traffic analysis and software-defined networking (SDN)
CN110099009B (en) * 2018-01-31 2021-01-26 北京易真学思教育科技有限公司 Dynamic current limiting method based on interface response time trend and computer readable medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110290070A (en) * 2019-05-15 2019-09-27 北京三快在线科技有限公司 A kind of flow control methods, device, equipment and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN112015550A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
US7739418B2 (en) Resource management system
US6988268B2 (en) IO completion architecture for user-mode networking
JP4205103B2 (en) Information system, load control method, load control program, and recording medium
US11500592B2 (en) Systems and methods for allocating data compression activities in a storage system
EP2097815B1 (en) Method and system for transaction resource control
US8818989B2 (en) Memory usage query governor
US20100082855A1 (en) Associating process priority with i/o queuing
US20020099759A1 (en) Load balancer with starvation avoidance
CN112866136A (en) Service data processing method and device
JP2005092875A (en) System and method for increasing data throughput by using thread scheduling
McKenney et al. Extending RCU for realtime and embedded workloads
US9489404B2 (en) De-duplicating data in a network with power management
US10223536B2 (en) Device monitoring policy
WO2020232903A1 (en) Monitoring task dynamic adjustment method and apparatus, and computer device and storage medium
WO2020006860A1 (en) Picture cache cleaning method and apparatus, terminal device and medium
CN106603256B (en) Flow control method and device
CN110838987B (en) Queue current limiting method and storage medium
US20130239114A1 (en) Fine Grained Adaptive Throttling of Background Processes
CN112015550B (en) System adaptive current limiting method based on server hardware and software indicators
CN107872480B (en) Big data cluster data balancing method and device
US8607245B2 (en) Dynamic processor-set management
CN116382855B (en) Virtual machine migration method, electronic equipment and computer storage medium
CN115002033A (en) Flow control method, device, equipment, storage medium and computer product
CN113364648A (en) Flow control method, system, device, service equipment and storage medium
JP2002366393A (en) Computer operation information collection method, its execution system, and its processing program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant