LogoLogoLogoLogo
  • Home
  • Services
    • Enterprise Web Application
    • Mobile App Development
    • Product Engineering
    • Salesforce Consulting
    • Data Retrieval and Analytics
  • Technologies
  • About Us
  • Career
  • Blog
  • Contact

Turning Jasper Community Server on

Published by Shridhar Bhat on 07/23/2012
Reading Time: 2 minutes

The Jasper Server community edition is great for generating PDF and Excel reports. It provides

easy reporting and analytics capabilities. But it’s not tuned for performance out of the box. We recently built a reporting application that had to send out more than 3000 concurrent scheduled reports each day. This article details out performance tuning to achieve the requirement.

The Jasper Server is a beast that moves very slow out of the box. It could handle about 100 concurrent report requests. After that it would fail and that too silently. The community wiki has a nice page for improving the performance. Here’s what worked for us.
—

Configuring a connection pool for a JNDI data source

Jasper Reports Community recommends using JNDI data source to configure connection pool within the container. Head to /jasperserver/META-INF/context.xml file under Tomcat. In context.xml, tune the jdbc/jasperserver resource, and modify the following attributes as per your need

  1. maxActive: Maximum number of dB connections in pool. By default it’s value is 100. Set to -1 for no limit.
  2. maxIdle: Maximum number of idle dB connections to retain in pool. By default it’s value is 30. Set to -1 for no limit.
  3. maxWait: Maximum time to wait for a dB connection to become available in ms. By default it’s value is 10000. Set to -1 to wait indefinitely.

—

Configuring JVM options of tomcat

Default setting of JVM options is not suitable for production environment. To change JVM options you will have to modify JAVA_OPTS variable in JASPER_SERVER-DIR/apache-tomcat/bin/setenv.xml file. Modify heap and stack size according to RAM of machine

  1. Xms: Minimum heap size to start with. It has no default value.
  2. Xmx: Maximum heap size. It typically has a default value of 256MB. It should be set to 50% of available RAM on the system.
  3. Xss: It represents stack size and is used to limit how much memory a stack consumes.

—

Configuring Postgresql

For tuning Postgresql for production environment as default settings are not suitable for production, change following properties in JASPER_SERVER-DIR/postgresql/data/postgresql.conf file as per your need

  1. max_connections: Maximum number of database connections to have at any time. Default value is pretty low for production environment.
  2. shared_buffers: Default value is quite low, this should be set to roughly 25% of available RAM on the system.

—

Very Large Reports

You can increase the value of property maxSize in /jasperserver/WEB-INF/applicationContext.xml. However, you need to be careful with the values.

Shridhar Bhat
Shridhar Bhat
Founder and CEO, Sarvaha Systems Mr. Shridhar Bhat is Founder and CEO of Sarvaha Systems. He has deep expertise in network software, telecom and vehicle telematics, semantic web, ontological applications, healthcare, system software, distributed computing and mobile applications with great user experience designs. He provides technical leadership, customer engagement and mentorship to the company.

Related posts

04/20/2025

The Invisible Shield of Node.js: How the Module Wrapper Saves the Day


Read more
04/15/2025

How the Node.js Event Loop Works (and Why It’s Smarter Than You Think!)


Read more
01/23/2025

Mastering Decision-Making with the Cynefin Framework


Read more
  • The Invisible Shield of Node.js: How the Module Wrapper Saves the Day
  • How the Node.js Event Loop Works (and Why It’s Smarter Than You Think!)
  • Mastering Decision-Making with the Cynefin Framework
  • Introduction to Plugin Architecture
  • JavaScript Call Stack Demystified: A Beginner’s Guide to Understanding the Event Loop!

info@sarvaha.com
+91-90092 11212
+91-98220 35224
+1 (919) 371-5310

 

Enterprise Web Application
Mobile App Development
Data Retrieval and Analytics
Salesforce Consulting
Product Engineering

About Us
Contact Us
Career
Blog

  • Facebook
  • LinkedIn
  • Twitter
©2025 All rights reserved