application.conf 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. play.server.server-header = "Play2"
  13. play.server {
  14. netty {
  15. transport = "native"
  16. option {
  17. SO_BACKLOG = 256
  18. child {
  19. SO_KEEPALIVE = true
  20. TCP_NODELAY = true
  21. # The default is 1 since Linux Kernel 3.13
  22. # You can check via "cat /proc/sys/net/ipv4/tcp_fastopen"
  23. # 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
  24. TCP_FASTOPEN = 1
  25. }
  26. }
  27. }
  28. }
  29. akka {
  30. actor {
  31. default-dispatcher {
  32. fork-join-executor {
  33. # The TechEmpower benchmark environment uses 4x 10-Core E7-4850 CPUs in the application server
  34. # That is 40 physical cores / 80 hyperthreaded cores
  35. # https://www.techempower.com/benchmarks/#section=environment
  36. parallelism-max = 40
  37. }
  38. }
  39. }
  40. }
  41. # Number of database connections
  42. # https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
  43. # db connections = ((physical_core_count * 2) + effective_spindle_count)
  44. # The TechEmpower benchmark environment uses 2 x 4-Core E5520 CPUs in the database server
  45. # That is 8 physical cores
  46. # https://www.techempower.com/benchmarks/#section=environment
  47. fixedConnectionPool = 17
  48. database.dispatcher {
  49. executor = "thread-pool-executor"
  50. throughput = 1
  51. thread-pool-executor {
  52. fixed-pool-size = ${fixedConnectionPool}
  53. }
  54. }
  55. # Database configuration
  56. # ~~~~~
  57. # You can declare as many datasources as you want.
  58. # By convention, the default datasource is named `default`
  59. db {
  60. default {
  61. # https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration
  62. url = "jdbc:mysql://TFB-database:3306/hello_world"
  63. username = "benchmarkdbuser"
  64. password = "benchmarkdbpass"
  65. hikaricp {
  66. dataSource {
  67. characterEncoding=UTF-8
  68. dontTrackOpenResources=true
  69. dontCheckOnDuplicateKeyUpdateInSQL=true
  70. cachePrepStmts=true
  71. prepStmtCacheSize=500
  72. prepStmtCacheSqlLimit=2048
  73. useServerPrepStmts=true
  74. useLocalSessionState=true
  75. useLocalTransactionState=true
  76. rewriteBatchedStatements=true
  77. cacheResultSetMetadata=true
  78. cacheServerConfiguration=true
  79. cacheCallableStmts=true
  80. callableStmtCacheSize=250
  81. elideSetAutoCommits=true
  82. maintainTimeStats=false
  83. alwaysSendSetIsolation=false
  84. zeroDateTimeBehavior="convertToNull"
  85. traceProtocol=false
  86. jdbcCompliantTruncation=false
  87. useUnbufferedInput=false
  88. useReadAheadInput=true
  89. useSSL=false
  90. }
  91. maximumPoolSize = ${fixedConnectionPool}
  92. }
  93. jndiName = DefaultDS
  94. }
  95. }
  96. jpa.default = defaultPersistenceUnit