Home » Main » Database Tuning (Advanced Topic)

Database Tuning (Advanced Topic)

This knowledge base article is targeted at experienced DBAs running PaperCut on external databases such as Oracle, Postgresql, Microsoft SQL Server or MySQL. Sites experimenting with database tuning parameters are advised to upgrade to the latest version of PaperCut. DBAs are also encourage to speak with the PaperCut development team for advice.

Database tuning parameters are configured via the database connection details in the server.properties file located at:

[install-path]/server/server.properties

This file may be edited with a standard text editor. The following tuning parameters may be appending to this file:

database.pool.min-pool-size

Minimum number of database connections the pool will maintain at any given time. Do not set this too high, as it will be very wasteful of database resources. 5 is a good default for most sites, and we would not recommend more than 15 for the vast majority of sites.
Default: database.pool.min-pool-size=5

database.pool.max-pool-size

Maximum number of database connections the pool will maintain at any given time. If your DB has a hard limit (e.g. Oracle), consider setting this to slightly below the hard-limit. e.g. if the hard-limit is 200 then set to 190.
Default: database.pool.max-pool-size=<Dynamic based on system configuration>

database.pool.max-idle-secs

Seconds a connection can remain pooled but unused before being discarded. This allows idle connections to be periodically renewed to clear out stale connections (e.g. if DB is restarted).
Default: database.pool.max-idle-secs=600

database.pool.max-idle-secs-excess-connections

Number of seconds that connections in excess of min-pool-size should be permitted to remain idle in the pool before being culled. Zero means no enforcement and excess connections will not be removed, however it setting to zero is NOT recommended, as it will be wasteful. 60 seconds is a reasonable configuration.
Default: database.pool.max-idle-secs-excess-connections=60

database.pool.test-period-secs

Test idle connections every number of sections. If the connection is found to be dead it will be removed from the pool.
Default: database.pool.min-pool-size=120

Categories: Databases, Architecture


keywords: database connection limits, RDMS, performance, data base configuration

Page last modified on August 30, 2011, at 08:13 AM

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.