DataAccessPerformance icon indicating copy to clipboard operation
DataAccessPerformance copied to clipboard

Investigate performance of MySqlConnector

Open divega opened this issue 7 years ago • 6 comments

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

  • It includes proper async support
  • It targets .NET Standard 2.0
  • It is the ADO.NET provider layer for the Pomelo EF Core provider for MySQL.
  • @bgrainger has volunteered to focus on performance for it

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

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

divega avatar Dec 11 '17 23:12 divega

@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)

divega avatar Dec 12 '17 00:12 divega

  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”.

bgrainger avatar Dec 13 '17 04:12 bgrainger

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.

sebastienros avatar Dec 13 '17 05:12 sebastienros

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

divega avatar Jan 23 '18 00:01 divega

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 ;)

sebastienros avatar Feb 16 '18 18:02 sebastienros

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

bgrainger avatar Mar 07 '18 20:03 bgrainger