irfa Posted July 9, 2014 Share Posted July 9, 2014 HiIm using jr-server 5.5.0 with MySQL on Linux.When I execute query in db its working fast. But when i put same query in report, db take much more time to process it and return to jr server.Query returns 7084 rows in more then 700 pages.My tomcat config:/opt/jasperreports-server-cp-5.5.0a/java/bin/java -Djava.util.logging.config.file=/opt/jasperreports-server-cp-5.5.0a/apache-tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=512m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Djava.awt.headless=true -Djava.endorsed.dirs=/opt/jasperreports-server-cp-5.5.0a/apache-tomcat/endorsed -classpath /opt/jasperreports-server-cp-5.5.0a/apache-tomcat/bin/bootstrap.jar:/opt/jasperreports-server-cp-5.5.0a/apache-tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/jasperreports-server-cp-5.5.0a/apache-tomcat -Dcatalina.home=/opt/jasperreports-server-cp-5.5.0a/apache-tomcat -Djava.io.tmpdir=/opt/jasperreports-server-cp-5.5.0a/apache-tomcat/tempI try to replace<bean id="fileVirtualizerFactory" class="com.jaspersoft.jasperserver.api.engine.common.service.impl.FileVirtualizerFactory"> <property name="maxSize" value="300"/> <property name="directory" value="${java.io.tmpdir}"/> </bean>with<bean id="fileVirtualizerFactory" class="com.jaspersoft.jasperserver.api.engine.common.service.impl.GZipVirtualizerFactory"> <property name="maxSize" value="700"/> </bean>and it wasn't better Link to comment Share on other sites More sharing options...
marianol Posted July 9, 2014 Share Posted July 9, 2014 Is the query fetch time or the report fill process that is taking most of the time? Link to comment Share on other sites More sharing options...
irfa Posted July 10, 2014 Author Share Posted July 10, 2014 query taking most of the time. When i run report, Im looking in mysql with "show processlist" and take about 8 sec to execute. Same query directly in mysql execute in less than 1 sec Link to comment Share on other sites More sharing options...
marianol Posted July 10, 2014 Share Posted July 10, 2014 If is the query time in the MySQL backend Jasper has nothing to do there, and the changes you made to the report virtualizers will not help since those only affect the report fill time not the query time or fetch time. It may an issue with the JDBC driver for mySQL. JRS ships with the MariaDB JDBC driver for MySQL why don't you try changing it to the MySQL JConnect Driver? you can get it here http://dev.mysql.com/downloads/connector/j/5.1.htmlAlso think about the fetch time, once the query is executed the results (7K rows) have to be transmited to where the Jasper Server instace is so there are network/socket, try logging the queries @ the mysql side and also @ the jasper server side (for jasperserver log net.sf.jasperreports.engine.query.JRJdbcQueryExecuter=DEBUG see http://community.jaspersoft.com/wiki/log4jproperties-jasperreports-server) Link to comment Share on other sites More sharing options...
hozawa Posted July 10, 2014 Share Posted July 10, 2014 If you have the commercial version, try enabling the audit. Look at the Performance report. Link to comment Share on other sites More sharing options...
irfa Posted July 14, 2014 Author Share Posted July 14, 2014 Not regarding for this issue: Is MaxPermSize important for report fill time? Do I need to increase my PermSize for better performance? I have some reports with graphics taking more time to fill. About this. Im already using JConnect Driver. It wasn't last version, but nothing changed with new. I try with MariaDB and its same. Ill try now with logging. Link to comment Share on other sites More sharing options...
irfa Posted February 26, 2015 Author Share Posted February 26, 2015 HiAgain same problem. But now query return only 1 row.It seams that query from report does not use index. I can find it in mysqld-slow.log file.Row sent: 1 , Row_examined: more then 39MIn mysql workbench its fast, with "explain select..." i can see that use index. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now