Skip to content

Conversation

roji
Copy link
Member

@roji roji commented Oct 12, 2021

And use positional parameters in platform benchmarks.

Bump other database-related dependencies.

scenario Before/After RPS
Fortunes platform raw Before 482,143
Fortunes platform raw After 475,239
Fortunes platform EF Before 372,978
Fortunes platform EF After 373,148
Detailed run results

Fortunes platform raw, Before

crank --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/platform.benchmarks.yml --scenario fortunes --profile aspnet-citrine-lin --application.framework net6.0 --application.source.repository http://github.com/roji/AspNetBenchmarks --application.source.branchOrCommit main --variable warmup=45 --variable duration=120

| db                  |         |
| ------------------- | ------- |
| CPU Usage (%)       | 39      |
| Cores usage (%)     | 1,085   |
| Working Set (MB)    | 46      |
| Build Time (ms)     | 1,706   |
| Start Time (ms)     | 357     |
| Published Size (KB) | 915,635 |


| application           |                            |
| --------------------- | -------------------------- |
| CPU Usage (%)         | 95                         |
| Cores usage (%)       | 2,650                      |
| Working Set (MB)      | 467                        |
| Private Memory (MB)   | 2,043                      |
| Build Time (ms)       | 4,249                      |
| Start Time (ms)       | 1,408                      |
| Published Size (KB)   | 93,749                     |
| .NET Core SDK Version | 6.0.100-rtm.21519.18       |
| ASP.NET Core Version  | 6.0.0-rtm.21519.22+66fd211 |
| .NET Runtime Version  | 6.0.0-rtm.21518.12+5a23dc3 |


| load                   |            |
| ---------------------- | ---------- |
| CPU Usage (%)          | 31         |
| Cores usage (%)        | 876        |
| Working Set (MB)       | 38         |
| Private Memory (MB)    | 363        |
| Start Time (ms)        | 0          |
| First Request (ms)     | 73         |
| Requests/sec           | 482,143    |
| Requests               | 57,905,437 |
| Mean latency (ms)      | 1.11       |
| Max latency (ms)       | 21.00      |
| Bad responses          | 0          |
| Socket errors          | 0          |
| Read throughput (MB/s) | 625.80     |
| Latency 50th (ms)      | 1.00       |
| Latency 75th (ms)      | 1.21       |
| Latency 90th (ms)      | 1.51       |
| Latency 99th (ms)      | 4.19       |

Fortunes platform raw, After

crank --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/platform.benchmarks.yml --scenario fortunes --profile aspnet-citrine-lin --application.framework net6.0 --application.source.repository http://github.com/roji/AspNetBenchmarks --application.source.branchOrCommit NpgsqlRc1 --variable warmup=45 --variable duration=120

| db                  |         |
| ------------------- | ------- |
| CPU Usage (%)       | 37      |
| Cores usage (%)     | 1,040   |
| Working Set (MB)    | 44      |
| Build Time (ms)     | 1,878   |
| Start Time (ms)     | 345     |
| Published Size (KB) | 915,635 |


| application           |                            |
| --------------------- | -------------------------- |
| CPU Usage (%)         | 94                         |
| Cores usage (%)       | 2,634                      |
| Working Set (MB)      | 491                        |
| Private Memory (MB)   | 2,064                      |
| Build Time (ms)       | 2,963                      |
| Start Time (ms)       | 1,435                      |
| Published Size (KB)   | 94,090                     |
| .NET Core SDK Version | 6.0.100-rtm.21519.18       |
| ASP.NET Core Version  | 6.0.0-rtm.21519.22+66fd211 |
| .NET Runtime Version  | 6.0.0-rtm.21518.12+5a23dc3 |


| load                   |            |
| ---------------------- | ---------- |
| CPU Usage (%)          | 31         |
| Cores usage (%)        | 856        |
| Working Set (MB)       | 37         |
| Private Memory (MB)    | 363        |
| Start Time (ms)        | 0          |
| First Request (ms)     | 82         |
| Requests/sec           | 475,239    |
| Requests               | 57,076,128 |
| Mean latency (ms)      | 1.13       |
| Max latency (ms)       | 19.96      |
| Bad responses          | 0          |
| Socket errors          | 0          |
| Read throughput (MB/s) | 616.84     |
| Latency 50th (ms)      | 1.02       |
| Latency 75th (ms)      | 1.22       |
| Latency 90th (ms)      | 1.53       |
| Latency 99th (ms)      | 4.18       |

Fortunes platform EF, Before

crank --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/platform.benchmarks.yml --scenario fortunes_ef --profile aspnet-citrine-lin --application.framework net6.0 --application.source.repository http://github.com/roji/AspNetBenchmarks --application.source.branchOrCommit main --variable warmup=45 --variable duration=120

| db                  |         |
| ------------------- | ------- |
| CPU Usage (%)       | 32      |
| Cores usage (%)     | 910     |
| Working Set (MB)    | 45      |
| Build Time (ms)     | 1,942   |
| Start Time (ms)     | 339     |
| Published Size (KB) | 915,635 |


