Hello Ivy team, By the default, an ivy datasource has max connection is "5". Now we are facing with an issue that our application run very slowly. If we change the max connection from "5" to "50", the performance is really better, we can see the big different result after changing. The question is what is the suitable number of max connection? And can you share a little bit how you handle the connection pool in Ivy? Best regards, Nam Nguyen asked 01.08.2016 at 12:08 namnguyenwow |
Hi The number of max connection that suits best is depending on the project and the number of concurrent users. It is therefore not easy to define a good default value that suits all problems well. If you see bad performance use our VisualVM Plugin. There you see how many database connection are currently in use and what are the response times of the databases. If the number of database connection is almost at the maximum it is appropriate to increase the maximum. Note, that it might be counterproductive to increase the maximum database connection to a high value, since each connection consumes resources on the database server. Also have a look at the list with the slowest SQL statements. If a statement needs more than a second to execute it, it is worth to analyse the statement and try to optimize it. Note, that a database connection is reserved by a SQL statement. The longer a statement takes to execute the longer a database connection is reserved and meanwhile cannot be used by other request threads. Sometimes an additional index on a table column can boost performance by a factor of 1000. Especially if you have a lot of rows. Use database tools to explain how the SQL Statement is executed and find out if indexes are used to execute the statement or not. For more information about our VisualVM Plugin see here: VisualVM Plugin answered 03.08.2016 at 17:39 Reto Weiss ♦♦ |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 01.08.2016 at 12:08
Seen: 1,912 times
Last updated: 03.08.2016 at 17:39