Report Server optimization based on report performance optimization scenario

Source: Internet
Author: User
Tags server memory xms

Memory

JVM stack memory is a key indicator of application server performance, the general server default memory configuration is relatively small, in larger application projects, this memory is not enough, so need to view and modify the Web server memory size, The following describes how server memory is viewed and how different server memory is modified.

The memory configuration methods for each application server are different, as listed below are the JVM parameter (-XMS,-XMX) configuration methods for common servers.

JVM parameter definitions:

-Xms: Initialize memory size

-XMX: Maximum memory that can be used

The following sample tools: report Development Tools Finereport

view of server memory

If you want to view the memory configuration of the application server, you can start the Web server and enter the platform system with the URL address: Http://localhost:8080/WebReport/ReportServer?op=fr_platform , select Management System > System monitoring > System Status > Memory Usage To view memory usage for the current Web server, such as:
650) this.width=650; "Title=" Click to view the original size picture "src=" http://dl2.iteye.com/upload/attachment/0111/5610/ A96d6cd6-0a10-3641-90f2-f84f959a46a1.png "width=" height= "370"/>

Note: If a user buys a data decision system, the URL address can be entered

Http://localhost:8075/WebReport/ReportServer?op=fs

which

Free Memory: 204M refers to the available remaining memory: 204M.

All memory: 247M refers to the current memory of the call is: 247M.

Maximum memory: 494M refers to the maximum memory that can be called: 494M.

finereport Memory Mechanism

1. Description

In the process of using the report, there are sometimes memory overflow problems, the following is a brief description of our report's memory mechanism and how to free memory.

2. Memory mechanism

2.1 Java Memory Recovery mechanism

The Java Memory garbage collection (GC) mechanism is to check the reference chain from the main running object of the program, and when it is traversed, it is found that no referenced orphaned objects are garbage collected. GC in order to properly dispose of objects, it is necessary to monitor the running state of each object. Including the application of objects, references, references, assignments, and so on, the GC needs to be monitored.

In Java, these useless objects are collected by the GC, while Java provides functions to access the GC, such as the function System.GC () that runs the GC, but according to the Java language Specification, the function does not guarantee that the JVM's garbage collector will execute. Because different JVM implementations may use different algorithms to manage the GC. Typically, GC threads have a lower priority level. There are a number of policies that the JVM calls the GC, some of which are used to a certain extent, the GC starts to work, there are timed executions, there is a gentle execution of the GC, and some interrupt-execution GC.

The main reason for a memory leak is that you previously requested a memory space and forgot to release it. If a reference to a useless object exists in the program, those objects will reside in memory and consume memory because the garbage collector GC cannot be verified that the objects are no longer needed. If there is a reference to the object, the object is defined as a "valid activity" and is not freed. To make sure that the object's memory will be recycled, we must make sure that the object is no longer in use.

Description of memory management release mechanism in 2.2 finereport

Finereport report background is written in the pure Java language, so its memory release mechanism is consistent with the above, when the client and the server side of the end of interaction (such as closing the browser page, print end, etc.), the server side will be the memory consumed by the previous client operation is freed, is set to be recycled state, Wait for the JVM to invoke the GC

3. Manual GC method in Finereport

Fr in the 1G memory of the critical point should be in the 130w row around the column, for some integration environment, it may be necessary to do some operations, the use of the FR memory released, Fr also provides a response interface, the following method is as follows:

Add a button to a template, click on the button, or call it directly in JS, as follows:

$.ajax ({url:FR.servletURL, data: {op: ' fr_utils ', cmd: ' gs_gc '}, Async:false,})



Report Server optimization based on report performance optimization scenario

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.