-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance improvement #1339
Comments
Just for clarity, are the numbers time taken (lower is better) or requests per second (higher is better)?
Especially compared to Node or PHP (and probably Python), MySqlConnector has some unfortunate overhead caused by conforming to the ADO.NET API. I've often considered (don't remember if I created a GitHub issue for it) creating a "Direct" API that maps much more closely on to the MySQL protocol and drops ADO.NET compatibility. |
It is number of operation per second (higher is better). Each connector has different problem, like some needs to parse column name, ADO.NET need possibility to cancel each row read, ... There one thing i'm not still convinced : async versus sync. That is for 2 reasons:
|
Async definitely adds a measurable amount of overhead in .NET. It's been greatly improved over the years (e.g., The purported benefit is scalability: .NET threads can process other work that the server needs to do while waiting for a response from the MySQL server. It prioritises throughput over latency. If your benchmarks are primarily driven by latency, then I would expect sync to look better than async, and async only start to shine in a highly concurrent benchmark like TechEmpower (although note that it's "only" doing 200,000 rps on MySQL). |
Yes, async improved a lots when using huge number of threads, i'm not discussing that. Just wondering in the context of database connection, where most of the time best pool connection size is under 50 connections. Some other reading : https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing |
Just for information, here is a benchmark I did using multiple connectors and languages on the same database, on a single thread. Drivers all performs differently.
These benchmarks allow you to see different things, a simple query, parsing/sending/managing parameters of small or big results, parsing many columns, ...
It is not a fair comparison (influence of language performance, sync/async), but gives indications of what can be improved.
Still, I would compare .net to node.js, since both are asynchronous (with lots of threads performance would downgrade less than sync drivers)
This driver is ".net communi." (community)
Just to indicate that it would seem that simple query resulting in OK_Packet might be improved, and passing multiple parameters.
The text was updated successfully, but these errors were encountered: