application.conf 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # This is the main configuration file for the application.
  2. # ~~~~~
  3. # Secret key
  4. # ~~~~~
  5. # The secret key is used to secure cryptographics functions.
  6. play.http.secret.key = "`o0VB@vXStsF:ffwM5ZZ_r:GYkm96QM[nRUJLpEbI8hwLUdV;N<:UyUWI;lf/XP`"
  7. # The application languages
  8. # ~~~~~
  9. play.i18n.langs = [ "en" ]
  10. # Disable default filters
  11. play.filters.enabled = [ ]
  12. # Disable thread local, it's not used by this application
  13. # ~~~~~
  14. play.allowHttpContext = false
  15. play.jpa.allowJPAEntityManagerContext = false
  16. play.modules {
  17. enabled += "startup.StartupModule"
  18. }
  19. play.server.server-header = "Play2"
  20. play.server {
  21. netty {
  22. transport = "native"
  23. # Whether the Netty wire should be logged
  24. log.wire = false
  25. option {
  26. SO_BACKLOG = 256
  27. child {
  28. SO_KEEPALIVE = true
  29. TCP_NODELAY = true
  30. # The default is 1 since Linux Kernel 3.13
  31. # You can check via "cat /proc/sys/net/ipv4/tcp_fastopen"
  32. # 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
  33. TCP_FASTOPEN = 1
  34. }
  35. }
  36. }
  37. }
  38. akka {
  39. actor {
  40. default-dispatcher {
  41. fork-join-executor {
  42. # Information about the TechEmpower benchmark environment: https://www.techempower.com/benchmarks/#section=environment
  43. # The environment variable physical_cpu_count does NOT include the hyperthreaded cores!
  44. parallelism-max = 14
  45. parallelism-max = ${?physical_cpu_count}
  46. task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.7.x/Migration24#Thread-pool-configuration
  47. }
  48. # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher
  49. # Throughput defines the maximum number of messages to be
  50. # processed per actor before the thread jumps to the next actor.
  51. # Set to 1 for as fair as possible.
  52. throughput = 1
  53. }
  54. }
  55. }
  56. # Number of database connections
  57. # https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
  58. # db connections = ((physical_core_count * 2) + effective_spindle_count)
  59. # https://www.techempower.com/benchmarks/#section=environment
  60. fixedConnectionPool = 17
  61. fixedConnectionPool = ${?db_pool_size}
  62. database.dispatcher {
  63. executor = "thread-pool-executor"
  64. throughput = 1
  65. thread-pool-executor {
  66. fixed-pool-size = ${fixedConnectionPool}
  67. }
  68. }
  69. # Database configuration
  70. # ~~~~~
  71. # You can declare as many datasources as you want.
  72. # By convention, the default datasource is named `default`
  73. db {
  74. default {
  75. # https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration
  76. url = "jdbc:mysql://tfb-database:3306/hello_world"
  77. username = "benchmarkdbuser"
  78. password = "benchmarkdbpass"
  79. hikaricp {
  80. dataSource {
  81. characterEncoding=UTF-8
  82. dontTrackOpenResources=true
  83. dontCheckOnDuplicateKeyUpdateInSQL=true
  84. cachePrepStmts=true
  85. prepStmtCacheSize=500
  86. prepStmtCacheSqlLimit=2048
  87. useServerPrepStmts=true
  88. useLocalSessionState=true
  89. useLocalTransactionState=true
  90. rewriteBatchedStatements=true
  91. cacheResultSetMetadata=true
  92. cacheServerConfiguration=true
  93. cacheCallableStmts=true
  94. callableStmtCacheSize=250
  95. elideSetAutoCommits=true
  96. maintainTimeStats=false
  97. alwaysSendSetIsolation=false
  98. zeroDateTimeBehavior="convertToNull"
  99. traceProtocol=false
  100. jdbcCompliantTruncation=false
  101. useUnbufferedInput=false
  102. useReadAheadInput=true
  103. useSSL=false
  104. }
  105. maximumPoolSize = ${fixedConnectionPool}
  106. }
  107. jndiName = DefaultDS
  108. }
  109. }
  110. jpa.default = defaultPersistenceUnit