application.conf 3.8 KB

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