CN108804152B - Method and device for adjusting configuration parameters - Google Patents
Method and device for adjusting configuration parameters Download PDFInfo
- Publication number
- CN108804152B CN108804152B CN201810419442.8A CN201810419442A CN108804152B CN 108804152 B CN108804152 B CN 108804152B CN 201810419442 A CN201810419442 A CN 201810419442A CN 108804152 B CN108804152 B CN 108804152B
- Authority
- CN
- China
- Prior art keywords
- business service
- current configuration
- configuration parameter
- preset
- current
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
- G06F9/4451—User profiles; Roaming
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)
- Telephonic Communication Services (AREA)
Abstract
The embodiment of the application discloses a method and a device for adjusting configuration parameters. The method comprises the steps that based on at least one business service request of a client and at least one current configuration parameter of the business service, after the at least one business service corresponding to the at least one business service request is operated, the operation resource of each business service in the at least one business service is monitored to obtain the current operation data of the business service, the numerical value of the current operation data of the business service is compared with a preset operation threshold value, and based on the comparison result, the current configuration parameter is adjusted to obtain a new current configuration parameter; and finally, running at least one new business service based on the new current configuration parameters, thereby ensuring the normal running of the business service and improving the performance of the business service.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for adjusting configuration parameters.
Background
The electronic equipment needs management personnel to configure the parameters of the electronic equipment before use. The configured parameters may include buffer size, buffer location, response time from receiving a service request to returning data, timeout time, log level, number of connections per second, network card throughput, etc. Wherein the number of connections per second is the number of effective services to be connected to the client within each second. In the existing configuration process, a manager generally configures parameters to be configured according to a preset configuration file.
However, if there is a configuration problem in the preset configuration file, a service failure may be caused to the server, and in an actual operation process, a situation that resource allocation is not reasonable may occur, for example, when the electronic device performs two service services (a service and B service), cache resources allocated by a manager for the a service and the B service respectively occupy 1/2 of the total cache resources. When the service A normally operates and the service B does not operate, redundant data is discarded because the service data volume received by the service A is larger than the allocated cache resources, and the cache resources allocated by the service B are always in an idle state, so that resource waste is caused, and the service performance is lower. When the service A normally operates and the service B normally operates, because the service data volume received by the service B is equal to the allocated cache resources, namely, no resources are wasted, the service data volume received by the service A is larger than the allocated cache resources, the service A is interrupted, and the user experience is influenced.
Disclosure of Invention
The embodiment of the application provides a method and a device for adjusting configuration parameters, which improve the performance of business services, ensure the continuous operation of the business services and improve the user experience.
In a first aspect, a method for adjusting configuration parameters is provided, and the method may include:
running at least one business service corresponding to at least one business service request based on at least one business service request of a client and the current configuration parameters of at least one business service;
monitoring the running resources of each business service in at least one business service to obtain the current running data of the business service, wherein the running resources comprise hardware running resources and software running resources, and the current running data comprise hardware running data and software running data;
comparing the value of the current operation data of the business service with a preset operation threshold value, and adjusting the current configuration parameters based on the comparison result to obtain at least one new current configuration parameter;
and running the new business service based on the new current configuration parameters.
In an optional example, the preset operation threshold includes a preset high operation threshold and a preset low operation threshold;
comparing the value of the current operation data of the business service with a preset operation threshold value, and adjusting the current configuration parameters based on the comparison result to obtain new current configuration parameters, wherein the method comprises the following steps:
when the numerical value of the current operation data of the business service is not less than the preset high operation threshold value, linearly reducing the preset adjustment amount of the current configuration parameter to obtain a new current configuration parameter;
or, when the value of the current operation data of the service is not greater than the preset low operation threshold, linearly increasing the preset adjustment amount to the current configuration parameter to obtain a new current configuration parameter.
In an alternative example, before comparing the value of the current operation data of the business service with the preset operation threshold, the method includes:
acquiring a preset priority to be adjusted of a current configuration parameter;
based on the comparison result, adjusting the current configuration parameters to obtain new current configuration parameters, including:
and based on the comparison result, adjusting the current configuration parameters according to the sequence of the priorities to be adjusted from high to low to obtain new current configuration parameters.
In an alternative example, the new business service is run based on the new current configuration parameters, including: and reading the new current configuration parameters based on at least one new business service request sent by the client to run at least one new business service.
In one optional example, the current configuration parameters include buffer size, number of connections per second, network card throughput, and number of service processes.
In an optional example, after obtaining the new current configuration parameter, the method further includes:
and recording the new current configuration parameters to generate a parameter log.
In an optional example, before comparing the value of the current operation data of the business service with the preset operation threshold, the method further comprises:
monitoring the running resources of at least one non-request business service running except at least one business service to obtain the current running data of the non-request business service, wherein the non-request business service is the business service which is requested to run by a non-client.
In an optional example, when monitoring the running resources of a first business service and a second business service in at least one business service, and obtaining current running data of the first business service and the second business service respectively, the method further includes:
comparing the current operation data of the first business service with the current operation data of the second business service;
when the comparison result shows that the numerical values of the hardware operation data of the first business service and the hardware operation data of the second business service are not smaller than the preset high operation threshold value and the numerical value of the software operation data of the first business service is detected to be higher than the numerical value of the software operation data of the second business service, linearly reducing a first preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly reducing a second preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service;
when the comparison result shows that the numerical values of the software operation data of the first business service and the second business service are not more than a preset low operation threshold value and the numerical value of the hardware operation data of the first business service is higher than the numerical value of the hardware operation data of the second business service, linearly increasing the second preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly increasing the first preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service; the first preset adjustment amount is larger than the second preset adjustment amount, and the priority of the configuration parameter adjustment based on the hardware operation data is higher than the priority of the configuration parameter adjustment based on the software operation data.
In a second aspect, there is provided a device for adjusting configuration parameters, the device comprising:
the operation unit is used for operating the business service corresponding to the business service request based on at least one business service request of the client and the current configuration parameter of at least one business service;
the monitoring unit is used for monitoring the running resources of each business service in at least one running business service to obtain the current running data of the business service, wherein the current running data comprises hardware running data and software running data, and the running resources comprise hardware running resources and software running resources;
the adjusting unit is used for comparing the value of the current operation data of the business service with a preset operation threshold value and adjusting the current configuration parameters based on the comparison result to obtain new current configuration parameters;
and the operation unit is also used for operating at least one new business service based on the new current configuration parameters.
In an optional example, the preset operation threshold includes a preset high operation threshold and a preset low operation threshold;
the adjusting unit is specifically used for linearly reducing a preset adjustment amount for the current configuration parameter when the numerical value of the current operation data of the service is not less than a preset high operation threshold value, so as to obtain a new current configuration parameter;
or, when the value of the current operation data of the service is not greater than the preset low operation threshold, linearly increasing the preset adjustment amount to the current configuration parameter to obtain a new current configuration parameter.
In an optional example, the adjusting unit is further specifically configured to:
acquiring a preset priority to be adjusted of a current configuration parameter;
and based on the comparison result, adjusting the current configuration parameters according to the sequence of the priorities to be adjusted from high to low to obtain new current configuration parameters.
In an optional example, the running unit is specifically configured to: and reading the new current configuration parameters based on at least one new business service request sent by the client to run at least one new business service.
In one optional example, the current configuration parameters include buffer size, number of connections per second, network card throughput, and number of service processes.
In an optional example, the apparatus further comprises a recording unit;
and the recording unit is used for recording the new current configuration parameters and generating a parameter log.
In an optional example, the listening unit is further configured to: monitoring the running resources of at least one non-request business service running except the at least one business service to obtain the current running data of the non-request business service, wherein the non-request business service is a business service which is not requested to run by the client.
In an optional example, the adjusting unit is further specifically configured to:
when monitoring the running resources of a first business service and a second business service in at least one business service and respectively obtaining the current running data of the first business service and the second business service, comparing the current running data of the first business service with the current running data of the second business service;
when the comparison result shows that the numerical values of the hardware operation data of the first business service and the hardware operation data of the second business service are not smaller than the preset high operation threshold value and the numerical value of the software operation data of the first business service is detected to be higher than the numerical value of the software operation data of the second business service, linearly reducing a first preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly reducing a second preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service;
when the comparison result shows that the numerical values of the software operation data of the first business service and the second business service are not more than the preset low operation threshold value and the numerical value of the hardware operation data of the first business service is higher than the numerical value of the hardware operation data of the second business service, linearly increasing a second preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly increasing the first preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service; the first preset adjustment amount is larger than the second preset adjustment amount, and the priority of the configuration parameter adjustment based on the hardware operation data is higher than the priority of the configuration parameter adjustment based on the software operation data.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method steps of any one of the first aspect described above when executing the program stored in the memory.
In an eighth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when being executed by a processor, carries out the method steps of any of the first aspect.
In the embodiment of the invention, after at least one business service corresponding to at least one business service request is operated based on at least one business service request of a client and at least one current configuration parameter of the business service, the current operation data of the business service is obtained by monitoring the operation resource of each business service in at least one business service, the numerical value of the current operation data of the business service is compared with a preset operation threshold value, and the current configuration parameter is adjusted based on the comparison result to obtain a new current configuration parameter; and finally, running at least one new business service based on the new current configuration parameters, thereby ensuring the normal running of the business service and improving the performance of the business service.
Drawings
Fig. 1 is a schematic flow chart of a method for adjusting configuration parameters according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating another method for adjusting configuration parameters according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for adjusting configuration parameters according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without any creative effort belong to the protection scope of the present application.
The method for adjusting the configuration parameters provided by the embodiment of the invention can be applied to electronic equipment, and the electronic equipment can be a terminal or a server. In order to ensure the accuracy of adjustment, the server has stronger computing power; a terminal may be a User Equipment (UE) with high computing power, a handheld device with wireless communication capabilities, a vehicle mounted device, a wearable device, a computing device or other processing device connected to a wireless modem, a Mobile Station (MS), etc.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The following describes the adjustment method in detail by taking the server as an example.
Fig. 1 is a schematic flow chart of a method for adjusting configuration parameters according to an embodiment of the present invention. As shown in fig. 1, the method may include:
step 110, based on the at least one service request of the client and the current configuration parameter of the at least one service, running the at least one service corresponding to the at least one service request.
And after receiving at least one service request of the client, the server starts to operate at least one corresponding service, so as to obtain the current configuration parameters of the at least one currently operated service.
Optionally, the server may read a current configuration file of the currently running at least one service in real time, obtain a read record, and obtain a corresponding current configuration parameter of the currently running at least one service from the read record, where the current configuration file includes the current configuration parameter. Or, the server may read the current configuration file of the currently running at least one service every a preset time period, and obtain the current configuration parameter of the currently running at least one service. For the server started for the first time, the read current configuration parameters are initial configuration parameters, namely default configuration parameters set by management personnel.
The current configuration parameters may include buffer size, number of connections per second, network card throughput, number of processes, and the like.
Optionally, to improve the accuracy of the adjustment, the current configuration parameters may also include a response time from receiving a service request to returning a corresponding request response and a corresponding timeout time, and a log level. The log levels may include information (info) level, warning (war), error (error), critical error (false).
It should be noted that the log level may be set according to an operating environment of the server, and the current configuration parameter may further include other parameters besides the configuration parameter, which is not limited herein in the embodiment of the present invention.
And step 120, monitoring the running resources of the at least one running business service to obtain the current running data of the at least one business service.
The server may monitor an operation resource of each of the at least one service, and obtain current operation data of each service. The current operating data is the operating data of the parameter type (such as CPU and network card) corresponding to the current configuration parameter, the operating resource includes software operating resource and hardware operating resource, and the current operating data includes hardware operating data and software operating data.
The value of the current operation data is used to represent the value of the current operation condition of the hardware and the software, and may include CPU occupancy, memory occupancy, hard disk occupancy, network card occupancy in the hardware operation resource, and network card throughput in the software operation resource, timeout WAIT number of TIME _ WAIT state, WAIT number of FIN _ WAIT2 state, and the like.
Step 130, adjusting the current configuration parameters based on the value of the current operation data of the service and the preset operation threshold value to obtain new current configuration parameters.
And comparing the value of the current operation data of the business service with a preset operation threshold value, and adjusting the current configuration parameters based on the comparison result to obtain new current configuration parameters. The preset operation threshold may be a specific value or a range value. The preset operating threshold may include a preset low operating threshold and a preset high operating threshold;
specifically, when the value of the current operation data of the operating service is not less than the preset high operation threshold, the preset adjustment amount is linearly reduced for the current configuration parameter, so as to obtain a new current configuration parameter. Namely, the preset adjustment quantity is linearly reduced for at least one configuration parameter of the service process number, the network card throughput, the buffer size and the connection number per second of the service.
Or when the value of the current operation data of the operation business service is not larger than the preset low operation threshold value, linearly increasing the preset adjustment amount to the current configuration parameter to obtain a new current configuration parameter. Namely, the preset adjustment amount is linearly increased for at least one configuration parameter of the service process number, the network card throughput, the buffer size and the connection number per second of the service.
The server may determine the first preset adjustment amount and the second preset adjustment amount based on improving the service performance, or may preset a fixed value respectively, and the first preset adjustment amount and the second preset adjustment amount may be the same or different.
In a possible embodiment, when the value of the hardware operation data of a certain service is not greater than the preset high operation threshold and the software operation data is not greater than the preset low operation threshold, the server may linearly increase the number of service processes in the current configuration parameter by a preset adjustment amount, so as to obtain a new number of service processes.
Or, when the numerical value of the hardware operation data of a certain service is not less than the preset high operation threshold, the server may linearly reduce the preset adjustment amount for the service process number in the current configuration parameter, thereby obtaining a new service process number.
Optionally, before comparing the value of the current operation data of the business service with the preset operation threshold, the method further includes:
monitoring the running resources of at least one non-request business service running except at least one business service to obtain the current running data of the non-request business service, wherein the non-request business service is the business service which is requested to run by a non-client.
Optionally, when monitoring the running resources of the first service and the second service in the at least one service and obtaining the current running data of the first service and the second service, respectively, the method further includes:
comparing the current operation data of the first business service with the current operation data of the second business service;
when the comparison result shows that the numerical values of the hardware operation data of the first business service and the hardware operation data of the second business service are not smaller than the preset high operation threshold value and the numerical value of the software operation data of the first business service is detected to be higher than the numerical value of the software operation data of the second business service, linearly reducing a first preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly reducing a second preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service;
when the comparison result shows that the numerical values of the software operation data of the first business service and the second business service are not more than a preset low operation threshold value and the numerical value of the hardware operation data of the first business service is higher than the numerical value of the hardware operation data of the second business service, linearly increasing the second preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly increasing the first preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service;
the first preset adjustment amount is larger than the second preset adjustment amount, the priority of the configuration parameter adjustment based on the hardware operation data is higher than the priority of the configuration parameter adjustment based on the software operation data, namely when the configuration parameter needs to be adjusted based on the hardware operation data and the same configuration parameter needs to be adjusted based on the software operation data, the configuration parameter is adjusted based on the hardware operation data.
Optionally, in order to improve the accuracy of the adjustment, the preset operation threshold may further include a preset normal operation threshold, which is used to indicate that the current operation data at the threshold point or in the threshold range is the normal operation data. That is, by adjusting the current configuration parameters by the preset adjustment, the current operating traffic may be adjusted at the preset normal operation threshold.
It is understood that the preset normal operation threshold is a preset value between the preset low operation threshold and the preset high operation threshold.
For example, the operating data is used as the CPU occupancy, the preset low operation threshold value is a range value of 83% to 2%, the preset high operation threshold value is a range value of 93% to 99%, and the preset normal operation threshold value is 92% to 84%.
When the CPU occupancy rate of the running business service is not less than 93% -99%, the server confirms that the business service can not normally run soon, at the moment, the current configuration parameter is linearly reduced by a preset adjustment amount, and the current configuration parameter is adjusted within the range of 92% -84%, so that a new current configuration parameter is obtained, and the interruption of the business service is avoided; when the CPU occupancy rate of the running business service is not more than the range value of 83% -2%, the server confirms that the performance of the business service is low, at the moment, the preset adjustment amount is linearly increased for the current configuration parameter, the current configuration parameter is adjusted within the range of 92% -84%, and a new current configuration parameter is obtained, so that the performance of the business service is improved.
Optionally, in order to improve service performance of the service, a preset priority to be adjusted of the current configuration parameter is obtained, such as a priority list to be adjusted, where the current configuration parameter includes at least one of a cache size, a number of connections per second, a network card throughput, and a number of processes, a current configuration parameter corresponding to current operation data that is not less than a preset high operation threshold in the priority list to be adjusted is marked as a high priority, and a current configuration parameter corresponding to current operation data that is not more than a preset low operation threshold is marked as a low priority.
And based on the comparison result, adjusting the current configuration parameters according to the sequence of the priorities to be adjusted from high to low to obtain new current configuration parameters.
Specifically, when the value of the current operation data of the service is not less than the preset high operation threshold, linearly reducing the preset adjustment amount of the current configuration parameter according to the sequence from high to low of the priority to be adjusted to obtain a new current configuration parameter; or when the value of the current operation data of the service is not greater than the preset low operation threshold value, linearly increasing the preset adjustment amount to the current configuration parameter according to the sequence from high to low of the priority to be adjusted to obtain a new current configuration parameter.
Therefore, the server linearly reduces the current configuration parameters with overlarge running data values so as to avoid the interruption of the running of the business service due to the overlarge running data values; and linearly increasing the current configuration parameter with the too small value of the operation data so as to improve the service performance of the configuration type corresponding to the current configuration parameter and avoid resource waste.
Optionally, after generating the new current configuration parameters, the server may record the new current configuration parameters and generate a parameter log for the administrator to view.
Step 140, at least one new business service is run based on the new current configuration parameters.
Before executing the step, the server stores the new current configuration parameters, and when at least one new business service request sent by the client is received, the new current configuration parameters are read to run at least one new business service.
And the server operates the new business service according to the automatically adjusted new configuration parameters so as to realize accurate allocation of reasonable operation resources for each business service.
The following describes the present operation traffic as the CPU occupancy in detail.
Fig. 2 is a schematic flow chart of another method for adjusting configuration parameters according to an embodiment of the present invention, as shown in fig. 2, an execution subject of the method is a server, and the method may include:
step 201, a service request of a client is received.
Step 202, running the service corresponding to the service request, and acquiring the current configuration parameters, such as the cache size of the service, the number of connections per second, the throughput of the network card, the number of processes, and the like.
And 203, monitoring the running resources of the running business service to obtain the CPU occupancy rate of the business service.
Step 204, judging the size relation between the CPU occupancy rate and a preset low operation threshold value and a preset high operation threshold value;
if the CPU occupancy is not less than the preset high operation threshold, execute step 205;
if the CPU occupancy is not greater than the preset operation threshold, execute step 206;
step 205, linearly decreasing the current configuration parameter by a preset adjustment amount to obtain a new current configuration parameter, and then executing step 207.
Step 206, linearly increasing the current configuration parameter by a preset adjustment amount to obtain a new current configuration parameter, and then executing step 207.
Step 207, running the new service based on the new current configuration parameters.
In the embodiment of the invention, at least one business service corresponding to at least one business service request is operated based on at least one business service request of a client and the current configuration parameter of at least one business service. The method comprises the steps that current configuration parameters of first-time running business services are initial configuration parameters, then current running data of the business services are obtained by monitoring running resources of each business service in at least one business service, the numerical value of the current running data of the business services is compared with a preset running threshold value, and the current configuration parameters are adjusted based on the comparison result to obtain new current configuration parameters; and finally, running at least one new business service based on the new current configuration parameters, thereby ensuring the normal running of the business service and improving the performance of the business service.
The embodiment of the present invention corresponding to the foregoing method further provides a device for adjusting configuration parameters, and as shown in fig. 3, the device may include: the system comprises an acquisition unit 310, a monitoring unit 320, a regulating unit 330 and an operation unit 340.
An operation unit 310, configured to operate at least one service corresponding to at least one service request based on at least one service request of a client and a current configuration parameter of at least one service, where the current configuration parameter of the service that is operated for the first time is an initial configuration parameter;
a monitoring unit 320, configured to monitor an operation resource of each service in at least one service to be operated, to obtain current operation data of the service, where the current operation data includes hardware operation data and software operation data, and the operation resource includes a hardware operation resource and a software operation resource;
the adjusting unit 330 is configured to compare the value of the current operation data of the service with a preset operation threshold, and adjust the current configuration parameter based on the comparison result to obtain a new current configuration parameter.
The running unit 310 is further configured to run at least one new business service based on the new current configuration parameters.
Optionally, the preset operation threshold includes a preset high operation threshold and a preset low operation threshold;
an adjusting unit 330, configured to, when the value of the current operation data of the service is not less than the preset high operation threshold, linearly reduce a preset adjustment amount for the current configuration parameter to obtain a new current configuration parameter;
or, when the value of the current operation data of the service is not greater than the preset low operation threshold, linearly increasing the preset adjustment amount to the current configuration parameter to obtain a new current configuration parameter.
Optionally, the adjusting unit 330 is further specifically configured to:
acquiring a preset priority to be adjusted of a current configuration parameter;
and based on the comparison result, adjusting the current configuration parameters according to the sequence of the priorities to be adjusted from high to low to obtain new current configuration parameters.
Optionally, the operation unit 310 is specifically configured to: and reading the new current configuration parameters based on at least one new business service request sent by the client to run at least one new business service. Optionally, the current configuration parameters include a buffer size, a number of connections per second, a network card throughput, and a number of service processes.
Optionally, the apparatus further comprises a recording unit 340;
the recording unit 340 is configured to record the new current configuration parameter, and generate a parameter log.
Optionally, the listening unit 320 is further configured to: monitoring the running resources of at least one non-request business service running except the at least one business service to obtain the current running data of the non-request business service, wherein the non-request business service is a business service which is not requested to run by the client.
Optionally, the adjusting unit 330 is further specifically configured to: when the monitoring unit 320 monitors the running resources of a first service and a second service in at least one service to obtain current running data of the first service and the second service, respectively, comparing the current running data of the first service with the current running data of the second service;
when the comparison result shows that the numerical values of the hardware operation data of the first business service and the hardware operation data of the second business service are not smaller than the preset high operation threshold value and the numerical value of the software operation data of the first business service is detected to be higher than the numerical value of the software operation data of the second business service, linearly reducing a first preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly reducing a second preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service;
when the comparison result shows that the numerical values of the software operation data of the first business service and the second business service are not more than a preset low operation threshold value and the numerical value of the hardware operation data of the first business service is higher than the numerical value of the hardware operation data of the second business service, linearly increasing a second preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly increasing a first preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service; the first preset adjustment amount is larger than the second preset adjustment amount, and the priority of the configuration parameter adjustment based on the hardware operation data is higher than the priority of the configuration parameter adjustment based on the software operation data.
The device of the embodiment of the invention runs at least one business service corresponding to at least one business service request based on at least one business service request of the client and the current configuration parameter of at least one business service. The method comprises the steps that current configuration parameters of first-time running business services are initial configuration parameters, then current running data of the business services are obtained by monitoring running resources of each business service in at least one business service, the numerical value of the current running data of the business services is compared with a preset running threshold value, and the current configuration parameters are adjusted based on the comparison result to obtain new current configuration parameters; and finally, running at least one new business service based on the new current configuration parameters, thereby ensuring the normal running of the business service and improving the performance of the business service.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 410, a communication interface 420, a memory 430, and a communication bus 440, where the processor 410, the communication interface 420, and the memory 430 complete mutual communication through the communication bus 440.
A memory 430 for storing computer programs;
the processor 410, when executing the program stored in the memory 430, implements the following steps:
the method comprises the steps that at least one business service corresponding to at least one business service request is operated based on at least one business service request of a client and current configuration parameters of at least one business service, wherein the current configuration parameters of the business service operated for the first time are initial configuration parameters;
monitoring the running resources of each business service in at least one business service to obtain the current running data of the business service, wherein the running resources comprise hardware running resources and software running resources, and the current running data comprise hardware running data and software running data;
comparing the value of the current operation data of the business service with a preset operation threshold value, and adjusting the current configuration parameters based on the comparison result to obtain at least one new current configuration parameter;
and running the new business service based on the new current configuration parameters.
Optionally, the preset operation threshold includes a preset high operation threshold and a preset low operation threshold;
comparing the value of the current operation data of the business service with a preset operation threshold value, and adjusting the current configuration parameters based on the comparison result to obtain new current configuration parameters, wherein the method comprises the following steps:
when the numerical value of the current operation data of the business service is not less than the preset high operation threshold value, linearly reducing the preset adjustment amount of the current configuration parameter to obtain a new current configuration parameter;
or, when the value of the current operation data of the service is not greater than the preset low operation threshold, linearly increasing the preset adjustment amount to the current configuration parameter to obtain a new current configuration parameter.
Optionally, before comparing the value of the current operation data of the business service with the preset operation threshold, the method includes:
acquiring a preset priority to be adjusted of a current configuration parameter;
based on the comparison result, adjusting the current configuration parameters to obtain new current configuration parameters, including:
and based on the comparison result, adjusting the current configuration parameters according to the sequence of the priorities to be adjusted from high to low to obtain new current configuration parameters.
Optionally, running at least one new business service based on the new current configuration parameters, including: and reading the new current configuration parameters based on at least one new business service request sent by the client to run at least one new business service.
Optionally, the current configuration parameters include a buffer size, a number of connections per second, a network card throughput, and a number of service processes.
Optionally, after obtaining the new current configuration parameter, the method further includes:
and recording the new current configuration parameters to generate a parameter log.
Optionally, before comparing the value of the current operation data of the business service with the preset operation threshold, the method further includes: monitoring the running resources of at least one non-request business service running except at least one business service to obtain the current running data of the non-request business service, wherein the non-request business service is the business service which is requested to run by a non-client.
Optionally, when monitoring the running resources of the first service and the second service in the at least one service and obtaining the current running data of the first service and the second service, respectively, the method further includes:
comparing the current operation data of the first business service with the current operation data of the second business service;
when the comparison result shows that the numerical values of the hardware operation data of the first business service and the hardware operation data of the second business service are not smaller than the preset high operation threshold value and the numerical value of the software operation data of the first business service is detected to be higher than the numerical value of the software operation data of the second business service, linearly reducing a first preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly reducing a second preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service; when the comparison result shows that the numerical values of the software operation data of the first business service and the second business service are not more than a preset low operation threshold value and the numerical value of the hardware operation data of the first business service is higher than the numerical value of the hardware operation data of the second business service, linearly increasing the second preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly increasing the first preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service;
the first preset adjustment amount is larger than the second preset adjustment amount, and the priority of the configuration parameter adjustment based on the hardware operation data is higher than the priority of the configuration parameter adjustment based on the software operation data.
Therefore, the processor of the electronic device runs the at least one business service corresponding to the at least one business service request based on the at least one business service request of the client and the current configuration parameters of the at least one business service. The method comprises the steps that current configuration parameters of first-time running business services are initial configuration parameters, then current running data of the business services are obtained by monitoring running resources of each business service in at least one business service, the numerical value of the current running data of the business services is compared with a preset running threshold value, and the current configuration parameters are adjusted based on the comparison result to obtain new current configuration parameters; and finally, running at least one new business service based on the new current configuration parameters, thereby ensuring the normal running of the business service and improving the performance of the business service.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, which stores instructions that, when executed on a computer, cause the computer to execute the method for adjusting configuration parameters described in any of the above embodiments.
In yet another embodiment of the present invention, a computer program product containing instructions is provided, which when run on a computer causes the computer to perform the method for adjusting configuration parameters as described in any of the above embodiments.
As will be appreciated by one of skill in the art, the embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
It is apparent that those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalents, the embodiments of the present application are also intended to include such modifications and variations.
Claims (16)
1. A method for adjusting configuration parameters, comprising:
the method comprises the steps that at least one business service corresponding to at least one business service request is operated based on at least one business service request of a client and current configuration parameters of at least one business service, wherein the current configuration parameters of the business service operated for the first time are initial configuration parameters; the current configuration parameters comprise at least one configuration parameter of network card throughput, cache size and connection number per second;
monitoring the running resources of each business service in the at least one business service to obtain the current running data of the business service, wherein the running resources comprise hardware running resources and software running resources, and the current running data comprise hardware running data and software running data;
comparing the value of the current operation data of the business service with a preset operation threshold value, and adjusting the current configuration parameter based on the comparison result to obtain a new current configuration parameter;
running at least one new business service based on the new current configuration parameters;
the preset operation threshold value comprises a preset high operation threshold value and a preset low operation threshold value;
when monitoring the running resources of a first business service and a second business service in the at least one business service and respectively obtaining the current running data of the first business service and the second business service, the method further comprises the following steps:
comparing the current operating data of the first business service with the current operating data of the second business service;
when the comparison result shows that the numerical value of the hardware operation data of the first business service and the numerical value of the hardware operation data of the second business service are not smaller than the preset high operation threshold value and the numerical value of the software operation data of the first business service is detected to be higher than the numerical value of the software operation data of the second business service, linearly reducing a first preset adjustment amount for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly reducing a second preset adjustment amount for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service;
when the comparison result shows that the numerical value of the software operation data of the first business service and the numerical value of the software operation data of the second business service are not larger than the preset low operation threshold value and the numerical value of the hardware operation data of the first business service is detected to be higher than the numerical value of the hardware operation data of the second business service, linearly increasing the second preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly increasing the first preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service;
the first preset adjustment amount is larger than the second preset adjustment amount, and the priority of the configuration parameter adjustment based on the hardware operation data is higher than the priority of the configuration parameter adjustment based on the software operation data.
2. The method of claim 1, wherein comparing the value of the current operation data of the business service with a preset operation threshold and adjusting the current configuration parameter based on the comparison result to obtain a new current configuration parameter comprises:
when the numerical value of the current operation data of the business service is not less than the preset high operation threshold value, linearly reducing a preset adjustment amount for the current configuration parameter to obtain a new current configuration parameter;
or, when the value of the current operation data of the service is not greater than the preset low operation threshold, linearly increasing the preset adjustment amount for the current configuration parameter to obtain a new current configuration parameter.
3. The method of claim 1, wherein comparing the value of the current operational data of the business service to a preset operational threshold comprises:
acquiring a preset priority to be adjusted of the current configuration parameter;
the adjusting the current configuration parameter based on the comparison result to obtain a new current configuration parameter includes:
and adjusting the current configuration parameters according to the sequence of the priorities to be adjusted from high to low based on the comparison result to obtain new current configuration parameters.
4. The method of claim 1, wherein running a new business service based on the new current configuration parameters comprises:
and reading the new current configuration parameters based on at least one new business service request sent by the client to run at least one new business service.
5. The method of claim 1, wherein the current configuration parameters include buffer size, number of connections per second, network card throughput, and number of service processes.
6. The method of claim 1, wherein after obtaining the new current configuration parameters, the method further comprises:
and recording the new current configuration parameters to generate a parameter log.
7. The method of claim 1, wherein prior to comparing the value of the current operational data of the business service to a preset operational threshold, the method further comprises:
monitoring the running resources of at least one non-request business service running except the at least one business service to obtain the current running data of the non-request business service, wherein the non-request business service is a business service which is not requested to run by the client.
8. An apparatus for adjusting configuration parameters, comprising:
the system comprises an operation unit, a configuration unit and a configuration unit, wherein the operation unit is used for operating at least one business service corresponding to at least one business service request based on at least one business service request of a client and at least one current configuration parameter of the business service, and the current configuration parameter of the business service which is operated for the first time is an initial configuration parameter; the current configuration parameters comprise at least one configuration parameter of network card throughput, cache size and connection number per second;
the monitoring unit is used for monitoring the running resources of each business service in the at least one running business service to obtain the current running data of the business service, wherein the current running data comprises hardware running data and software running data, and the running resources comprise hardware running resources and software running resources;
the adjusting unit is used for comparing the value of the current operation data of the business service with a preset operation threshold value and adjusting the current configuration parameter based on the comparison result to obtain a new current configuration parameter;
the operation unit is further configured to operate at least one new service based on the new current configuration parameter;
the preset operation threshold value comprises a preset high operation threshold value and a preset low operation threshold value;
the adjusting unit is further specifically configured to:
when monitoring the running resources of a first business service and a second business service in the at least one business service and respectively obtaining the current running data of the first business service and the second business service, comparing the current running data of the first business service with the current running data of the second business service;
when the comparison result shows that the numerical value of the hardware operation data of the first business service and the numerical value of the hardware operation data of the second business service are not smaller than the preset high operation threshold value and the numerical value of the software operation data of the first business service is detected to be higher than the numerical value of the software operation data of the second business service, linearly reducing a first preset adjustment amount for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly reducing a second preset adjustment amount for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service;
when the comparison result shows that the numerical value of the software operation data of the first business service and the numerical value of the software operation data of the second business service are not larger than the preset low operation threshold value and the numerical value of the hardware operation data of the first business service is detected to be higher than the numerical value of the hardware operation data of the second business service, linearly increasing the second preset adjustment quantity for the current configuration parameter of the first business service to obtain a new current configuration parameter of the first business service, and simultaneously linearly increasing the first preset adjustment quantity for the current configuration parameter of the second business service to obtain a new current configuration parameter of the second business service; the first preset adjustment amount is larger than the second preset adjustment amount, and the priority of the configuration parameter adjustment based on the hardware operation data is higher than the priority of the configuration parameter adjustment based on the software operation data.
9. The apparatus of claim 8,
the adjusting unit is specifically configured to linearly reduce a preset adjustment amount for the current configuration parameter to obtain a new current configuration parameter when the value of the current operation data of the service is not less than the preset high operation threshold;
or, when the value of the current operation data of the service is not greater than the preset low operation threshold, linearly increasing the preset adjustment amount for the current configuration parameter to obtain a new current configuration parameter.
10. The apparatus of claim 8, wherein the adjustment unit is further specifically configured to:
acquiring a preset priority to be adjusted of the current configuration parameter;
and adjusting the current configuration parameters according to the sequence of the priorities to be adjusted from high to low based on the comparison result to obtain new current configuration parameters.
11. The apparatus according to claim 8, wherein the operating unit is specifically configured to:
and reading the new current configuration parameters based on at least one new business service request sent by the client to run at least one new business service.
12. The apparatus of claim 8, wherein the current configuration parameters include buffer size, number of connections per second, network card throughput, and number of service processes.
13. The apparatus of claim 8, wherein the apparatus further comprises a recording unit;
and the recording unit is used for recording the new current configuration parameters and generating a parameter log.
14. The apparatus of claim 8, wherein the listening unit is further configured to: monitoring the running resources of at least one non-request business service running except the at least one business service to obtain the current running data of the non-request business service, wherein the non-request business service is a business service which is not requested to run by the client.
15. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
16. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810419442.8A CN108804152B (en) | 2018-05-04 | 2018-05-04 | Method and device for adjusting configuration parameters |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810419442.8A CN108804152B (en) | 2018-05-04 | 2018-05-04 | Method and device for adjusting configuration parameters |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108804152A CN108804152A (en) | 2018-11-13 |
CN108804152B true CN108804152B (en) | 2021-08-31 |
Family
ID=64093293
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810419442.8A Active CN108804152B (en) | 2018-05-04 | 2018-05-04 | Method and device for adjusting configuration parameters |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804152B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109753416A (en) * | 2018-12-11 | 2019-05-14 | 东软集团股份有限公司 | Agent agent capabilities control method, device, storage medium and electronic equipment |
CN110351126A (en) * | 2019-06-26 | 2019-10-18 | 中信百信银行股份有限公司 | Log rank method of adjustment, device and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101854667A (en) * | 2010-05-19 | 2010-10-06 | 中兴通讯股份有限公司 | Cloud computing supporting mobile terminal side load balancing processing method and device |
CN103188730A (en) * | 2011-12-31 | 2013-07-03 | 中国移动通信集团山东有限公司 | System resource load regulating system and method and device and equipment regulating server |
CN106201722A (en) * | 2016-07-12 | 2016-12-07 | 乐视控股(北京)有限公司 | The load regulation method of server and system |
CN106793093A (en) * | 2015-11-19 | 2017-05-31 | 大唐移动通信设备有限公司 | A kind of method for processing business and device |
-
2018
- 2018-05-04 CN CN201810419442.8A patent/CN108804152B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101854667A (en) * | 2010-05-19 | 2010-10-06 | 中兴通讯股份有限公司 | Cloud computing supporting mobile terminal side load balancing processing method and device |
CN103188730A (en) * | 2011-12-31 | 2013-07-03 | 中国移动通信集团山东有限公司 | System resource load regulating system and method and device and equipment regulating server |
CN106793093A (en) * | 2015-11-19 | 2017-05-31 | 大唐移动通信设备有限公司 | A kind of method for processing business and device |
CN106201722A (en) * | 2016-07-12 | 2016-12-07 | 乐视控股(北京)有限公司 | The load regulation method of server and system |
Also Published As
Publication number | Publication date |
---|---|
CN108804152A (en) | 2018-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109936511B (en) | Token obtaining method, device, server, terminal equipment and medium | |
EP3335120B1 (en) | Method and system for resource scheduling | |
CN110858843B (en) | Service request processing method and device and computer readable storage medium | |
CN109525500B (en) | Information processing method and information processing device capable of automatically adjusting threshold | |
US10848366B2 (en) | Network function management method, management unit, and system | |
CN107135088B (en) | Method and device for processing logs in cloud computing system | |
CN110247816B (en) | Index monitoring method and device | |
CN109560976B (en) | Message delay monitoring method and device | |
CN109032805A (en) | A kind of scalable appearance method, apparatus of elasticity, server and storage medium | |
CN113067875B (en) | Access method, device and equipment based on dynamic flow control of micro-service gateway | |
CN112383585A (en) | Message processing system and method and electronic equipment | |
CN108572898A (en) | A kind of method, apparatus of control interface, equipment and storage medium | |
CN112015557A (en) | Resource adjusting method and device and server | |
CN108804152B (en) | Method and device for adjusting configuration parameters | |
CN112596985B (en) | IT asset detection method, device, equipment and medium | |
CN109284275B (en) | Cloud platform virtual machine file system monitoring method and device | |
CN111159009A (en) | Pressure testing method and device for log service system | |
CN113660179B (en) | Bandwidth cooperative control device and method for PCIe SSD multi-virtual function device | |
US20180123866A1 (en) | Method and apparatus for determining event level of monitoring result | |
CN115567448A (en) | Flow control method, flow control device, flow control apparatus, flow control medium, and program product | |
CN112866128A (en) | Speed limiting method and device for distributed network and electronic equipment | |
CN109062707B (en) | Electronic device, method for limiting inter-process communication thereof and storage medium | |
CN114416326A (en) | Big data control method, device, control system and readable storage medium | |
CN112612578A (en) | Virtual machine monitoring method and device | |
CN112800003A (en) | Recommendation method for creating snapshot, snapshot creation method and device and electronic equipment |
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 |