Garbage collecting and load balancing method and system of Java virtual machine

A java virtual machine, load balancing technology, applied in the field of load balancing, can solve problems such as business impact and server stalls

Inactive Publication Date: 2017-10-24
杭州吉吉知识产权运营有限公司
View PDF7 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] The technical problem to be solved by the present invention is to provide a method and system for garbage collection and load balancing of a Java virtual machine, which is used to solve the problem that the Java virtual machine server pauses when doing global garbage collection and affects business.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Garbage collecting and load balancing method and system of Java virtual machine
  • Garbage collecting and load balancing method and system of Java virtual machine
  • Garbage collecting and load balancing method and system of Java virtual machine

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0048] The present embodiment provides a garbage collection method of a Java virtual machine, such as figure 1 shown, including steps:

[0049] S11: Detect the usage rate of the old generation of the Java virtual machine through the detection process of the business server;

[0050] S12: Determine whether the usage rate of the old generation reaches the preset threshold, if so, send a notification to suspend the business request of the current business server to the notification process of the load balancer and start garbage collection, otherwise, continue to wait.

[0051] The acronym for Java Virtual Machine is JVM. JVM is a specification for computing equipment. It is a fictitious computer that is realized by simulating various computer functions on an actual computer.

[0052] In order to improve server performance, load balancer plus business server mode is widely used at present, such as Figure 9 as shown, Figure 9 It is a schematic diagram of a load balancing depl...

Embodiment 2

[0072] The present embodiment provides a garbage collection method of a Java virtual machine, such as image 3 shown, including steps:

[0073] S31: Detect the usage rate of the old generation of the Java virtual machine through the detection process of the business server;

[0074] S32: Determine whether the usage rate of the old generation reaches the preset threshold, if so, send a notification to suspend the business request of the current business server to the notification process of the load balancer and start garbage collection, otherwise, continue to wait;

[0075] S33: Determine whether the garbage collection has ended through the JVM log, and if so, send a notification of resuming the service request of the current service server to the notification process of the load balancer; otherwise, continue to wait.

[0076] The difference between this embodiment and the first embodiment is that step S33 is further included.

[0077] Specifically, it is judged whether the ...

Embodiment 3

[0086] The present embodiment provides a garbage collection method of a Java virtual machine, such as Figure 5 shown, including steps:

[0087] S51: Detect the JVM information and JVM log of the Java virtual machine at a preset time interval T;

[0088] S52: Detect the usage rate of the old generation of the Java virtual machine through the detection process of the business server;

[0089] S53: Determine whether the usage rate of the old generation reaches the preset threshold, if so, send a notification to suspend the business request of the current business server to the notification process of the load balancer and start garbage collection, otherwise, continue to wait;

[0090] S54: Determine whether the garbage collection has ended through the JVM log, and if so, send a notification of resuming the service request of the current service server to the notification process of the load balancer; otherwise, continue to wait.

[0091] The difference from Embodiment 1 and Em...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a garbage collecting and load balancing method and system of a Java virtual machine and aims to solve the problem that the Java virtual machine pauses and affect service when performing global garbage collection. The garbage collecting and load balancing method comprises the steps that S1, the tenured generation usage rate of the Java virtual machine is detected through a detection process of a service server; S2, whether the tenured generation usage rate reaches to a preset threshold value or not is judged, if yes, a notification for pausing a service quest of the current service server is sent to a notifying process of a load balancer, garbage collection begins, and if not, waiting continues. By adopting the garbage collecting and load balancing method, the problem of server pausing produced by garbage collection of the Java virtual machine in a cluster environment is solved.

Description

technical field [0001] The invention relates to the technical field of load balancing, in particular to a method and system for garbage collection and load balancing of a Java virtual machine. Background technique [0002] With the development of Internet technology, servers are used more and more widely, and Java, as one of the most popular high-level languages, is widely used in many companies. In order to improve the performance of the server, the mode of load balancer plus business server is generally adopted at present. [0003] Since the bottom layer of Java uses JVM technology, it effectively solves the memory leak problem caused by C / C++, but its garbage collection mechanism affects its performance. There are two main types of JVM garbage collection, Monitor GC and Full GC. The monitor GC takes a relatively short time and generally takes tens of milliseconds to complete, which will not have much impact on the business. However, the Full GC may sometimes take as lon...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/50G06F9/455
CPCG06F9/45558G06F9/5022G06F9/505G06F9/5077G06F2009/4557
Inventor 张伟
Owner 杭州吉吉知识产权运营有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products