aspnet / DataAccessPerformance

Benchmarks, prototypes and discussions for database access performance investigation
MIT License
116 stars 26 forks source link

Investigate performance of MySqlConnector #21

Open divega opened 6 years ago

divega commented 6 years ago

MySqlConnector is an ADO.NET provider for MySQL that is not based on the "official" MySQL provider. It has a few notable characteristics:

Code and issue tracking lives at https://github.com/mysql-net/MySqlConnector.

NuGet package is at https://www.nuget.org/packages/MySqlConnector.

divega commented 6 years ago

@bgrainger thanks for volunteering!

@sebastienros I am wondering how to best help @bgrainger get started. I think if we document the steps as we go, it can become a useful template for subsequent providers. This what I believe we will need:

  1. Define performance baseline for MySQL, i.e. a identify a repeatable set of tests that anyone can use to estimate the maximum throughput on any given client and server configuration (this test can use any tech, i.e. it does not need to use .NET).
  2. Provide any post-cloning instructions for setting up the tests
  3. Provide tips and links to useful tools to use for profiling and diagnosing
  4. Summarize learnings from improvements applied so that other providers can leverage them (it would be great if @roji and @damageboy could do this for the Npgsql improvements applied so far in https://github.com/aspnet/DataAccessPerformance/issues/3)
bgrainger commented 6 years ago
  1. Based on these blog posts, it seems like the standard benchmarking software for MySQL is sysbench. However, it currently excludes Windows (“As of sysbench 1.0 support for native Windows builds was dropped.”), so it can't work for “any given client and server configuration”.
sebastienros commented 6 years ago

Thanks, that's useful information and we can get the baseline from a Linux machine it's not an issue. I will run it, then give you the numbers of the benchmark with the latest MySQL connector version.

divega commented 6 years ago

@sebastienros did you have a chance to look at this? It would be great if we can give @bgrainger something to work on :smile:

sebastienros commented 6 years ago

Just found about this comment. Will run it right away. @bgrainger can you ping me on skype (sebastienros) so we can make faster progress? Latency matters ;)

bgrainger commented 6 years ago

I was curious to know how close MySqlConnector was to maximum throughput, so I learnt the Registered I/O Networking Extensions for Winsock ("how hard could it be?") and wrote a (Windows-only) client that queries a MySQL Server as quickly as possible using native code and registered I/O.

Compile the code from: https://github.com/bgrainger/MySqlBench

Or download a precompiled binary: https://github.com/bgrainger/MySqlBench/releases