The present application claims priority from Japanese Application P2004-030038 filed on Feb. 6, 2004, the content of which is hereby incorporated by reference into this application.
The present invention relates to a tuning system for optimizing operation parameters of a multilayered system having a hierarchical structure and comprising a plurality of programs.
With repeated mergers of business enterprises and development of diversified business activities, a corporate information system supporting various activities of each business enterprise has been becoming increasingly complicated. In the business environment as described above, in order to realize high performance with low cost, now it is required to provide performance tuning so that a plurality of programs operating in correlation to each other can efficiently operate without losing good coordination and balance between the programs.
An experienced specialist having enough knowledge concerning operations of programs and hardware can carry out tuning by building up various types of information measurable when a system is run and rules for parameters to be set when the measured information shows a specific feature as a fuzzy inference base. For instance Japanese Patent Laid-Open No. 11-249934 discloses the performance tuning system as described above.
However, there are few experts well familiar with the complicated system as a whole. Even if such expert is available, it is extremely difficult to define all of the rules required for tuning.
It is difficult to find out optimal operation parameters for each of programs forming a multilayered system.
The present invention provides a control technology for tuning a performance of a multilayered system having a hierarchical structure and comprising a plurality of programs, and this control technology is realized by executing a computer program and is characterized in that operation parameters for each of the programs each constituting the multilayered system are set; each program is actuated; performance information for the multilayered system is measured; after operation of each program is stopped, a set of next parameters as a combination of parameters used when running the multilayered system next is decided with reference to a result of measurement of performance information so that the performance information is optimized; and the steps described above are sequentially repeated until a prespecified condition for terminating the operation sequence is satisfied.
With the present invention, anybody can easily decide an optimal parameter set even for a multilayered system comprising a plurality of programs, for which the optical operation parameters are hardly decided with the conventional technology.
The tuning control system used for tuning the parameters comprises programs for a tuning control unit 101, an experiment control unit 102, a next parameter set decision unit 103, a parameter setting unit 104, a program start/stop unit 105, and a performance information measurement unit 106. The parameter setting unit 104 sets values for the parameters 111-1 to 111-n. The program start/stop unit 105 is a program for starting and stopping the programs 112-1 to 112-n for the multilayered system 110. The performance information measurement unit 106 actuates the multilayered system 110, for instance, by sending a request, and measures the performance information. The experiment control unit 102 makes the parameter setting unit 104, program start/stop unit 105, and performance information measurement unit 106 run for carrying out an experiment. The next parameter set decision unit 103 is a program for deciding parameters to be tested next by using an optimization algorithm and based on the performance information measured as described above. The tuning control unit 101 is a program for executing an experiment by controlling the experiment control unit 102 and next parameter set decision unit 103. In the following description, the term “program 1120 may sometimes be used to indicate any of the programs 112-1 to 112-n. The same is true also for other system components.
The programs 112-1 to 112-n and system components 101 to 106 in the tuning control system are programs which can run in a computer, and may be provided in one or more computers.
In Embodiment 1, there are three parameters to be tuned, namely a maximum number of processing simultaneously executable in the Web server 451, a maximum number of processing simultaneously executable in the AP server 461, and a maximum number of pools which the AP server can maintain connection with the DB server 471. The maximum number of processing simultaneously executable indicates a number of processes, threads, or tasks simultaneously executed by the program in response to the issuance of requests. The tuning control program 402 computes a combination of parameters (parameter set) optimizing the performance of the Web system 440. In this example, the downhill simplex method is used as an algorithm for optimization.
Then the tuning control unit 101 provides controls so that the processing in step 605 and that in step 606 are repeatedly executed until the condition for termination of the experiment is satisfied (step 604). Herein the condition for termination of the experiment indicates that the distance condition described above is satisfied, or that the times of experiments reach the maximum experiment times. In step 605, the tuning control unit 101 activates the next parameter set decision unit 103. The next parameter set decision unit 103 decides one or more parameter sets for the next experiment with reference to a result of the previous experiment. The downhill simplex method is applied to decision of the next parameter sets. In step 606, the tuning control unit 101 calls the experiment control unit 102 like in step 603. The experiment control unit 102 activates the parameter setting unit 104, sets the decided next parameter sets in the Web system 440 to activate the Web system 440, and executes an experiment for acquiring the performance information. When the condition for termination of the experiment is satisfied, the tuning control unit 101 outputs a parameter set showing the best performance information among those measured up to the time point to a display unit 205 as an optimal parameter set (step 607).
When a type of an experiment is “null” (step 810), the next parameter set decision unit 103 changes the experiment type to “reflection” (step 811), and computes a reflection point for the current target point in the parameter space according to the procedure described below (step 812). The argument in this step is −1.0. Then the next parameter set decision unit 103 stores the reflection point in a buffer-for the next parameter set (step 813). Then the next parameter set decision unit 103 returns the next parameter set to the tuning control unit 101 (step 860).
When the experiment type is “reflection” (step 820) and the performance information at the reflection point is better than that at the worst point (step 821, YES), the next parameter set decision unit 103 replaces the worst point with the reflection point (step 823). When the performance information at the reflection point is better than that at the best point (step 823, YES), the next parameter set decision unit 103 changes the experiment type to “double reflection” (step 824). Then the next parameter set decision unit 103 obtains a position for double reflection of the worst point among the four points on the parameter space according to the procedure described later (step 812). The argument in this step is −2.0. Then the next parameter set decision unit 103 stores the position for double reflection in the buffer for the next parameter set (step 825).
When the performance information at the reflection position is worse than that at the best point (step 823, NO) and the performance information at the reflection position is worse than that at the second worst position (step 826, YES), the next parameter set decision unit 103 changes the experiment type to “inner reflection” (step 827). Then the next parameter set decision unit 103 computes a position for inner reflection for the worst point among the four points on the parameter space according to the procedure described later (step 812). The argument in this step is 0.5. Then the next parameter set decision unit 103 stores the position for inner reflection in the buffer for the next parameter set (step 828). When the performance information at the reflection position is the same as or better than that at the second worst point (step 826, NO), the next parameter set decision unit 103 changes the experiment type to “null”, and again executes the processing for deciding the next parameter sets (step 605).
When the experiment type is “double reflection” (step 830) and the performance information at the double reflection position is better than that at the worst point (step 831), the next parameter set decision unit 103 replaces the worst point with a point for the double reflection position (step 833). Then the next parameter set decision unit 103 changes the experiment type to “null”, and again executes the processing for deciding the next parameter set (step 605).
When the experiment type is “inner reflection” (step 840) and the performance information at the inner reflection position is better than that at the worst point (step 841, YES), the next parameter set decision unit 103 replaces the worst point with a point for the inner reflection position (step 842). Then the next parameter set decision unit 103 changes the experiment type to “null” (step 843), and again executes the processing for deciding the next parameter sets (step 605). When the performance information at the inner reflection position is worse than that at the worst point (step 841, NO), the next parameter set decision unit 103 changes the experiment type to “retraction” (step 844). Then the next parameter set decision unit 103 computes a position for retraction from four points on the parameter space according to the procedure described below (step 845). The argument in this step is 0.5. Then the next parameter set decision unit 103 stores the positions for the retraction points in the buffer for the next parameter sets (step 846).
When the experiment type is “retraction” (step 850), the next parameter set decision unit 103 replaces the points other than the best point with the points for the retraction positions (step 851). Then the next parameter set decision unit 103 changes the experiment type to “null” (step 852), and again executes decision of the next parameter sets (step 605).
When arriving at the final step 860 in each processing sequence, the next parameter set decision unit 103 returns the next parameter sets to the tuning control unit 101.
A=a1+a2+a3+a4 (Equation 1)
B=b1+b2+b3+b4 (Equation 2)
C=c1+c2+c3+c4 (Equation 3)
fac1=(1.0−fac)/3 (3: Number of parameters) (Equation 4)
fac2=fac1−fac (Equation 5)
ar=a×ac1−a2×fac2 (Equation 6)
br=b×fac1−b2×fac2 (Equation 7)
cr=c×fac1−c2×fac2 (Equation 8)
ar1=fac×(a2+a1) (Equation 9)
br1=fac×(b2+b1) (Equation 10)
cr1=fac×(c2+c1) (Equation 11)
ar2=fac×(a3+a1) (Equation 12)
br2=fac×(b3+b1) (Equation 13)
cr2=fac×(c3+c1) (Equation 14)
ar3=fac×(a4+a1) (Equation 15)
br3=fac×(b4+b1) (Equation 16)
cr3=fac×(c4+c1) (Equation 17)
In Embodiment 1, when the best point is found at the same point in a plurality of experiments, it is not clear whether the best point is a true best point or the best point is recognized accidentally as a result of each experiment. In Embodiment 2, the experiment is repeated again by using the parameter set at the best point, and an average of the measured performance information and the performance information at the previous best point is regarded as the true best point.
When the best point is obtained in the preceding experiment and the same point is recognized as the best point also in the current experiment (step 1203, YES), the tuning control unit 101 increments the value stored in the counter by 1 (step 1204). When the counter value is larger than times (top_times) (step 1205), the parameter set at the best point is again employed as the next parameter set for the next experiment (step 1206). In step 606, the tuning control unit 101 activates the next parameter set decision unit 103 and again executes an experiment with the same parameter set. A result of the experiment does not always indicate the same performance information. Then the tuning control unit 101 calculates an average of the preceding performance information and the current performance information, and regards the average as the performance information of the parameter set used in the current experiment (step 1207). In a case where the best point was not obtained in the preceding experiment or the best point in the preceding experiment is different from that obtained in the current experiment (step 1203, NO), the tuning control unit 101 replaces the parameter sets at the preceding best point and the preceding performance information in the buffer with the parameter set at the current best point and the current performance information, respectively (step 1208). If the preceding best point is not available, the tuning control unit 101 simply stores the parameter set at the current best point and the performance information in the buffer. Then the tuning control unit 101 initializes the counter to 0 (zero) (step 1209).
Sometimes it is possible to escape from the temporal best point remaining there to the true best point by repeating the experiments in Embodiment 2.
In Embodiment 3, tuning is performed by executing the initial experiments more times than a number of parameters plus 1 to speed up the convergence to the optimal solution.
When a program 112 for the multilayered system 110 is executed under the program execution environment such as Java VM, sometimes the ad hoc processing such as that for removing the unnecessary portions (Garbage Collection (GC)) may be executed. In Embodiment 4, a result of performance measurement concerning a time zone spent for the ad hoc processing as described above is excluded from the target for sampling. (Note: Java is a registered trade mark owned by Sun Microsystems Inc.).
Description of the Embodiment 4 assumes a case in which, in the Web system 440 to be tuned, the AP server 461 utilizes Java VM and GC occurs at odd intervals. The Web system 440 comprises a program capable of monitoring occurrence of GC, monitors time points when GC from Java VM occurs and ends, and stores the information in a storage device.
Embodiment 5 is a case in which a value of a parameter derived by the next parameter set decision unit 103 is corrected to a specific multiple obtained by multiplying the parameter value, for instance, by 2 or 3. With this operation, a parameter set can be quickly converged to a solution near the optimal solution.
Then the next parameter set decision unit 103 corrects the parameter values to multiples of a number specified with param_step before returning the next parameter set to the tuning control unit 101. When correcting each parameter value, for instance, each of the computed parameter values in the parameter set is divided by param_step and the quotient is subjected to half adjustment or rounding down below decimal point to obtain an integral number, and a next parameter value is obtained by multiplying the value by param_step. Alternatively, each computed parameter value in the parameter set is divided by param_step, and the obtained odd is subtracted from the original value.
Embodiment 6 is a case in which, when a parameter set derived by the next parameter set decision unit 103 is the same as that at the best point, values of the parameters in the parameter set are finely increased or decreased for a random correction. This correction is performed by adding 1 to or subtracting 1 from each of the original values. With this operation, fine search can be made around the best point.
With the embodiments described above, anybody can easily perform tuning, before starting use of a multilayered system, when the configuration is changed in association with replacement of any hardware, or when an application running in the system is exchanged with another. The present invention can also be applied to tuning of a Web system, which has been becoming increasingly important day by day. As parameters to be tuned, in addition to the maximum number of simultaneously executable operations executed in the Web server, AP server, and DB server, also a maximum number of queues maintained by each server can be tuned with this invention.
Having described a preferred embodiment of the present invention with reference to the accompanying drawings, it is to be understood that the invention is not limited to the embodiments and that various changes and modifications could be effected therein by those skilled in the art without departing from the spirit or scope of the present invention as defined in the appended claims.
| Number | Date | Country | Kind |
|---|---|---|---|
| 2004-030038 | Feb 2004 | JP | national |