BackPrevious Page Next PageNext

Tuning Server Performance

Preloading catalogs and reports

Customizing the heartbeat interval

Using the Action Task Manager

Configuring table pipeline

Many variables affect the performance of JReport Server, for example, the hardware and software environment that it runs in. You may or may not have any influence in this regard, but you are able to carry out performance tuning to make JReport Server efficient, reliable, and fast.

The following lists the factors that help with the server performance:

Preloading catalogs and reports

Catalogs, reports, analysis templates, as well as Java classes and fonts can be preloaded when JReport Server is started so as to improve performance.

  1. On the JReport Administration page, click Configuration on the system toolbar and select Performance from the drop-down menu. The Configuration - Performance page is displayed.

    Configure Performance

  2. Click the Add button beside the Catalogs to Be Preloaded box.
  3. In the displayed dialog, click the Browse button to select the folder or type in the folder name with full path in the server resource tree directly, for example, /SampleReports. The catalogs in the folder will be loaded. Select a catalog and its version from the corresponding drop-down list and then click OK. The catalog will be added in the Catalogs to Be Preloaded box.
  4. Repeat the above step to add more catalogs to the Catalogs to Be Preloaded box. To remove an unwanted catalog from the box, select it and click Remove.
  5. Click the Add button beside the Reports to Be Preloaded box.
  6. In the displayed dialog, click the Browse button to select the folder or type in the folder name with full path in the server resource tree directly, for example, /SampleReports. The reports and analysis templates in the folder will be loaded. Select a report or analysis template and its version from the corresponding drop-down list and then click OK. The report or analysis template will be added in the Reports to Be Preloaded box.
  7. Repeat the above step to add more reports and analysis templates to the Reports to Be Preloaded box. To remove an unwanted report or analysis template from the box, select it and click Remove.
  8. To preload Java classes that are used by catalogs, reports and the JReport Engine, select the corresponding checkboxes. Preloading some useful Java classes will improve performance. Otherwise, it will take some time for JReport Server to load any required Java classes when generating reports. The feature is not available to organization admin.
  9. To preload the fonts used by reports, check the Preload Fonts checkbox. The option is not available to organization admin.
  10. To compress the temporary data generated during runtime before it is swapped to disk, select the Compress Swap Files checkbox. By compressing the swap files, the I/O efforts in certain circumstance may be remarkably reduced so that the overall performance can be improved. This function is not available to organization admin.

    Note: Compressing swap files will increase CPU pressure because it uses compress algorithm to shrink data, so if your system already has high CPU usage, enabling this option will bring extra performance impact, depending on different circumstance, and such impact may overcome the performance gain that comes from reducing I/O time.

  11. Click Save and then restart JReport Server to make the settings to take effect.

Customizing the heartbeat interval

The heartbeat mechanism is introduced in Web Report Studio, Page Report Studio, JDashboard, and Visual Analysis. It works together with user session timeout to release the unused resources of the products in time. Heartbeat is activated by default. It begins to work after any of the products are opened, by reporting to JReport Server that the product is alive per a period of time in a way similar to heartbeats. If within 3 times of the heartbeat interval JReport Server has not received a heartbeat, the product will be expired and the resources be released. Heartbeat stops in the following situations:

If the heartbeat interval is shorter than the user session timeout time which can be configured by the administrator on the JReport Server Administration page > Configuration > Advanced page, the session will not expire as long as there are heartbeats. If the heartbeat interval is longer than the session timeout time, the session will be expired when the session times out.

The following parameters are used for heartbeat:

Heartbeat can be configured by adding the JVM parameter -Djrd.heartbeat and -Djrd.hbtimeout in the JReport Server startup file. In an integration environment, you can also specify the parameters in web.xml:

<context-param>
<param-name>jrd.heartbeat</param-name>
<param-value>15000</param-value>
</context-param>
<context-param>
<param-name>jrd.hbtimeout</param-name>
<param-value>45000</param-value>
</context-param>

Heartbeat uses Web Worker technology of HTML5. Web Worker is supported by Firefox, Chrome, Safari and IE10 where it is working in a separate javascript thread. But in IE9, IE8 JReport can only simulate Web Worker using iFrame, which means that the heartbeat code can be blocked by render code in IE 9 browsers.

Using the Action Task Manager

The Action Task Manager coordinates Page Report Studio actions through two fixed-size tables:

Note: Only certain operations that consume considerable hardware resources need to be prevented from being run at the same time. You can define which kind of requests need to be queued before being processed.

Action Task Manager

When a new Page Report Studio request reaches the server, it will be processed according to the following flow:

  1. The Page Report Studio service determines whether the requested operation is a restricted action. If it is, the Action Task Manager will take over the request. Otherwise, it will be processed directly, without being managed by the Action Task Manager.
  2. If the Concurrent Processing Table is full, the restricted request will be assigned to the Waiting Requests Queue. If the queue is full, the Page Report Studio service will refuse the request and return a warning message.
  3. After the request has been processed, it will be de-registered from the Concurrent Processing table. The Page Report Studio service will then automatically continue to process the requests in the Waiting Requests Queue.

By using the property file dhtml.properties provided in Page Report Studio, you can balance the server load by adjusting table sizes and specify which kind of requests are managed by the Action Task Manager to queue page report actions to ensure Page Report Studio features do not take too many system resources and impact other functions。

dhtml.properties

The dhtml.properties file is located at <install_root>\bin. It allows you to control three major options for the Action Task Manager:

Run

Configuring table pipeline

Table pipeline allows tables to show result as soon as there are data ready for the first page while partial summaries and the rest are still being processed in the background. By default, it is enabled on JReport Server to help speed up the rendering performance of tables in web reports and dashboards that involve millions of data records.

To configure table pipeline:

  1. Go to the Profile > Customize Profile > Common tab.
  2. The Table Pipeline option is checked by default.
  3. In the Table Block Refresh Time text box, specify the time interval in seconds for refreshing data so as to update partial data before the tables are fully ready.
  4. Click OK to save the changes.

Table pipeline can work in most cases. However when a table is applied component level sort and the Prefetch property of the business view the table uses is true, in order to make table pipeline take effect, the table and all the other data components in the same web report or dashboard that use the same business view should have the same component level sort setting: the same sort on field (sorting group by summary is excluded) and the same sort order.

In addition, if your report database is MySQL which fetches all data before returning the result set and JReport has to wait for the result set, the performance would not be much improved even when table pipeline is enabled. To solve the problem, you need to make fetch size work for MySQL in either ways:

BackPrevious Page Next PageNext