Skip to content

Commit

Permalink
Revert "Tune maximum connection pool size for Npgsql, enable multiple…
Browse files Browse the repository at this point in the history
…xing for non-platform benchmarks (aspnet#1667)"

This reverts commit d72cf79.
  • Loading branch information
roji committed May 5, 2021
1 parent fcac6a1 commit f497f5b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scenarios/database.benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
arguments: "--nonInteractive true --scenarios {{scenario}} --urls {{serverScheme}}://{{serverAddress}}:{{serverPort}} --server {{server}} --kestrelTransport {{transport}} --protocol {{protocol}}"
environmentVariables:
database: PostgresQL
connectionString: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=18;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Delay Us=500;Write Coalescing Buffer Threshold Bytes=1000
connectionString: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4

postgresql:
source:
Expand Down
20 changes: 16 additions & 4 deletions scenarios/platform.benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ jobs:
project: src/BenchmarksApps/Kestrel/PlatformBenchmarks/PlatformBenchmarks.csproj
readyStateText: Application started.
framework: net5.0
environmentVariables:
database: PostgreSQL
connectionstring: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=18;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Delay Us=500;Write Coalescing Buffer Threshold Bytes=1000


postgresql:
source:
repository: https://github.com/TechEmpower/FrameworkBenchmarks.git
Expand Down Expand Up @@ -59,6 +56,9 @@ scenarios:
job: platformbenchmarks
buildArguments:
- "/p:IsDatabase=true"
environmentVariables:
database: PostgreSQL
connectionstring: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Delay Us=500;Write Coalescing Buffer Threshold Bytes=1000
load:
job: wrk
variables:
Expand All @@ -73,6 +73,9 @@ scenarios:
job: platformbenchmarks
buildArguments:
- "/p:IsDatabase=true"
environmentVariables:
database: PostgreSQL
connectionstring: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Delay Us=500;Write Coalescing Buffer Threshold Bytes=1000
load:
job: wrk
variables:
Expand All @@ -86,6 +89,9 @@ scenarios:
job: platformbenchmarks
buildArguments:
- "/p:IsDatabase=true"
environmentVariables:
database: PostgreSQL
connectionstring: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4
load:
job: wrk
variables:
Expand All @@ -99,6 +105,9 @@ scenarios:
job: platformbenchmarks
buildArguments:
- "/p:IsDatabase=true"
environmentVariables:
database: PostgreSQL
connectionstring: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4
load:
job: wrk
variables:
Expand All @@ -112,6 +121,9 @@ scenarios:
job: platformbenchmarks
buildArguments:
- "/p:IsDatabase=true"
environmentVariables:
database: PostgreSQL
connectionString: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4
load:
job: wrk
variables:
Expand Down
4 changes: 2 additions & 2 deletions src/Benchmarks/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public void ConfigureServices(IServiceCollection services)
case DatabaseServer.PostgreSql:
services.AddEntityFrameworkNpgsql();
var settings = new NpgsqlConnectionStringBuilder(appSettings.ConnectionString);
if (!settings.NoResetOnClose && !settings.Multiplexing)
throw new ArgumentException("No Reset On Close=true Or Multiplexing=true implies must be specified for Npgsql");
if (!settings.NoResetOnClose)
throw new ArgumentException("No Reset On Close=true must be specified for Npgsql");
if (settings.Enlist)
throw new ArgumentException("Enlist=false must be specified for Npgsql");

Expand Down

0 comments on commit f497f5b

Please sign in to comment.