WO2004099985A1 - Execution environment danger prediction/evading method, system, program, and recording medium thereof - Google Patents
Execution environment danger prediction/evading method, system, program, and recording medium thereof Download PDFInfo
- Publication number
- WO2004099985A1 WO2004099985A1 PCT/JP2003/005814 JP0305814W WO2004099985A1 WO 2004099985 A1 WO2004099985 A1 WO 2004099985A1 JP 0305814 W JP0305814 W JP 0305814W WO 2004099985 A1 WO2004099985 A1 WO 2004099985A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- memory
- garbage collection
- execution environment
- warning
- danger
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0253—Garbage collection, i.e. reclamation of unreferenced memory
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99951—File or database maintenance
- Y10S707/99952—Coherency, e.g. same view to multiple users
- Y10S707/99953—Recoverability
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99951—File or database maintenance
- Y10S707/99956—File allocation
- Y10S707/99957—Garbage collection
Definitions
- the present invention relates to a technology for stably operating an application program, and in particular, a client layer and a middle layer constituting an enterprise application.
- the execution environment of the middle tier which is located on the server side, is monitored during the operation of the application to prevent the execution environment from becoming dangerous, thereby stabilizing the application. Forecasting the danger of the execution environment for operating the system.
- Examples of the enterprise applications include a Web application mainly using Java (registered trademark).
- the execution environment of the middle tier located on the server side is mainly a Java Virtual Machine (Java Virtual Machine).
- the present invention is intended for an execution system having a memory management function such as garbage collection such as JaVa. Background art
- J a v a will be used as an example for explanation.
- Fig. 1 is a diagram showing an example of the operating environment of a Java application.
- data during the operation of the application in the execution environment 100 of the JaVa application is collected, and the collected data is analyzed by the performance analysis tool 2000. I do.
- the performance analysis tool 2000 By feeding back the analysis results of the performance analysis tool 2000 to the execution environment 100 of the JaVa application, an optimal operation environment for the Java application is constructed.
- Java application 100 In the execution environment of Java application 100, higher than OS 110 In the layer, there is a Java virtual machine 100, and in the upper layer, the application server
- EJB container ⁇ Serv1et container which is a program for operating EJB (Enterprise JavaBeans) and Serv1et.
- applications 104 such as Servleet, Java Server Pages (JSP), and EJB are operated.
- the Web server 1050 accepts a request from the client.
- the most familiar with the operation status of the J aV a application is the J a V a virtual machine 1 0 0 which is located at the lowest level in the execution environment 1 It is.
- data collected from the execution environment 1000 is stored in the performance database 210, and the stored data is stored in the analysis program 200.
- the service level diagnosis 250 diagnoses whether the server responds to the request from the client within the specified time or whether the current service status is satisfied.
- Figure 2 shows an example of a conventional method for analyzing the operating environment of a Java application.
- the data collected from the server 300 running the Java application (the server having the Java application execution environment 100) is stored in the performance database 210. It is stored in the data storage device 31010 provided.
- the performance analyzer 320 refers to the data stored in the data storage device 310, and analyzes the data using the analysis program 220.
- the operation administrator 3003 can use the performance analyzer 30020 to display analysis results in a graph using the monitoring tool 2300, perform detailed analysis using the drilldown tool 204,
- the following technologies are known as conventional technologies related to stable operation of enterprise applications that perform service level diagnosis by using service level diagnosis 20000.
- the operation manager monitors the processing performance of services and the system performance of the server side using monitoring tools.
- This technology analyzes the measured data, predicts and detects signs of a trap in conjunction with the threshold, and notifies the operation manager of it.
- the operation status can be graphed and evaluated, and detailed analysis of performance data (drill-down) can be performed to support the identification of bottlenecks in performance degradation.
- the example in Fig. 2 is an example of this first prior art.
- the processing performance of the above service is how many seconds it can respond to a request from a client.
- the server-side system performance described above includes CPU usage, memory usage, and network usage.
- the processing time of services such as Servlet ⁇ EJB is measured, the server with the highest processing speed is automatically selected, and requests from clients are distributed to efficiently process the entire system.
- Non-patent document 4 I BM e Server, Heterogeneous Workload Management, Japan I BM Co., Ltd., U "RL: http: //www-6.ibm.com/jp/servers/eserver/ac/tech/index2-1 html)-(3rd prior art)
- Java virtual machine ⁇ The profiler interface measures events generated in the Java virtual machine, detects long-running methods (bottlenecks), detects objects with memory leaks, and risks deadlocks. There is a technology that detects a possible thread.
- a monitoring tool that collects various data, displays it in a graph, etc. and monitors it requires human intervention in the steps of trouble prediction and avoidance.
- it lacked timeliness and autonomy.
- timeliness there was no timeliness in the method of analysis using a drill-down tool.
- data collection, service level diagnosis (analysis), and notification of warnings were performed automatically, many measures were not automated after receiving a warning.
- conditions such as how much data is collected and when analysis is performed have affected the timing of danger discovery.
- the processing is performed automatically.
- this is a load balancing mechanism that measures the service time and distributes the load. was not a technology to discover.
- the JaVa virtual machine When the heap becomes insufficient, the JaVa virtual machine automatically executes garbage collection to recover memory.
- a forced garbage collection is performed before that. We are trying to recover memory. This technique may be useful if the memory usage gradually increases after the memory usage exceeds the threshold and it takes a relatively long time for automatic garbage collection to occur.
- the events provided by the JaVa virtual machine / profiler interface are issued very frequently, which places an extra load on the JaVa virtual machine.
- a predetermined interface As a result, they did not have the information they needed to find the danger, or they had a low degree of freedom.
- Many tools that find sequence calls (bottlenecks) or memory leaks with high CPU usage use a profiler interface, but the load is relatively high, and these are not used during application operation but during the testing stage. Was to be done.
- the present invention has been made in view of such a situation, and reduces the load of data collection, performs more accurate risk prediction from appropriate judgment materials and algorithms, and predicts trouble from data measurement.
- the purpose of the present invention is to provide a technology that can perform processing up to notification, avoidance, and avoidance in a short time and in a timely manner, and can automatically execute the processing. Disclosure of the invention
- the present invention is, for example, a method for predicting and avoiding the danger of memory shortage in an execution environment of a middle tier of an enterprise application, and a method for estimating and avoiding the danger of the execution environment to avoid the danger.
- This danger prediction / avoidance method measures the data related to the memory status when a garbage collection event occurs, predicts the danger of insufficient memory from the measured data, and issues a warning about the predicted danger of insufficient memory. Notify other applications. It also avoids the predicted danger of running out of memory Calculate the amount of memory required for this and notify the calculated amount of memory.
- prediction of the danger of memory shortage is performed using algorithms that correspond to each type of garbage collection.
- a Java virtual machine when used as the execution environment of the middle tier of an enterprise application, when an event of garbage collection occurs, data such as the time of occurrence / memory usage is measured. Other than the above, the memory usage is regularly measured. Based on the measured data, it predicts the danger of a memory shortage error (hereinafter referred to as OutOfMemory) or performance degradation due to memory shortage, and notifies them of such warnings. Also, calculate the amount of memory required to avoid danger. To predict the danger of memory shortage, predictions are made not only for basic garbage collection but also for special garbage collection such as generational garbage collection.
- the memory usage is not measured. Since the measurement of memory usage is performed by measurement at the time of event occurrence and periodic measurement at a relatively long cycle as necessary, data can be measured without imposing a load on application operation. it can. Also, according to the method for avoiding danger prediction of the execution environment according to the present invention, the amount of memory required to avoid the predicted danger of memory shortage is calculated, and the calculated amount of memory is notified. The execution environment can be quickly and easily recovered.
- danger is determined by an algorithm corresponding to each type of garbage collection, so that a more accurate danger can be determined.
- the method for avoiding danger prediction of the execution environment according to the present invention can be realized by a computer and a software program, and the program can be recorded on a computer-readable recording medium or can be provided through a network. It is.
- This program is installed on a medium such as a hard disk, expanded in main storage, and executed by the CPU.
- recording media Portable recording media such as CD-ROMs and DVDs are conceivable.
- Fig. 1 is a diagram showing an example of the operating environment of the Java application.
- Figure 2 shows an example of a conventional method for analyzing the operating environment of a Java application.
- Fig. 3 is a diagram showing an example of the configuration of the danger prediction / avoidance system.
- FIG. 4 is a diagram showing an example of setting data.
- Fig. 5 is a diagram for explaining the measurement and analysis means.
- Fig. 6 is a diagram showing three typical states of garbage collection intervals and memory usage.
- FIG. 7 is a diagram illustrating a state in which a warning should be given.
- Fig. 8 is a diagram explaining the garbage collection interval and memory usage in generational garbage collection.
- Fig. 9 is a diagram explaining the measurement of the overflow amount.
- Fig. 10 is a diagram for explaining the state of garbage collection intervals and memory usage in generational garbage collection that dynamically changes size.
- FIGS 11 to 15 are flowcharts of the memory usage measurement and analysis process.
- Fig. 16 and Fig. 17 show examples of the status of the memory usage measurement and analysis means that is the target of warning.
- FIG. 18 is a flowchart of the thread measurement / analysis processing.
- Fig. 19 is a diagram showing the distribution of processing to the Java virtual machine by cooperation between the Java virtual machine and the application server.
- Figure 20 is a diagram showing the cooperation between the Java virtual machine and the application server.
- FIG. 21 is an analysis result notification processing flowchart.
- FIG. 22 is a flowchart of a command notification process.
- FIG. 23 is a flowchart of the JaVa virtual machine optimal control process. BEST MODE FOR CARRYING OUT THE INVENTION
- Fig. 3 is a diagram showing an example of the configuration of the danger prediction / avoidance system.
- the Java virtual machine 1 and the application server 2 in the upper layer are linked by the Java virtual machine linking means 3.
- the Java virtual machine 1 is provided with measurement and analysis means 10.
- the measurement / analysis means 10 includes a memory usage measurement / analysis means 11, a thread measurement / analysis means 12, and setting data 100.
- the application server 2 includes a Java Virtual Machine control means 20. Also, the Java virtual machine control means 20 includes a Java virtual machine optimum control means 21.
- the JaVa virtual machine cooperation means 3 includes an analysis result notifying means 31 and a command notifying means 32.
- FIG. 4 is a diagram showing an example of setting data.
- the setting data 100 provided by the measurement and analysis means 10 is the memory usage measurement flag 101, the thread measurement flag 102, the GC generation interval warning threshold (thl) 103 , OutOfMemory warning threshold A (th 2) 104, OutOfMemory warning threshold B (th 3) 1 0 5, Out of memory warning threshold (th 4) 1 06, Memory free recovery threshold (th 5) 107, new generation shortage warning threshold (th6) 108, overflow warning threshold (th7) 109, deadlock warning threshold (th8) 110.
- the above GC means garbage collection.
- garbage collection is sometimes referred to as GC.
- These values in the setting data 100 can be set by the application server 2 issuing a command.
- a system administrator or the like can set in advance or at any time using a setting program (not shown).
- each means The operation of each means is described below. First, the part that measures, analyzes, and predicts the danger of data in the JaVa virtual machine 1 will be described. And feed packs for optimal operation. Will be described.
- the JaVa virtual machine 1 includes a measurement-analysis means 10 therein. Measurement and analysis of data and prediction of the occurrence of traps are performed inside the Java virtual machine 1. Therefore, in the present invention, the process from data measurement to analysis and trouble prediction is performed in a more timely manner than in the first conventional technology in which measured data is output once to a database or the like and judged by an analysis program. be able to.
- Fig. 5 illustrates the measurement and analysis means. Measurement inside the J aV a virtual machine 1-
- the analysis means 10 is a function that periodically measures data (for example, at intervals of several seconds) 10 ⁇ and a function that measures data when a garbage collection event occurs 1 It has two data measurement functions of 0 ⁇ .
- the exact amount of memory (heap) used in the JaVa virtual machine 1 is measured at the time of the "memory release" event.
- the frequency of events is extremely high, and measuring data when all events occur places a burden on application operations. Analyzing memory usage and predicting danger can be performed on data that is acquired periodically, and there is no need to measure data when a “memory allocation Z release” event occurs.
- Measurement 'Analysis means 10 is used from two data measurement functions (10 ⁇ , 10j3) according to the items to be measured so that data can be accurately measured without imposing a load on application operation. Select the data measurement function.
- the measurement inside the JaVa virtual machine 1 is performed by the analysis means 10 and the memory usage measurement and analysis means 11 for measuring and analyzing the memory usage.
- Thread measurement and analysis means 12 for measuring and analyzing the thread are provided.
- Memory usage measurement • Analytical method 11 1 periodically measures the amount of used memory (heap) and measures the occurrence of garbage collection in the JaVa virtual machine 1, and obtains the results of those measurements. Analyze the data. As a result of the analysis, if there is a danger that OutMemory errors may occur due to insufficient memory, or if insufficient memory adversely affects performance, a warning is given. . It is also necessary to restore the status at that time. Estimate the moly size.
- Memory usage measurement ⁇ Analysis unit 11 measures the amount of memory used by Java virtual machine 1 at regular intervals. The setting of the measurement interval at this time can be changed by a command from the & ⁇ virtual machine control means 20 (the details will be described later) of the option 1 when starting the && virtual machine 1 and the application server 2 It is. In addition, the memory usage measurement 'analysis means 11 measures data when a garbage collection event occurs.
- the virtual machine 1 Since the virtual machine 1 knows its own operation status well, it can detect the risk of trouble within itself.
- the most serious problem in the JaVa virtual machine 1 is a lack of memory (heap). Due to this memory shortage, machine performance is degraded, and in severe cases, processing may stop.
- the amount of transaction requests from clients may be larger than expected, and the memory usage may exceed the initial estimate.
- the amount of requests from clients changes every moment, and the amount of memory used also changes according to the situation. In such a case, it is not possible to accurately judge the danger of memory shortage simply by comparing the amount of used memory measured with the threshold value as in the third conventional technique described above. Therefore, it is necessary to make more appropriate decisions according to the situation. '
- JaVa In the application of JaVa, when memory is required, the memory is acquired by the new operator. In a Java application, memory release cannot be written in a program, and memory release is left to the Java virtual machine 1.
- the process of releasing memory in JaVa virtual machine 1, that is, garbage collection, has a very large effect on machine performance. Therefore, various types of garbage collection according to the situation are being studied, and the garbage collection method adopted by each Java Virtual Machine 1 is different.
- the determination method specific to the garbage collection used for each JaVa virtual machine 1 Required In order to determine the danger of running out of memory, in addition to the common determination method that can be applied to all garbage collections, the determination method specific to the garbage collection used for each JaVa virtual machine 1 Required.
- Memory usage measurement and analysis unit 1 1 analyzes the measured data, and determining the risk of a common memory shortage applicable to all gas page collection, is adopted for each J a V a virtual machine 1 Determines the risk of running out of memory inherent to garbage collection. Also, based on the results of each judgment, a warning is issued for a dangerous state and the amount of memory required to recover the state is calculated.
- Fig. 6 is a diagram showing three typical states of the garbage collection interval and the memory usage.
- the graphs shown in Fig. 6 (A) to (C) are examples of graphs showing changes in memory usage 200 and the occurrence of garbage collection 210, and the occurrence of garbage collection 210. Three typical states related to intervals and memory usage 200 are shown.
- the vertical axis indicates the amount of memory
- the horizontal axis indicates time.
- the solid line shows the time change of the memory usage 200
- the dotted line shows the set maximum heap size 220. JaVa virtual machine 1 executes garbage collection 210 when the memory usage 200 is likely to exceed the maximum heap size 220 due to the "memory allocation" event, and releases the memory. Do.
- Figure 6 (A) shows a stable state where garbage collection 210 does not occur, or the interval between garbage collection 210 occurrences is relatively long, and garbage collection 210 recovers memory space. Indicates the state.
- Fig. 6 (B). Shows the state where the interval of garbage collection 210 tends to be short, but the memory space is recovered by garbage collection 210.
- FIG. 6 (C) shows a state in which the garbage collection 210 occurs at short intervals and the garbage collection 210 does not sufficiently recover the memory space.
- the state shown in Fig. 6 (B) and the state shown in Fig. 6 (C) are subject to warning.
- FIG. 7 is a diagram illustrating a state in which a warning should be given.
- Figure 7 (A) shows the state in which a warning about performance degradation due to insufficient memory should be issued.
- the vertical axis indicates the intervals of garbage collection
- the horizontal axis indicates the intervals of garbage collection at equal intervals.
- the garbage collection occurrence interval has fallen below the GC occurrence interval warning threshold 103.
- Figures 7 (B) and 7 (C) are diagrams showing the state in which a warning of the danger of OutOfMemory should be issued.
- the vertical axis shows the amount of memory and the horizontal axis shows time.
- the bold line 104 is the value obtained by (full capacity XOutOfMemor y warning threshold A 104).
- the bold line 105 ' is the value obtained by (total capacity X OutOfMemory warning threshold B105).
- a change in the memory usage of 200 indicates that the free space of the memory is gradually recovering in the order of GC210a, GC210b, and GC210c. .
- the memory usage 200 after GC 210b and GC 210c exceeds the thick line 105 ', the memory usage after GC 210b and GC 210c is used. It can be seen that the rate is above the OutOfMemory warning threshold B105.
- the OutOfMemory warning threshold value A 104 is larger than the OutOfMemory warning threshold value B 105. Even if the memory usage is below the OutOfMemory warning threshold A104, if the memory usage is increasing above the OutOfMemory warning threshold B105, there is a danger of OutOfMemory.
- the following (Judgment 1) to (Judgment 3) show the tricks to judge the risk of memory shortage in the basic garbage collection by the memory usage measurement 'analysis means 11'.
- the usage rate is a memo. Indicates the ratio of the memory usage to the total capacity of the memory. Therefore, the following equation (1) is obtained.
- Memory usage measurement and analysis means 11 Based on the judgment results of basic garbage collection dangers shown in (Judgment 1) to (Judgment 3), warning of OutOfMemory danger, memory shortage Warning of performance degradation due to
- the memory usage measurement and analysis means 11 analyzes the data according to the characteristics of the generational garbage collection, warns against dangerous conditions, and provides information necessary to recover the status. The calculation of the amount of moly will be described.
- Generation-type garbage collection manages the memory (heap) by dividing it into two areas, the new generation and the old generation.
- a Java program object When allocated to memory, it is first allocated to a new generation of memory.
- newGC a new generation of garbage collection
- Objects that have survived n e wGC several times are moved to the old generation memory.
- garbage collection or GC garbage collection
- Fig. 8 is a diagram explaining the state of the garbage collection interval and the memory usage in the generation type garbage collection.
- the graphs shown in Figs. 8 (A) to (C) show the changes in memory usage (old generation 201, new generation 202) and garbage collection (GC) 210, new GC 21 for the old generation and the new generation.
- This is an example of the occurrence of 1 in a graph, and shows three typical states related to the garbage collection 210 and newGC 211 occurrence intervals and memory usage (201, 202).
- the vertical axis represents the amount of memory
- the horizontal axis represents time.
- the dotted line indicates the set maximum heap size 220
- the dashed line indicates the boundary 221 between the new generation and old generation memory areas.
- the area below the dashed line is the area of the old generation memory
- the area from the dashed line to the dotted line is the area of the new generation memory.
- the solid line in each generation shows the temporal change in memory usage (201, 202) for each generation.
- the states in Fig. 8 (A) to (C) are shown in Figs. 6 (A) to (C). Corresponding to each state.
- the new VM 1 executes 1 to perform a burst of new generation memory.
- the Java virtual machine 1 transfers objects remaining in the new-generation memory to the old-generation memory after experiencing the new wGC 211 several times. Performs garbage collection 210 of the entire memory when objects cannot be moved from
- the frequency of occurrence of new GC211 is higher than the frequency of occurrence of GC210 in the entire memory.
- the processing time of the GC 210 is several seconds, and in some cases ten and several seconds, the processing time of the new GC 211 is about several tens of milliseconds. In applications where response time is important, it is necessary to maintain the state where GC210 does not occur as much as possible (the state shown in Fig. 8 (A)).
- GC210 occurs when there are many objects that move from the new generation to the old generation, and when there are many long-lived objects and when the new generation has a small memory size and overflows ( Even if the generation is young, it may be moved to the old generation (when overflow algorithm is adopted).
- the overflow amount the size of the objects overflowing from the new generation memory to the old generation memory (hereinafter referred to as the overflow amount) was measured, and the state shown in Figs. 8 (B) and 8 (C) was obtained.
- the amount of memory required to achieve the state shown in Fig. 8 (A) can be estimated.
- FIG. 9 is a diagram explaining the measurement of the overflow amount.
- Figure 9 (A) shows the state in which objects overflow from the memory of the new generation 240 to the memory of the old generation 230 in the new GC 211, where the hatched area indicates the overflow amount.
- the amount of memory of the new generation 240 was sufficient at the time when the newGC 211 occurred (the timing of the occurrence of the newGC 211 has been extended). It shall be expressed as shown in Fig. (B). If this is repeated for every new GC 2 11 1, the state will be as shown in Fig. 9 (C).
- Figure 9 (C) shows a state where it is assumed that the object that actually overflowed with four new GCs 211 did not overflow with an infinite amount of memory of the new generation 240. are doing.
- the k-th overflow amount and expressed as t k overflowing total amount of which is assumed to overflowing Do bought at the time of FIG. 9 (C) is a + t 2 + t + t. If there is an extra memory of t + t 2 + t + t 4 in addition to the original memory in the area of the new generation 240 from the beginning, the new generation can be performed up to four times with new GC 2 11 No objects overflow from the 240 memory.
- Fig. 9 (C) suppose that the object overflowed by the first newGC 211 does not overflow and remains in the area of the new generation 240 until the fourth newGC 211 time. Some of them should be unnecessary objects. Similarly, among the objects that overflowed at the time of the second ne wGC 21 1 and the objects that overflowed at the time of the third ne wGC 21 1 You. In Fig. 9 (C), some of the objects that were determined not to have overflowed by the fourth new GC 211 may be released by the fourth new GC 211. Actually, Fig. 9 (C) is considered to be the state shown in Fig. 9 (D).
- the cumulative amount of overflow of n new GCs can be obtained by the following equation (3).
- x t . tal indicates the total overflow amount.
- equation (4) is used instead of equation (1) for calculating the memory usage rate.
- the memory usage measurement / analysis means 11 matches the basic judgment results shown in (Judgment 1) to (Judgment 3) and the characteristics of the generational garbage collection shown in (Judgment 4) and (Judgment 5). Based on the result of the risk judgment, a warning of the risk of OutOfMemory and a warning of the risk of performance degradation due to insufficient memory are issued.
- the memory usage measurement 'analysis means 11 calculates the amount of memory required to recover the state.
- FIG. 10 is a diagram for explaining the state of the generation interval of garbage collection and the memory usage in the generation type garbage collection that dynamically changes the size.
- the free space of the memory immediately after garbage collection 210 is reduced by a preset ratio between the new generation memory area and the old memory area. It is distributed to the generation memory area.
- Figures 10 (A) to (C) show changes in memory usage (old generation 201, new generation 202) and garbage collection 210, neGC 211 for the old generation and the new generation, respectively.
- Fig. 10 (A) shows a typical example of the state of garbage collection 210, new GC 211, and the memory usage.
- the vertical axis represents the amount of memory
- the horizontal axis represents time.
- the dotted line indicates the set maximum heap size 220 and the dashed line indicates the boundary 221 between the new generation and old generation memory areas.
- the area below the dashed line is the area of the old generation memory, and the area from the dashed line to the dotted line (maximum heap size 220) is the area of the new generation memory.
- the solid line in each generation indicates the time variation of the memory usage (201, 202) for each generation.
- the states shown in FIGS. 10 (A) to (C) correspond to the states shown in FIGS. 6 (A) to (C).
- the J a Va virtual machine 1 Execute new GC211 to release the new generation memory.
- Java virtual machine 1 is a new generation after experiencing new GC 2 11 several times. Move the objects remaining in the memory of the old generation to the memory of the old generation. The memory of the new generation is reduced and the memory of the old generation is increased by the amount of moving objects from the memory of the new generation to the memory of the old generation.
- & 3 virtual machine 1 executes garbage collection 210 of the entire memory. At this time, the free space of the memory immediately after garbage collection 210 is distributed to a new generation memory area and an old generation memory area at a preset ratio.
- Memory usage measurement ⁇ The judgment of the risk of memory shortage in generational garbage collection by dynamically changing the size by the analysis means 11 is (Judgment 1) to (Judgment 3) and (Judgment 5) described above. Equation (1) is used to calculate the usage rate in generational garbage collection that dynamically changes size. The memory usage measurement and analysis means 11 is based on the risk judgment results shown in (Judgment 1) to (Judgment 3) and (Judgment 5). Give a warning of drop.
- the memory usage measurement and analysis means 11 calculates the amount of memory required to recover the state. In generational garbage collection that dynamically changes size, the amount of memory required for recovery is improved by the above equation (2). For example,
- the memory size required for recovery in (Judgment 1) to (Judgment 3) was calculated so that the ratio of the free space of the old generation to the total capacity after garbage collection exceeded the memory free space recovery threshold value of 107. Size. The calculation is to find m (capacity added for recovery) that satisfies the following equation (6).
- non-dynamic generation type GC means a generation type GC that does not dynamically change the memory size of the new generation and the old generation. Indicates a page collection.
- Dynamic generation type GC indicates a generation type garbage collection that dynamically changes its size.
- GC indicates the garbage collection of the entire memory, and
- newGC indicates the new generation garbage collection in the generation type GC.
- Fig. 11 is a flowchart of the analysis process of memory usage measurement.
- step S1 it is determined whether or not the memory usage measurement flag 101 is ON (step S1), and if not (if OFF), the processing is terminated. If it is ON in step S1, it is determined whether or not GC has occurred (step S2). If GC has not occurred, the process proceeds to step S6.
- step S2 If a GC occurs in step S2, the data measurement and calculation processing shown in Fig. 12 is performed (step S3), and the data analysis and warning processing A shown in Fig. 13 are performed (step S4). ), Then perform data analysis and warning processing B shown in Fig. 14 (step S5), and proceed to step S6.
- step S6 It is determined whether or not it is a generation type GC (step S6), and if it is not a generation type GC, the process is terminated.
- step S6 If it is a generation type GC in step S6, the generation type GC specific measurement-analysis processing shown in Fig. 15 is performed (step S7), and the processing ends.
- Figure 12 is a flowchart of the data measurement and calculation process.
- the current GC occurrence time is measured (step S10), and the current GC occurrence interval (the current GC occurrence time minus the previous GC occurrence time) is calculated (step S11).
- step S12 in the case of the generation type GC, measurement is performed not only on the entire memory but also on the memory of the old generation.
- step S13 when using non-generational type GC and dynamic generation type GC, calculation is performed using equation (1). Is calculated using equation (4).
- FIG. 13 is a flowchart of data analysis and warning processing A.
- this usage rate ⁇ th 2 OutOfMemory warning threshold A 104)
- step S20 it is determined whether or not “this usage rate ⁇ th 2 (OutOfMemory warning threshold A 104)” is satisfied (step S20), and if it is, the process proceeds to step S26. If not satisfied in step S20, it is determined whether or not “current usage rate> previous usage rate” is satisfied (step S21). If not, how many times the memory usage rate increases.
- the counter c1 for counting whether or not it is continuous is set to 0 (step S23), and the process ends.
- step S21 it is determined whether or not “this usage rate> th3 (OutOfMemory warning threshold B105)” is satisfied (step S22). If not, use of memory is determined.
- the counter c1 for counting how many times the rate increase continues is set to 0 (step S23), and the process ends.
- step S25 It is determined whether or not the value of the counter c1 is equal to or greater than a value n1 arbitrarily set in advance (step S25). If the value is equal to or greater than n1, the process proceeds to step S26. If the value is not equal to or more than the value n1 in step S25, the process ends.
- step S26 a warning of the danger of OutOfMemory (warning w1) is issued, the amount of memory required for recovery is calculated (step S27), and the process ends.
- step S27 In the calculation of the amount of memory required for the recovery in step S27, if the generation type GC is not used, a calculation is performed to find m (the capacity added for recovery) that satisfies the above equation (2), In the case of a type GC, a calculation is performed to find m (capacity added for recovery) that satisfies the above equation (5). Calculation to determine the capacity to be added).
- Figure 14 is a flowchart of the data analysis / warning process B.
- step S30 it is determined whether or not “this GC generation interval ⁇ th 1 (GC generation interval warning threshold value 103)” is satisfied (step S30), and if not, how many times the GC generation interval continues.
- the counter c 2 which counts whether the value has fallen below the GC generation interval warning threshold value 103, is set to 0 (step S 31), and the process ends.
- step S33 It is determined whether or not the value of the counter c2 is equal to or greater than a value n2 arbitrarily set in advance (step S33), and if not, the process is terminated.
- step S33 if c2 is equal to or larger than value n2, it is determined whether or not "this usage rate ⁇ th4 (memory shortage warning threshold value 1 06)" is satisfied (step S34). If the conditions hold, a warning (warning w2) is issued to warn of performance degradation due to insufficient memory (step S35), the amount of memory required for recovery is calculated (step S36), and the process ends.
- this usage rate ⁇ th4 memory shortage warning threshold value 1 06
- step S36 In the calculation of the amount of memory required for the recovery in step S36, if the generation type GC is not used, a calculation for finding m (the capacity added for recovery) that satisfies the above equation (2) is performed. In the case of a GC, calculation is performed to find m (capacity to be added for recovery) that satisfies the above equation (5). To calculate).
- step S34 it is determined whether or not "vacancy rate ⁇ th5 (memory free space recovery threshold value 1 07)" (step S37). A warning (warning w3) is generated (step S38), and the process ends.
- step S39 it is determined whether the GC is a non-dynamic generation type GC. If not, the absolute amount of memory is smaller than the memory consumption speed. A warning (warning w4) is issued (step S40), and the process ends.
- step S39 If it is a non-dynamic generation type GC in step S39, it is determined whether "new generation capacity Z total capacity ⁇ th6 (new generation shortage warning threshold value 1 08)" is satisfied (step S4). 1) If this is true, a warning is issued (warning w5) that the proportion of the new generation is small (step S42), and the processing ends. .
- FIG. 15 is a flowchart of the generation-type GC-specific measurement and analysis process.
- step S50 it is determined whether or not newGC has occurred (step S50), and if not, the process ends.
- step S50 it is determined whether or not the new GC is the first new GC after the GC (step S51). If the new GC is not the first new GC, the process proceeds to step S53. If it is the first new GC in step S51, the value n is set to 1 (step S52), and the process proceeds to step S53.
- step S53 The amount of objects overflowing from the new generation to the old generation is measured by new GC (step S53), and the total amount of overflow is calculated using equation (3) (step S54). Next, it is determined whether or not “total overflow / free space of the previous generation> th 7 (overflow warning threshold value 1 09)” is satisfied (step S 55). Proceed to.
- step S55 If the condition is satisfied in step S55, a warning of the danger of OutOfllemory (warning w1) is issued (step S56), and the total overflow amount calculated in step S54 is set as the amount of memory to be added for recovery ( Step S57), and proceed to step S58.
- Figure 16 is a diagram showing an example (1) of a state in which the memory usage measurement and analysis means is subject to a warning.
- Figs. 16 (A) and (B) correspond to the judgment conditions in Fig. 13 respectively.
- the vertical axis shows the amount of memory and the horizontal axis shows time.
- the bold line 104 is the value obtained from (full capacity XOutOfMemory warning threshold A104).
- the bold line 105 ' is the value obtained from (the total capacity XOutOfMemory warning threshold B105).
- the thick line 107 is the value obtained by (total capacity X (1-memory free recovery threshold value 107)).
- FIG. 16 (A) shows an example in which step S20 in FIG. 13 is established. Looking at the change in memory usage 200 in Fig. 16 (A), almost no free memory has been recovered by GC210. Memory usage after GC 210 0 200 Indicates that the memory usage exceeds the OutOfMemory warning threshold A104.
- the OutOfMemory warning threshold A104 is, for example, about 90% to 95%.
- Fig. 16 (B) is an example in which step S21, step S22, and step S25 in Fig. 13 are simultaneously established.
- Fig. 16 (B) looking at the change in the memory usage 200, the free space of the memory gradually stops recovering in the order of GC210o; GC210i3 and GC210y. You can see that there is.
- the memory usage 200 after GC 210; GC and GC 210 g continuously exceeds the thick line 105 ', the memory usage after GC 210 j3 and GC 210 y, respectively. It can be seen that the memory usage exceeds the 0utOfMemory warning threshold B105.
- Figure 17 is a diagram showing an example (2) of a state in which the memory usage measurement and analysis means is subject to a warning.
- FIGS. 17 (A) to 17 (C) correspond to the judgment conditions in FIG. 14, respectively.
- the vertical axis represents the amount of memory
- the horizontal axis represents time.
- the bold line 106 is the value determined by (total capacity X memory shortage warning threshold value 106).
- the bold line 108 is the value obtained by (total capacity X (1-new generation shortage warning threshold value 108)).
- the thick line 107 is the value obtained by (total capacity X (1-memory free recovery threshold value 107)).
- FIG. 17 (A) shows an example in which step S34 in FIG. 14 is established. Looking at the change in memory usage 200 in Fig. 17 (A), the memory space is recovered to some extent by GC210, but the GC generation interval is shortened. Since the memory usage 200 after GC210 exceeds the thick line 106 ', it can be seen that the memory usage exceeds the memory shortage warning threshold value 106.
- the memory shortage warning threshold value 106 is, for example, about 80% to 90%.
- Fig. 17 (B) is an example where step S37 in Fig. 14 is satisfied, and is an example where the generation type GC is not used. Looking at the change in the memory usage 200 in Fig. 17 (B), the memory is recovered by GC210. In addition, since the memory usage 200 after GC 210 is below the thick line 107 ', It can be seen that the vacancy rate exceeds the memory vacancy recovery threshold value 107.
- Fig. 17 (C) is an example in which step S41 in Fig. 14 is satisfied, and is an example in the case of non-dynamic generation type GC.
- a look at the change in the memory usage 201 of the old generation shows that the free memory has been recovered by GC210.
- the memory usage rate of the old generation after GC 210 is lower than the bold line 107 '. I have.
- the GC generation interval is shortened.
- the ratio of the new generation capacity to the total memory capacity is the new generation shortage warning threshold. It turns out that it is less than 108. This is because the new generation capacity is small.
- the new generation shortage warning threshold value 1108 is, for example, about 5% to 10%.
- the thread measurement / analysis means 12 that measures and analyzes whether or not the thread of the JaVa application has a deadlock and issues a warning is described.
- the state of the thread of JaVa includes a state of being executed, a state of being ready for execution, a state of being suspended, a state of sleeping, and a state of waiting for lock release.
- the thread state transition can be measured by events of the Java virtual machine / profiler interface.
- deadlock detection which measures and analyzes thread state transitions based on events in the Java Virtual Machine 'profiler interface, should be performed during development.
- the thread measurement and analysis Measure the thread status periodically at intervals that do not impose a load on the operation of the thread.
- the thread that is waiting for lock release is recorded, and it is checked whether the same thread is waiting for relock release at the next measurement. If the machine is standing by continuously, count the number of times. If there are two or more threads that have exceeded the deadlock warning threshold value 110 for the number of consecutive wait states for lock release, it is determined that there is a risk of deadlock.
- Figure 18 is a flowchart of the thread measurement and analysis process.
- step S60 it is determined whether or not the thread measurement flag 102 is ON (step S60). If it is not ON (if it is OFF), the process proceeds to step S68.
- step S60 If it is ON in step S60, the state of all threads is measured (step S61), and the threads that are currently waiting for lock release are extracted and recorded (step S62). In addition, among the threads that have already been recorded, the threads that have not been extracted this time are deleted (step S63).
- the counter of the number of times that the thread waiting state extracted for the first time this time is continuous (this is called a continuous counter) is set to 1 (step S64), and the continuous counter of the thread extracted last time is incremented by 1 (step S65). ).
- step S66 it is determined whether or not there are two or more threads satisfying “continuous counter ⁇ th 8 (deadlock warning threshold 1 10)” (step S66). Proceed to 6.
- step S66 If it exists in step S66, a warning (warning w7) that there is a danger of deadlock is issued (step S67), and the process proceeds to step S68.
- step S68 Sleeps the thread state measurement at the measurement interval specified as an option when the JaVa virtual machine 1 is started or as a command from the JaVa virtual machine control means 20 (described later) of the application server 2. Then (step S68), the process returns to step S60.
- this system employs an algorithm that makes judgments based on periodic measurements, rather than measuring all thread state transitions.
- the risk of thread deadlock can be warned without imposing a load on the operation environment of the location.
- the Java virtual machine 1 notifies the analysis result to the upper layer (application server 2) and feeds it back so that the optimal operation environment is established.
- Fig. 19 is a diagram showing the distribution of processing to the Java virtual machine by cooperation between the Java virtual machine and the application server.
- An application server 2 is located above the JaVa virtual machines 1a to 1d.
- Each of the JaVa virtual machines 1a to 1d is started by the upper-level application server 2, and there is a close connection between each of the JaVa virtual machines 1a to 1d and the application server 2. Have a relationship.
- the application server 2 starts a plurality of Java virtual machines 1a to 1d, distributes requests from clients to each of the Java virtual machines 1a to 1d, and processes the application.
- the results of the analysis performed by the measurement and analysis means 10a to 10d in each JaVa virtual machine 1a to 1d are reported directly to the application server 2.
- the application server 2 feeds the received analysis result notification to the application operating environment and distributes requests from clients to the Java Virtual Machines 1a to 1d more appropriately.
- the Java virtual machine 1a sends a notification to the application server 2 that there is a high risk of an OutOfMemory error due to insufficient memory.
- the application server 2 stops distributing the processing to the Java virtual machine 1a, and when the virtual machine 1a completes the current processing, the new JaV a.
- aVirtual machine 1 Processing can be distributed to b to ld.
- Figure 20 is a diagram showing the cooperation between the Java virtual machine and the application server.
- the J a V a virtual machine control means 20 in the application server 2 This is a means to start and stop the ava virtual machine 1 and to distribute application processing to the Java virtual machine 1.
- the Java virtual machine control means 20 and the Java virtual machine 1 are linked to each other by the Java virtual machine link means 3.
- the JaVa virtual machine cooperation means 3 includes an analysis result notifying means 31.
- the analysis result notification means 31 has a function of notifying the analysis result directly by inter-process communication and a function of notifying the analysis result via a medium such as a file.
- the measurement and analysis means 10 in the Java virtual machine 1 sends the analysis result to the Java virtual machine control means 20 using the analysis result notifying means 31.
- the Java virtual machine control means 20 controls the start and stop of the Java virtual machine 1 and the Java virtual machine based on the analysis result sent by the analysis result notification means 31. Distribution of the application to the application.
- the Java virtual machine control means 20 starts and stops the Java virtual machine 1 and distributes applications to the Java virtual machine 1 based on information from the Java virtual machine 1.
- the means for optimally performing is Java virtual machine optimal control means 21.
- the Java virtual machine cooperation means 3 includes a command notification means 32.
- This command notification means 32 notifies a command directly by inter-process communication.
- the JaVa virtual machine control means 20 uses the command notification means 32 to set commands for instructing start / stop of measurement / analysis for each type of measurement, and setting of thresholds used for judgment of analysis results Send commands to change, commands to force garbage collection, etc. For example, if a warning is not notified for a long period of time, the JaVa virtual machine control means 20 uses the command notification means 32 to notify the JaVa virtual machine 1 of memory usage. A command can be sent to instruct to suspend the measurement.
- FIG. 21 is an analysis result notification processing flowchart.
- the analysis result notification processing is explained separately for the processing of the Java virtual machine 1 'processing on the analysis means 10 side and the processing on the Java virtual machine control means 20 side of the application server 2.
- Fig. 21 (A) is a flowchart of the analysis result notification processing on the measurement and analysis means 10 side. It is.
- the measurement / analysis means 10 determines whether or not there is a warning (step S70), and if there is a warning, notifies the Java virtual machine control means 20 using the analysis result notifying means 31. (Step S71). At this time, if there is information on the amount of memory required for recovery, it is also notified.
- the warning may be sent by inter-process communication or output to a log file.
- FIG. 21 (B) is an analysis result notification processing flow chart on the Java virtual machine control means 20 side.
- J a V a virtual machine control unit 20 determines whether it has received a warning (step S 80), if receiving a warning, pass the warning to the J ava virtual machine optimal control unit 2 1 (Step S81). At this time, if information on the amount of memory required for recovery has been received, it is also passed.
- FIG. 22 is a flowchart of the command notification process.
- the command notification process is described separately for the process on the Java virtual machine control means 20 side of the application server 2 and the process on the measurement and analysis means 10 side of the Java virtual machine 1.
- (A) is a flowchart of the command notification processing on the Java virtual machine control means 20 side.
- the Java virtual machine control means 20 determines whether or not there is a command to change the operating environment to the measurement and analysis means 10 (step S90). If there is a command, the command notification means 3.2 is issued . A command to change the setting is sent to the measurement / analysis means 10 using this (step S91). Commands are sent by inter-process communication.
- commands for changing the operating environment include the following.
- Fig. 22 ( ⁇ ) is a flowchart of the command notification processing on the measurement / analysis means 10 side. It is.
- the measurement 'analyzing means 10 determines whether or not a command has been received (step S100), and if the command has been received, executes the command (step S101). '
- Examples of command execution include the following.
- Thread measurement start If the command is a Z end command, the thread measurement flag 102 is set to ⁇ N / 0 FF.
- Measurement in Java virtual machine 1 As a result of analysis by analysis means 10, notifications such as warning of danger of OutOfMemory, warning of performance degradation due to insufficient memory, and memory size required for recovery, etc. It is sent to the virtual machine control means 20.
- the notification reaches the application server 2 immediately.
- the Java virtual machine control means 20 periodically checks whether or not the notification has been received, and, upon receiving the notification, immediately passes the notification to the Java virtual machine optimum control means 21 to execute the application operating environment. Feed pack.
- the Java virtual machine optimal control means 21 stops distribution of application processing to the Java virtual machine 1.
- the J a V a After the virtual machine 1 is completed applications that are currently being processed, launch the alternative of J a V a virtual machine 1 '.
- the startup options of the alternative Java virtual machine 1 based on the memory size required for recovery notified from the Java virtual machine 1, are used. Specify the optimal memory size.
- the Java virtual machine optimal control means 21 is notified the next time the Java virtual machine 1 starts up. Based on the memory size required for recovery, specify the optimal memory size in the Java virtual machine 1 startup options.
- There is also a feed pack method that reduces the distribution of application processing to the Java virtual machine 1 that warns of performance degradation due to insufficient memory.
- the notification of the thread deadlock danger warning is not fed back to the startup of the Java virtual machine 1 or the distribution control of application processing. This information is left in the file as log information of the application server 2 and used for later review of the application.
- FIG. 23 is a flowchart of the JaVa virtual machine optimal control process.
- step S110 the memory size required for warning and recovery is received (step S110), and the type of warning is determined (step S111).
- step S111 If the warning of the danger of OutOfMemory (warning w1 ) is found in step S111, the Java virtual machine 1 that has issued the warning is terminated after the application is terminated (step S112 ).
- the alternative Java virtual machine 1 ' is started (step S113), and the processing ends.
- the optimal memory size is specified as an option based on the memory size required for the received recovery.
- step S111 If a warning of performance degradation due to insufficient memory (warning w2) is issued in step S111, the received memory size required for recovery is saved (step S114), and the process ends.
- the optimal memory size is specified in the options based on the saved memory size required for recovery.
- step S111 If the warning of the risk of deadlock is found in step S111 (warning w7), a warning of the risk of deadlock is recorded in the log (step S115). This is notified to the operation manager (step S116), and the processing ends.
- this system has multiple stages of improved algorithms for judging danger according to the various garbage collections used by each JaVa virtual machine, so that more accurate danger judgment can be performed. Can be.
- the means of measuring and analyzing the data of the Java virtual machine and notifying the danger and the means of controlling the Java virtual machine of the upper layer are directly communicated by interprocess communication. Since they are connected and can automatically issue warnings and provide feedback without human intervention, the risk of delaying recovery from a problem to recovery is reduced.
- the present invention monitors the state of the execution environment of the middle tier, which is located on the server side, during the operation of an application in a three-tier system consisting of the client tier, middle tier, and database tier that constitute an enterprise application. By avoiding the state, it can be used to operate the application stably.
- an execution environment of the middle tier deployed on the server side for example, there is an execution system such as a Java virtual machine having a memory management function by garbage collection.
- the means for measuring and analyzing data such as the JaVa virtual machine and notifying the danger and the means for controlling the JaVa virtual machine in the upper layer (application server) are linked with each other to generate a warning. Notifications and feed packs can be performed automatically without manual intervention, so that the risk of memory shortage in the execution environment can be efficiently avoided.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Memory System (AREA)
Abstract
Measurement/analysis means (10) in a Java virtual machine (1) includes a function for measuring data when a garbage collection event occurs and a function for periodically measuring data. The measurement/analysis means (10) analyzes the measured data and predicts danger of memory shortage. Here, danger prediction is performed by the algorithm corresponding to the garbage collection type used by the Java virtual machine (1). The alarm of danger of memory shortage predicted is notified to an application server (2) by analysis result notification means (31) such as inter-process communication. Moreover, the measurement/analysis means (10) calculates a memory amount required for evading the danger of memory shortage predicted. The calculated memory amount is notified to the application server (2) by the analysis result notification means (31) such as the inter-process communication in the same way as the alarm.
Description
実行環境の危険予測/回避方法, システム, プログラムおよびその記録媒体 技術分野 , Execution environment danger prediction / avoidance method, system, program and its recording medium
本発明は, アプリケーションプログラムを安定に運用させるための技術に関し , 特に, エンタープライズアプリケーションを構成するクライアント層, 中間層 The present invention relates to a technology for stably operating an application program, and in particular, a client layer and a middle layer constituting an enterprise application.
, データベース層の 3階層システムにおいて, サーバ側に配置される中間層の実 行環境の状態をアプリケーションの運用時に監視し, 実行環境が危険な状態にな ることを回避することで, アプリケーションを安定に運用させるための実行環境 の危険予測 Z回避技術に関する。 In a three-tier system with a database layer, the execution environment of the middle tier, which is located on the server side, is monitored during the operation of the application to prevent the execution environment from becoming dangerous, thereby stabilizing the application. Forecasting the danger of the execution environment for operating the system.
上記のエンタープライズアプリケーションとしては, 主に J a v a (登録商標 ) を使用した W e bアプリケーションなどがある。 Examples of the enterprise applications include a Web application mainly using Java (registered trademark).
また, 上記のエンタープライズアプリケーションの構成には, さらに中間層を 2階層に分けた 4階層システムもある。 In the configuration of the enterprise application described above, there is also a four-layer system in which the middle layer is divided into two layers.
また, 上記のサーバ側に配置される中間層の実行癀境としては, 主に J a V a 仮想マシン (Java Virtual Machine) などがある。 The execution environment of the middle tier located on the server side is mainly a Java Virtual Machine (Java Virtual Machine).
本発明は, J a V aのようなガベージコレクションなどのメモリ管理機能をも つた実行系を対象としている。 背景技術 The present invention is intended for an execution system having a memory management function such as garbage collection such as JaVa. Background art
以下, 説明のために J a v aを例として用いるものとする。 Hereinafter, J a v a will be used as an example for explanation.
第 1図は, J a V aアプリケーションの運用環境の例を示す図である。 第 1図 の例では, J a V aアプリケーションの実行環境 1 0 0 0におけるアプリケーシ ョンの運用時のデータが収集され, そのときに収集されたデータを性能分析ツー ル 2 0 0 0が分析する。 性能分析ツール 2 0 0 0における分析結果を J a V aァ プリケーシ ンの実行環境 1 0 0 0にフィードバックすることにより, 最適な J a V aアプリケーションの運用環境を構築している。 Fig. 1 is a diagram showing an example of the operating environment of a Java application. In the example of Fig. 1, data during the operation of the application in the execution environment 100 of the JaVa application is collected, and the collected data is analyzed by the performance analysis tool 2000. I do. By feeding back the analysis results of the performance analysis tool 2000 to the execution environment 100 of the JaVa application, an optimal operation environment for the Java application is constructed.
J a v aアプリケーションの実行環境 1 0 0 0において, O S 1 0 1 0の上位
層に J a v a仮想マシン 1 0 2 0があり, その上位層にアプリケーションサーバIn the execution environment of Java application 100, higher than OS 110 In the layer, there is a Java virtual machine 100, and in the upper layer, the application server
1 0 3 0がある。 アプリケーションサーバ 1 0 3 0の例として, E J B (Enterp rise JavaBeans) や S e r v 1 e tなどを動かすプログラムである E J Bコンテ ナゃ S e r v 1 e tコンテナなどがある。 アプリケーションサーバ 1 0 3 0の上 位層で, S e r v l e t , J S P (Java Server Pages ) , E J B等のアプリケ ーション 1 0 4 0が動作する。 W e bサーバ 1 0 5 0はクライアントからの要求 を受け付ける。 J a V aアプリケーションの運用状況を最もよく知っているのは , 実行環境 1 0 0 0の中で最下層に位置して実際にアプリケーションを実行して いる J a V a仮想マシン 1 0 2 0である。 There is 1 0 3 0. As an example of the application server 1,030, there is an EJB container ゃ Serv1et container which is a program for operating EJB (Enterprise JavaBeans) and Serv1et. In the upper layer of the application server 10030, applications 104 such as Servleet, Java Server Pages (JSP), and EJB are operated. The Web server 1050 accepts a request from the client. The most familiar with the operation status of the J aV a application is the J a V a virtual machine 1 0 0 which is located at the lowest level in the execution environment 1 It is.
性能分析ツール 2 0 0 0において, 実行環境 1 0 0 0から収集されたデータは 性能データベース 2 0 1 0に蓄積され, 蓄積されたデータは分析プログラム 2 0 In the performance analysis tool 2000, data collected from the execution environment 1000 is stored in the performance database 210, and the stored data is stored in the analysis program 200.
2 0によって解析される。 分析結果をモニタリングツール 2 0 3 0で表示したりParsed by 20. Display the analysis results with the monitoring tool 203
, ドリルダウンツール 2 0 4 0でより細かく分析したりする。 また, サービスレ ベル診断 2 0 5 0により, クライアントからの要求に対してサーバが決められた 時間内に応答しているか, 現在のサービスの状態が満たされているかなどを診断 する。 , Use the drill-down tool 204 for more detailed analysis. In addition, the service level diagnosis 250 diagnoses whether the server responds to the request from the client within the specified time or whether the current service status is satisfied.
第 2図は, 従来の J a v aアプリケーションの運用環境の分析方法の例を示す 図である。 第 2図において, J a V aアプリケーションを運用するサーバ 3 0 0 0 ( J a V aアプリケーションの実行環境 1 0 0 0を有するサーバ) から収集さ れたデータは, 性能データベース 2 0 1 0を備えるデータ蓄積装置 3 0 1 0に蓄 積される。 性能分析装置 3 0 2 0は, データ蓄積装置 3 0 1 0に蓄積されたデー タを参照し, そのデータを分析プログラム 2 0 2 0によって解析する。 運用管理 者 3 0 3 0は, 性能分析装置 3 0 2 0において, モニタリングツール 2 0 3 0に より分析結果をグラフ表示したり, ドリルダウンツール 2 0 4 0により詳細な分 析を行ったり, サービスレベル診断 2 0 5 0によりサービスレベルの診断を行う エンタープライズアプリケーションの安定運用に関する従来の技術としては, 以下のような技術がある。 Figure 2 shows an example of a conventional method for analyzing the operating environment of a Java application. In Fig. 2, the data collected from the server 300 running the Java application (the server having the Java application execution environment 100) is stored in the performance database 210. It is stored in the data storage device 31010 provided. The performance analyzer 320 refers to the data stored in the data storage device 310, and analyzes the data using the analysis program 220. The operation administrator 3003 can use the performance analyzer 30020 to display analysis results in a graph using the monitoring tool 2300, perform detailed analysis using the drilldown tool 204, The following technologies are known as conventional technologies related to stable operation of enterprise applications that perform service level diagnosis by using service level diagnosis 20000.
(第 1の従来技術)
サービスの処理性能やサーバ側のシステム性能を運用管理者がモニタリングッ ールで監視する技術がある。 この技術では, 測定したデータの分析を行い, しき い値と連携させてトラプルの兆候を予測 ·検出し, それを運用管理者に通知する 。 また, 測定したデータを分析ツールによって解析することで, 運用状況のグラ フ化ゃ評価, 性能データの詳細な分析 (ドリルダウン) を行い, 性能低下のボト ルネックの特定などを支援する。 第 2図の例が, この第 1の従来技術の例となる 上記のサービスの処理性能とは, クライアントからの要求に対して何秒間で応 答できるかなどである。 また, 上記のサーバ側のシステム性能とは, C PU使用 率, メモリ使用量, ネットワーク使用率などである。 (First conventional technology) There is a technology in which the operation manager monitors the processing performance of services and the system performance of the server side using monitoring tools. This technology analyzes the measured data, predicts and detects signs of a trap in conjunction with the threshold, and notifies the operation manager of it. In addition, by analyzing the measured data with an analysis tool, the operation status can be graphed and evaluated, and detailed analysis of performance data (drill-down) can be performed to support the identification of bottlenecks in performance degradation. The example in Fig. 2 is an example of this first prior art. The processing performance of the above service is how many seconds it can respond to a request from a client. The server-side system performance described above includes CPU usage, memory usage, and network usage.
第 1の従来の技術が記載された文献には, 以下のようなものがある。 The following documents describe the first conventional technology.
非特許文献 1 Non-patent document 1
S y s t e mw a l k e r , パフォーマンス管理製品, 富士通株式会社, (U R L : http: //systemwalker. fujitsu. com/ jp/com/conc/pafo. html ) Systemw alker, Performance Management Products, Fujitsu Limited, (URL: http: // systemwalker. Fujitsu. Com / jp / com / conc / pafo.html)
非特許文献 2 Non-patent document 2
システム管理/ T i v o 1 i, パフォーマンス &アベイラビリティ製品, 日本 I BM株式会社, (UR L : http://www-6. ibm. com/jp/software/tivoli/produc ts/inaex. html#per ) System Management / Tivo 1 i, Performance & Availability Products, Japan IBM Co., Ltd. (UR L: http://www-6.ibm.com/jp/software/tivoli/products/inaex.html#per)
非特許文献 3 Non-patent document 3
P r e c i s e / I n d e p t h f o r J 2 E E, 日揮情報ソフトウェア 株式会社, (U R L : http: //www. jsys-products. com/product/ pre _ md _ Zee /document, html) JEEE, JGC Information Software, Inc., (URL: http: //www.jsys-products.com/product/pre_md_Zee/document, html)
(第 2の従来技術) (2nd conventional technology)
処理性能が異なるサーバが混在する環境において, サーブレツトゃ E J Bなど のサービスの処理時間を測定し, 処理の速いサーバを自動選択してクライアント からの要求を振り分けることで, システム全体としての処理を効率的に行う技術 がある。 In an environment where servers with different processing performance coexist, the processing time of services such as Servlet ゃ EJB is measured, the server with the highest processing speed is automatically selected, and requests from clients are distributed to efficiently process the entire system. There is a technology to perform.
第 2の従来の技術が記載された文献には, 以下のようなものがある。 The following documents describe the second conventional technology.
非特許文献 4
I BM e S e r v e r , 異機種間ワークロード管理, 日本 I BM株式会社, 、U"R L : http: //w w-6. ibm. com/ jp/ servers/ eserver/ ac/ tech/ index2― 1. html ) - (第 3の従来技術) Non-patent document 4 I BM e Server, Heterogeneous Workload Management, Japan I BM Co., Ltd., U "RL: http: //www-6.ibm.com/jp/servers/eserver/ac/tech/index2-1 html)-(3rd prior art)
J a V aのメモリ量を調べる A P I (Application Program Interface ) を使 つて J a v a仮想マシンが管理しているメモリ (ヒープ) サイズの定期調査を行 い, メモリ不足を検出する技術がある。 この技術では, メモリの空きがしきい値 より不足した場合に, ガベージコレクションを強制実行することにより, メモリ の空きの回復を促している。 There is a technology that detects the memory shortage by periodically examining the memory (heap) size managed by the Java virtual machine using an application program interface (API) that checks the amount of Java memory. In this technology, when the free space of the memory is less than the threshold value, the garbage collection is forcibly executed to encourage the recovery of the free memory.
第 3の従来の技術が記載された文献には, 以下のようなものがある。 The following documents describe the third conventional technology.
非特許文献 5 Non-patent document 5
W e b L o g i c S e r v e r , J a v a仮想、マシンのチューニング, 自動 的な低メモリ状態の検出とガベージコレクションの強制, 日本 BE Aシステムズ 株式会社, (U R L : http://edocs. beasys. co. jp/e-docs/wls/docs70/perf orm/ JVMTuning. html#489159 ) Web Logic Server, Java Virtual, machine tuning, automatic detection of low memory status and forced garbage collection, Japan BEA Systems Corporation, (URL: http://edocs.beasys.co.jp / e-docs / wls / docs70 / perform / JVMTuning.html # 489159)
(第 4の従来技術) (4th conventional technology)
J a v a仮想マシン · プロファイラインタフェースにより J a V a仮想マシン で発生したィベントを計測し, 実行時間の長いメソッド (ボトルネック) の検出 や, メモリリークの危険性のあるオブジェクトの検出, デッドロックの危険性の あるスレツ ドの検出を行う技術がある。 Java virtual machine · The profiler interface measures events generated in the Java virtual machine, detects long-running methods (bottlenecks), detects objects with memory leaks, and risks deadlocks. There is a technology that detects a possible thread.
J a V a仮想マシン ·プロファイラインタフェースにより計測されるィベント には, "ガベージコレクションを開始した 終了した" , "J a v aのメソッド に入った 終了した" , "オブジェクトを割り当てた/解放した" , "J a v a スレッ ドの状態が遷移した" などがある。 Events that are measured by the Java Virtual Machine · Profiler interface include "garbage collection started and finished", "Java method entered and finished", "object allocated / released", " The status of the Java thread has changed. "
しかし, 以上のようなエンタープライズアプリケーションの安定運用に関する 従来の技術には, 以下のような問題があった。 However, the conventional technologies for stable operation of enterprise applications as described above have the following problems.
(第 1の従来技術の問題点) (Problem of the first prior art)
第 1の従来技銜では, 様々なデータを採取してそれをグラフなどで表示して監 視するモニタリングツールは, トラブル予測と回避のステップに人間の介在を必
要とするため, タイムリー性と自律性に欠けていた。 特に, ドリルダウンツール で分析する方法ではタイムリー性はまったくなかった。 また, データの収集, サ 一ビスレベル診断 (分析) , 警告の通知までは自動的に行われていても, 警告を 受けてからの対処は自動化されていないものが多かった。 さらに, データをどの くらい収集していつ分析を行うかなどの条件が, 危険性の発見のタイミングに影 響していた。 In the first conventional technique, a monitoring tool that collects various data, displays it in a graph, etc. and monitors it requires human intervention in the steps of trouble prediction and avoidance. In short, it lacked timeliness and autonomy. In particular, there was no timeliness in the method of analysis using a drill-down tool. In addition, even though data collection, service level diagnosis (analysis), and notification of warnings were performed automatically, many measures were not automated after receiving a warning. In addition, conditions such as how much data is collected and when analysis is performed have affected the timing of danger discovery.
(第 2の従来技術の問題点) (Problem of the second conventional technology)
第 2の従来技術では, 処理が自動的に行われているが, それはあくまでサービ ス時間を計測して負荷分散するロードバランスの仕組みであって, 収集した様々 なデータを分析して危険の要因を発見する技術ではなかった。 In the second conventional technology, the processing is performed automatically. However, this is a load balancing mechanism that measures the service time and distributes the load. Was not a technology to discover.
(第 3の従来技術の問題点) (Problem of the third conventional technology)
第 3の従来技術では, 処理が自動的に行われているが, トラブルを予測するァ ルゴリズムに問題があった。 J a V a仮想マシンのメモリ (ヒープ) 不足はトラ プルの主要因ではあるが, 空き容量としきい値を比較してヒープ不足を検出する だけでは必ずしも正しい判断ができているとはいえない。 In the third conventional technology, processing is performed automatically, but there is a problem with the algorithm for predicting trouble. Memory (heap) lack of J a V a virtual machine is the main cause of tiger pull, but it can not be said that it is always right decision only detect-heap by comparing the available capacity and the threshold value.
ヒープが不足した場合には, J a V a仮想マシンは自動的にガベージコレクシ ヨンを実行してメモリの回復を図るが, 上記第 3の従来技術では, それより前に 強制的なガベージコレクションでメモリの回復を図っている。 この技術は, メモ リの使用量がしきい値を超えた後に徐々にメモリ使用量が増え, 自動的なガベー ジコレクションが起きるまでに比較的長い時間がかかる場合には, 有効かもしれ ない。 When the heap becomes insufficient, the JaVa virtual machine automatically executes garbage collection to recover memory. However, in the third conventional technique, a forced garbage collection is performed before that. We are trying to recover memory. This technique may be useful if the memory usage gradually increases after the memory usage exceeds the threshold and it takes a relatively long time for automatic garbage collection to occur.
し力 し, すべてがこのような状況であるとは限らない。 例えば, メモリの絶対 量が不足していてガベージコレクションの頻度が高い場合には, 強制的にガベー ジコレクションを起こしてもすぐに次のガベージコレクションが起きてしまい, 負荷の高いガベージコレクション処理を何度も行ってしまうことになる。 However, not all situations are such. For example, if the absolute amount of memory is insufficient and the frequency of garbage collection is high, the next garbage collection will occur immediately after the forced garbage collection occurs. I will go again.
(第 4の従来技術の問題点) (4th problem of the prior art)
第 4の従来技術では, J a V a仮想マシン ·プロファイラインタフェースで提 供されているイベントの発行頻度が非常に高く, そのために J a V a仮想マシン に余分な負荷をかけてしまっていた。 また, あらかじめ決められたインタフエ一
スを使用しているため, 危険性の発見に必要な情報がなかったり, できることの 自由度が低かったりしていた。 C P U使用率の高いシーケンスコール (ボトルネ ック) やメモリリークを見つけるツールにはプロファイラインタフェースを使つ たものが多いが, 負荷が比較的に高く, これらはアプリケーションの運用時では なくテストの段階で行われるべきものであった。 In the fourth prior art, the events provided by the JaVa virtual machine / profiler interface are issued very frequently, which places an extra load on the JaVa virtual machine. In addition, a predetermined interface As a result, they did not have the information they needed to find the danger, or they had a low degree of freedom. Many tools that find sequence calls (bottlenecks) or memory leaks with high CPU usage use a profiler interface, but the load is relatively high, and these are not used during application operation but during the testing stage. Was to be done.
以上の従来技術の問題点を解決し, アプリケーシヨンを安定に運用させてミッ ションクリティカルなシステムを実現するには, 異常が発生する前にトラブルの 危険を察知して回避する必要がある。 そのためには, 危険性を発見してから回避 するまでに, 以下の条件を満たす必要がある。 In order to solve the above problems of the conventional technology and realize a mission-critical system by operating applications stably, it is necessary to detect and avoid the danger of trouble before an error occurs. To do so, the following conditions must be met from the discovery of the danger to its avoidance.
( 1 ) トラプルを予測するためのデータ採取の負荷を軽くし, アプリケーショ ンの運用に負荷を与えない。 (1) Reduce the load of data collection for predicting traps, and do not impose a load on application operation.
( 2 ) トラブルを予測する判断材料とアルゴリズムには適切なものを用い, よ り正確な予測を行う。 . (2) Use appropriate judgment materials and algorithms for predicting troubles, and make more accurate predictions. .
( 3 ) データの測定からトラブルを予測, 通知, 回避するまでの処理を, 短時 間かつタイムリーに行う。 さらに, これらのステップは, すべて自動的 (自律的 ) に行われることが望ましい。 (3) Perform processing from data measurement to predicting, notifying, and avoiding problems in a short time and in a timely manner. In addition, all of these steps should be performed automatically (autonomously).
本発明は, このような状況に鑑みてなされたものであり, データ採取の負荷を 軽くし, 適切な判断材料とアルゴリズムとからより正確な危険性の予測を行い, データの測定からトラブルの予測, 通知, 回避までの処理を, 短時間かつタイム リーに行い, それらの処理を自動的に実行することが可能となる技術を提供する ことを目的とする。 発明の開示 The present invention has been made in view of such a situation, and reduces the load of data collection, performs more accurate risk prediction from appropriate judgment materials and algorithms, and predicts trouble from data measurement. The purpose of the present invention is to provide a technology that can perform processing up to notification, avoidance, and avoidance in a short time and in a timely manner, and can automatically execute the processing. Disclosure of the invention
本発明は, 例えばエンタープライズアプリケーションの中間層の実行環境にお いて, メモリ不足の危険性を予測し, その危険を回避するための実行環境の危険 予測/回避方法である。 この危険予測/回避方法は, ガベージコレクションのィ ベント発生時に, メモリ状態に関するデータを測定し, 測定されたデータからメ モリ不足の危険性を予測し, 予測されたメモリ不足の危険性に対する警告を他の アプリケーションに通知する。 また, 予測されたメモリ不足の危険性を回避する
ために必要なメモリ量を算出し, 算出されたメモリ量を通知する。 また, メモリ 不足の危険性の予測は, ガベージコレクションの種類ごとに対応するァルゴリズ ムを用いて行う。 The present invention is, for example, a method for predicting and avoiding the danger of memory shortage in an execution environment of a middle tier of an enterprise application, and a method for estimating and avoiding the danger of the execution environment to avoid the danger. This danger prediction / avoidance method measures the data related to the memory status when a garbage collection event occurs, predicts the danger of insufficient memory from the measured data, and issues a warning about the predicted danger of insufficient memory. Notify other applications. It also avoids the predicted danger of running out of memory Calculate the amount of memory required for this and notify the calculated amount of memory. In addition, prediction of the danger of memory shortage is performed using algorithms that correspond to each type of garbage collection.
具体的には, 例えば, エンタープライズアプリケーションの中間層の実行環境 として J a V a仮想マシンを例とした場合, ガベージコレクションのィベント発 生時にその発生時刻ゃメモリ使用量などのデータを測定し, それ以外は定期的に メモリの使用量などを計測する。 測定されたデータをもとに, メモリ不足エラー (以下, OutOfMemory という) の危険性やメモリ不足による性能低下などを予測 し, それらの警告を通知する。 また, 危険性を回避するために必要なメモリ量を 計算する。 メモリ不足の危険性の予測には, 基本的なガベージコレクションに合 わせた予測だけではなく, 世代型ガベージコレクションなどの特殊なガベージコ レクシヨンに合わせた予測も行う。 Specifically, for example, when a Java virtual machine is used as the execution environment of the middle tier of an enterprise application, when an event of garbage collection occurs, data such as the time of occurrence / memory usage is measured. Other than the above, the memory usage is regularly measured. Based on the measured data, it predicts the danger of a memory shortage error (hereinafter referred to as OutOfMemory) or performance degradation due to memory shortage, and notifies them of such warnings. Also, calculate the amount of memory required to avoid danger. To predict the danger of memory shortage, predictions are made not only for basic garbage collection but also for special garbage collection such as generational garbage collection.
本発明による実行環境の危険予測 回避方法によれば, ガベージコレクシヨン 以外のイベント発生時 (例えば, メモリの割り当てのイベント発生時など) には メモリ使用量などの測定を行わず, 主にガベージコレクションのィベント発生時 の測定と, 必要に応じて比較的長い周期での定期的な測定によって, メモリ使用 量などの測定を行うため, アプリケーションの運用に負荷をかけずにデータの測 定を行うことができる。 また, 本発明による実行環境の危険予測 回避方法によ れば, 予測されたメモリ不足の危険性を回避するために必要なメモリ量を計算し , その計算されたメモリ量を通知するため, アプリケーションの実行環境の状態 回復を早く, 容易に行うことができる。 また, 本発明による実行環境の危険予測 /回避方法によれば, ガベージコレクションの種類ごとに対応するアルゴリズム によって危険性の判断を行うため, より正確な危険性の判断を行うことができる 以上のような本発明による実行環境の危険予測ノ回避方法は, コンピュータと ソフトウエアプログラムとによって実現することができ, そのプログラムをコン ピュータ読み取り可能な記録媒体に記録することも, ネットワークを通して提供 することも可能である。 このプログラムは, ハードディスク等の媒体にインス ト ールされ, 主記憶装置に展開されて C P Uによって実行される。 また, 記録媒体
としては, C D— R OMや D V D等の可搬型記録媒体が考えられる。 図面の簡単な説明 According to the method for avoiding danger prediction of the execution environment according to the present invention, when an event other than garbage collection occurs (for example, when an event of memory allocation occurs), the memory usage is not measured. Since the measurement of memory usage is performed by measurement at the time of event occurrence and periodic measurement at a relatively long cycle as necessary, data can be measured without imposing a load on application operation. it can. Also, according to the method for avoiding danger prediction of the execution environment according to the present invention, the amount of memory required to avoid the predicted danger of memory shortage is calculated, and the calculated amount of memory is notified. The execution environment can be quickly and easily recovered. In addition, according to the method for estimating and avoiding danger of the execution environment according to the present invention, danger is determined by an algorithm corresponding to each type of garbage collection, so that a more accurate danger can be determined. The method for avoiding danger prediction of the execution environment according to the present invention can be realized by a computer and a software program, and the program can be recorded on a computer-readable recording medium or can be provided through a network. It is. This program is installed on a medium such as a hard disk, expanded in main storage, and executed by the CPU. In addition, recording media Portable recording media such as CD-ROMs and DVDs are conceivable. BRIEF DESCRIPTION OF THE FIGURES
第 1図は, J a v aアプリケーションの運用環境の例を示す図である。 Fig. 1 is a diagram showing an example of the operating environment of the Java application.
第 2図は, 従来の J a V aアプリケーションの運用環境の分析方法の例を示す 図である。 Figure 2 shows an example of a conventional method for analyzing the operating environment of a Java application.
第 3図は, 危険予測/回避システムの構成例を示す図である。 Fig. 3 is a diagram showing an example of the configuration of the danger prediction / avoidance system.
第 4図は, 設定データの例を示す図である。 FIG. 4 is a diagram showing an example of setting data.
第 5図は, 測定 '分析手段を説明する図である。 Fig. 5 is a diagram for explaining the measurement and analysis means.
第 6図は, ガベージコレクションの発生間隔とメモリ使用量に関する代表的な 3つの状態を示す図である。 Fig. 6 is a diagram showing three typical states of garbage collection intervals and memory usage.
第 7図は, 警告を行うべき状態を説明する図である。 FIG. 7 is a diagram illustrating a state in which a warning should be given.
第 8図は, 世代型ガベージコレクションにおけるガベージコレクションの発生 間隔とメモリ使用量に関する状態を説明する図である。 Fig. 8 is a diagram explaining the garbage collection interval and memory usage in generational garbage collection.
第 9図は, 溢れ量の測定を説明する図である。 Fig. 9 is a diagram explaining the measurement of the overflow amount.
第 1 0図は, ダイナミックにサイズを変更する世代型ガベージコレクションに おけるガベージコレクシヨンの発生間隔とメモリ使用量に関する状態を説明する 図である。 Fig. 10 is a diagram for explaining the state of garbage collection intervals and memory usage in generational garbage collection that dynamically changes size.
第 1 1図ないし第 1 5図は, メモリ使用量測定 ·分析処理フローチャートであ る。 Figures 11 to 15 are flowcharts of the memory usage measurement and analysis process.
第 1 6図および第 1 7図は, メモリ使用量測定 ·分析手段の警告対象となる状 態の例を示す図である。 Fig. 16 and Fig. 17 show examples of the status of the memory usage measurement and analysis means that is the target of warning.
第 1 8図は, スレツド測定■分析処理フローチャートである。 FIG. 18 is a flowchart of the thread measurement / analysis processing.
第 1 9図は, J a V a仮想マシンとアプリケーションサーバとの連携による J a v a仮想マシンへの処理の振り分けを示す図である。 Fig. 19 is a diagram showing the distribution of processing to the Java virtual machine by cooperation between the Java virtual machine and the application server.
第 2 0図は, J a V a仮想マシンとアプリケーションサーバとの連携を示す図 である。 Figure 20 is a diagram showing the cooperation between the Java virtual machine and the application server.
第 2 1図は, 分析結果通知処理フローチャートである。 FIG. 21 is an analysis result notification processing flowchart.
第 2 2図は, コマンド通知処理フローチャートである。
第 23図は, J a V a仮想マシン最適制御処理フローチャートである。 発明を実施するための最良の形態 FIG. 22 is a flowchart of a command notification process. FIG. 23 is a flowchart of the JaVa virtual machine optimal control process. BEST MODE FOR CARRYING OUT THE INVENTION
第 3図は, 危険予測/回避システムの構成例を示す図である。 第 3図において , J a V a仮想マシン 1とその上位層のアプリケーションサーバ 2とは, J a v a仮想マシン連携手段 3により連携している。 Fig. 3 is a diagram showing an example of the configuration of the danger prediction / avoidance system. In FIG. 3, the Java virtual machine 1 and the application server 2 in the upper layer are linked by the Java virtual machine linking means 3.
J a v a仮想マシン 1は, 測定 '分析手段 1 0を備える。 また, 測定 ·分析手 段 1 0は, メモリ使用量測定■分析手段 1 1と, スレツド測定■分析手段 1 2と , 設定データ 1 00とを備える。 The Java virtual machine 1 is provided with measurement and analysis means 10. The measurement / analysis means 10 includes a memory usage measurement / analysis means 11, a thread measurement / analysis means 12, and setting data 100.
アプリケーションサーバ 2は, J a V a仮想マシン制御手段 20を備える。 ま た, その J a V a仮想マシン制御手段 20は, J a v a仮想マシン最適制御手段 2 1を備える。 The application server 2 includes a Java Virtual Machine control means 20. Also, the Java virtual machine control means 20 includes a Java virtual machine optimum control means 21.
J a V a仮想マシン連携手段 3は, 分析結果通知手段 3 1と, コマンド通知手 段 32とを備える。 The JaVa virtual machine cooperation means 3 includes an analysis result notifying means 31 and a command notifying means 32.
第 4図は, 設定データの例を示す図である。 測定 ·分析手段 1 0が備える設定 データ 1 00は, 第 4図に示すように, メモリ使用量測定フラグ 1 0 1 , スレツ ド測定フラグ 1 02, GC発生間隔警告しきい値 (t h l) 1 03, OutOfMemor y警告しきい値 A ( t h 2) 1 04, OutOfMemory警告しきい値 B ( t h 3) 1 0 5, メモリ不足警告しきい値 ( t h 4) 1 06, メモリ空き回復しきい値 ( t h 5) 1 0 7, n e w世代不足警告しきい値 ( t h 6) 1 08, 溢れ量警告しき い値 (t h 7) 1 09, デッドロック警告しきい値 ( t h 8) 1 10のデータで ある。 なお, 上記 GCはガベージコレクションを意味する。 以下, 場合によって ガベージコレクションを GCと記載する。 FIG. 4 is a diagram showing an example of setting data. As shown in Fig. 4, the setting data 100 provided by the measurement and analysis means 10 is the memory usage measurement flag 101, the thread measurement flag 102, the GC generation interval warning threshold (thl) 103 , OutOfMemory warning threshold A (th 2) 104, OutOfMemory warning threshold B (th 3) 1 0 5, Out of memory warning threshold (th 4) 1 06, Memory free recovery threshold (th 5) 107, new generation shortage warning threshold (th6) 108, overflow warning threshold (th7) 109, deadlock warning threshold (th8) 110. The above GC means garbage collection. Hereinafter, garbage collection is sometimes referred to as GC.
設定データ 1 00におけるこれらの値は, アプリケーションサーバ 2がコマン ドを発行して設定することができる。 また, 事前にまたは随時, 図示省略した設 定用プログラムを用いてシステム管理者等が設定することもできる。 These values in the setting data 100 can be set by the application server 2 issuing a command. In addition, a system administrator or the like can set in advance or at any time using a setting program (not shown).
以下, 各手段の動作を説明するが, 最初に, J a V a仮想マシン 1内でデータ の測定と分析, 危険性の予測を行う部分について説明し, 次に, 分析結果をアブ リケーションサーバ 2に通知して最適な運用環境になるようにフィードパックす
る部分について説明する。 The operation of each means is described below. First, the part that measures, analyzes, and predicts the danger of data in the JaVa virtual machine 1 will be described. And feed packs for optimal operation. Will be described.
本発明では, 第 3図に示すように, J a V a仮想マシン 1がその内部に測定 - 分析手段 1 0を備える。 データの測定 ·分析, トラプル発生の予測は, J a v a 仮想マシン 1の内部で行われる。 よって, 本発明では, 測定データをデータべ一 スなどに一度出力して分析プログラムによって判断するような第 1の従来技術に 比べて, データの測定から分析, トラブルの予測までをタイムリーに行うことが できる。 In the present invention, as shown in FIG. 3, the JaVa virtual machine 1 includes a measurement-analysis means 10 therein. Measurement and analysis of data and prediction of the occurrence of traps are performed inside the Java virtual machine 1. Therefore, in the present invention, the process from data measurement to analysis and trouble prediction is performed in a more timely manner than in the first conventional technology in which measured data is output once to a database or the like and judged by an analysis program. be able to.
第 5図は, 測定 .分析手段を説明する図である。 J a V a仮想マシン 1内の測 定 -分析手段 1 0は, 定期的に (例えば, 数秒間隔に) データを計測する機能 1 0 αと, ガベージコレクションのィベント発生時にデータを計測する機能 1 0 β との 2つのデータ測定機能を持っている。 Fig. 5 illustrates the measurement and analysis means. Measurement inside the J aV a virtual machine 1-The analysis means 10 is a function that periodically measures data (for example, at intervals of several seconds) 10 α and a function that measures data when a garbage collection event occurs 1 It has two data measurement functions of 0 β.
J a V a仮想マシン 1で使用されているメモリ (ヒープ) の量は, "メモリの 割り当て 解放" のイベント発生時に測定されたものが正確な量である。 しかし , イベントの発生頻度は非常に高く, すべてのイベント発生時にデータを測定す るとアプリケーションの運用に負荷がかかってしまう。 メモリ使用量の分析と危 険性の予測は, 定期的に取得するデータで行うことが可能であり, "メモリの割 り当て Z解放" ィベント発生時にデータの測定を行う必要はない。 The exact amount of memory (heap) used in the JaVa virtual machine 1 is measured at the time of the "memory release" event. However, the frequency of events is extremely high, and measuring data when all events occur places a burden on application operations. Analyzing memory usage and predicting danger can be performed on data that is acquired periodically, and there is no need to measure data when a “memory allocation Z release” event occurs.
測定 '分析手段 1 0は, アプリケーションの運用に負荷をかけずに正確にデー タを測定できるように, 測定する項目に応じて 2つのデータ測定機能 (1 0 α , 1 0 j3 ) から使用するデータ測定機能を選択する。 Measurement 'Analysis means 10 is used from two data measurement functions (10α, 10j3) according to the items to be measured so that data can be accurately measured without imposing a load on application operation. Select the data measurement function.
第 3図に示すように, J a V a仮想マシン 1内の測定 '分析手段 1 0は, メモ リ使用量の測定と分析を行うメモリ使用量測定 ·分析手段 1 1と, J a V aスレ ッドの測定と分析を行うスレツド測定 ·分析手段 1 2とを備える。 As shown in Fig. 3, the measurement inside the JaVa virtual machine 1 is performed by the analysis means 10 and the memory usage measurement and analysis means 11 for measuring and analyzing the memory usage. Thread measurement and analysis means 12 for measuring and analyzing the thread are provided.
まず, メモリ使用量測定 ·分析手段 1 1について説明する。 メモリ使用量測定 •分析手段 1 1は, J a V a仮想マシン内 1で, 使用メモリ (ヒープ) 量の定期 的な測定とガベージコレクション発生時の測定とを行い, それらの測定で得られ たデータを分析する。 分析の結果, メモリ量が不足していて OutO预 emory のエラ 一が発生する危険性がある場合や, メモリ不足が性能に悪影響を及ぼしている場 合などには, そのことへの警告を行う。 また, そのときの状態の回復に必要なメ
モリサイズを見積もる。 First, the memory usage measurement and analysis means 11 will be described. Memory usage measurement • Analytical method 11 1 periodically measures the amount of used memory (heap) and measures the occurrence of garbage collection in the JaVa virtual machine 1, and obtains the results of those measurements. Analyze the data. As a result of the analysis, if there is a danger that OutMemory errors may occur due to insufficient memory, or if insufficient memory adversely affects performance, a warning is given. . It is also necessary to restore the status at that time. Estimate the moly size.
メモリ使用量測定 ·分析手段 1 1は, J a v a仮想マシン 1が使用中のメモリ 量を, 定期的な間隔で測定する。 このときの測定間隔は, & &仮想マシン1 を起動するときのォプションゃ, アプリケーションサーバ 2内の J a V a仮想マ シン制御手段 2 0 (詳細は後述) からのコマンドにより, 設定ノ変更可能である 。 また, メモリ使用量測定 '分析手段 1 1は, ガベージコレクションのイベント 発生時に, データを測定する。 Memory usage measurement · Analysis unit 11 measures the amount of memory used by Java virtual machine 1 at regular intervals. The setting of the measurement interval at this time can be changed by a command from the & ゃ virtual machine control means 20 (the details will be described later) of the option 1 when starting the && virtual machine 1 and the application server 2 It is. In addition, the memory usage measurement 'analysis means 11 measures data when a garbage collection event occurs.
】 & 3仮想マシン1は, 自分自身の動作状況をよく知っているため, 自身内 でトラブルの危険性を検出することができる。 J a V a仮想マシン 1内でのトラ ブルで一番深刻なものは, メモリ (ヒープ) 不足である。 このメモリ不足によつ てマシン性能が低下し, ひどい場合には処理が止まってしまうこともある。 ] & 3 Since the virtual machine 1 knows its own operation status well, it can detect the risk of trouble within itself. The most serious problem in the JaVa virtual machine 1 is a lack of memory (heap). Due to this memory shortage, machine performance is degraded, and in severe cases, processing may stop.
また, クライアントからのトランザクションの要求量が予想以上に多くなるこ とがあり, メモリ使用量が当初の見積もりよりもオーバーしてしまうことがある 。 クライアントからの要求量は刻々と変化するものであり, メモリ使用量も状況 に応じて変化するものである。 このような場合, 前述の第 3の従来技術のように 測定した使用メモリ量としきい値とを単純に比較するだけでは, メモリ不足の危 険性を正確に判断することはできない。 よって, 状況に応じたもっと適切な判断 をする必要がある。 ' Also, the amount of transaction requests from clients may be larger than expected, and the memory usage may exceed the initial estimate. The amount of requests from clients changes every moment, and the amount of memory used also changes according to the situation. In such a case, it is not possible to accurately judge the danger of memory shortage simply by comparing the amount of used memory measured with the threshold value as in the third conventional technique described above. Therefore, it is necessary to make more appropriate decisions according to the situation. '
J a V aのアプリケーションでは, メモリが必要なときに, n e w演算子でメ モリの獲得が行われる。 し力、し, J a V aのアプリケーションではメモリの解放 をプログラムに書くことはできず, メモリの解放は J a v a仮想マシン 1に任さ れている。 J a V a仮想マシン 1におけるメモリの解放処理, すなわちガベージ コレクションは, マシン性能に対して非常に大きな影響を与える。 そのため, 状 況に合わせた様々な方式のガベージコレクションが研究されており, それぞれの J a V a仮想マシン 1によって採用しているガベージコレクションの方式は異な る。 In the application of JaVa, when memory is required, the memory is acquired by the new operator. In a Java application, memory release cannot be written in a program, and memory release is left to the Java virtual machine 1. The process of releasing memory in JaVa virtual machine 1, that is, garbage collection, has a very large effect on machine performance. Therefore, various types of garbage collection according to the situation are being studied, and the garbage collection method adopted by each Java Virtual Machine 1 is different.
よって, メモリ不足の危険性を判断する方法は, すべてのガベージコレクショ ンに適用できる共通の判定方法に加えて, J a V a仮想マシン 1ごとに採用され ているガベージコレクションに固有の判定方法が必要となる。
メモリ使用量測定 ·分析手段 1 1は, 測定されたデータを分析し, すべてのガ ページコレクションに適用できる共通のメモリ不足の危険性の判断と, 各 J a V a仮想マシン 1ごとに採用されたガベージコレクションに固有のメモリ不足の危 険性の判断とを行う。 また, それぞれの判断結果から, 危険な状態に対する警告 , 状態の回復に必要なメモリ量の計算を行う。 Therefore, in order to determine the danger of running out of memory, in addition to the common determination method that can be applied to all garbage collections, the determination method specific to the garbage collection used for each JaVa virtual machine 1 Required. Memory usage measurement and analysis unit 1 1 analyzes the measured data, and determining the risk of a common memory shortage applicable to all gas page collection, is adopted for each J a V a virtual machine 1 Determines the risk of running out of memory inherent to garbage collection. Also, based on the results of each judgment, a warning is issued for a dangerous state and the amount of memory required to recover the state is calculated.
メモリ使用量測定 ·分析手段 1 1による基本的なデータの分析, 危険な状態に 対する警告, 状態の回復に必要なメモリ量の計算について説明する。 まず, ガべ 一ジコレクションの発生間隔とメモリ使用量に関する代表的な 3つの状態につい て, 図を用いて説明する。 Measurement of memory usage · Analysis of basic data by means of analysis 11, warning for dangerous conditions, and calculation of the amount of memory required to recover the status are described. First, the three typical states of the garbage collection interval and the memory usage are explained using figures.
第 6図は, ガベージコレクシヨンの発生間隔とメモリ使用量に関する代表的な 3つの状態を示す図である。 第 6図 (A) 〜 (C ) に示すグラフは, メモリ使用 量 2 0 0の変化とガベージコレクション 2 1 0の発生をグラフ化して表したもの の例であり, ガベージコレクション 2 1 0の発生間隔とメモリ使用量 2 0 0に関 する代表的な 3つの状態を示している。 Fig. 6 is a diagram showing three typical states of the garbage collection interval and the memory usage. The graphs shown in Fig. 6 (A) to (C) are examples of graphs showing changes in memory usage 200 and the occurrence of garbage collection 210, and the occurrence of garbage collection 210. Three typical states related to intervals and memory usage 200 are shown.
第 6図 (A) 〜 (C ) のグラフでは, 縦軸にメモリ量をとつており, 横軸に時 間をとつている。 第 6図 (A) 〜 (C ) において, 実線はメモリ使用量 2 0 0の 時間変化を示し, 点線は設定されている最大ヒープサイズ 2 2 0を示す。 J a V a仮想マシン 1は, "メモリの割り当て" イベントによりメモリ使用量 2 0 0が 最大ヒープサイズ 2 2 0を超えそうなときに, ガベージコレクション 2 1 0を実 行し, メモリの解放を行う。 In the graphs in Figs. 6 (A) to 6 (C), the vertical axis indicates the amount of memory, and the horizontal axis indicates time. In Fig. 6 (A) to (C), the solid line shows the time change of the memory usage 200, and the dotted line shows the set maximum heap size 220. JaVa virtual machine 1 executes garbage collection 210 when the memory usage 200 is likely to exceed the maximum heap size 220 due to the "memory allocation" event, and releases the memory. Do.
第 6図 (A) は, ガベージコレクション 2 1 0が発生しない安定した状態, あ るいは, ガベージコレクション 2 1 0の発生間隔が比較的長く, ガベージコレク シヨン 2 1 0によってメモリの空きが回復する状態を表している。 第 6図 (B ) . は, ガベージコレクション 2 1 0の発生間隔が短くなる傾向にあるが, ガベージ コレクション 2 1 0によってメモリの空きが回復する状態を表している。 第 6図 Figure 6 (A) shows a stable state where garbage collection 210 does not occur, or the interval between garbage collection 210 occurrences is relatively long, and garbage collection 210 recovers memory space. Indicates the state. Fig. 6 (B). Shows the state where the interval of garbage collection 210 tends to be short, but the memory space is recovered by garbage collection 210. Fig. 6
( C ) は, ガベージコレクション 2 1 0の発生間隔が短く, ガベージコレクショ ン 2 1 0によってメモリの空きが十分に回復しない状態を表している。 第 6図 ( B ) の状態, 第 6図 (C ) の状態が, 警告の対象となる。 (C) shows a state in which the garbage collection 210 occurs at short intervals and the garbage collection 210 does not sufficiently recover the memory space. The state shown in Fig. 6 (B) and the state shown in Fig. 6 (C) are subject to warning.
第 7図は, 警告を行うべき状態を説明する図である。
第 7図 (A) は, メモリ不足による性能低下の警告を行うべき状態を示してい る。 第 7図 (A) では, 縦軸にガベージコレクションの発生間隔をとつており, 横軸にガベージコレクションの発生を順に等間隔にとっている。 この例では, ガ ベージコレクシヨンの発生間隔が, GC発生間隔警告しきい値 1 03を下回って 推移している。 FIG. 7 is a diagram illustrating a state in which a warning should be given. Figure 7 (A) shows the state in which a warning about performance degradation due to insufficient memory should be issued. In Fig. 7 (A), the vertical axis indicates the intervals of garbage collection, and the horizontal axis indicates the intervals of garbage collection at equal intervals. In this example, the garbage collection occurrence interval has fallen below the GC occurrence interval warning threshold 103.
第 7図 (B) , (C) は, OutOfMemory の危険性の警告を行うべき状態を示す 図である。 第 7図 (B) , (C) では, 縦軸にメモリ量をとつており, 横軸に時 間をとつている。 第 7図 (B) において, 太線 1 04, は (全容量 XOutOfMemor y 警告しきい値 A 1 04) で求められた値である。 また, 第 7図 (C) において , 太線 1 05' は (全容量 X OutOfMemory 警告しきい値 B 1 0 5) で求められた 値である。 Figures 7 (B) and 7 (C) are diagrams showing the state in which a warning of the danger of OutOfMemory should be issued. In Figs. 7 (B) and 7 (C), the vertical axis shows the amount of memory and the horizontal axis shows time. In Fig. 7 (B), the bold line 104 is the value obtained by (full capacity XOutOfMemor y warning threshold A 104). In Fig. 7 (C), the bold line 105 'is the value obtained by (total capacity X OutOfMemory warning threshold B105).
第 7図 (B) において, メモリ使用量 200の変化を見ると, GC 2 1 0によ つてメモリの空きがほとんど回復していない。 GC 21 0後のメモリ使用量 20 0が太線 1 04 ' を上回っていることから, メモリの使用率 (メモリ使用量 Z全 容量) が OutOfMemory 警告しきい値 A 1 04を上回っていることがわかる。 Looking at the change in the memory usage 200 in Fig. 7 (B), almost no free memory has been recovered by GC210. Since the memory usage 200 after GC 210 exceeds the thick line 104 ', it can be seen that the memory usage rate (memory usage Z total capacity) exceeds the OutOfMemory warning threshold A104. .
第 7図 (C) において, メモリ使用量 200の変化を見ると GC 2 1 0 a , GC 21 0 b , GC 2 1 0 cと順に徐々にメモリの空きが回復しなくなってきて いることがわかる。 また, GC 2 1 0 b後, GC 2 1 0 c後のメモリ使用量 20 0が太線 1 05 ' を上回っていることから, GC 2 1 0 b後, GC 2 1 0 c後の メモリの使用率が OutOfMemory 警告しきい値 B 1 05を上回っていることがわか る。 In Fig. 7 (C), a change in the memory usage of 200 indicates that the free space of the memory is gradually recovering in the order of GC210a, GC210b, and GC210c. . In addition, since the memory usage 200 after GC 210b and GC 210c exceeds the thick line 105 ', the memory usage after GC 210b and GC 210c is used. It can be seen that the rate is above the OutOfMemory warning threshold B105.
ここで, OutOfMemory 警告しきい値 A 1 04は, OutOfMemory 警告しきい値 B 1 05より大きい値であるものとする。 メモリの使用率が OutOfMemory 警告しき い値 A1 04を下回っていても, メモリの使用率が OutOfMemory 警告しきい値 B 1 05を上回って増加傾向にあれば, OutOfMemory の危険性があると判断される 以下の (判断 1) 〜 (判断 3) は, メモリ使用量測定 '分析手段 1 1による基 本的なガベージコレクションのメモリ不足の危険性の判断口ジックを示している 。 なお, 以下の基本的なガベージコレクションの判断において, 使用率とはメモ
リの全容量に対するメモリ使用量の割合を示す。 よって, 以下の式 (1 ) のとお りとなる。 Here, it is assumed that the OutOfMemory warning threshold value A 104 is larger than the OutOfMemory warning threshold value B 105. Even if the memory usage is below the OutOfMemory warning threshold A104, if the memory usage is increasing above the OutOfMemory warning threshold B105, there is a danger of OutOfMemory. The following (Judgment 1) to (Judgment 3) show the tricks to judge the risk of memory shortage in the basic garbage collection by the memory usage measurement 'analysis means 11'. In the following basic garbage collection judgment, the usage rate is a memo. Indicates the ratio of the memory usage to the total capacity of the memory. Therefore, the following equation (1) is obtained.
使用率 =メモリ使用量/全容量 · · ·式 (1 ) Usage rate = memory usage / total capacity · · · formula (1)
(判断 1 ) ガベージコレクションの発生間隔を測定し, その発生間隔が G C発 生間隔警告しきい値 1 0 3を下回る状態が続いている場合には, メモリ不足で性 能が低下していると判断する (第 7図 (A) 参照) 。 (Decision 1) The garbage collection interval is measured, and if the interval continues below the GC interval interval warning threshold of 103, it is considered that performance is degraded due to insufficient memory. Judge (see Fig. 7 (A)).
(判断 2 ) ガベージコレクション後のメモリ使用量を測定し, 使用率が OutOfM emory警告しきい値 A 1 0 4を上回っている場合には, OutOfMemory の危険性が あると判断する (第 7図 (B ) 参照) 。 (Judgment 2) The memory usage after garbage collection is measured, and if the usage rate exceeds the OutOfMemory warning threshold A104, it is judged that there is a danger of OutOfMemory (Fig. 7 ( B))).
(判断 3 ) ガベージコレクション後のメモリ使用量を測定し, 使用率が連続し て増加傾向にあり, それら力 S Out Of Memory 警告しきい値 B 1 0 5を上回っている 場合には, OutOfMemory の危険性があると判断する (第 7図 (C ) 参照) 。 (Decision 3) The memory usage after garbage collection is measured, and if the usage rate is continuously increasing and exceeds the power S Out Of Memory warning threshold B105, the OutOfMemory Judge that there is a danger (see Fig. 7 (C)).
メモリ使用量測定 ·分析手段 1 1は, (判断 1 ) 〜 (判断 3 ) に示すような基 本的なガベージコレクションの危険性の判断結果をもとに, OutOfMemory の危険 性の警告, メモリ不足による性能低下の警告などを行う。 Memory usage measurement and analysis means 11 Based on the judgment results of basic garbage collection dangers shown in (Judgment 1) to (Judgment 3), warning of OutOfMemory danger, memory shortage Warning of performance degradation due to
また, メモリ使用量測定 ·分析手段 1 1は, 状態の回復に必要なメモリ量の計 算を行う。 例えば, (判断 1 ) 〜 (判断 3 ) における回復に必要なメモリサイズ は, ガベージコレクション後のメモリの空き率 (空き率 = 1—使用率) がメモリ 空き回復しきい値 1 0 7を超えるように計算されたサイズとする。 計算は, 以下 の式 (2 ) を満たす m (回復のために追加する容量) を求める計算となる。 The memory usage measurement and analysis means 11 calculates the amount of memory required to recover the state. For example, the memory size required for recovery in (Judgment 1) to (Judgment 3) is such that the vacancy rate of the memory after garbage collection (vacancy rate = 1—usage rate) exceeds the memory vacancy recovery threshold value of 107. Is the size calculated in The calculation is to find m (capacity added for recovery) that satisfies the following equation (2).
(空き容量 + m) / (全容量 + m) (Free space + m) / (Total space + m)
>メモリ空き回復しきい値 1 0 7 · · '式 (2 ) 以上, メモリ使用量測定 ·分析手段 1 1による基本的なデータの分析, 危険な 状態に対する警告, 状態の回復に必要なメモリ量の計算について説明した。 さら に各ガベージコレクションの特徴に合わせて判断の追加 ·改良を行うことにより , より正確なデータの分析, 危険な状態に対する警告, 状態の回復に必要なメモ リ量の計算を行うことができる。 > Memory free recovery threshold value 1 0 7 ··· 'Equation (2) or more, memory usage measurement · Basic data analysis by analysis means 11, warning for dangerous status, amount of memory required for status recovery Has been described. Furthermore, by adding and improving judgments according to the characteristics of each garbage collection, it is possible to analyze data more accurately, warn of dangerous conditions, and calculate the amount of memory required for state recovery.
次に, メモリ使用量測定 ·分析手段 1 1による世代型ガベージコレクシヨンの 特徴に合わせたデータの分析, 危険な状態に対する警告, 状態の回復に必要なメ
モリ量の計算について説明する。 Next, the memory usage measurement and analysis means 11 analyzes the data according to the characteristics of the generational garbage collection, warns against dangerous conditions, and provides information necessary to recover the status. The calculation of the amount of moly will be described.
世代型のガベージコレクションは, メモリ (ヒープ) を新世代, 旧世代の 2つ の領域に分けて管理している。 J a v aプログラムのオブジェクトがメモリに割 り当てられるときには, まず新世代のメモリに割り当てられる。 新世代のメモリ がいつぱいになると, 新世代のガベージコレクション (以下, n e wGCという ) が発生する。 n e wGCを何度か経験して残ったオブジェクトは, 旧世代のメ モリに移動される。 旧世代のメモリがいつばいになるとメモリ全体のガベージコ レクシヨン (以下, 単にガベージコレクションまたは GCという) が発生する。 したがって, 新世代のメモリ使用量は変化が非常に激しいものとなる。 Generation-type garbage collection manages the memory (heap) by dividing it into two areas, the new generation and the old generation. When a Java program object is allocated to memory, it is first allocated to a new generation of memory. When the new generation of memory becomes full, a new generation of garbage collection (hereafter, newGC) will occur. Objects that have survived n e wGC several times are moved to the old generation memory. When the old generation memory becomes too old, garbage collection of the entire memory (hereinafter simply referred to as garbage collection or GC) occurs. Therefore, the memory usage of the new generation will be very volatile.
前述の第 3の従来技術に示した J a V aの AP Iに, 全体のメモリ量と空きの メモリ量を求める AP Iがある。 しかし, これらの AP Iが新世代と旧世代を合 わせた合計のメモリ量をデータとして返すような場合には, そのデータをグラフ にしても第 6図に示すようなグラフにはならない。 よって, データを正しく分析 することができない。 世代型ガベージコレクションの場合には, 新世代と旧世代 のメモリ使用量を別々に測定してデータを分析する必要がある。 Among the APIs of JaVa shown in the third prior art mentioned above, there is an API that calculates the total memory capacity and the free memory capacity. However, if these APIs return the total memory size of the new generation and the old generation as data, the graph shown in Fig. 6 does not become the graph even if the data is graphed. Therefore, the data cannot be analyzed correctly. In the case of generational garbage collection, it is necessary to analyze the data by separately measuring the memory usage of the new generation and the old generation.
第 8図は, 世代型ガベージコレクションにおけるガべ一ジコレクションの発生 間隔とメモリ使用量に関する状態を説明する図である。 第 8図 (A) 〜 (C) に 示すグラフは, 旧世代, 新世代別にメモリ使用量 (旧世代 20 1, 新世代 202 ) の変化とガベージコレクション (GC) 2 1 0, n e wGC 2 1 1の発生をグ ラフにしたものの例であり, ガベージコレクション 2 1 0, n e wGC 2 1 1の 発生間隔とメモリ使用量 (20 1, 202) に関する代表的な 3つの状態を表し ている。 Fig. 8 is a diagram explaining the state of the garbage collection interval and the memory usage in the generation type garbage collection. The graphs shown in Figs. 8 (A) to (C) show the changes in memory usage (old generation 201, new generation 202) and garbage collection (GC) 210, new GC 21 for the old generation and the new generation. This is an example of the occurrence of 1 in a graph, and shows three typical states related to the garbage collection 210 and newGC 211 occurrence intervals and memory usage (201, 202).
第 8図 (A) 〜 (C) のグラフでは, 縦軸にメモリ量をとつており, 横軸に時 間をとつている。 第 8図 (A) 〜 (C) において, 点線は設定されている最大ヒ ープサイズ 220を示し, 一点鎖線は新世代と旧世代のメモリの領域の境界 22 1を示す。 一点鎖線から下の領域が旧世代のメモリの領域となり, 一点鎖線から 点線 (最大ヒープサイズ 220) までの領域が新世代のメモリの領域となる。 各 世代における実線は, 各世代別のメモリ使用量 (20 1, 202) の時間変化を 示す。 なお, 第 8図 (A) 〜 (C) のそれぞれの状態は, 第 6図 (A) 〜 (C)
のそれぞれの状態に対応する。 In the graphs in Figs. 8 (A) to 8 (C), the vertical axis represents the amount of memory, and the horizontal axis represents time. In Figs. 8 (A) to (C), the dotted line indicates the set maximum heap size 220, and the dashed line indicates the boundary 221 between the new generation and old generation memory areas. The area below the dashed line is the area of the old generation memory, and the area from the dashed line to the dotted line (maximum heap size 220) is the area of the new generation memory. The solid line in each generation shows the temporal change in memory usage (201, 202) for each generation. The states in Fig. 8 (A) to (C) are shown in Figs. 6 (A) to (C). Corresponding to each state.
J a V a仮想マシン 1は, メモリの割り当てイベントにより新世代のメモリ使 用量 202が新世代のメモリ量を超えるとき (第 8図では最大ヒープサイズ 22 0を超えるとき) に, n e wGC 2 1 1を実行し, 新世代のメモリの群放を行う 。 また, J a V a仮想マシン 1は, n e wGC 21 1を何度か経験して新世代の メモリに残っているオブジェクトを旧世代のメモリに移し, 旧世代のメモリがい つぱいで新世代のメモリからオブジェクトを移せなくなるときに, メモリ全体の ガベージコレクシヨン 21 0を実行する。 When the new generation's memory usage 202 exceeds the new generation's memory due to a memory allocation event (in FIG. 8, when the maximum heap size exceeds 220), the new VM 1 Execute 1 to perform a burst of new generation memory. In addition, the Java virtual machine 1 transfers objects remaining in the new-generation memory to the old-generation memory after experiencing the new wGC 211 several times. Performs garbage collection 210 of the entire memory when objects cannot be moved from
n e wGC 2 1 1の発生頻度はメモリ全体の G C 2 1 0の発生頻度より高い。 しかし, GC 2 1 0の処理時間が数秒, 場合によっては十数秒であるのに対し, n e wGC 21 1の処理時間は数十ミリ秒程度である。 レスポンス時間が重要な アプリケーションでは, できるだけ GC 21 0が発生しない状態 (第 8図 (A) の状態) を維持するようにする必要がある。 The frequency of occurrence of new GC211 is higher than the frequency of occurrence of GC210 in the entire memory. However, while the processing time of the GC 210 is several seconds, and in some cases ten and several seconds, the processing time of the new GC 211 is about several tens of milliseconds. In applications where response time is important, it is necessary to maintain the state where GC210 does not occur as much as possible (the state shown in Fig. 8 (A)).
GC 2 1 0が発生するのは, 新世代から旧世代に移動するォブジェクトが多い 場合であり, 長寿命なオブジェク トが多いケースと, 新世代のメモリサイズが小 さくて溢れが発生するケース (世代が若くても旧世代に移動させる (溢れ) アル ゴリズムを採用している場合など) とがある。 n ewGC 2 1 1時に, 新世代の メモリから旧世代のメモリに溢れるオブジェクトのサイズ (以下, 溢れ量という ) を測定することで, 第 8図 (B) や第 8図 (C) の状態を第 8図 (A) の状態 にするのに必要なメモリ量を見積もることができる。 GC210 occurs when there are many objects that move from the new generation to the old generation, and when there are many long-lived objects and when the new generation has a small memory size and overflows ( Even if the generation is young, it may be moved to the old generation (when overflow algorithm is adopted). At the time of the new GC 211, the size of the objects overflowing from the new generation memory to the old generation memory (hereinafter referred to as the overflow amount) was measured, and the state shown in Figs. 8 (B) and 8 (C) was obtained. The amount of memory required to achieve the state shown in Fig. 8 (A) can be estimated.
第 9図は, 溢れ量の測定を説明する図である。 第 9図 (A) は, n ewGC 2 1 1で新世代 240のメモリから旧世代 230のメモリにォブジェクトが溢れる 状態を示しており, ハッチング部分が溢れ量である。 ここで, n ewGC 2 1 1 が起きた時刻に新世代 240のメモリ量が十分にあった (n e wGC 21 1の発 生するタイミングが伸びた) ものと仮定し, そのときの状態を第 9図 (B) のよ うに表現するものとする。 これを n e wGC 2 1 1のたびに繰り返すと第 9図 ( C) のような状態になる。 Fig. 9 is a diagram explaining the measurement of the overflow amount. Figure 9 (A) shows the state in which objects overflow from the memory of the new generation 240 to the memory of the old generation 230 in the new GC 211, where the hatched area indicates the overflow amount. Here, it is assumed that the amount of memory of the new generation 240 was sufficient at the time when the newGC 211 occurred (the timing of the occurrence of the newGC 211 has been extended). It shall be expressed as shown in Fig. (B). If this is repeated for every new GC 2 11 1, the state will be as shown in Fig. 9 (C).
第 9図 (C) は, 実際には 4回の n e wGC 21 1で溢れたオブジェクトが, 新世代 240のメモリ量が無限に存在し, 溢れなかったものと仮定した状態を示
している。 k回目の溢れ量を t k と表すとすると, 第 9図 (C) の時点で溢れな かったと仮定された溢れ量の合計は, + t 2 + t + t となる。 もし, 新 世代 240の領域に最初から元の量のメモリに加えて t + t 2 + t + t 4 の 量のメモリが余計にあったなら, 4回の n e wGC 2 1 1までで新世代 240の メモリから溢れるオブジェクトはない。 Figure 9 (C) shows a state where it is assumed that the object that actually overflowed with four new GCs 211 did not overflow with an infinite amount of memory of the new generation 240. are doing. When the k-th overflow amount and expressed as t k, overflowing total amount of which is assumed to overflowing Do bought at the time of FIG. 9 (C) is a + t 2 + t + t. If there is an extra memory of t + t 2 + t + t 4 in addition to the original memory in the area of the new generation 240 from the beginning, the new generation can be performed up to four times with new GC 2 11 No objects overflow from the 240 memory.
さらに, 時間が経つにつれて不要となるオブジェクトがあるので, それを考慮 して溢れ量を見積もると以下のようになる。 例えば, 第 9図 (C) において, 1 回目の n ewGC 2 1 1で溢れたオブジェクトが溢れずに 4回目の n e wGC 2 1 1の時間まで新世代 240の領域に残っているものとすると, その一部は不要 なオブジェクトになっているはずである。 同様に, 2回目の n e wGC 21 1時 に溢れたォブジェクト, 3回目の n e wGC 21 1時に溢れたオブジェクトの中 にも, 4回目の n e wGC 2 1 1の時間までに不要となるオブジェクトが存在す る。 第 9図 (C) において, 4回目の n e wGC 2 1 1までに溢れなかったもの とされたオブジェクトの一部は, 4回目の n e wGC 2 1 1までに解放されても よいはずである。 実際には, 第 9図 (C) は, 第 9図 (D) のような状態である と考えられる。 In addition, some objects become unnecessary over time, and the amount of overflow is estimated as follows. For example, in Fig. 9 (C), suppose that the object overflowed by the first newGC 211 does not overflow and remains in the area of the new generation 240 until the fourth newGC 211 time. Some of them should be unnecessary objects. Similarly, among the objects that overflowed at the time of the second ne wGC 21 1 and the objects that overflowed at the time of the third ne wGC 21 1 You. In Fig. 9 (C), some of the objects that were determined not to have overflowed by the fourth new GC 211 may be released by the fourth new GC 211. Actually, Fig. 9 (C) is considered to be the state shown in Fig. 9 (D).
第 9図 (D) において, 1回の n e wGC 2 1 1によるオブジェクトの生存率 を d, k回目の溢れ量を xk と表すとすると, In FIG. 9 (D), when the one ne WGC 2 1 1 by viability object d, the k-th overflow amount and expressed as x k,
X! = t! X d 3 X! = t! X d 3
= t X d 2 = t X d 2
x a = t X d 1 xa = t X d 1
x = t X d 0 x = t X d 0
となり, 溢れ量の累計は, X + χ 2 + χ 3 + 4 となる。 よって, 新世代 24And the total overflow is X + χ 2 + χ 3 + 4. Therefore, the new generation 24
0のメモリ量が X l + X 2 + X 3 + X 4 だけ余分にあれば, 溢れを起こさなかつ たこととなる。 If the amount of memory 0 is extra only X l + X 2 + X 3 + X 4, so that the has failed cause overflow.
一般的に, n回の n e wGCの溢れ量の累計は, 以下の式 (3) で求められる 。 式 (3) において, xt。tal は溢れ量の累計を示す。 In general, the cumulative amount of overflow of n new GCs can be obtained by the following equation (3). In equation (3), x t . tal indicates the total overflow amount.
n ( t k X dn-k ) · · ■式 (3) 以下, メモリ使用量測定 ·分析手段 1 1による世代型ガベージコレクションの
特徴に合わせたメモリ不足の危険性の判断口ジックを示す。 世代型ガベージコレ クシヨンにおけるメモリ不足の危険性の判断は, 前述の (判断 1) 〜 (判断 3) に, 以下の (判断 4) と (判断 5) とを加えたものとなる。 n (t k X d n - k ) · · Equation (3) Hereafter, measurement of memory usage · Analysis of generation-type garbage collection by means 11 Shows the magic of determining the danger of lack of memory according to the features. The judgment of the danger of memory shortage in the generational garbage collection is obtained by adding the following (Judgment 4) and (Judgment 5) to (Judgment 1) to (Judgment 3) described above.
なお, 以下の世代型ガベージコレクションの判断において, メモリ使用率の計 算には, 式 (1) の代わりに以下の式 (4) を用いるものとする。 Note that in the following generation-type garbage collection judgment, the following equation (4) is used instead of equation (1) for calculating the memory usage rate.
使用率 =旧世代メモリ使用量 Z旧世代容量 · · ·式 (4) Usage rate = Old generation memory usage Z Old generation capacity · · · Formula (4)
(判断 4) ガベージコレクション後のメモリ使用量を測定し, メモリの使用率 がメモリ不足警告しきい値 1 06を下回っていても (十分にメモリの空きが回復 していても) , GCの発生間隔が GC発生間隔警告しきい値 1 03を下回ってお り, 新世代のメモリ量の割合 (新世代容量 全容量) が n e w世代不足警告しき い値 108を下回っている場合には, 新世代のメモリサイズが小さすぎることが 性能に影響している (GCの発生頻度を高くしている) と判断する。 (Decision 4) The memory usage after garbage collection is measured, and even if the memory usage is below the memory shortage warning threshold value of 106 (even if the memory is fully recovered), GC occurs. If the interval is less than the GC occurrence interval warning threshold value 103 and the ratio of the new generation memory amount (the new generation capacity total capacity) is less than the new generation shortage warning threshold value 108, the new generation Judgment that the memory size is too small affects the performance (increases the frequency of occurrence of GC).
(判断 5) 式 (3) により溢れ量の累計を毎 n e wGC後に計算し, (溢れ量 の累計/旧世代空き容量) が溢れ量警告しきい値 1 09を超える場合には, OutO f Memory の危険性があると判断する。 (Judgment 5) The total overflow amount is calculated after every new GC by equation (3), and if (total overflow amount / free space of old generation) exceeds the overflow warning threshold value 109, the OutOf Memory Is determined to be at risk.
メモリ使用量測定 ·分析手段 1 1は, (判断 1) 〜 (判断 3) に示した基本的 な判断結果と (判断 4) , (判断 5) に示した世代型ガベージコレクションの特 徴に合わせた危険性の判断結果とをもとに, OutOfMemory の危険性の警告, メモ リ不足による性能低下の危険性の警告などを行う。 The memory usage measurement / analysis means 11 matches the basic judgment results shown in (Judgment 1) to (Judgment 3) and the characteristics of the generational garbage collection shown in (Judgment 4) and (Judgment 5). Based on the result of the risk judgment, a warning of the risk of OutOfMemory and a warning of the risk of performance degradation due to insufficient memory are issued.
また, メモリ使用量測定 '分析手段 1 1は, 状態の回復に必要なメモリ量の計 算を行う。 例えば, (判断 1) 〜 (判断 3) における回復に必要なメモリサイズ は, ガベージコレクション後のメモリの空き率 (空き率 = 1一使用率) がメモリ 空き回復しきい値 1 0 7を超えるように計算されたサイズとする。 計算は, 以下 の式 (5) を満たす m (回復のために追加する容量) を求める計算となる。 In addition, the memory usage measurement 'analysis means 11 calculates the amount of memory required to recover the state. For example, the memory size required for recovery in (Judgment 1) to (Judgment 3) is such that the vacancy rate of memory after garbage collection (vacancy rate = 1 usage rate) exceeds the memory vacancy recovery threshold value of 107 Is the size calculated in The calculation is to find m (capacity added for recovery) that satisfies the following equation (5).
(旧世代空き容量 + m) / (旧世代容量 +m) (Old generation free space + m) / (old generation space + m)
>メモリ空き回復しきい値 1 0 7 · . '式 (5) また, 例えば, (判断 5) の場合において, 回復に必要な追加メモリ量は, あ る GCとその次の GCとの間に発生した n e wGCに対して, 式 (3) により求 められた溢れ量の累計とする。
第 8図に示すよう.な世代型ガベージコレクションにおける新世代のメモリの領 域と旧世代のメモリの領域との割合を, J a V a仮想マシン 1を起動するときの オプションで設定できるものがある。 また, 第 8図に示すような世代型ガベージ コレクションでは新世代のメモリサイズと旧世代のメモリサイズとを一定にして いるが, 新世代のメモリサイズと旧世代のメモリサイズとをダイナミックに変更 する世代型ガベージコレクションもある。 > Memory free space recovery threshold 1 0 7 ·. '(5) For example, in the case of (Judgment 5), the amount of additional memory required for recovery is determined by the amount of memory between one GC and the next GC. For the generated new GC, let it be the total amount of overflow determined by Eq. (3). As shown in Fig. 8, the ratio between the area of the new generation memory and the area of the old generation memory in the generation-type garbage collection can be set as an option when the JaVa virtual machine 1 is started. is there. In addition, in the generational garbage collection as shown in Fig. 8, the memory size of the new generation and the memory size of the old generation are kept constant, but the memory size of the new generation and the memory size of the old generation are dynamically changed. There is also a generational garbage collection.
第 1 0図は, ダイナミックにサイズを変更する世代型ガベージコレクシヨンに おけるガベージコレクシヨンの発生間隔とメモリ使用量に関する状態を説明する 図である。 第 1 0図に示すダイナミックにサイズを変更する世代型ガベージコレ クシヨンでは, ガベージコレクション 2 1 0直後のメモリの空き容量を, あらか じめ設定された割合で, 新世代のメモリの領域と旧世代のメモリの領域とに分配 する。 FIG. 10 is a diagram for explaining the state of the generation interval of garbage collection and the memory usage in the generation type garbage collection that dynamically changes the size. In the generation-type garbage collection that dynamically changes the size shown in Fig. 10, the free space of the memory immediately after garbage collection 210 is reduced by a preset ratio between the new generation memory area and the old memory area. It is distributed to the generation memory area.
第 1 0図 (A) 〜 (C ) は, 旧世代, 新世代別に, メモリ使用量 (旧世代 2 0 1 , 新世代 2 0 2 ) の変化とガベージコレクシヨン 2 1 0, n e G C 2 1 1の 発生とをグラフ化して表した例であり, ガベージコレクション 2 1 0, n e w G C 2 1 1の発生間隔とメモリ使用量とに関する代表的な 3つの状態を表している 第 1 0図 (A) 〜 (C ) のグラフでは, 縦軸にメモリ量をとつており, 横軸に 時間をとつている。 第 1 0図 (A) 〜 (C ) において, 点線は設定されている最 大ヒープサイズ 2 2 0を示し, 一点鎖線は新世代と旧世代のメモリの領域の境界 2 2 1を示す。 一点鎖線から下の領域が旧世代のメモリの領域となり, 一点鎖線 から点線 (最大ヒープサイズ 2 2 0 ) までの領域が新世代のメモリの領域となる 。 各世代における実線は, 各世代別のメモリ使用量 (2 0 1, 2 0 2 ) の時間変 化を示す。 なお, 第 1 0図 (A) 〜 (C ) のそれぞれの状態は, 第 6図 (A) 〜 ( C ) のそれぞれの状態に対応する。 Figures 10 (A) to (C) show changes in memory usage (old generation 201, new generation 202) and garbage collection 210, neGC 211 for the old generation and the new generation, respectively. Fig. 10 (A) shows a typical example of the state of garbage collection 210, new GC 211, and the memory usage. In the graphs (C) to (C), the vertical axis represents the amount of memory, and the horizontal axis represents time. In Figs. 10 (A) to 10 (C), the dotted line indicates the set maximum heap size 220 and the dashed line indicates the boundary 221 between the new generation and old generation memory areas. The area below the dashed line is the area of the old generation memory, and the area from the dashed line to the dotted line (maximum heap size 220) is the area of the new generation memory. The solid line in each generation indicates the time variation of the memory usage (201, 202) for each generation. The states shown in FIGS. 10 (A) to (C) correspond to the states shown in FIGS. 6 (A) to (C).
J a V a仮想マシン 1は, メモリの割り当てイベントにより新世代のメモリ使 用量 2 0 2が新世代のメモリ量を超えるとき (第 1 0図では最大ヒープサイズ 2 2 0を超えるとき) に, n e w G C 2 1 1を実行し, 新世代のメモリの解放を行 う。 また, J a v a仮想マシン 1は, n e w G C 2 1 1を何度か経験して新世代
のメモリに残っているオブジェクトを旧世代のメモリに移す。 オブジェク トを新 世代のメモリから旧世代のメモリに移した分だけ新世代のメモリが少なくなり, 旧世代のメモリが増える。 When the memory allocation event causes the new generation memory usage 202 to exceed the new generation memory amount (in FIG. 10 when the maximum heap size 220 exceeds the maximum heap size 220), the J a Va virtual machine 1 Execute new GC211 to release the new generation memory. In addition, Java virtual machine 1 is a new generation after experiencing new GC 2 11 several times. Move the objects remaining in the memory of the old generation to the memory of the old generation. The memory of the new generation is reduced and the memory of the old generation is increased by the amount of moving objects from the memory of the new generation to the memory of the old generation.
】 & 3仮想マシン1は, 旧世代のメモリがいっぱいになったときに, メモリ 全体のガベージコレクション 2 1 0を実行する。 このとき, あらかじめ設定され た割合で, ガベージコレクション 2 1 0直後のメモリの空き容量を, 新世代のメ モリの領域と旧世代のメモリの領域とに分配する。 When the memory of the old generation becomes full, & 3 virtual machine 1 executes garbage collection 210 of the entire memory. At this time, the free space of the memory immediately after garbage collection 210 is distributed to a new generation memory area and an old generation memory area at a preset ratio.
メモリ使用量測定 ·分析手段 1 1によるダイナミックにサイズを変更する世代 型ガベージコレクションにおけるメモリ不足の危険性の判断は, 前述の (判断 1 ) 〜 (判断 3 ) , (判断 5 ) となる。 また, ダイナミックにサイズを変更する世 代型ガベージコレクションにおいて, 使用率の計算には式 (1 ) を用いる。 メモリ使用量測定,分析手段 1 1は, (判断 1 ) 〜 (判断 3 ) , (判断 5 ) に 示す危険性の判断結果をもとに, OutOfMemory の危険性の警告, メモリ不足によ る性能低下の警告などを行う。 Memory usage measurement · The judgment of the risk of memory shortage in generational garbage collection by dynamically changing the size by the analysis means 11 is (Judgment 1) to (Judgment 3) and (Judgment 5) described above. Equation (1) is used to calculate the usage rate in generational garbage collection that dynamically changes size. The memory usage measurement and analysis means 11 is based on the risk judgment results shown in (Judgment 1) to (Judgment 3) and (Judgment 5). Give a warning of drop.
また, メモリ使用量測定 ·分析手段 1 1は, 状態の回復に必要なメモリ量の計 算を行う。 ダイナミックにサイズを変更する世代型ガベージコレクションにおい て, 回復に必要なメモリ量の計算は, 先に示した式 (2 ) を改良する。 例えば, The memory usage measurement and analysis means 11 calculates the amount of memory required to recover the state. In generational garbage collection that dynamically changes size, the amount of memory required for recovery is improved by the above equation (2). For example,
(判断 1 ) 〜 (判断 3 ) の場合における回復に必要なメモリサイズは, ガベージ コレクション後の全容量に対する旧世代空き容量の割合がメモリ空き回復しきい 値 1 0 7を超えるように計算されたサイズとする。 計算は, 以下の式 (6 ) を満 たす m (回復のために追加する容量) を求める計算となる。 The memory size required for recovery in (Judgment 1) to (Judgment 3) was calculated so that the ratio of the free space of the old generation to the total capacity after garbage collection exceeded the memory free space recovery threshold value of 107. Size. The calculation is to find m (capacity added for recovery) that satisfies the following equation (6).
(旧世代空き容量 +旧世代分配率 X m) / (全容量 + m) (Old generation free space + old generation distribution ratio X m) / (total space + m)
>メモリ空き回復しきい値 1 0 7 · · '式 (6 ) また, (判断 5 ) の場合における回復に必要な追加メモリ量は, 前述の世代型 ガべ一ジコレクションの場合と同じである。 > Memory free recovery threshold 1 0 7 ··· 'Eq. (6) Also, the amount of additional memory required for recovery in case (judgement 5) is the same as in the case of the generational garbage collection described above. .
メモリ使用量測定 ·分析手段 1 1における処理の例について, 第 1 1図から第 1 5図のフローチャートを用いて説明する。 An example of processing in the memory usage measurement and analysis means 11 will be described with reference to the flowcharts in FIGS.
第 1 1図から第 1 5図のフローチャートにおいて, "非ダイナミック世代型 G C " は, 新世代, 旧世代のメモリサイズをダイナミックには変更しない世代型ガ
ページコレクションを示すものとする。 また, "ダイナミック世代型 GC" は, ダイナミックにサイズを変更する世代型ガベージコレクションを示すものとする 。 また, "GC" はメモリ全体のガベージコレクションを示し, "n e wGC" は世代型 GCにおける新世代のガベージコレクシヨンを示す。 In the flowcharts in Figs. 11 to 15, "non-dynamic generation type GC" means a generation type GC that does not dynamically change the memory size of the new generation and the old generation. Indicates a page collection. "Dynamic generation type GC" indicates a generation type garbage collection that dynamically changes its size. "GC" indicates the garbage collection of the entire memory, and "newGC" indicates the new generation garbage collection in the generation type GC.
第 1 1図は, メモリ使用量測定 '分析処理フローチャートである。 Fig. 11 is a flowchart of the analysis process of memory usage measurement.
まず, メモリ使用量測定フラグ 1 0 1が ONであるか否かを判定し (ステップ S 1 ) , ONでなければ (OFFであれば) 処理を終了する。 ,, ステップ S 1において ONであれば, GCが発生したか否かを判定し (ステツ プ S 2) , GCが発生していなければステップ S 6に進む。 First, it is determined whether or not the memory usage measurement flag 101 is ON (step S1), and if not (if OFF), the processing is terminated. If it is ON in step S1, it is determined whether or not GC has occurred (step S2). If GC has not occurred, the process proceeds to step S6.
ステップ S 2において GCが発生していれば, 第 1 2図に示すデータ測定 ·計 算処理を行い (ステップ S 3) , 第 1 3図に示すデータ分析 .警告処理 Aを行い (ステップ S 4) , 次いで第 14図に示すデータ分析 ·警告処理 Bを行い (ステ ップ S 5) , ステップ S 6に進む。 If a GC occurs in step S2, the data measurement and calculation processing shown in Fig. 12 is performed (step S3), and the data analysis and warning processing A shown in Fig. 13 are performed (step S4). ), Then perform data analysis and warning processing B shown in Fig. 14 (step S5), and proceed to step S6.
世代型 GCであるか否かを判定し (ステップ S 6) , 世代型 GCでなければ処 理を終了する。 It is determined whether or not it is a generation type GC (step S6), and if it is not a generation type GC, the process is terminated.
ステップ S 6において世代型 GCであれば, 第 1 5図に示す世代型 GC固有測 定 -分析処理を行い (ステップ S 7) , 処理を終了する。 If it is a generation type GC in step S6, the generation type GC specific measurement-analysis processing shown in Fig. 15 is performed (step S7), and the processing ends.
第 1 2図は, データ測定 ·計算処理フローチャートである。 Figure 12 is a flowchart of the data measurement and calculation process.
まず, 今回の GC発生時刻を測定し (ステップ S 1 0) , 今回の GC発生間隔 (今回の GC発生時刻一前回の GC発生時刻) を計算する (ステップ S 1 1) 。 次に, GC直後のメモリ使用量と空き容量とを測定し (ステップ S 1 2) , GC 直後のメモリの使用率と空き率 (空き率 = 1一使用率) とを計算し (ステップ S 1 3) , 処理を終了する。 First, the current GC occurrence time is measured (step S10), and the current GC occurrence interval (the current GC occurrence time minus the previous GC occurrence time) is calculated (step S11). Next, the memory usage and the free space immediately after the GC are measured (step S12), and the memory usage and the free space immediately after the GC (free space = 1-one usage) are calculated (step S1). 3), End the processing.
ここで, ステップ S 1 2において, 世代型 GCの場合には, メモリ全体だけで はなく, 旧世代のメモリについても測定を行う。 また, ステップ S 1 3のメモリ の使用率の計算において, 世代型 GCでない場合とダイナミック世代型 GCであ る場合には式 (1) を用いて計算を行い, 非ダイナミック世代型 GCである場合 には式 (4) を用いて計算を行う。 Here, in step S12, in the case of the generation type GC, measurement is performed not only on the entire memory but also on the memory of the old generation. In addition, in the calculation of the memory usage rate in step S13, when using non-generational type GC and dynamic generation type GC, calculation is performed using equation (1). Is calculated using equation (4).
第 1 3図は, データ分析 ·警告処理 Aフローチャートである。
まず "今回の使用率≥ t h 2 (OutOfMemory警告しきい値 A 1 04) " が成立 するか否かを判定し (ステップ S 20) , 成立すればステップ S 26に進む。 ステップ S 20において成立しなければ, "今回の使用率 >前回の使用率" が 成立するか否かを判定し (ステップ S 2 1) , 成立しなければ, メモリの使用率 の増加が何回連続したかを数えるためのカウンタ c 1を 0とし (ステップ S 23 ) , 処理を終了する。 Figure 13 is a flowchart of data analysis and warning processing A. First, it is determined whether or not “this usage rate ≥ th 2 (OutOfMemory warning threshold A 104)” is satisfied (step S20), and if it is, the process proceeds to step S26. If not satisfied in step S20, it is determined whether or not “current usage rate> previous usage rate” is satisfied (step S21). If not, how many times the memory usage rate increases. The counter c1 for counting whether or not it is continuous is set to 0 (step S23), and the process ends.
ステップ S 21において成立すれば, "今回の使用率 > t h 3 (OutOfMemory 警告しきい値 B 1 05) " が成立するか否かを判定し (ステップ S 22) , 成立 しなければ, メモリの使用率の増加が何回連続したかを数えるためのカウンタ c 1を 0とし (ステップ S 23) , 処理を終了する。 If it is satisfied in step S21, it is determined whether or not “this usage rate> th3 (OutOfMemory warning threshold B105)” is satisfied (step S22). If not, use of memory is determined. The counter c1 for counting how many times the rate increase continues is set to 0 (step S23), and the process ends.
ステップ S 22において成立すれば, カウンタ c 1を 1インクリメント ( c 1 = c 1 + 1) する (ステップ S 24) 。 If the condition is satisfied in step S22, the counter c1 is incremented by 1 (c1 = c1 + 1) (step S24).
カウンタ c 1があらかじめ任意に設定された値 n 1以上であるか否かを判定し (ステップ S 25) , 値 n 1以上であればステップ S 26に進む。 ステップ S 2 5において値 n 1以上でなければ, 処理を終了する。 It is determined whether or not the value of the counter c1 is equal to or greater than a value n1 arbitrarily set in advance (step S25). If the value is equal to or greater than n1, the process proceeds to step S26. If the value is not equal to or more than the value n1 in step S25, the process ends.
ステップ S 26では, OutOfMemory の危険性の警告 (警告 w 1 ) を行い, 回復 に必要なメモリ量を計算し (ステップ S 2 7) , 処理を終了する。 In step S26, a warning of the danger of OutOfMemory (warning w1) is issued, the amount of memory required for recovery is calculated (step S27), and the process ends.
このステップ S 2 7における回復に必要なメモリ量の計算において, 世代型 G Cでない場合には前記式 (2) を満たす m (回復のために追加する容量) を求め る計算を行い, 非ダイナミック世代型 GCである場合には前記式 (5) を満たす m (回復のために追加する容量) を求める計算を行い, ダイナミック世代型 GC である場合には前記式 (6) を満たす m (回復のために追加する容量) を求める 計算を行う。 In the calculation of the amount of memory required for the recovery in step S27, if the generation type GC is not used, a calculation is performed to find m (the capacity added for recovery) that satisfies the above equation (2), In the case of a type GC, a calculation is performed to find m (capacity added for recovery) that satisfies the above equation (5). Calculation to determine the capacity to be added).
第 14図は, データ分析 ·警告処理 Bフローチャートである。 Figure 14 is a flowchart of the data analysis / warning process B.
まず "今回の GC発生間隔 < t h 1 (GC発生間隔警告しきい値 1 03) " が 成立するか否かを判定し (ステップ S 30) , 成立しなければ, GC発生間隔が 何回連続で GC発生間隔警告しきい値 1 03を下回つたかを数えるカウンタ c 2 を 0とし (ステップ S 3 1) , 処理を終了する。 First, it is determined whether or not “this GC generation interval <th 1 (GC generation interval warning threshold value 103)” is satisfied (step S30), and if not, how many times the GC generation interval continues. The counter c 2, which counts whether the value has fallen below the GC generation interval warning threshold value 103, is set to 0 (step S 31), and the process ends.
ステップ S 30において成立すれば, カウンタ c 2を 1インクリメント (c 2
= c 2+ l) する (ステップ S 32) 。 If the condition is satisfied in step S30, the counter c2 is incremented by 1 (c2 = c2 + l) (step S32).
カウンタ c 2があらかじめ任意に設定された値 n 2以上であるか否かを判定し (ステップ S 3 3) , 値 n 2以上でなければ処理を終了する。 It is determined whether or not the value of the counter c2 is equal to or greater than a value n2 arbitrarily set in advance (step S33), and if not, the process is terminated.
ステップ S 3 3において, c 2が値 n 2以上であれば, "今回の使用率≥ t h 4 (メモリ不足警告しきい値 1 06) " が成立するか否かを判定し (ステップ S 34) , 成立すれば, メモリ不足による性能低下の警告 (警告 w2) を行い (ス テツプ S 3 5) , 回復に必要なメモリ量を計算し (ステップ S 36) , 処理を終 了する。 In step S33, if c2 is equal to or larger than value n2, it is determined whether or not "this usage rate ≥ th4 (memory shortage warning threshold value 1 06)" is satisfied (step S34). If the conditions hold, a warning (warning w2) is issued to warn of performance degradation due to insufficient memory (step S35), the amount of memory required for recovery is calculated (step S36), and the process ends.
このステップ S 36における回復に必要なメモリ量の計算において, 世代型 G Cでない場合には前記式 (2) を満たす m (回復のために追加する容量) を求め る計算を行い, 非ダイナミック世代型 GCである場合には前記式 (5) を満たす m (回復のために追加する容量) を求める計算を行い, ダイナミック世代型 GC である場合には前記式 (6) を満たす m (回復のために追加する容量) を求める 計算を行う。 In the calculation of the amount of memory required for the recovery in step S36, if the generation type GC is not used, a calculation for finding m (the capacity added for recovery) that satisfies the above equation (2) is performed. In the case of a GC, calculation is performed to find m (capacity to be added for recovery) that satisfies the above equation (5). To calculate).
ステップ S 34において成立しなければ, "空き率≥ t h 5 (メモリ空き回復 しきい値 1 07) " であるか否かを判定し (ステップ S 3 7) , 成立しなければ , GCが短い間隔で発生しているとの警告 (警告 w3) を行い (ステップ S 3 8 ) , 処理を終了する。 If not satisfied in step S34, it is determined whether or not "vacancy rate ≥ th5 (memory free space recovery threshold value 1 07)" (step S37). A warning (warning w3) is generated (step S38), and the process ends.
ステップ S 3 7において成立すれば, 非ダイナミック世代型 GCであるか否か を判定し (ステップ S 39) , 非ダイナミック世代型 GCでなければ, メモリの 消費スピードに比べてメモリの絶対量が小さいなどの警告 (警告 w4) を行い ( ステップ S 40) , 処理を終了する。 If the condition is satisfied in step S37, it is determined whether the GC is a non-dynamic generation type GC (step S39). If not, the absolute amount of memory is smaller than the memory consumption speed. A warning (warning w4) is issued (step S40), and the process ends.
ステップ S 3 9において非ダイナミック世代型 GCであれば, "新世代容量 Z 全容量 < t h 6 (n e w世代不足警告しきい値 1 08) " が成立するか否かを判 定し (ステップ S 4 1) , 成立すれば新世代の割合が小さいとの警告 (警告 w5 ) を行い (ステップ S 42) , 処理を終了する。 . If it is a non-dynamic generation type GC in step S39, it is determined whether "new generation capacity Z total capacity <th6 (new generation shortage warning threshold value 1 08)" is satisfied (step S4). 1) If this is true, a warning is issued (warning w5) that the proportion of the new generation is small (step S42), and the processing ends. .
ステップ S 4 1において成立しなければ, メモリの消費スピードに比べてメモ リの絶対量が小さい, Survivor容量の割合が小さいなどの警告 (警告 w6) を行 い (ステップ S 43) , 処理を終了する。
第 1 5図は, 世代型 GC固有測定 ·分析処理フローチャートである。 If this is not the case in step S41, a warning (warning w6) is issued (warning w6) indicating that the absolute amount of memory is small compared to the memory consumption speed, and the ratio of the survivor capacity is small (step S43), and the processing ends. I do. Figure 15 is a flowchart of the generation-type GC-specific measurement and analysis process.
まず, n e wGCが発生したか否かを判定し (ステップ S 50) , 発生してい なければ処理を終了する。 First, it is determined whether or not newGC has occurred (step S50), and if not, the process ends.
ステップ S 50において n e wGCが発生していれば, GC後の最初の n e w GCか否かを判定し (ステップ S 5 1) , 最初の n e wGCでなければステップ S 53に進む。 ステップ S 5 1において最初の n e wGCであれば, 値 nを 1と し (ステップ S 52) , ステップ S 53に進む。 If a new GC has occurred in step S50, it is determined whether or not the new GC is the first new GC after the GC (step S51). If the new GC is not the first new GC, the process proceeds to step S53. If it is the first new GC in step S51, the value n is set to 1 (step S52), and the process proceeds to step S53.
n e wGCで新世代から旧世代に溢れたォブジェクトの量を測定し (ステップ S 5 3) , 式 (3) を用いて溢れ量の累計を計算する (ステップ S 54) 。 次に, "溢れ量の累計/旧世代空き容量 > t h 7 (溢れ量警告しきい値 1 09 ) " が成立するか否かを判定し (ステップ S 55) , 成立しなければステップ S 5 8に進む。 The amount of objects overflowing from the new generation to the old generation is measured by new GC (step S53), and the total amount of overflow is calculated using equation (3) (step S54). Next, it is determined whether or not “total overflow / free space of the previous generation> th 7 (overflow warning threshold value 1 09)” is satisfied (step S 55). Proceed to.
ステップ S 5 5において成立すれば, OutOfllemory の危険性の警告 (警告 w 1 ) を行い (ステップ S 56) , ステップ S 54で計算された溢れ量の累計を回復 のために追加するメモリ量とし (ステップ S 57) , ステップ S 58に進む。 値 nを 1インクリメント (n = n+ l) し (ステップ S 5 8) , 処理を終了す る。 If the condition is satisfied in step S55, a warning of the danger of OutOfllemory (warning w1) is issued (step S56), and the total overflow amount calculated in step S54 is set as the amount of memory to be added for recovery ( Step S57), and proceed to step S58. The value n is incremented by 1 (n = n + l) (step S58), and the process ends.
第 1 6図は, メモリ使用量測定 ·分析手段の警告対象となる状態の例 (1) を 示す図である。 第 1 6図 (A) , (B) は, それぞれが第 1 3図の各判断条件に 対応している。 また, 第 1 6図 (A) , (B) のグラフでは, 縦軸にメモリ量を とっており, 横軸に時間をとつている。 Figure 16 is a diagram showing an example (1) of a state in which the memory usage measurement and analysis means is subject to a warning. Figs. 16 (A) and (B) correspond to the judgment conditions in Fig. 13 respectively. In the graphs in Figs. 16 (A) and (B), the vertical axis shows the amount of memory and the horizontal axis shows time.
第 1 6図 (A) において, 太線 1 04' は (全容量 XOutOfMemory 警告しきい 値 A1 04) で求められた値である。 また, 第 1 6図 (B) において, 太線 1 0 5 ' は (全容量 XOutOfMemory警告しきい値 B 1 05) で求められた値である。 また, 第 1 6図 (A) , (B) において, 太線 1 07' は (全容量 X (1—メモ リ空き回復しきい値 1 07) ) で求められた値である。 In Fig. 16 (A), the bold line 104 'is the value obtained from (full capacity XOutOfMemory warning threshold A104). In Fig. 16 (B), the bold line 105 'is the value obtained from (the total capacity XOutOfMemory warning threshold B105). In Figs. 16 (A) and (B), the thick line 107 'is the value obtained by (total capacity X (1-memory free recovery threshold value 107)).
第 1 6図 (A) は, 第 1 3図のステップ S 20が成立する場合の例である。 第 1 6図 (A) において, メモリ使用量 200の変化を見ると, GC 2 1 0によつ てメモリの空きがほとんど回復していない。 GC 21 0後のメモリ使用量 200
が太線 1 04' を上回っていることから, メモリの使用率が OutOfMemory 警告し きい値 A1 04を上回っていることがわかる。 OutOfMemory 警告しきい値 A 1 0 4は, 例えば, 90 %〜 95 %程度である。 FIG. 16 (A) shows an example in which step S20 in FIG. 13 is established. Looking at the change in memory usage 200 in Fig. 16 (A), almost no free memory has been recovered by GC210. Memory usage after GC 210 0 200 Indicates that the memory usage exceeds the OutOfMemory warning threshold A104. The OutOfMemory warning threshold A104 is, for example, about 90% to 95%.
第 1 6図 (B) は, 第 1 3図のステップ S 2 1, ステップ S 22, ステップ S 25が同時に成立する場合の例である。 第 1 6図 (B) において, メモリ使用量 200の変化を見ると, GC 2 1 0 o;, GC 2 1 0 i3 , GC 2 1 0 yと順に徐々 にメモリの空きが回復しなくなってきていることがわかる。 また, GC 2 1 0 ;8 後, GC 2 10 γ後のメモリ使用量 200が連続して太線 1 05' を上回ってい ることから, GC 21 0 j3後, GC 2 1 0 y後のそれぞれのメモリの使用率が 0u tOfMemory警告しきい値 B 1 05を上回っていることがわかる。 Fig. 16 (B) is an example in which step S21, step S22, and step S25 in Fig. 13 are simultaneously established. In Fig. 16 (B), looking at the change in the memory usage 200, the free space of the memory gradually stops recovering in the order of GC210o; GC210i3 and GC210y. You can see that there is. In addition, since the memory usage 200 after GC 210; GC and GC 210 g continuously exceeds the thick line 105 ', the memory usage after GC 210 j3 and GC 210 y, respectively. It can be seen that the memory usage exceeds the 0utOfMemory warning threshold B105.
第 1 7図は, メモリ使用量測定 ·分析手段の警告対象となる状態の例 (2) を 示す図である。 第 1 7図 (A) 〜 (C) は, それぞれが第 14図の各判断条件に 対応している。 また, 第 1 7図 (A) 〜 (C) のグラフでは, 縦軸にメモリ量を とっており, 横軸に時間をとつている。 Figure 17 is a diagram showing an example (2) of a state in which the memory usage measurement and analysis means is subject to a warning. FIGS. 17 (A) to 17 (C) correspond to the judgment conditions in FIG. 14, respectively. In the graphs in Figs. 17 (A) to 17 (C), the vertical axis represents the amount of memory, and the horizontal axis represents time.
第 1 7図 (A) において, 太線 1 06 ' は (全容量 Xメモリ不足警告しきい値 1 06) で求められた値である。 また, 第 1 7図 (C) において, 太線 1 08 ' は (全容量 X (1— n e w世代不足警告しきい値 1 08) ) で求められた値であ る。 また, 第 1 7図 (A) 〜 (C) において, 太線 1 07' は (全容量 X ( 1 - メモリ空き回復しきい値 1 07) ) で求められた値である。 In Fig. 17 (A), the bold line 106 'is the value determined by (total capacity X memory shortage warning threshold value 106). In Fig. 17 (C), the bold line 108 'is the value obtained by (total capacity X (1-new generation shortage warning threshold value 108)). In Figs. 17 (A) to 17 (C), the thick line 107 'is the value obtained by (total capacity X (1-memory free recovery threshold value 107)).
第 1 7図 (A) は, 第 14図のステップ S 34が成立する場合の例である。 第 1 7図 (A) において, メモリ使用量 200の変化を見ると, GC 2 1 0によつ てメモリの空きはある程度回復するが, GC発生間隔が短くなつている。 GC 2 1 0後のメモリ使用量 200が太線 1 06 ' を上回っていることから, メモリの 使用率がメモリ不足警告しきい値 1 06を上回っていることがわかる。 メモリ不 足警告しきい値 1 06は, 例えば, 80 %〜 90 %程度である。 FIG. 17 (A) shows an example in which step S34 in FIG. 14 is established. Looking at the change in memory usage 200 in Fig. 17 (A), the memory space is recovered to some extent by GC210, but the GC generation interval is shortened. Since the memory usage 200 after GC210 exceeds the thick line 106 ', it can be seen that the memory usage exceeds the memory shortage warning threshold value 106. The memory shortage warning threshold value 106 is, for example, about 80% to 90%.
第 1 7図 (B) は, 第 14図のステップ S 3 7が成立する場合の例であり, 世 代型 GCでない場合の例である。 第 1 7図 (B) において, メモリ使用量 200 の変化を見ると, GC 2 1 0によってメモリの空きは回復している。 また, GC 2 1 0後のメモリ使用量 200が太線 1 07' を下回っていることから, メモリ
の空き率がメモリ空き回復しきい値 1 0 7を上回っていることがわかる。 Fig. 17 (B) is an example where step S37 in Fig. 14 is satisfied, and is an example where the generation type GC is not used. Looking at the change in the memory usage 200 in Fig. 17 (B), the memory is recovered by GC210. In addition, since the memory usage 200 after GC 210 is below the thick line 107 ', It can be seen that the vacancy rate exceeds the memory vacancy recovery threshold value 107.
しかし, G C発生間隔が短くなつている。 これは, メモリの絶対量 (最大ヒー プサイズ 2 2 0 ) が小さいなどの理由による。 メモリ空き回復しきい値 1 0 7は However, the GC occurrence interval is becoming shorter. This is because the absolute amount of memory (maximum heap size 220) is small. Memory free recovery threshold 1 0 7
, 例えば, 5 0 % 6 0 %程度である。 , For example, about 50% and 60%.
第 1 7図 (C ) は, 第 1 4図のステップ S 4 1が成立する場合の例であり, 非 ダイナミック世代型 G Cの場合の例である。 第 1 7図 (C ) において, 旧世代の メモリ使用量 2 0 1の変化を見ると, G C 2 1 0によってメモリの空きは回復し ている。 また, G C 2 1 0後の旧世代のメモリ使用量 2 0 1が太線 1 0 7 ' を下 回っていることから, メモリの空き率がメモリ空き回復しきい値 1 0 7を上回つ ている。 Fig. 17 (C) is an example in which step S41 in Fig. 14 is satisfied, and is an example in the case of non-dynamic generation type GC. In Fig. 17 (C), a look at the change in the memory usage 201 of the old generation shows that the free memory has been recovered by GC210. In addition, the memory usage rate of the old generation after GC 210 is lower than the bold line 107 '. I have.
し力 し, G C発生間隔が短くなつている。 また, 旧世代のメモリと新世代のメ モリの境界 2 2 1が太線 1 0 8 ' を上回っていることから, メモリの全容量に対 する新世代容量の割合が n e w世代不足警告しきい値 1 0 8を下回っていること がわかる。 これは, 新世代容量が小さいからである。 n e w世代不足警告しきい 値 1 0 8は, 例えば, 5 % 1 0 %程度である。 Therefore, the GC generation interval is shortened. In addition, since the boundary between the old generation memory and the new generation memory 221 exceeds the thick line 108 ', the ratio of the new generation capacity to the total memory capacity is the new generation shortage warning threshold. It turns out that it is less than 108. This is because the new generation capacity is small. The new generation shortage warning threshold value 1108 is, for example, about 5% to 10%.
次に, J a V aアプリケーションのスレツ ドがデッドロックを起こしてるか否 かを測定 ·分析し, 警告するスレツド測定 ·分析手段 1 2について説明する。 Next, the thread measurement / analysis means 12 that measures and analyzes whether or not the thread of the JaVa application has a deadlock and issues a warning is described.
J a V aのスレッ ドの状態としては, 実行中, 実行可能状態で待機中, サスぺ ンド中, スリープ中, ロックの解放待ちで待機中などの状態がある。 The state of the thread of JaVa includes a state of being executed, a state of being ready for execution, a state of being suspended, a state of sleeping, and a state of waiting for lock release.
前述の第 4の従来技術で示したように, スレツドの状態遷移は, J a v a仮想 マシン · プロファイラインタフェースのイベントによって測定することができる 。 実際に, これらのイベントを分析してスレッ ドの状態を調べることで, デッド 口ックしたスレツドを検出する製品がある。 As described in the fourth prior art, the thread state transition can be measured by events of the Java virtual machine / profiler interface. In fact, there are products that detect these dead events by analyzing these events and examining the thread status.
しかし, スレッ ドの状態遷移は非常に頻繁に起こるものであり, これらのィべ ントをすベて測定しているとアプリケーションの運用に大きな負荷がかかること となる。 よって, J a V a仮想マシン ' プロファイラインタフェースのイベント によってスレツ ドの状態遷移を測定して分析するデッドロックの検出は, 開発時 に行われるべきものである。 However, thread state transitions occur very frequently, and if all these events are measured, a heavy load will be placed on application operation. Therefore, deadlock detection, which measures and analyzes thread state transitions based on events in the Java Virtual Machine 'profiler interface, should be performed during development.
これに対し本システムでは, スレッ ド測定 '分析手段 1 2が, アプリケーショ
ンの運用に負荷がかからない程度の間隔で定期的にスレッ ドの状態を測定する。 また, ロックの解放待ちで待機中のスレッ ドを記録し, 次の測定のときに同じス レツドが再ぴロックの解放待ちで待機しているか否かを確認する。 連続して待機 している場合には, その連続回数をカウントする。 ロックの解放待ちでの待機状 態の連続回数がデッドロック警告しきい値 1 1 0を超えたスレツドが 2個以上あ る場合には, デッドロックの危険性があると判断する。 In contrast, in this system, the thread measurement and analysis Measure the thread status periodically at intervals that do not impose a load on the operation of the thread. In addition, the thread that is waiting for lock release is recorded, and it is checked whether the same thread is waiting for relock release at the next measurement. If the machine is standing by continuously, count the number of times. If there are two or more threads that have exceeded the deadlock warning threshold value 110 for the number of consecutive wait states for lock release, it is determined that there is a risk of deadlock.
これにより, アプリケーションの運用時に, その運用に負荷をかけずにデッド 口ックの危険性を検出することができる。 This makes it possible to detect the risk of deadlock during application operation without imposing a load on the operation.
第 1 8図は, スレツド測定 ·分析処理フローチャートである。 Figure 18 is a flowchart of the thread measurement and analysis process.
まず, スレッ ド測定フラグ 1 02が ONであるか否かを判定し (ステップ S 6 0) , ONでなければ (OFFであれば) ステップ S 6 8に進む。 First, it is determined whether or not the thread measurement flag 102 is ON (step S60). If it is not ON (if it is OFF), the process proceeds to step S68.
ステップ S 60において ONであれば, すべてのスレッ ドの状態を測定し (ス テツプ S 6 1) , 現在ロックの解放待ちで待機中のスレッ ドを抽出して記録する (ステップ S 62) 。 また, すでに記録されていたスレッ ドのうち, 今回抽出さ れなかったスレツ ドの記録を削除する (ステップ S 6 3) 。 If it is ON in step S60, the state of all threads is measured (step S61), and the threads that are currently waiting for lock release are extracted and recorded (step S62). In addition, among the threads that have already been recorded, the threads that have not been extracted this time are deleted (step S63).
今回初めて抽出されたスレツドの待機状態が連続する回数のカウンタ (これを 連続カウンタという) を 1とし (ステップ S 64) , 前回も抽出されたスレッ ド の連続カウンタを 1インクリメントする (ステップ S 6 5) 。 The counter of the number of times that the thread waiting state extracted for the first time this time is continuous (this is called a continuous counter) is set to 1 (step S64), and the continuous counter of the thread extracted last time is incremented by 1 (step S65). ).
次に, "連続カウンタ≥ t h 8 (デッドロック警告しきい値 1 10) " を満た すスレッ ドが 2つ以上存在するか否かを判定し (ステップ S 66) , 存在しなけ ればステップ S 6 8に進む。 Next, it is determined whether or not there are two or more threads satisfying “continuous counter ≥ th 8 (deadlock warning threshold 1 10)” (step S66). Proceed to 6.
ステップ S 66において存在すれば, デッドロックの危険性があるとの警告 ( 警告 w7) を行い (ステップ S 6 7) , ステップ S 6 8に進む。 If it exists in step S66, a warning (warning w7) that there is a danger of deadlock is issued (step S67), and the process proceeds to step S68.
J a V a仮想マシン 1の起動時にオプションで, または, アプリケーションサ ーバ 2の J a V a仮想マシン制御手段 20 (後述) からコマンドで指定された測 定間隔だけ, スレッド状態の測定をスリープし (ステップ S 68) , ステップ S 60に戻る。 Sleeps the thread state measurement at the measurement interval specified as an option when the JaVa virtual machine 1 is started or as a command from the JaVa virtual machine control means 20 (described later) of the application server 2. Then (step S68), the process returns to step S60.
以上のように, 本システムでは, スレッ ドの状態遷移をすベて測定する方法で はなく, 定期的な測定により判断を行うアルゴリズムを採用しているため, アブ
リケーシヨンの運用環境に負荷をかけずに, スレツドのデッドロックの危険性を 警告することができる。 As described above, this system employs an algorithm that makes judgments based on periodic measurements, rather than measuring all thread state transitions. The risk of thread deadlock can be warned without imposing a load on the operation environment of the location.
次に, J a V a仮想マシン 1が分析結果を上位層 (アプリケーションサーバ 2 ) に通知し, 最適な運用環境になるようにフィードバックする技術手段について 説明する。 Next, we explain the technical means that the Java virtual machine 1 notifies the analysis result to the upper layer (application server 2) and feeds it back so that the optimal operation environment is established.
第 1 9図は, J a V a仮想マシンとアプリケーションサーバとの連携による J a v a仮想マシンへの処理の振り分けを示す図である。 第 1 9図のシステムでは , O S 4の上層に 4つの J a , V a仮想マシン 1 a〜l dがあり, それぞれが測定 •分析手段 1 0 a〜l 0 dを有している。 J a V a仮想マシン 1 a〜l dの上位 層にはアプリケーションサーバ 2がある。 Fig. 19 is a diagram showing the distribution of processing to the Java virtual machine by cooperation between the Java virtual machine and the application server. In the system shown in Fig. 19, there are four Ja and Va virtual machines 1a to 1d in the upper layer of OS4, each of which has measurement and analysis means 10a to 10d. An application server 2 is located above the JaVa virtual machines 1a to 1d.
各 J a V a仮想マシン 1 a〜 1 dの起動は, 上位層のアプリケーションサーバ 2が行っており, 各 J a V a仮想マシン 1 a〜 1 dとアプリケーションサーバ 2 との間には密接な関係がある。 アプリケーションサーバ 2は, 複数の J a v a仮 想マシン 1 a〜l dを起動し, 各 J a V a仮想マシン 1 a〜l dにクライアント からの要求を振り分け, アプリケーションを処理する。 Each of the JaVa virtual machines 1a to 1d is started by the upper-level application server 2, and there is a close connection between each of the JaVa virtual machines 1a to 1d and the application server 2. Have a relationship. The application server 2 starts a plurality of Java virtual machines 1a to 1d, distributes requests from clients to each of the Java virtual machines 1a to 1d, and processes the application.
各 J a V a仮想マシン 1 a〜 1 d内の測定 ·分析手段 1 0 a〜 1 0 dで行った 分析の分析結果は, 直接にアプリケーションサーバ 2に通知される。 アプリケー ションサーバ 2は, 受け取った分析結果の通知をアプリケーションの運用環境に フィードパックし, クライアントからの要求をより適切に J a V a仮想マシン 1 a〜l dに振り分ける。 The results of the analysis performed by the measurement and analysis means 10a to 10d in each JaVa virtual machine 1a to 1d are reported directly to the application server 2. The application server 2 feeds the received analysis result notification to the application operating environment and distributes requests from clients to the Java Virtual Machines 1a to 1d more appropriately.
例えば, J a V a仮想マシン 1 aがアプリケーションサーバ 2にメモリ不足で OutOfMemory のエラーになる危険性が高いという通知を送るものとする。 アプリ ケーションサーバ 2は, この J a V a仮想マシン 1 aへの処理の振り分けを中止 し, J a V a仮想マシン 1 aが現在の手持ちの処理を終わらせたところで, 新し い J a V a仮想マシン 1 b〜l dに処理を振り分けることができる。 For example, it is assumed that the Java virtual machine 1a sends a notification to the application server 2 that there is a high risk of an OutOfMemory error due to insufficient memory. The application server 2 stops distributing the processing to the Java virtual machine 1a, and when the virtual machine 1a completes the current processing, the new JaV a. aVirtual machine 1 Processing can be distributed to b to ld.
まず, J a V a仮想マシン 1とアプリケーションサーバ 2とが連携することに ついて説明する。 First, the cooperation between the Java Virtual Machine 1 and the application server 2 will be described.
第 2 0図は, J a V a仮想マシンとアプリケーションサーバとの連携を示す図 である。 アプリケーションサーバ 2内の J a V a仮想マシン制御手段 2 0は, J
a v a仮想マシン 1の起動 ·停止を行い, J a V a仮想マシン 1にアプリケーシ ヨンの処理を振り分ける手段である。 この J a V a仮想マシン制御手段 2 0と J a v a仮想マシン 1とは, J a V a仮想マシン連携手段 3により互いに連携して いる。 Figure 20 is a diagram showing the cooperation between the Java virtual machine and the application server. The J a V a virtual machine control means 20 in the application server 2 This is a means to start and stop the ava virtual machine 1 and to distribute application processing to the Java virtual machine 1. The Java virtual machine control means 20 and the Java virtual machine 1 are linked to each other by the Java virtual machine link means 3.
J a V a仮想マシン連携手段 3は, 分析結果通知手段 3 1を備える。 この分析 結果通知手段 3 1は, プロセス間通信で直接に分析結果を通知する機能と, ファ ィルなどの媒体を経由して分析結果を通知する機能とを持つ。 The JaVa virtual machine cooperation means 3 includes an analysis result notifying means 31. The analysis result notification means 31 has a function of notifying the analysis result directly by inter-process communication and a function of notifying the analysis result via a medium such as a file.
J a v a仮想マシン 1内の測定 ·分析手段 1 0は, 分析結果通知手段 3 1を用 いて, J a v a仮想マシン制御手段 2 0に分析結果を送る。 The measurement and analysis means 10 in the Java virtual machine 1 sends the analysis result to the Java virtual machine control means 20 using the analysis result notifying means 31.
J a V a仮想マシン制御手段 2 0は, 分析結果通知手段 3 1により送られてき た分析結果をもとに, J a v a仮想マシン 1の起動 .停止の制御と, J a V a仮 想マシンへのァプケーシヨンの処理の振り分けとを行う。 ここで, J a v a仮想 マシン制御手段 2 0内で, J a V a仮想マシン 1からの情報をもとに, J a v a 仮想マシン 1の起動 .停止や J a v a仮想マシン 1へのアプリケーションの振り 分けを最適に行う手段は, J a v a仮想マシン最適制御手段 2 1である。 The Java virtual machine control means 20 controls the start and stop of the Java virtual machine 1 and the Java virtual machine based on the analysis result sent by the analysis result notification means 31. Distribution of the application to the application. Here, the Java virtual machine control means 20 starts and stops the Java virtual machine 1 and distributes applications to the Java virtual machine 1 based on information from the Java virtual machine 1. The means for optimally performing is Java virtual machine optimal control means 21.
また, J a V a仮想マシン連携手段 3は, コマンド通知手段 3 2を備える。 こ のコマンド通知手段 3 2は, プロセス間通信で直接にコマンドを通知する。 Further, the Java virtual machine cooperation means 3 includes a command notification means 32. This command notification means 32 notifies a command directly by inter-process communication.
J a V a仮想マシン制御手段 2 0は, コマンド通知手段 3 2を用いて, 測定の 種類ごとに測定 ·分析の開始/中断を指示するコマンド, 分析結果の判定に使用 するしきい値の設定 .変更を指示するコマンド, 強制ガベージコレクシヨンを指 示するコマンドなどを送付する。 例えば, 警告が長期間に渡って通知されない場 合などには, J a V a仮想マシン制御手段 2 0は, コマンド通知手段 3 2を用い て, J a V a仮想マシン 1にメモリ使用量などの測定の中断を指示するコマンド を送付することができる。 The JaVa virtual machine control means 20 uses the command notification means 32 to set commands for instructing start / stop of measurement / analysis for each type of measurement, and setting of thresholds used for judgment of analysis results Send commands to change, commands to force garbage collection, etc. For example, if a warning is not notified for a long period of time, the JaVa virtual machine control means 20 uses the command notification means 32 to notify the JaVa virtual machine 1 of memory usage. A command can be sent to instruct to suspend the measurement.
第 2 1図は, 分析結果通知処理フローチャートである。 ここでは, 分析結果通 知処理を, J a V a仮想マシン 1の測定 '分析手段 1 0側の処理と, アプリケー ションサーバ 2の J a v a仮想マシン制御手段 2 0側の処理とにわけて説明する 第 2 1図 (A) は, 測定 ·分析手段 1 0側の分析結果通知処理フローチャート
である。 測定 ·分析手段 1 0は, 警告があるか否かを判定し (ステップ S 70) , 警告があれば, 分析結果通知手段 3 1を用いて J a v a仮想マシン制御手段 2 0に警告を通知する (ステップ S 71) 。 このとき回復に必要なメモリ量の情報 もあれば, 同時に通知する。 また, 警告は, プロセス間通信で送付してもよいし , ログファイルに出力してもよレ、。 FIG. 21 is an analysis result notification processing flowchart. Here, the analysis result notification processing is explained separately for the processing of the Java virtual machine 1 'processing on the analysis means 10 side and the processing on the Java virtual machine control means 20 side of the application server 2. Fig. 21 (A) is a flowchart of the analysis result notification processing on the measurement and analysis means 10 side. It is. The measurement / analysis means 10 determines whether or not there is a warning (step S70), and if there is a warning, notifies the Java virtual machine control means 20 using the analysis result notifying means 31. (Step S71). At this time, if there is information on the amount of memory required for recovery, it is also notified. The warning may be sent by inter-process communication or output to a log file.
第 2 1図 (B) は, J a v a仮想マシン制御手段 20側の分析結果通知処理フ ローチャートである。 J a V a仮想マシン制御手段 20は, 警告を受信したか否 かを判定し (ステップ S 80) , 警告を受信していれば, その警告を J a v a仮 想マシン最適制御手段 2 1に渡す (ステップ S 8 1) 。 このとき回復に必要なメ モリ量の情報も受信していれば, 同時に渡す。 FIG. 21 (B) is an analysis result notification processing flow chart on the Java virtual machine control means 20 side. J a V a virtual machine control unit 20 determines whether it has received a warning (step S 80), if receiving a warning, pass the warning to the J ava virtual machine optimal control unit 2 1 (Step S81). At this time, if information on the amount of memory required for recovery has been received, it is also passed.
第 22図は, コマンド通知処理フローチャートである。 ここでは, コマンド通 知処理を, アプリケーションサーバ 2の J a v a仮想マシン制御手段 20側の処 理と, J a v a仮想マシン 1の測定 ·分析手段 1 0側の処理とにわけて説明する 第 22図 ( A) は, J a v a仮想マシン制御手段 20側のコマンド通知処理フ ローチャートである。 j a v a仮想マシン制御手段 20は, 測定 .分析手段 1 0 への動作環境変更のコマンドがあるか否かを判定し (ステップ S 90) , コマン ドがあれば, コマンド通知手段 3 ·2を用いて測定 ·分析手段 1 0に設定変更のた めのコマンドを送付する (ステップ S 9 1) 。 また, コマンドはプロセス間通信 で送付する。 FIG. 22 is a flowchart of the command notification process. Here, the command notification process is described separately for the process on the Java virtual machine control means 20 side of the application server 2 and the process on the measurement and analysis means 10 side of the Java virtual machine 1. (A) is a flowchart of the command notification processing on the Java virtual machine control means 20 side. The Java virtual machine control means 20 determines whether or not there is a command to change the operating environment to the measurement and analysis means 10 (step S90). If there is a command, the command notification means 3.2 is issued . A command to change the setting is sent to the measurement / analysis means 10 using this (step S91). Commands are sent by inter-process communication.
ここで, 動作環境変更のコマンドの例としては, 例えば, 以下のようなものが める。 Here, examples of commands for changing the operating environment include the following.
(1) メモリ使用量の測定開始コマンド (1) Memory usage measurement start command
(2) メモリ使用量の測定中断コマンド (2) Memory usage measurement stop command
(3) スレツ ドの測定開始コマンド (3) Thread measurement start command
(4) スレツ ドの測定終了コマンド (4) Thread measurement end command
(5) しきい値の設定 変更コマンド (5) Threshold setting change command
( 6 ) 強制ガベージコレクションコマンド (6) Force garbage collection command
第 22図 (Β) は, 測定 '分析手段 1 0側のコマンド通知処理フローチャート
である。 測定 '分析手段 1 0は, コマンドを受信したか否かを判定し (ステップ S 1 00) , コマンドを受信していれば, そのコマンドを実行する (ステップ S 1 0 1) 。 ' Fig. 22 (Β) is a flowchart of the command notification processing on the measurement / analysis means 10 side. It is. The measurement 'analyzing means 10 determines whether or not a command has been received (step S100), and if the command has been received, executes the command (step S101). '
ここで, コマンド実行の例としては, 例えば, 以下のようなものがある。 Here, examples of command execution include the following.
(1) メモリ使用量の測定開始 Z中断コマンドであれば, メモリ使用量測定フ ラグ 1 0 1を ONZ〇F Fする。 (1) Start memory usage measurement If it is a Z suspend command, set the memory usage measurement flag 101 to ONZ〇FF.
(2) スレツ ドの測定開始 Z終了コマンドであれば, スレツド測定フラグ 1 0 2を〇N/0 F Fする。 (2) Thread measurement start If the command is a Z end command, the thread measurement flag 102 is set to 〇N / 0 FF.
(3) しきい値の設定ノ変更コマンドであれば, 該当するしきい値 (1 03〜 1 1 0) を設定/変更する。 (3) If the command is a threshold change command, set / change the corresponding threshold (103 to 110).
(4) 強制ガベージコレクションコマンドであれば, 】 & &仮想マシン1の ガベージコレクション処理を呼ぶ。 (4) If it is a forced garbage collection command,] & & Call the garbage collection process of virtual machine 1.
次に, 分析結果をアプリケーションの運用環境にフィードバックすることにつ いて説明する。 Next, the feedback of the analysis results to the application operating environment is described.
J a v a仮想マシン 1内の測定 .分析手段 1 0での分析結果として, OutOfMem ory の危険性の警告, メモリ不足による性能低下の警告, 回復に必要なメモリサ ィズなどの通知を J a V a仮想マシン制御手段 20に送付する。 ここで, J a v a仮想マシン 1と J a v a仮想マシン制御手段 20と力 プロセス間通信により 直接に結合されているものとすると, 通知は直ちにアプリケーションサーバ 2に 届くこととなる。 J a V a仮想マシン制御手段 20は, 通知が届いているか否か を定期的に確認し, 通知を受け付けたら直ちにその通知を J a v a仮想マシン最 適制御手段 2 1に渡し, アプリケーションの運用環境にフィードパックする。 例えば, J a V a仮想マシン 1から OutOfMemory の危険性の警告の通知を受け た場合, J a v a仮想マシン最適制御手段 2 1は, その J a v a仮想マシン 1へ のアプリケーション処理の振り分けを止める。 その J a V a仮想マシン 1が現在 処理中のアプリケーションを終了したら, 代替の J a V a仮想マシン 1 ' を立ち 上げる。 代替の J a V a仮想マシン 1 ' を立ち上げるときには, J a v a仮想マ シン 1から通知された回復に必要なメモリサイズをもとに, 代替の J a v a仮想 マシン 1, の起動時のォプションで最適なメモリサイズを指定する。
また, J a v a仮想マシン 1からメモリ不足による性能低下の警告の通知を受 けた場合, J a V a仮想マシン最適制御手段 2 1は, 次回に J a v a仮想マシン 1を立ち上げるときに, 通知された回復に必要なメモリサイズをもとに, J a v a仮想マシン 1起動時のォプションで最適なメモリサイズを指定する。 メモリ不 足による性能低下の警告を出した J a v a仮想マシン 1へのアプリケーション処 理の振り分けを減らすというフィードパックの方法もある。 Measurement in Java virtual machine 1. As a result of analysis by analysis means 10, notifications such as warning of danger of OutOfMemory, warning of performance degradation due to insufficient memory, and memory size required for recovery, etc. It is sent to the virtual machine control means 20. Here, assuming that the Java virtual machine 1 and the Java virtual machine control means 20 are directly connected to each other by force inter-process communication, the notification reaches the application server 2 immediately. The Java virtual machine control means 20 periodically checks whether or not the notification has been received, and, upon receiving the notification, immediately passes the notification to the Java virtual machine optimum control means 21 to execute the application operating environment. Feed pack. For example, when receiving a notification of a danger of OutOfMemory from the Java virtual machine 1, the Java virtual machine optimal control means 21 stops distribution of application processing to the Java virtual machine 1. The J a V a After the virtual machine 1 is completed applications that are currently being processed, launch the alternative of J a V a virtual machine 1 '. When launching the alternative Java virtual machine 1 ′, the startup options of the alternative Java virtual machine 1, based on the memory size required for recovery notified from the Java virtual machine 1, are used. Specify the optimal memory size. Also, when a Java virtual machine 1 receives a warning of performance degradation due to lack of memory, the Java virtual machine optimal control means 21 is notified the next time the Java virtual machine 1 starts up. Based on the memory size required for recovery, specify the optimal memory size in the Java virtual machine 1 startup options. There is also a feed pack method that reduces the distribution of application processing to the Java virtual machine 1 that warns of performance degradation due to insufficient memory.
スレツドのデッドロックの危険性の警告の通知は, J a v a仮想マシン 1の起 動やアプリケーション処理の振り分け制御にはフィードパックしない。 この情報 は, アプリケーションサーバ 2のログ情報としてファイルに残し, 後のアプリケ ーションの見直しに利用する。 The notification of the thread deadlock danger warning is not fed back to the startup of the Java virtual machine 1 or the distribution control of application processing. This information is left in the file as log information of the application server 2 and used for later review of the application.
第 23図は, J a V a仮想マシン最適制御処理フローチャートである。 FIG. 23 is a flowchart of the JaVa virtual machine optimal control process.
まず, 警告, 回復に必要なメモリサイズを受け取り (ステップ S 1 1 0) , 警 告の種類を判定する (ステップ S 1 1 1) 。 First, the memory size required for warning and recovery is received (step S110), and the type of warning is determined (step S111).
ステップ S 1 1 1において OutOfMemory の危険性の警告 (警告 w 1 ) であれば , アプリケーションの終了を待って警告の出た J a v a仮想マシン 1を終了させ る (ステップ S 1 1 2) 。 代替の J a V a仮想マシン 1 ' を起動し (ステップ S 1 1 3) , 処理を終了する。 代替の J a v a仮想マシン 1, の起動時には, 受け 取った回復に必要なメモリサイズをもとに, ォプションで最適なメモリサイズを 指定する。 If the warning of the danger of OutOfMemory (warning w1 ) is found in step S111, the Java virtual machine 1 that has issued the warning is terminated after the application is terminated (step S112 ). The alternative Java virtual machine 1 'is started (step S113), and the processing ends. When the alternative Java virtual machine 1 is started, the optimal memory size is specified as an option based on the memory size required for the received recovery.
ステップ S 1 1 1においてメモリ不足による性能低下の警告 (警告 w2) であ れば, 受け取った回復に必要なメモリサイズを保存し (ステップ S 1 1 4) , 処 理を終了する。 次回の J a v a仮想マシン 1の起動時には, 保存した回復に必要 なメモリサイズをもとに, ォプションで最適なメモリサイズを指定する。 If a warning of performance degradation due to insufficient memory (warning w2) is issued in step S111, the received memory size required for recovery is saved (step S114), and the process ends. At the next startup of the Java virtual machine 1, the optimal memory size is specified in the options based on the saved memory size required for recovery.
ステップ S 1 1 1においてデッドロックの危険性の警告 (警告 w7) であれば , デッドロックの危険性の警告をログに記録する (ステップ S 1 1 5) 。 その旨 を運用管理者に通知し (ステップ S 1 1 6) , 処理を終了する。 If the warning of the risk of deadlock is found in step S111 (warning w7), a warning of the risk of deadlock is recorded in the log (step S115). This is notified to the operation manager (step S116), and the processing ends.
本システムの効果は, 以下のとおりである。 本システムでは, メモリの割り当 てと解放のすべてを測定する方法ではなく, ガベージコレクションのィベント発 生時の測定と, 必要に応じてメモリ使用量の定期的な測定とによって判断を行う
アルゴリズムを採用しているため, アプリケーションの運用環境に負荷をかけず に, 0ut0:fMemOry の危険性やメモリ不足による性能低下の警告をすることができ る。 The effects of this system are as follows. In this system, instead of measuring all of the memory allocation and release, the judgment is made based on the measurement when the garbage collection event occurs and the periodic measurement of the memory usage as necessary. Since it uses the algorithm, without placing a load on the application of the production environment, 0ut0: Ru can be a warning of performance degradation due to the risk and out-of-memory fMem O ry.
また, 測定したデータを採取して外部プロセスでデータの分析を行う方法では , データの測定から回復に向けたフィードパックまでに時間がかかり, タイムリ 一性を損なう可能性がある。 本システムでは, アプリケーションを動かしている J a v a仮想マシン内にデータを測定 ·分析する手段があるため, よりタイムリ 一なフィードパックを行うことができる。 In the method of collecting measured data and analyzing the data by an external process, it takes time from data measurement to feed pack for recovery, which may impair the time consistency. In this system, there is a means to measure and analyze data in the Java virtual machine running the application, so that a more timely feed pack can be performed.
また, 本システムでは, 各 J a V a仮想マシンが採用している様々なガベージ コレクシヨンに応じて危険性を判断するための改良アルゴリズムを多段的に持つ ているため, より正確な危険性の判断ができる。 In addition, this system has multiple stages of improved algorithms for judging danger according to the various garbage collections used by each JaVa virtual machine, so that more accurate danger judgment can be performed. Can be.
また, 単なる OutO预 emory の危険性やメモリ不足による性能低下の警告だけで は, 再度同じような状態になる危険性があるが, 本システムでは, J a V a仮想 マシンの最適な運用に必要なメモリ量を合わせて通知するため, 回復に向けたよ り適切なフィードバックを行うことができる。 In addition, a simple danger of OutOemory or a warning of performance degradation due to insufficient memory may cause a similar situation again, but this system is required for optimal operation of the JaVa virtual machine. Since a notification is also made when the amount of memory is large, more appropriate feedback for recovery can be provided.
また, 本システムでは, J a V a仮想マシンのデータを測定 .分析し, 危険性 を通知する手段と上位層 (アプリケーションサーバ) の J a v a仮想マシンを制 御する手段とがプロセス間通信により直接つながっており, 警告の通知とフィー ドバックを人が介することなく 自動的に行えるため, 問題があってから回復を行 うまでのタイミングが遅れる危険性が低くなる。 産業上の利用可能性 In this system, the means of measuring and analyzing the data of the Java virtual machine and notifying the danger and the means of controlling the Java virtual machine of the upper layer (application server) are directly communicated by interprocess communication. Since they are connected and can automatically issue warnings and provide feedback without human intervention, the risk of delaying recovery from a problem to recovery is reduced. Industrial applicability
本発明は, エンタープライズアプリケーションを構成するクライアント層, 中 間層, データベース層の 3階層システムにおいて, サーバ側に配置される中間層 の実行環境の状態をアプリケーションの運用時に監視し, 実行環境が危険な状態 になることを回避することで, アプリケーションを安定に運用させるために利用 することができる。 サーバ側に配置される中間層の実行環境としては, 例えば, ガベージコレクションによるメモリ管理機能を持つ J a v a仮想マシンなどの実 行系がある。
本発明では, J a V a仮想マシンなどのデータを測定 ·分析し, 危険性を通知 する手段と上位層 (アプリケーションサーバ) の J a V a仮想マシンを制御する 手段とを連携させ, 警告の通知とフィードパックを人手を介することなく自動的 に行うことができるため, 実行環境におけるメモリ不足の危険性の回避を効率よ く行うことができる。
The present invention monitors the state of the execution environment of the middle tier, which is located on the server side, during the operation of an application in a three-tier system consisting of the client tier, middle tier, and database tier that constitute an enterprise application. By avoiding the state, it can be used to operate the application stably. As an execution environment of the middle tier deployed on the server side, for example, there is an execution system such as a Java virtual machine having a memory management function by garbage collection. In the present invention, the means for measuring and analyzing data such as the JaVa virtual machine and notifying the danger and the means for controlling the JaVa virtual machine in the upper layer (application server) are linked with each other to generate a warning. Notifications and feed packs can be performed automatically without manual intervention, so that the risk of memory shortage in the execution environment can be efficiently avoided.
Claims
1 . 割り当てたメモリの解放をガベージコレクションによって行うプログラム実 行環境を有するコンピュータシステムにおける実行環境の危険予測/回避方法で あって, 1. A method of estimating and avoiding danger of an execution environment in a computer system having a program execution environment in which allocated memory is released by garbage collection.
ガベージコレクションのィベント発生時に, ガベージコレクション直後のメモ リ使用量を測定する過程と, Measuring the memory usage immediately after garbage collection when a garbage collection event occurs;
前記測定されたメモリ使用量からメモリ不足の危険性を予測する過程と, 前記予測されたメモリ不足の危険性を回避するために必要なメモリ量を算出す る過程と, Estimating the risk of memory shortage from the measured memory usage, and calculating the amount of memory required to avoid the predicted danger of memory shortage;
前記予測されたメモリ不足の危険性に対する警告とそれを回避するために必要 なメモリ量を他のアプリケーションに通知する過程とを有する A warning of the predicted danger of memory shortage and a step of notifying another application of an amount of memory required to avoid the warning.
ことを特徴とする実行環境の危険予測 Z回避方法。 Danger prediction of execution environment characterized by the following.
2 . 前記メモリ不足の危険性の予測おょぴそれを回避するために必要なメモリ量 の算出を, システムが使用するガベージコレクションの種類ごとに対応するアル ゴリズム用いて行う 2. Predict the risk of memory shortage and calculate the amount of memory required to avoid it using algorithms that correspond to the types of garbage collection used by the system.
ことを特徴とする請求の範囲第 1項記載の実行環境の危険予測/回避方法。 The danger prediction / avoidance method for the execution environment according to claim 1, characterized in that:
3 . 定期的にスレッ ドの状態を測定し, ロックの解放待ちで待機中の状態のスレ ッドを抽出する過程と, 3. The process of periodically measuring the thread status and extracting the thread in the waiting state while waiting for the release of the lock;
前記抽出されたロックの解放待ちで待機中の状態のスレツドごとに, 連続して 抽出された回数をカウントする過程と, Counting the number of consecutive extractions for each thread in the waiting state waiting for release of the extracted lock;
前記連続して抽出された回数があらかじめ指定されたしきい値を上回るスレツ ドが, 2つ以上存在する場合に, デッドロックの危険性があると判断し, 警告を 出力する過程とを有する If there are two or more threads whose number of consecutive extractions exceeds a predetermined threshold, it is determined that there is a risk of deadlock and a warning is output.
ことを特徴とする請求の範囲第 1項記載の実行環境の危険予測/回避方法。 The danger prediction / avoidance method for the execution environment according to claim 1, characterized in that:
4 . 割り当てたメモリの解放をガベージコレクションによって行うプログラム実 行環境を有するコンピュータシステムにおける実行環境の危険予測/回避方法で あって, 4. Danger prediction / avoidance method of the execution environment in a computer system having a program execution environment in which the allocated memory is released by garbage collection,
ガベージコレクションの発生時に, ガベージコレクションの発生間隔を測定す
る過程と, When garbage collection occurs, measure the interval between garbage collections. Process,
前記測定されたガベージコレクシヨンの発生間隔が, あらかじめ指定されたし きい値を連続して下回る場合に, メモリ不足で性能が低下していると判断する過 程と, When the measured garbage collection interval is continuously lower than a predetermined threshold, the process of determining that the performance is degraded due to insufficient memory,
メモリ不足で性能が低下しているとの警告を, 他のアプリケーションに通知す る過程とを有する Notifying other applications of a warning that performance is degraded due to insufficient memory.
ことを特徴とする実行環境の危険予測/回避方法。 A danger prediction / avoidance method for an execution environment, characterized in that:
5 . 割り当てたメモリの解放をガベージコレクションによって行うプログラム実 行環境を有するコンピュータシステムにおける実行環境の危険予測/回避方法で あって, 5. Danger prediction / avoidance method for the execution environment in a computer system having a program execution environment in which the allocated memory is released by garbage collection,
ガベージコレクションのィベント発生時に, ガベージコレクション直後のメモ リ使用量を測定する過程と, Measuring the amount of memory used immediately after garbage collection when a garbage collection event occurs;
メモリの全容量に対する前記測定されたメモリ使用量の割合が, あらかじめ指 定されたしきい値を上回る場合に, メモリ不足エラーの危険性があると判断する 過程と, Determining that there is a risk of a memory shortage error when the measured ratio of the memory usage to the total memory capacity exceeds a predetermined threshold value;
メモリ不足エラーの危険性があるとの警告を, 他のアプリケーションに通知す る過程とを有する Notifying another application of a warning that there is a risk of an insufficient memory error.
ことを特徴とする実行環境の危険予測 回避方法。 A method for avoiding danger prediction in an execution environment, characterized in that:
6 . 割り当てたメモリの解放をガベージコレクションによって行うプログラム実 行環境を有するコンピュータシステムにおける実行環境の危険予測 Z回避方法で あって, 6. Danger prediction of the execution environment in a computer system that has a program execution environment that releases allocated memory by garbage collection.
ガベージコレクションのィベント発生時に, ガベージコレクション直後 (^メモ リ使用量を測定する過程と, · When a garbage collection event occurs, immediately after the garbage collection (^ the process of measuring memory usage,
メモリの全容量に対する前記測定されたメモリ使用量の割合が, 連続して増加 傾向にあり, かつ, あらかじめ指定されたしきい値を連続して上回る場合に, メ モリ不足エラーの危険性があると判断する過程と, If the ratio of the measured memory usage to the total memory capacity tends to increase continuously and continuously exceeds a predetermined threshold, there is a risk of a memory shortage error. And the process of determining
メモリ不足エラーの危険性があるとの警告を, 他のアプリケーションに通知す る過程とを有する Notifying another application of a warning that there is a risk of an insufficient memory error.
ことを特徴とする実行環境の危険予測 Z回避方法。
Danger prediction of execution environment characterized by the following.
7 . 割り当てたメモリの解放を世代型ガベージコレクションによって行うプログ ラム実行環境を有するコンピュータシステムにおける実行環境の危険予測ノ回避 方法であって, 7. A method for avoiding danger prediction of an execution environment in a computer system having a program execution environment in which allocated memory is released by generational garbage collection,
メモリ全体のガベージコレクションのィベント発生時に, メモリ全体のガベー ジコレクション直後のメモリ使用量およびメモリ全体のガベージコレクションの 発生間隔を測定する過程と, When the event of garbage collection of the entire memory occurs, the process of measuring the memory usage immediately after the garbage collection of the entire memory and the occurrence interval of the garbage collection of the entire memory;
新世代に割り当てられたメモリ量が少ないために, 前記測定されたメモリ全体 のガベージコレクションの発生間隔があらかじめ指定されたしきい値を下回る場 合に, 新世代に割り当てられたメモリ量が小さすぎると判断する過程と, 新世代に割り当てられたメモリ量が小さすぎるとの警告を, 他のアプリケーシ ョンに通知する過程とを有する The amount of memory allocated to the new generation is too small if the measured garbage collection interval of the entire memory is less than a predetermined threshold because the amount of memory allocated to the new generation is small. And the process of notifying another application of a warning that the amount of memory allocated to the new generation is too small.
ことを特徴とする実行環境の危険予測/回避方法。 A danger prediction / avoidance method for an execution environment, characterized in that:
8 . 割り当てたメモリの解放を世代型ガベージコレクションによって行うプログ ラム実行環境を有するコンピュータシステムにおける実行環境の危険予測/回避 方法であって, 8. A danger prediction / avoidance method for an execution environment in a computer system having a program execution environment in which allocated memory is released by generational garbage collection,
新世代領域のガベージコレクシヨンのィベント発生時に, 新世代領域から旧世 代領域への溢れ量を測定する過程と, Measuring the amount of overflow from the new generation area to the old generation area when a garbage collection event occurs in the new generation area;
旧世代領域のメモリの空き容量に対する前記測定された溢れ量をもとに計算さ れた溢れ量の累計の割合があらかじめ指定されたしきい値を上回る場合に, メモ リ不足ェラーの危険性があると判断する過程と, If the sum of the overflow calculated based on the measured overflow to the free space in the old generation area exceeds a predetermined threshold, the risk of memory shortage error is increased. The process of determining that there is,
メモリ不足エラーの危険性があるとの警告を, 他のアプリケーションに通知す る過程とを有する Notifying another application of a warning that there is a risk of an insufficient memory error.
ことを特徴とする実行環境の危険予測 回避方法。 A method for avoiding danger prediction in an execution environment, characterized in that:
9 . 割り当てたメモリの解放をガベージコレクションによって行うプログラム実 行環境を有するコンピュータシステムにおいて, 9. In a computer system with a program execution environment that releases allocated memory by garbage collection,
ガベージコレクションのィベント発生時に, ガベージコレクション直後のメモ リ使用量を測定する手段と, Means for measuring memory usage immediately after garbage collection when a garbage collection event occurs;
前記測定されたメモリ使用量からメモリ不足の危険性を予測する手段と, 前記予測されたメモリ不足の危険性を回避するために必要なメモリ量を算出す
る手段と, Means for predicting the risk of memory shortage from the measured memory usage, and calculating the amount of memory required to avoid the predicted risk of memory shortage Means,
前記予測されたメモリ不足の危険性に対する警告とそれを回避するために必要 なメモリ量を他のアプリケーションに通知する手段とを備える A warning is provided for the predicted danger of memory shortage and means for notifying another application of the amount of memory required to avoid the warning is provided.
ことを特徴とする実行環境の危険予測 Z回避システム。 Danger prediction of execution environment characterized by the following.
1 0 . 割り当てたメモリの解放をガベージコレクションによって行うプログラム 実行環境を有するコンピュータシステムにおいて実行環境の危険予測および回避 を行うためのプログラムであって, 10. Program for releasing allocated memory by garbage collection A program for predicting and avoiding danger of the execution environment in a computer system having the execution environment.
ガベージコレクションのィベント発生時に, ガベージコレクション直後のメモ リ使用量を測定する処理と, When the event of garbage collection occurs, the process of measuring the memory usage immediately after garbage collection;
前記測定されたメモリ使用量からメモリ不足の危険性を予測する処理と, 前記予測されたメモリ不足の危険性を回避するために必要なメモリ量を算出す る処理と, A process of predicting the risk of memory shortage from the measured memory usage, and a process of calculating a memory amount required to avoid the predicted risk of memory shortage;
前記予測されたメモリ不足の危険性に対する警告とそれを回避するために必要 なメモリ量を他のアプリケーションに通知する処理とを, The warning about the predicted danger of insufficient memory and the process of notifying another application of the amount of memory necessary to avoid the warning are as follows.
コンピュータに実行させるための実行環境の危険予測/回避プログラム。 An execution environment danger prediction / avoidance program to be executed by a computer.
1 1 . 割り当てたメモリの解放をガベージコレクションによって行うプログラム 実行環境を有するコンピュータシステムにおいて実行環境の危険予測および回避 を行うためのプログラムを記録したコンピュータ読み取り可能な記録媒体であつ て, 11. A program for releasing allocated memory by garbage collection A computer-readable recording medium storing a program for predicting and avoiding danger of an execution environment in a computer system having an execution environment,
ガベージコレクションのィベント発生時に, ガベージコレクション直後のメモ リ使用量を測定する処理と, When the event of garbage collection occurs, the process of measuring the memory usage immediately after garbage collection;
前記測定されたメモリ使用量からメモリ不足の危険性を予測する処理と, 前記予測されたメモリ不足の危険性を回避するために必要なメモリ量を算出す る処理と, A process of predicting the risk of memory shortage from the measured memory usage, and a process of calculating a memory amount required to avoid the predicted risk of memory shortage;
前記予測されたメモリ不足の危険性に対する警告とそれを回避するために必要 なメモリ量とを他のアプリケーションに通知する処理とを, A process of notifying another application of the warning about the predicted danger of lack of memory and the amount of memory required to avoid the warning,
コンピュータに実行させるためのプログラムを記録した Recorded program to be executed by computer
ことを特徴とする実行環境の危険予測 Z回避プログラムの記録媒体。
Danger prediction of execution environment characterized by the following: A recording medium for Z avoidance program.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2003/005814 WO2004099985A1 (en) | 2003-05-09 | 2003-05-09 | Execution environment danger prediction/evading method, system, program, and recording medium thereof |
JP2004571568A JP4170988B2 (en) | 2003-05-09 | 2003-05-09 | Risk prediction / avoidance method, system, program, and recording medium for execution environment |
US11/170,217 US7516292B2 (en) | 2003-05-09 | 2005-06-29 | Method for predicting and avoiding danger in execution environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2003/005814 WO2004099985A1 (en) | 2003-05-09 | 2003-05-09 | Execution environment danger prediction/evading method, system, program, and recording medium thereof |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US11/170,217 Continuation US7516292B2 (en) | 2003-05-09 | 2005-06-29 | Method for predicting and avoiding danger in execution environment |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2004099985A1 true WO2004099985A1 (en) | 2004-11-18 |
Family
ID=33428596
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2003/005814 WO2004099985A1 (en) | 2003-05-09 | 2003-05-09 | Execution environment danger prediction/evading method, system, program, and recording medium thereof |
Country Status (3)
Country | Link |
---|---|
US (1) | US7516292B2 (en) |
JP (1) | JP4170988B2 (en) |
WO (1) | WO2004099985A1 (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006171927A (en) * | 2004-12-14 | 2006-06-29 | Mitsubishi Electric Corp | Program execution device, program execution method and data region management program |
JP2007087053A (en) * | 2005-09-21 | 2007-04-05 | Oki Electric Ind Co Ltd | Disk array control device and control method |
JP2007213490A (en) * | 2006-02-13 | 2007-08-23 | Fujitsu Ltd | Application server system and virtual machine program |
JP2007226399A (en) * | 2006-02-22 | 2007-09-06 | Hitachi Ltd | Computer control method, computer, computer control program, and computer system |
JP2009512936A (en) * | 2005-10-20 | 2009-03-26 | マイクロソフト コーポレーション | Load balancing |
JP2009238011A (en) * | 2008-03-27 | 2009-10-15 | Nec Corp | Method and program for controlling execution environment |
WO2009139426A1 (en) * | 2008-05-14 | 2009-11-19 | 日本電気株式会社 | Information processing system and information processing method |
JP2010525484A (en) * | 2007-04-26 | 2010-07-22 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Deterministic computing systems, methods, and program storage devices (distributed, fault tolerant, and high availability computing systems) to achieve distributed, fault tolerant, and high availability |
US7783683B2 (en) * | 2005-07-13 | 2010-08-24 | Fujitsu Limited | Computer-readable storage medium storing generational garbage collection program |
US7926071B2 (en) | 2005-10-20 | 2011-04-12 | Microsoft Corporation | Load balancing interfaces |
JP2011198087A (en) * | 2010-03-19 | 2011-10-06 | Nec System Technologies Ltd | Failure detection system, failure detection server, and failure detection method |
JP2018503896A (en) * | 2014-12-05 | 2018-02-08 | アマゾン テクノロジーズ インコーポレイテッド | Automatic management of resource sizing |
US10204000B2 (en) | 2015-05-01 | 2019-02-12 | Fujitsu Limited | Apparatus and method for managing dump data for cause analysis of a memory leak |
CN111831467A (en) * | 2020-07-21 | 2020-10-27 | 北京思特奇信息技术股份有限公司 | Method, system and electronic equipment for java process memory overflow self-fusing |
Families Citing this family (121)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
ATE494580T1 (en) * | 2005-04-18 | 2011-01-15 | Research In Motion Ltd | CENTRALIZED STORAGE MANAGEMENT IN WIRELESS DEVICES |
US20070061429A1 (en) * | 2005-09-12 | 2007-03-15 | Microsoft Corporation | Optimizing utilization of application resources |
WO2008054403A2 (en) * | 2005-11-15 | 2008-05-08 | Probity Laboratories, Llc | Systems and methods for identifying, categorizing, quantifying and evaluating risks |
CN100426225C (en) * | 2006-04-21 | 2008-10-15 | 华为技术有限公司 | A method for protecting EMS memory and its system |
US8161544B2 (en) * | 2006-07-19 | 2012-04-17 | Microsoft Corporation | Trusted communications with child processes |
EP2485146B1 (en) * | 2006-08-07 | 2021-03-17 | Oracle International Corporation | System and method for providing hardware virtualization in a virtual machine environment |
US7475214B2 (en) * | 2006-08-16 | 2009-01-06 | International Business Machines Corporation | Method and system to optimize java virtual machine performance |
US7730269B2 (en) * | 2006-08-29 | 2010-06-01 | International Business Machines Corporation | Load management to reduce communication signaling latency in a virtual machine environment |
US7761487B2 (en) * | 2006-12-13 | 2010-07-20 | Computer Associates Think, Inc. | Predicting out of memory conditions using soft references |
US20080162709A1 (en) * | 2006-12-27 | 2008-07-03 | International Business Machines Corporation | System for processing application protocol requests |
US7904493B2 (en) * | 2007-03-30 | 2011-03-08 | Sap Ag | Method and system for object age detection in garbage collection heaps |
US8601469B2 (en) * | 2007-03-30 | 2013-12-03 | Sap Ag | Method and system for customizing allocation statistics |
US8522209B2 (en) * | 2007-03-30 | 2013-08-27 | Sap Ag | Method and system for integrating profiling and debugging |
US20080243970A1 (en) * | 2007-03-30 | 2008-10-02 | Sap Ag | Method and system for providing loitering trace in virtual machines |
US8667471B2 (en) * | 2007-03-30 | 2014-03-04 | Sap Ag | Method and system for customizing profiling sessions |
US8336033B2 (en) * | 2007-03-30 | 2012-12-18 | Sap Ag | Method and system for generating a hierarchical tree representing stack traces |
US8356286B2 (en) * | 2007-03-30 | 2013-01-15 | Sap Ag | Method and system for providing on-demand profiling infrastructure for profiling at virtual machines |
US7978516B2 (en) | 2007-12-27 | 2011-07-12 | Pliant Technology, Inc. | Flash memory controller having reduced pinout |
US9727436B2 (en) * | 2008-01-02 | 2017-08-08 | International Business Machines Corporation | Adding a profiling agent to a virtual machine to permit performance and memory consumption analysis within unit tests |
US8095766B2 (en) * | 2008-04-07 | 2012-01-10 | International Business Machines Corporation | Method and system for approximating object sizes in an object-oriented system |
US7870257B2 (en) | 2008-06-02 | 2011-01-11 | International Business Machines Corporation | Enhancing real-time performance for java application serving |
EP2237197A1 (en) * | 2009-03-31 | 2010-10-06 | Siemens Aktiengesellschaft | Method for evaluating key production indicators (KPI) in a manufacturing execution system (MES) |
US8365041B2 (en) | 2010-03-17 | 2013-01-29 | Sandisk Enterprise Ip Llc | MLC self-raid flash data protection scheme |
CA2700217C (en) * | 2010-04-01 | 2011-07-19 | Ibm Canada Limited - Ibm Canada Limitee | Write barrier elision for reference arrays |
WO2012072363A1 (en) | 2010-11-30 | 2012-06-07 | International Business Machines Corporation | A method computer program and system to optimize memory management of an application running on a virtual machine |
US8909982B2 (en) | 2011-06-19 | 2014-12-09 | Sandisk Enterprise Ip Llc | System and method for detecting copyback programming problems |
US8910020B2 (en) | 2011-06-19 | 2014-12-09 | Sandisk Enterprise Ip Llc | Intelligent bit recovery for flash memory |
US8938658B2 (en) | 2011-11-07 | 2015-01-20 | Sandisk Enterprise Ip Llc | Statistical read comparison signal generation for memory systems |
US9048876B2 (en) | 2011-11-18 | 2015-06-02 | Sandisk Enterprise Ip Llc | Systems, methods and devices for multi-tiered error correction |
US8924815B2 (en) | 2011-11-18 | 2014-12-30 | Sandisk Enterprise Ip Llc | Systems, methods and devices for decoding codewords having multiple parity segments |
US8954822B2 (en) | 2011-11-18 | 2015-02-10 | Sandisk Enterprise Ip Llc | Data encoder and decoder using memory-specific parity-check matrix |
US8458702B1 (en) | 2012-02-28 | 2013-06-04 | Google Inc. | Method for implementing user space up-calls on java virtual machine before/after garbage collection |
US9699263B1 (en) | 2012-08-17 | 2017-07-04 | Sandisk Technologies Llc. | Automatic read and write acceleration of data accessed by virtual machines |
US9753846B2 (en) * | 2012-09-06 | 2017-09-05 | Red Hat, Inc. | Adjusting the operating memory used by a virtual machine during runtime |
US9418003B2 (en) * | 2012-10-10 | 2016-08-16 | Salesforce.Com, Inc. | System, method and computer program product for conditionally performing garbage collection |
US9501398B2 (en) | 2012-12-26 | 2016-11-22 | Sandisk Technologies Llc | Persistent storage device with NVRAM for staging writes |
US9239751B1 (en) | 2012-12-27 | 2016-01-19 | Sandisk Enterprise Ip Llc | Compressing data from multiple reads for error control management in memory systems |
US9612948B2 (en) | 2012-12-27 | 2017-04-04 | Sandisk Technologies Llc | Reads and writes between a contiguous data block and noncontiguous sets of logical address blocks in a persistent storage device |
US9003264B1 (en) | 2012-12-31 | 2015-04-07 | Sandisk Enterprise Ip Llc | Systems, methods, and devices for multi-dimensional flash RAID data protection |
US9454420B1 (en) | 2012-12-31 | 2016-09-27 | Sandisk Technologies Llc | Method and system of reading threshold voltage equalization |
US9214965B2 (en) | 2013-02-20 | 2015-12-15 | Sandisk Enterprise Ip Llc | Method and system for improving data integrity in non-volatile storage |
US9329928B2 (en) | 2013-02-20 | 2016-05-03 | Sandisk Enterprise IP LLC. | Bandwidth optimization in a non-volatile memory system |
US9870830B1 (en) | 2013-03-14 | 2018-01-16 | Sandisk Technologies Llc | Optimal multilevel sensing for reading data from a storage medium |
US9136877B1 (en) | 2013-03-15 | 2015-09-15 | Sandisk Enterprise Ip Llc | Syndrome layered decoding for LDPC codes |
US9244763B1 (en) | 2013-03-15 | 2016-01-26 | Sandisk Enterprise Ip Llc | System and method for updating a reading threshold voltage based on symbol transition information |
US9367246B2 (en) | 2013-03-15 | 2016-06-14 | Sandisk Technologies Inc. | Performance optimization of data transfer for soft information generation |
US9236886B1 (en) | 2013-03-15 | 2016-01-12 | Sandisk Enterprise Ip Llc | Universal and reconfigurable QC-LDPC encoder |
US9009576B1 (en) | 2013-03-15 | 2015-04-14 | Sandisk Enterprise Ip Llc | Adaptive LLR based on syndrome weight |
US9092350B1 (en) | 2013-03-15 | 2015-07-28 | Sandisk Enterprise Ip Llc | Detection and handling of unbalanced errors in interleaved codewords |
US10049037B2 (en) | 2013-04-05 | 2018-08-14 | Sandisk Enterprise Ip Llc | Data management in a storage system |
US9170941B2 (en) | 2013-04-05 | 2015-10-27 | Sandisk Enterprises IP LLC | Data hardening in a storage system |
US10205640B2 (en) * | 2013-04-11 | 2019-02-12 | Oracle International Corporation | Seasonal trending, forecasting, anomaly detection, and endpoint prediction of java heap usage |
US9159437B2 (en) | 2013-06-11 | 2015-10-13 | Sandisk Enterprise IP LLC. | Device and method for resolving an LM flag issue |
TWI573015B (en) * | 2013-06-19 | 2017-03-01 | 祥碩科技股份有限公司 | Anti-timeout method and data processing system |
US9043517B1 (en) | 2013-07-25 | 2015-05-26 | Sandisk Enterprise Ip Llc | Multipass programming in buffers implemented in non-volatile data storage systems |
US9384126B1 (en) | 2013-07-25 | 2016-07-05 | Sandisk Technologies Inc. | Methods and systems to avoid false negative results in bloom filters implemented in non-volatile data storage systems |
US9524235B1 (en) | 2013-07-25 | 2016-12-20 | Sandisk Technologies Llc | Local hash value generation in non-volatile data storage systems |
US9652766B1 (en) * | 2013-08-22 | 2017-05-16 | Amazon Technologies, Inc. | Managing data stored in memory locations having size limitations |
US9361221B1 (en) | 2013-08-26 | 2016-06-07 | Sandisk Technologies Inc. | Write amplification reduction through reliable writes during garbage collection |
US9639463B1 (en) | 2013-08-26 | 2017-05-02 | Sandisk Technologies Llc | Heuristic aware garbage collection scheme in storage systems |
US9519577B2 (en) | 2013-09-03 | 2016-12-13 | Sandisk Technologies Llc | Method and system for migrating data between flash memory devices |
US9442670B2 (en) | 2013-09-03 | 2016-09-13 | Sandisk Technologies Llc | Method and system for rebalancing data stored in flash memory devices |
US9158349B2 (en) | 2013-10-04 | 2015-10-13 | Sandisk Enterprise Ip Llc | System and method for heat dissipation |
US9323637B2 (en) | 2013-10-07 | 2016-04-26 | Sandisk Enterprise Ip Llc | Power sequencing and data hardening architecture |
US9442662B2 (en) | 2013-10-18 | 2016-09-13 | Sandisk Technologies Llc | Device and method for managing die groups |
US9298608B2 (en) | 2013-10-18 | 2016-03-29 | Sandisk Enterprise Ip Llc | Biasing for wear leveling in storage systems |
US9436831B2 (en) | 2013-10-30 | 2016-09-06 | Sandisk Technologies Llc | Secure erase in a memory device |
US9263156B2 (en) | 2013-11-07 | 2016-02-16 | Sandisk Enterprise Ip Llc | System and method for adjusting trip points within a storage device |
US9244785B2 (en) | 2013-11-13 | 2016-01-26 | Sandisk Enterprise Ip Llc | Simulated power failure and data hardening |
US9152555B2 (en) | 2013-11-15 | 2015-10-06 | Sandisk Enterprise IP LLC. | Data management with modular erase in a data storage system |
US9703816B2 (en) | 2013-11-19 | 2017-07-11 | Sandisk Technologies Llc | Method and system for forward reference logging in a persistent datastore |
US9520197B2 (en) | 2013-11-22 | 2016-12-13 | Sandisk Technologies Llc | Adaptive erase of a storage device |
US9122636B2 (en) | 2013-11-27 | 2015-09-01 | Sandisk Enterprise Ip Llc | Hard power fail architecture |
US9280429B2 (en) | 2013-11-27 | 2016-03-08 | Sandisk Enterprise Ip Llc | Power fail latching based on monitoring multiple power supply voltages in a storage device |
US9520162B2 (en) | 2013-11-27 | 2016-12-13 | Sandisk Technologies Llc | DIMM device controller supervisor |
US9582058B2 (en) | 2013-11-29 | 2017-02-28 | Sandisk Technologies Llc | Power inrush management of storage devices |
US9250676B2 (en) | 2013-11-29 | 2016-02-02 | Sandisk Enterprise Ip Llc | Power failure architecture and verification |
US9092370B2 (en) | 2013-12-03 | 2015-07-28 | Sandisk Enterprise Ip Llc | Power failure tolerant cryptographic erase |
US9235245B2 (en) | 2013-12-04 | 2016-01-12 | Sandisk Enterprise Ip Llc | Startup performance and power isolation |
US9747028B1 (en) * | 2013-12-13 | 2017-08-29 | Amazon Technologies, Inc. | Artificial memory pressure for low memory machine |
US9129665B2 (en) | 2013-12-17 | 2015-09-08 | Sandisk Enterprise Ip Llc | Dynamic brownout adjustment in a storage device |
US9549457B2 (en) | 2014-02-12 | 2017-01-17 | Sandisk Technologies Llc | System and method for redirecting airflow across an electronic assembly |
US9497889B2 (en) | 2014-02-27 | 2016-11-15 | Sandisk Technologies Llc | Heat dissipation for substrate assemblies |
US9703636B2 (en) | 2014-03-01 | 2017-07-11 | Sandisk Technologies Llc | Firmware reversion trigger and control |
US9519319B2 (en) | 2014-03-14 | 2016-12-13 | Sandisk Technologies Llc | Self-supporting thermal tube structure for electronic assemblies |
US9348377B2 (en) | 2014-03-14 | 2016-05-24 | Sandisk Enterprise Ip Llc | Thermal isolation techniques |
US9485851B2 (en) | 2014-03-14 | 2016-11-01 | Sandisk Technologies Llc | Thermal tube assembly structures |
US9448876B2 (en) | 2014-03-19 | 2016-09-20 | Sandisk Technologies Llc | Fault detection and prediction in storage devices |
US9390814B2 (en) | 2014-03-19 | 2016-07-12 | Sandisk Technologies Llc | Fault detection and prediction for data storage elements |
US9454448B2 (en) | 2014-03-19 | 2016-09-27 | Sandisk Technologies Llc | Fault testing in storage devices |
US9626400B2 (en) | 2014-03-31 | 2017-04-18 | Sandisk Technologies Llc | Compaction of information in tiered data structure |
US9626399B2 (en) | 2014-03-31 | 2017-04-18 | Sandisk Technologies Llc | Conditional updates for reducing frequency of data modification operations |
US9390021B2 (en) | 2014-03-31 | 2016-07-12 | Sandisk Technologies Llc | Efficient cache utilization in a tiered data structure |
US9697267B2 (en) | 2014-04-03 | 2017-07-04 | Sandisk Technologies Llc | Methods and systems for performing efficient snapshots in tiered data structures |
US10656840B2 (en) | 2014-05-30 | 2020-05-19 | Sandisk Technologies Llc | Real-time I/O pattern recognition to enhance performance and endurance of a storage device |
US8891303B1 (en) | 2014-05-30 | 2014-11-18 | Sandisk Technologies Inc. | Method and system for dynamic word line based configuration of a three-dimensional memory device |
US9093160B1 (en) | 2014-05-30 | 2015-07-28 | Sandisk Technologies Inc. | Methods and systems for staggered memory operations |
US10114557B2 (en) | 2014-05-30 | 2018-10-30 | Sandisk Technologies Llc | Identification of hot regions to enhance performance and endurance of a non-volatile storage device |
US10162748B2 (en) | 2014-05-30 | 2018-12-25 | Sandisk Technologies Llc | Prioritizing garbage collection and block allocation based on I/O history for logical address regions |
US9703491B2 (en) | 2014-05-30 | 2017-07-11 | Sandisk Technologies Llc | Using history of unaligned writes to cache data and avoid read-modify-writes in a non-volatile storage device |
US10146448B2 (en) | 2014-05-30 | 2018-12-04 | Sandisk Technologies Llc | Using history of I/O sequences to trigger cached read ahead in a non-volatile storage device |
US9070481B1 (en) | 2014-05-30 | 2015-06-30 | Sandisk Technologies Inc. | Internal current measurement for age measurements |
US10656842B2 (en) | 2014-05-30 | 2020-05-19 | Sandisk Technologies Llc | Using history of I/O sizes and I/O sequences to trigger coalesced writes in a non-volatile storage device |
US9645749B2 (en) | 2014-05-30 | 2017-05-09 | Sandisk Technologies Llc | Method and system for recharacterizing the storage density of a memory device or a portion thereof |
US10372613B2 (en) | 2014-05-30 | 2019-08-06 | Sandisk Technologies Llc | Using sub-region I/O history to cache repeatedly accessed sub-regions in a non-volatile storage device |
US9652381B2 (en) | 2014-06-19 | 2017-05-16 | Sandisk Technologies Llc | Sub-block garbage collection |
US9443601B2 (en) | 2014-09-08 | 2016-09-13 | Sandisk Technologies Llc | Holdup capacitor energy harvesting |
CA2876379A1 (en) * | 2014-12-29 | 2016-06-29 | Adam J. Storm | Memory management in presence of asymmetrical memory transfer costs |
US10248561B2 (en) | 2015-06-18 | 2019-04-02 | Oracle International Corporation | Stateless detection of out-of-memory events in virtual machines |
US10467123B2 (en) | 2016-05-09 | 2019-11-05 | Oracle International Corporation | Compression techniques for encoding stack trace information |
US9672062B1 (en) * | 2016-12-01 | 2017-06-06 | Red Hat, Inc. | Batched memory page hinting |
US10198674B2 (en) * | 2016-12-22 | 2019-02-05 | Canon Kabushiki Kaisha | Method, apparatus and system for rendering a graphical representation within limited memory |
US10565104B2 (en) | 2017-08-01 | 2020-02-18 | International Business Machines Corporation | System and method to manage and share managed runtime memory for JAVA virtual machine |
US10579439B2 (en) | 2017-08-29 | 2020-03-03 | Red Hat, Inc. | Batched storage hinting with fast guest storage allocation |
US10956216B2 (en) | 2017-08-31 | 2021-03-23 | Red Hat, Inc. | Free page hinting with multiple page sizes |
US10747566B2 (en) | 2017-11-21 | 2020-08-18 | International Business Machines Corporation | Restarting application servers |
US10474382B2 (en) | 2017-12-01 | 2019-11-12 | Red Hat, Inc. | Fast virtual machine storage allocation with encrypted storage |
KR102700419B1 (en) * | 2018-09-04 | 2024-08-30 | 삼성전자주식회사 | Electronic apparatus and method for controlling thereof |
US10884641B2 (en) | 2019-04-16 | 2021-01-05 | Paypal, Inc. | Low latency gateway for an asynchronous orchestration engine using direct memory |
US11436141B2 (en) | 2019-12-13 | 2022-09-06 | Red Hat, Inc. | Free memory page hinting by virtual machines |
US11144369B2 (en) | 2019-12-30 | 2021-10-12 | Bank Of America Corporation | Preemptive self-healing of application server hanging threads |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05227993A (en) * | 1992-02-24 | 1993-09-07 | Nippon Oil & Fats Co Ltd | Determination of antioxidation activity |
JPH11212808A (en) * | 1997-11-21 | 1999-08-06 | Omron Corp | Program controller, and device and method for memory allocation |
JPH11312117A (en) * | 1998-04-28 | 1999-11-09 | Fujitsu Ltd | Memory management device and storage medium with memory management program stored therein |
JP2001265650A (en) * | 2000-03-15 | 2001-09-28 | Omron Corp | Memory resource using condition monitoring device and memory resource using condition monitoring method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0527993A (en) | 1991-07-24 | 1993-02-05 | Toshiba Corp | Deadlock detection processing system |
US6542911B2 (en) * | 2001-03-01 | 2003-04-01 | Sun Microsystems, Inc. | Method and apparatus for freeing memory from an extensible markup language document object model tree active in an application cache |
-
2003
- 2003-05-09 WO PCT/JP2003/005814 patent/WO2004099985A1/en active Application Filing
- 2003-05-09 JP JP2004571568A patent/JP4170988B2/en not_active Expired - Fee Related
-
2005
- 2005-06-29 US US11/170,217 patent/US7516292B2/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05227993A (en) * | 1992-02-24 | 1993-09-07 | Nippon Oil & Fats Co Ltd | Determination of antioxidation activity |
JPH11212808A (en) * | 1997-11-21 | 1999-08-06 | Omron Corp | Program controller, and device and method for memory allocation |
JPH11312117A (en) * | 1998-04-28 | 1999-11-09 | Fujitsu Ltd | Memory management device and storage medium with memory management program stored therein |
JP2001265650A (en) * | 2000-03-15 | 2001-09-28 | Omron Corp | Memory resource using condition monitoring device and memory resource using condition monitoring method |
Non-Patent Citations (1)
Title |
---|
YOSHIKAWA T. et al., "Koritsu no Model ni Motozuki Heap Size o Jido Chosetsu Suru Sedai GC Hoshiki", Transactions of Information Processing Society of Japan, 15 November 2000, Vol. 41, No. SIG9(PRO8), pages 78-86 * |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006171927A (en) * | 2004-12-14 | 2006-06-29 | Mitsubishi Electric Corp | Program execution device, program execution method and data region management program |
JP4589095B2 (en) * | 2004-12-14 | 2010-12-01 | 三菱電機株式会社 | Program execution device, program execution method, and data area management program |
US7783683B2 (en) * | 2005-07-13 | 2010-08-24 | Fujitsu Limited | Computer-readable storage medium storing generational garbage collection program |
JP2007087053A (en) * | 2005-09-21 | 2007-04-05 | Oki Electric Ind Co Ltd | Disk array control device and control method |
JP2009512936A (en) * | 2005-10-20 | 2009-03-26 | マイクロソフト コーポレーション | Load balancing |
US10334031B2 (en) | 2005-10-20 | 2019-06-25 | Microsoft Technology Licensing, Llc | Load balancing based on impending garbage collection in execution environment |
US7926071B2 (en) | 2005-10-20 | 2011-04-12 | Microsoft Corporation | Load balancing interfaces |
US8234378B2 (en) | 2005-10-20 | 2012-07-31 | Microsoft Corporation | Load balancing in a managed execution environment |
US8332845B2 (en) | 2006-02-13 | 2012-12-11 | Fujitsu Limited | Compile timing based on execution frequency of a procedure |
JP2007213490A (en) * | 2006-02-13 | 2007-08-23 | Fujitsu Ltd | Application server system and virtual machine program |
JP2007226399A (en) * | 2006-02-22 | 2007-09-06 | Hitachi Ltd | Computer control method, computer, computer control program, and computer system |
JP2010525484A (en) * | 2007-04-26 | 2010-07-22 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Deterministic computing systems, methods, and program storage devices (distributed, fault tolerant, and high availability computing systems) to achieve distributed, fault tolerant, and high availability |
JP2009238011A (en) * | 2008-03-27 | 2009-10-15 | Nec Corp | Method and program for controlling execution environment |
US8601166B2 (en) | 2008-05-14 | 2013-12-03 | Nec Corporation | Information processing system and information processing method for generating distribution and synchronization rules in a client/server environment based on operation environment data |
WO2009139426A1 (en) * | 2008-05-14 | 2009-11-19 | 日本電気株式会社 | Information processing system and information processing method |
JP2011198087A (en) * | 2010-03-19 | 2011-10-06 | Nec System Technologies Ltd | Failure detection system, failure detection server, and failure detection method |
JP2018503896A (en) * | 2014-12-05 | 2018-02-08 | アマゾン テクノロジーズ インコーポレイテッド | Automatic management of resource sizing |
US10204000B2 (en) | 2015-05-01 | 2019-02-12 | Fujitsu Limited | Apparatus and method for managing dump data for cause analysis of a memory leak |
CN111831467A (en) * | 2020-07-21 | 2020-10-27 | 北京思特奇信息技术股份有限公司 | Method, system and electronic equipment for java process memory overflow self-fusing |
Also Published As
Publication number | Publication date |
---|---|
JPWO2004099985A1 (en) | 2006-07-13 |
US20050240641A1 (en) | 2005-10-27 |
JP4170988B2 (en) | 2008-10-22 |
US7516292B2 (en) | 2009-04-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2004099985A1 (en) | Execution environment danger prediction/evading method, system, program, and recording medium thereof | |
JP4920391B2 (en) | Computer system management method, management server, computer system and program | |
US7761487B2 (en) | Predicting out of memory conditions using soft references | |
US8886866B2 (en) | Optimizing memory management of an application running on a virtual machine | |
CN109408210B (en) | Distributed timed task management method and system | |
JP3944167B2 (en) | An automated method for managing computing resources in a server network | |
US10719343B2 (en) | Optimizing virtual machines placement in cloud computing environments | |
US7720841B2 (en) | Model-based self-optimizing distributed information management | |
US10248404B2 (en) | Managing update deployment | |
US7730364B2 (en) | Systems and methods for predictive failure management | |
US20070136402A1 (en) | Automatic prediction of future out of memory exceptions in a garbage collected virtual machine | |
US11726836B2 (en) | Predicting expansion failures and defragmenting cluster resources | |
EP2685380A1 (en) | Operations management unit, operations management method, and program | |
CN112988398A (en) | Micro-service dynamic scaling and migration method and device | |
WO2016188100A1 (en) | Information system fault scenario information collection method and system | |
JP2005327261A (en) | Performance monitoring device, performance monitoring method and program | |
US8660816B2 (en) | Method, system, and computer program product for determining a hang state and distinguishing a hang state from an idle state | |
CN117632897A (en) | Dynamic capacity expansion and contraction method and device | |
KR20190061247A (en) | Real time resource usage ratio monitoring system of big data processing platform | |
CN111897626A (en) | Cloud computing scene-oriented virtual machine high-reliability system and implementation method | |
CN117032974A (en) | Dynamic scheduling method and terminal based on resource application | |
CN115480924A (en) | Method and device for processing job data, storage medium and electronic equipment | |
JP2001265650A (en) | Memory resource using condition monitoring device and memory resource using condition monitoring method | |
CN117806778B (en) | Resource management method, system, equipment and medium | |
CN113742117B (en) | Distributed task diagnosis method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AK | Designated states |
Kind code of ref document: A1 Designated state(s): JP US |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2004571568 Country of ref document: JP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 11170217 Country of ref document: US |