[Methods of Paging Query for JVM 2,000,000 Data and Its Optimizations

Posted by scraptoft on Tue, 21 Dec 2021 17:52:48 +0100

In the Incremental mode l, each collection process is paused twice, and the second time is slightly longer. For the first time, simply query the surviving object from root. The second time it is used to examine the survivors in detail. The whole process is as follows:

* stop all application threads; do the initial mark; resume all application threads(First pause, initial call mark)

* do the concurrent mark (uses one procesor for the concurrent work)(Run is Tag)

* do the concurrent pre-clean (uses one processor for the concurrent work)(Ready to clean up)

* stop all application threads; do the remark; resume all application threads(Second pause, mark, check)

* do the concurrent sweep (uses one processor for the concurrent work)(Cleanup during run)

* do the concurrent reset (uses one processor for the concurrent work)(Restore)

When using the Incremental mode l, you need to use the following variables:

-XX:+CMSIncrementalMode default: disabled start-up i-CMS Mode ( must with -XX:+UseConcMarkSweepGC)

-XX:+CMSIncrementalPacing default: disabled Provides automatic correction

-XX:CMSIncrementalDutyCycle=<N> default: 50 start-up CMS Upline

-XX:CMSIncrementalDutyCycleMin=<N> default: 10 start-up CMS Downline

-XX:CMSIncrementalSafetyFactor=<N> default: 10 Used to calculate the number of loops

-XX:CMSIncrementalOffset=<N> default: 0 Minimum number of cycles ( This is the percentage (0-100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections.)

-XX:CMSExpAvgFactor=<N> default: 25 Provide a guided collection number

The recommended parameters for use by SUN are:

-XX:+UseConcMarkSweepGC \

-XX:+CMSIncrementalMode \

-XX:+CMSIncrementalPacing \

-XX:CMSIncrementalDutyCycleMin=0 \

-XX:CMSIncrementalDutyCycle=10 \

-XX:+PrintGC Details \

-XX:+PrintGCTimeStamps \

-XX:-TraceClassUnloading

Note: If used throughput collector and concurrent low pause collector,Both garbage collectors require an appropriate high memory size to prepare for multithreading.

3. How to select collector

===================

The app runs on a single-processor machine and does not require pause time, allowing the vm to select a single-threaded collector serial collector.

Focus on peak application performance, no pause time is too strict, choose parallel collector_ Parallel collector. _

Focus on response time,pause time is small, select concurrent collector_ Concurrent collector. _

Previous highlights:

Summary of Java Knowledge System (2021)

Summary of Java multithreading Basics

[Summary of Full Stack Full Java Framework] SSH, SSM, Springboot

Ultra-detailed springBoot learning notes

Summary of common data structures and algorithms

Summary of Essential Knowledge Points for Java Interview in 2021

In this section, I summarize the common interview questions in Java so far in 2019, take the interview core to compile this document note, analyze the interviewer's psychology, and understand the interviewer's "routine", so it is not difficult to complete more than 90% of the high-level interviews in Java.

This section summarizes the knowledge points of a series of Internet mainstream advanced technologies, including Message Queuing, Redis Caching, Base Tables, Read-Write Separation, Design of High Concurrency Systems, Distributed Systems, High Availability Systems, SpringCloud Micro-Service Architecture, etc.

Catalog:

(The above is just a general catalog outline, with the details shown below at each point, from interview questions - Analyzing interviewer Psychology - analyzing interview questions - a process of perfect answers)

Partial content:

Learning can't stop for every person who does technology. The Editor extracted the core knowledge of Java so far in 2019. No matter what stage you are at now, as you can see, the content of this document is perfect for both job interviews and technical breadth and depth.

If you don't want to be obsolete by Hourwave, let's get it started. The full HD version has 888 pages. If you need it, you can praise it and pay attention to it. Click here for free!

As you can see, the content of this document is perfect for both your job interview and your technical breadth and depth.

If you don't want to be obsolete by Hourwave, let's get it started. The full HD version has 888 pages. If you need it, you can praise it and pay attention to it. Click here for free!

Topics: Java Interview Programmer