# This is the main configuration file for the application. # ~~~~~ # Secret key # ~~~~~ # The secret key is used to secure cryptographics functions. play.http.secret.key = "`o0VB@vXStsF:ffwM5ZZ_r:GYkm96QM[nRUJLpEbI8hwLUdV;N<:UyUWI;lf/XP`" # The application languages # ~~~~~ play.i18n.langs = [ "en" ] # Disable default filters play.filters.enabled = [ ] play.server.server-header = "Play2" play.server { netty { transport = "native" # Whether the Netty wire should be logged log.wire = false option { SO_BACKLOG = 256 child { SO_KEEPALIVE = true TCP_NODELAY = true # The default is 1 since Linux Kernel 3.13 # You can check via "cat /proc/sys/net/ipv4/tcp_fastopen" # However 3 would be better, but we can't change it to that value because we don't have root permission when running the benchmarks TCP_FASTOPEN = 1 } } } } akka { actor { default-dispatcher { fork-join-executor { # The TechEmpower benchmark environment uses 4x 10-Core E7-4850 CPUs in the application server # That is 40 physical cores / 80 hyperthreaded cores # https://www.techempower.com/benchmarks/#section=environment parallelism-max = 40 task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.6.x/Migration24#Thread-pool-configuration } # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher # Throughput defines the maximum number of messages to be # processed per actor before the thread jumps to the next actor. # Set to 1 for as fair as possible. throughput = 1 } } } # 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 database.dispatcher { executor = "thread-pool-executor" throughput = 1 thread-pool-executor { fixed-pool-size = ${fixedConnectionPool} } } # Database configuration # ~~~~~ # 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 { characterEncoding=UTF-8 dontTrackOpenResources=true dontCheckOnDuplicateKeyUpdateInSQL=true cachePrepStmts=true prepStmtCacheSize=500 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=true useSSL=false } maximumPoolSize = ${fixedConnectionPool} } jndiName = DefaultDS } } jpa.default = defaultPersistenceUnit