Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Investigate performance of MySqlConnector #21

Open
divega opened this issue Dec 11, 2017 · 6 comments
Open

Investigate performance of MySqlConnector #21

divega opened this issue Dec 11, 2017 · 6 comments

Comments

@divega
Copy link

divega commented Dec 11, 2017

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
Copy link
Author

divega commented Dec 12, 2017

@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 Incremental improvements to Npgsql #3)

@bgrainger
Copy link
Contributor

  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
Copy link
Member

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
Copy link
Author

divega commented Jan 23, 2018

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

@sebastienros
Copy link
Member

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
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants