Pentaho BI Server handles multivalued parameters and JVM settings __report

Source: Internet
Author: User
Tags garbage collection xms

In practice, a report might require users to specify some parameters to filter more specific reports. This is basically not a problem in the designer. The situation may be somewhat different when you want to publish the publication to Pentaho BI server. For example, these parameters may have many values, such as thousands, and allow users to select multiple. Also, each of the Pentaho contains a different amount of data, and in some cases can be very large, which requires a little configuration of the BI server to work properly.

By default, the Pentaho BI server reserved for the memory is relatively small. This is also due to saving server resources. As we all know, Pentaho BI server is java-based, runs in the JVM, and the application in Pentaho is run on the Tomcat platform, and Tomcat has its own settings. Therefore, whether a single containing parameter can function correctly depends on the JVM and Tomcat settings. The following are two ways to analyze how to set up.setting up the JVM The maximum value of the-xmx:java heap. The minimum value of the-xms:java heap. If you set-XMS=1.8GB on a 32-bit machine, the other programs will be hard to run. -XMN: Newborn Object (young generation, for the moment) heap size, best set 33%. Young generation refers to all objects with shorter life cycles. These objects are located in a special location in Heap (Eden). The Java garbage collector (garbage collector) will often patronize Eden. All newly created objects are in Eden, and if a new object survives the GC sweep 2-3 times, it will be transformed into an old Generation and transferred to tenured. -xx:newratio:young the size ratio of the generation to the old generation. The initial size of the-xx:newsize:young generation in the JVM. If-xx:newratio is already specified, then this item is automatically calculated. -xx:maxnewsize:young The maximum space that generation can grow. If you do not specify this item, the default is infinite. -xx:survivorratio: Specifies the proportion of Tenuredhe and Eden. -xx:minheapfreeratio: The default is 40%. When-xmx and-XMS are invalid, the JVM always relies on this item to allocate 40% of the free memory to the heap. -xx:maxheapfreeratio: The default is 70%. Ditto, but to avoid the waste of memory. The initial value of the-xx:permsize:permanent space. The maximum value of the-xx:maxpermsize:permanent space. Code Generation: Bytecode (byte code) is converted to the original code (native codes). Socket buffer: Includes 2 cache (buffer): Receive/send. Thread Stacks: line stacks, each thread has its own stack (stack), which makes the method thread-safe. -XSS: Used to change the size of the line stacks. Direct Memory Space: This allows Java developers to map a certain amount of memory to the outside of the Java object Stack (Java objects Heap). JNI Code: Rarely used. Garbage Collection: The garbage collector also has its own memory space to store information about threads and GC. Most of the GC work in tenThe ured part is not executed until it is exhausted.

In biserver-ce/start-pentaho.sh you will find the following line of code:

Export catalina_opts= "-xms256m-xmx768m-xx:maxpermsize=256m-dsun.rmi.dgc.client.gcinterval=3600000- Dsun.rmi.dgc.server.gcinterval=3600000″

Let's start from the bottom up.

The JVM is divided into 32bit and 64bit two versions. For 32-bit operating systems, the JVM cannot be larger than 4GB in RAM. Os outside of 4GB is useful. For example, Windows needs 2GB for its kernel to use, and the rest can be assigned to the JVM. Typically, the JVM heap is not greater than 1.2-1.6GB. So what is JVM heap. The following will be analyzed slowly.

JVM Memory

The above illustration is an example that describes the Java process heap (Java processing heap).

As shown in the illustration, the Java heap is a contiguous area in memory, where all object data is stored, including instances of the class (Instance of Class), the original function (primitive), and the reference (references).

We can configure the Java Heap with options:

So far, we have overlooked one problem, that is multithreading. In multi-threaded applications, objects are created at the same time, so these threads are likely to write concurrently for the same heap. To avoid this problem, the JVM allows each thread to have its own piece of Eden.

The next step is the remaining memory allocations.

Permanent space: This is the third part of the JVM where all classes (classes) and methods (methods) are stored.

Now that we have a general idea of the JVM's settings, although we don't need to set all the options above, knowing these will help you better set up memory for your program. Generally speaking,-XMX does not exceed 1/2 of the physical memory, and-XMS is not less than 1/2 of the-xmx. However, for the different production environment, it is necessary to adjust and test to find the best setting according to the actual situation. This section translates from Get started with Java JVM memory (heap, stack,-xss-xms-xmx-xmn ...), more JVM settings Reference Http://www.slideshare.net/gengmao/insi De-the-jvm-memory-management-and-troubleshooting. Set Tomcat

Locate the tomcat/conf/server.xmlin the Tomcat installation directory. There is a paragraph:

<connector uriencoding= "utf-8″port=" 8080″protocol= "Http/1.1″

Connectiontimeout= "20000″

Redirectport= "8443″/>

This is an HTTP connector that is responsible for HTTP requests (request) and response (Response). Here, we can change the size of the HTTP request/response header. The method is to add a "maxhttpheadersize= 16448″". MAXHTTPHEADERSIZE Specifies the maximum value of the HTTP request/response header, in bytes (byte), and the default value is 4096 (4KB).

After the above two settings are reasonable, the appropriate number of parameter values can be selected for the reporting, and the number of rows that can be accommodated by the bill will also increase.

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.