aspnet / Benchmarks

Benchmarks for ASP.NET Core
Other
1.16k stars 234 forks source link

Npgsql counters seem to be wrongly-managed #1551

Open roji opened 4 years ago

roji commented 4 years ago

Not sure yet if it's in Npgsql itself or in the benchmark infra, but:

Bytes Written:                     6,483,583
Bytes Read:                        165,323,803
Command Rate:                      0
Total Commands:                    1
Current Commands:                  -6,212,390
Failed Commands:                   0
Prepared Commands Ratio:           0
Connection Pools:                  1
Idle Connections:                  51
Busy Connections:                  16
Commands per multiplexing batch:   25
Waits per multiplexing batch:      0
Time per multiplexing batch (us):  67
DamianEdwards commented 1 year ago

Is this still a problem @roji?

sebastienros commented 1 year ago

Current results:

| Total Bytes Written                                           | 7,628,760     | ▃▆▇▇██████▄      |
| Total Bytes Read                                              | 194,513,114   | ▃▆▇▇██████▄      |
| Max Command Rate                                              | 0             |                  |
| Total Commands                                                | 0             |                  |
| Max Active Commands per second                                | -79,020       |                  |
| Total Failed Commands                                         | 0             |                  |
| Max Prepared Commands Ratio                                   | NaN           |                  |
| Max Connection Pools                                          | 1             | ████████████     |
| Max Idle Connections                                          | 18            | ▅▁ ▁  ▁  ▂██     |
| Max Busy Connections                                          | 18            | ▅▇█▇██▇██▆       |
| Max Average commands per multiplexing batch per second        | 16            | █▇▇▆▆▅▅▅▅▅▅▅     |
| Max Average write time per multiplexing batch (us) per second | 0             |                  |
DamianEdwards commented 1 year ago

OK so still broken it seems based on the negative number being reported. Could it be an overflow issue in that one counter?

roji commented 1 year ago

This is most probably an issue in Npgsql itself... Which BTW there's a strong chance we'll rewrite to use the newer OpenTelemetry metrics (https://github.com/npgsql/npgsql/issues/3960, there's even the start of semantic standardization going on).

I don't know what the status is of collecting runtime/kestrel metrics via OpenTeletry, but we may want to implement capturing support in crank...

DamianEdwards commented 1 year ago

As long as the metrics can be egressed via EventSource they can be captured easily out-of-proc via the .NET diagnostics server (EventPipe).