|
@@ -1,69 +1,69 @@
|
|
|
-
|
|
|
# This is the main configuration file for the application.
|
|
|
# ~~~~~
|
|
|
|
|
|
# Secret key
|
|
|
# ~~~~~
|
|
|
# The secret key is used to secure cryptographics functions.
|
|
|
-#
|
|
|
-# This must be changed for production, but we recommend not changing it in this file.
|
|
|
-#
|
|
|
-# See http://www.playframework.com/documentation/latest/ApplicationSecret for more details.
|
|
|
play.http.secret.key = "RItx1I:80?W@]8GAtPDuF8Ydd3mXM85p/<7og]Q;uBOdijQAauRDgu73B6`wQP59"
|
|
|
|
|
|
# The application languages
|
|
|
# ~~~~~
|
|
|
play.i18n.langs = [ "en" ]
|
|
|
|
|
|
-# Router
|
|
|
-# ~~~~~
|
|
|
-# Define the Router object to use for this application.
|
|
|
-# This router will be looked up first when the application is starting up,
|
|
|
-# so make sure this is the entry point.
|
|
|
-# Furthermore, it's assumed your route file is named properly.
|
|
|
-# So for an application router like `my.application.Router`,
|
|
|
-# you may need to define a router file `conf/my.application.routes`.
|
|
|
-# Default to Routes in the root package (and conf/routes)
|
|
|
-# play.http.router = my.application.Routes
|
|
|
-
|
|
|
-# Database configuration
|
|
|
-# ~~~~~
|
|
|
-# You can declare as many datasources as you want.
|
|
|
-# By convention, the default datasource is named `default`
|
|
|
-#
|
|
|
-# db.default.driver=org.h2.Driver
|
|
|
-# db.default.url="jdbc:h2:mem:play"
|
|
|
-# db.default.username=sa
|
|
|
-# db.default.password=""
|
|
|
-
|
|
|
-max-db-ops = 1024
|
|
|
-
|
|
|
-# You can expose this datasource via JNDI if needed (Useful for JPA)
|
|
|
-# db.default.jndiName=DefaultDS
|
|
|
-db.hello_world.driver= com.mysql.jdbc.Driver
|
|
|
-db.hello_world.url="jdbc:mysql://127.0.0.1:3306/hello_world?alwaysSendSetIsolation=false&avoidCheckOnDuplicateKeyUpdateInSQL=true&cacheCallableStmts=true&cachePrepStmts=true&cacheRSMetadata=true&cacheServerConfiguration=true&characterEncoding=UTF-8&dontTrackOpenResources=true&elideSetAutoCommits=true&jdbcCompliantTruncation=false&maintainTimeStats=false&prepStmtCacheSize=500&prepStmtCacheSqlLimit=2048&useUnbufferedInput=false&useReadAheadInput=false&useLocalSessionState=true&useServerPrepStmts&useSSL=false&rewriteBatchedStatements=true&traceProtocol=false&zeroDateTimeBehavior=convertToNull"
|
|
|
-db.hello_world.username=benchmarkdbuser
|
|
|
-db.hello_world.password=benchmarkdbpass
|
|
|
-db.hello_world.jndiName=DefaultDS
|
|
|
+# Disable default filters
|
|
|
+play.filters.enabled = [ ]
|
|
|
|
|
|
-db.hello_world.partitionCount=4
|
|
|
+play.server.akka.server-header = "Play2"
|
|
|
|
|
|
-# The number of connections to create per partition. Setting this to
|
|
|
-# 5 with 3 partitions means you will have 15 unique connections to the
|
|
|
-# database. Note that BoneCP will not create all these connections in
|
|
|
-# one go but rather start off with minConnectionsPerPartition and
|
|
|
-# gradually increase connections as required.
|
|
|
-db.hello_world.maxConnectionsPerPartition=64
|
|
|
+# Number of database connections
|
|
|
+# https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
|
|
|
+# db connections = ((physical_core_count * 2) + effective_spindle_count)
|
|
|
+# The TechEmpower benchmark environment uses 2 x 4-Core E5520 CPUs in the database server
|
|
|
+# That is 8 physical cores
|
|
|
+# https://www.techempower.com/benchmarks/#section=environment
|
|
|
+fixedConnectionPool = 17
|
|
|
|
|
|
-# The number of initial connections, per partition.
|
|
|
-db.hello_world.minConnectionsPerPartition=64
|
|
|
+database.dispatcher {
|
|
|
+ executor = "thread-pool-executor"
|
|
|
+ throughput = 1
|
|
|
+ thread-pool-executor {
|
|
|
+ fixed-pool-size = ${fixedConnectionPool}
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
-# Evolutions
|
|
|
+# Database configuration
|
|
|
# ~~~~~
|
|
|
-# You can disable evolutions if needed
|
|
|
-play.evolutions.enabled=false
|
|
|
-
|
|
|
-# You can disable evolutions for a specific datasource if necessary
|
|
|
-# play.evolutions.db.default.enabled=false
|
|
|
-
|
|
|
-play.filters.enabled=[]
|
|
|
+# You can declare as many datasources as you want.
|
|
|
+# By convention, the default datasource is named `default`
|
|
|
+db {
|
|
|
+ default {
|
|
|
+ # https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration
|
|
|
+ url = "jdbc:mysql://TFB-database:3306/hello_world"
|
|
|
+ username = "benchmarkdbuser"
|
|
|
+ password = "benchmarkdbpass"
|
|
|
+ hikaricp {
|
|
|
+ dataSource {
|
|
|
+ cachePrepStmts=true
|
|
|
+ prepStmtCacheSize=250
|
|
|
+ prepStmtCacheSqlLimit=2048
|
|
|
+ useServerPrepStmts=true
|
|
|
+ useLocalSessionState=true
|
|
|
+ useLocalTransactionState=true
|
|
|
+ rewriteBatchedStatements=true
|
|
|
+ cacheResultSetMetadata=true
|
|
|
+ cacheServerConfiguration=true
|
|
|
+ cacheCallableStmts=true
|
|
|
+ callableStmtCacheSize=250
|
|
|
+ elideSetAutoCommits=true
|
|
|
+ maintainTimeStats=false
|
|
|
+ alwaysSendSetIsolation=false
|
|
|
+ zeroDateTimeBehavior="convertToNull"
|
|
|
+ traceProtocol=false
|
|
|
+ jdbcCompliantTruncation=false
|
|
|
+ useUnbufferedInput=false
|
|
|
+ #useReadAheadInput=false
|
|
|
+ }
|
|
|
+ maximumPoolSize = ${fixedConnectionPool}
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|