| application           |                            |
| --------------------- | -------------------------- |
| CPU Usage (%)         | 96                         |
| Cores usage (%)       | 2,682                      |
| Working Set (MB)      | 624                        |
| Private Memory (MB)   | 2,116                      |
| Build Time (ms)       | 4,289                      |
| Start Time (ms)       | 1,451                      |
| Published Size (KB)   | 93,749                     |
| .NET Core SDK Version | 6.0.100-rtm.21519.18       |
| ASP.NET Core Version  | 6.0.0-rtm.21519.22+66fd211 |
| .NET Runtime Version  | 6.0.0-rtm.21518.12+5a23dc3 |


| load                   |            |
| ---------------------- | ---------- |
| CPU Usage (%)          | 24         |
| Cores usage (%)        | 663        |
| Working Set (MB)       | 38         |
| Private Memory (MB)    | 363        |
| Start Time (ms)        | 0          |
| First Request (ms)     | 750        |
| Requests/sec           | 372,978    |
| Requests               | 44,794,503 |
| Mean latency (ms)      | 1.47       |
| Max latency (ms)       | 35.21      |
| Bad responses          | 0          |
| Socket errors          | 3          |
| Read throughput (MB/s) | 484.11     |
| Latency 50th (ms)      | 1.30       |
| Latency 75th (ms)      | 1.60       |
| Latency 90th (ms)      | 2.02       |
| Latency 99th (ms)      | 6.20       |

Fortunes platform EF, After

crank --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/platform.benchmarks.yml --scenario fortunes_ef --profile aspnet-citrine-lin --application.framework net6.0 --application.source.repository http://github.com/roji/AspNetBenchmarks --application.source.branchOrCommit NpgsqlRc1 --variable warmup=45 --variable duration=120

| db                  |         |
| ------------------- | ------- |
| CPU Usage (%)       | 32      |
| Cores usage (%)     | 891     |
| Working Set (MB)    | 45      |
| Build Time (ms)     | 1,720   |
| Start Time (ms)     | 349     |
| Published Size (KB) | 915,635 |


| application           |                            |
| --------------------- | -------------------------- |
| CPU Usage (%)         | 96                         |
| Cores usage (%)       | 2,679                      |
| Working Set (MB)      | 731                        |
| Private Memory (MB)   | 2,305                      |
| Build Time (ms)       | 4,258                      |
| Start Time (ms)       | 1,405                      |
| Published Size (KB)   | 94,090                     |
| .NET Core SDK Version | 6.0.100-rtm.21519.18       |
| ASP.NET Core Version  | 6.0.0-rtm.21519.22+66fd211 |
| .NET Runtime Version  | 6.0.0-rtm.21518.12+5a23dc3 |


| load                   |            |
| ---------------------- | ---------- |
| CPU Usage (%)          | 24         |
| Cores usage (%)        | 669        |
| Working Set (MB)       | 38         |
| Private Memory (MB)    | 363        |
| Start Time (ms)        | 0          |
| First Request (ms)     | 796        |
| Requests/sec           | 373,148    |
| Requests               | 44,815,164 |
| Mean latency (ms)      | 1.48       |
| Max latency (ms)       | 31.51      |
| Bad responses          | 0          |
| Socket errors          | 0          |
| Read throughput (MB/s) | 484.33     |
| Latency 50th (ms)      | 1.29       |
| Latency 75th (ms)      | 1.60       |
| Latency 90th (ms)      | 2.05       |
| Latency 99th (ms)      | 6.62       |

private (NpgsqlCommand readCmd, NpgsqlParameter<int> idParameter) CreateReadCommand(NpgsqlConnection connection)
{
#if NET6_0_OR_GREATER
var cmd = new NpgsqlCommand("SELECT id, randomnumber FROM world WHERE id = $1", connection);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no more sql parsing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep (here's a blog post). I'll do a bit of benchmarking soon to see if this makes a difference - the more parameters/batched commands, and the longer the SQL, the more this should help.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(named parameters are still supported for backwards compat!)

@roji roji changed the title Bump Npgsql dependencies to 6.0.0-rc.1 Bump Npgsql dependencies to 6.0.0-rc.2 Oct 20, 2021
@roji roji force-pushed the NpgsqlRc1 branch 2 times, most recently from 4d975ab to dc64d0d Compare October 20, 2021 06:30
And use positional parameters in platform benchmarks.

Bump other database-related dependencies.
@roji roji marked this pull request as ready for review October 20, 2021 07:01
@roji roji merged commit 9a10162 into aspnet:main Oct 20, 2021
@roji roji deleted the NpgsqlRc1 branch October 20, 2021 07:05
@sebastienros
Copy link
Member

Note for next time we update the versions, this is breaking some benchmarks since the mysql drivers are not on the internal feed.

@roji
Copy link
Member Author

roji commented Oct 22, 2021

Oh sorry, I did not know we were running these continuously. I'll be careful with this next time.

@sebastienros
Copy link
Member

Shame on me since it's a user who reported it was broken :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants