Browse Source

Try DB pool size = CPU count * 2 for Crystal (#4285)

Vladislav Zarakovsky 6 years ago
parent
commit
d2e8962b60

+ 1 - 1
frameworks/Crystal/amber/amber.dockerfile

@@ -9,7 +9,7 @@ COPY shard.yml shard.yml
 
 
 ENV GC_MARKERS 1
 ENV GC_MARKERS 1
 ENV AMBER_ENV production
 ENV AMBER_ENV production
-ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=8&max_pool_size=8&max_idle_pool_size=8
+ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=56&max_pool_size=56&max_idle_pool_size=56
 
 
 RUN apt install -yqq libyaml-dev
 RUN apt install -yqq libyaml-dev
 RUN shards build amber --release --no-debug
 RUN shards build amber --release --no-debug

+ 1 - 1
frameworks/Crystal/crystal/crystal-radix.dockerfile

@@ -8,7 +8,7 @@ COPY shard.lock shard.lock
 COPY shard.yml shard.yml
 COPY shard.yml shard.yml
 
 
 ENV GC_MARKERS 1
 ENV GC_MARKERS 1
-ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=8&max_pool_size=8&max_idle_pool_size=8
+ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=56&max_pool_size=56&max_idle_pool_size=56
 
 
 RUN shards install
 RUN shards install
 RUN crystal build --release --no-debug server_radix.cr -o server_radix.out
 RUN crystal build --release --no-debug server_radix.cr -o server_radix.out

+ 1 - 1
frameworks/Crystal/crystal/crystal.dockerfile

@@ -8,7 +8,7 @@ COPY shard.lock shard.lock
 COPY shard.yml shard.yml
 COPY shard.yml shard.yml
 
 
 ENV GC_MARKERS 1
 ENV GC_MARKERS 1
-ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=8&max_pool_size=8&max_idle_pool_size=8
+ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=56&max_pool_size=56&max_idle_pool_size=56
 
 
 RUN shards install
 RUN shards install
 RUN crystal build --release --no-debug server.cr -o server.out
 RUN crystal build --release --no-debug server.cr -o server.out

+ 1 - 1
frameworks/Crystal/kemal/kemal.dockerfile

@@ -9,7 +9,7 @@ COPY shard.yml shard.yml
 
 
 ENV GC_MARKERS 1
 ENV GC_MARKERS 1
 ENV KEMAL_ENV production
 ENV KEMAL_ENV production
-ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=8&max_pool_size=8&max_idle_pool_size=8
+ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=56&max_pool_size=56&max_idle_pool_size=56
 
 
 RUN shards install
 RUN shards install
 RUN crystal build --release --no-debug server-postgres.cr
 RUN crystal build --release --no-debug server-postgres.cr

+ 1 - 1
frameworks/Crystal/raze/raze.dockerfile

@@ -7,7 +7,7 @@ COPY raze.cr raze.cr
 COPY shard.lock shard.lock
 COPY shard.lock shard.lock
 COPY shard.yml shard.yml
 COPY shard.yml shard.yml
 
 
-ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=8&max_pool_size=8&max_idle_pool_size=8
+ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=56&max_pool_size=56&max_idle_pool_size=56
 
 
 RUN shards install
 RUN shards install
 RUN crystal build --release --no-debug raze.cr
 RUN crystal build --release --no-debug raze.cr

+ 1 - 1
frameworks/Crystal/spider-gazelle/spider-gazelle.dockerfile

@@ -7,7 +7,7 @@ COPY src src
 # Build App
 # Build App
 RUN shards build --release --no-debug
 RUN shards build --release --no-debug
 
 
-ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=8&max_pool_size=8&max_idle_pool_size=8
+ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=56&max_pool_size=56&max_idle_pool_size=56
 ENV SG_ENV production
 ENV SG_ENV production
 
 
 # Run the app binding on port 8080
 # Run the app binding on port 8080