Benchmark – MySqlBackup.NET v2.6, mysqldump.exe v8.4.5, mysql.exe v8.4.5 (Report Date: July 4th, 2025)
This benchmark is run using this version of source code.
Run with Windows IIS, ASP.NET WebForms .NET 4.8 |
Intel Core i3-3220 (3.30GHz) 2 core 4 thread 8GB RAM DDR3 1600 MHz SSD PNY 250GB Windows 11 Pro x64 |
Intel Core i7-4770S (3.10GHz) 4 core 8 thread 16GB RAM DDR3 1600 MHz SSD Samsung 870 Evo 500GB Windows 10 Pro x64 |
Intel Core i7-4770S (3.10GHz) 4 core 8 thread 16GB RAM DDR3 1600 MHz Miray RAM Drive (6GB) Windows 10 Pro x64 |
Intel Core i7-4770S (3.10GHz) 4 core 8 thread 16GB RAM DDR3 1600 MHz SSD Samsung 870 Evo 500GB Windows 10 Pro x64 |
MySQL Server Parameters |
v8.4.5 InnoDB: 4 tables Database Size: 416 MB Total Rows: 400000 |
v8.4.5 InnoDB: 4 tables Database Size: 416 MB Total Rows: 400000 |
v8.4.5 InnoDB: 4 tables Database Size: 416 MB Total Rows: 400000 |
V8.4.5 InnoDB: 5 tables Database Size: 2.773 GB Total Rows: 3000000 |
Backup/Export MySqlBackup.NET Single Thread |
26s 475ms 571.588 MB 24s 640ms 571.588 MB 24s 655ms 571.588 MB |
15s 652ms 571.588 MB 15s 900ms 571.588 MB 15s 593ms 571.588 MB |
15s 725ms 571.588 MB 15s 593ms 571.588 MB 15s 609ms 571.588 MB |
2m 12s 173ms 4.202 GB 2m 16s 548ms 4.202 GB 2m 22s 157ms 4.202 GB |
Backup/Export MySqlBackup.NET Parallel Process |
15s 640ms 571.588 MB 15s 171ms 571.588 MB 15s 218ms 571.588 MB |
10s 8ms 571.588 MB 10s 444ms 571.588 MB 9s 781ms 571.588 MB |
10s 172ms 571.588 MB 10s 171ms 571.588 MB 10s 62ms 571.588 MB |
1m 29s 360ms 4.202 GB 1m 29s 735ms 4.202 GB 1m 28s 188ms 4.202 GB |
Backup/Export mysqldump.exe |
9s 717ms 566.976 MB 9s 921ms 566.976 MB 9s 547ms 566.976 MB |
7s 453ms 566.976 MB 6s 906ms 566.976 MB 6s 922ms 566.976 MB |
5s 906ms 566.976 MB 5s 967ms 566.976 MB 5s 703ms 566.976 MB |
49s 156ms 4.168 GB 49s 703ms 4.168 GB 48s 735ms 4.168 GB |
Restore/Import MySqlBackup.NET |
0m 59s 592ms 1m 27s 630ms 1m 5s 296ms |
36s 609ms 36s 62ms 36s 62ms |
35s 437ms 34s 937ms 34s 969ms |
4m 44s 548ms 4m 50s 377ms 4m 53s 18ms |
Restore/Import mysql.exe |
55s 139ms 54s 838ms 54s 45ms |
32s 980ms 34s 340ms 36s 94ms |
31s 31ms 30s 953ms 31s 93ms |
4m 29s 202ms 4m 20s 929ms 4m 21s 751ms |
Data Source: Github – MySqlBackup.NET Wiki (July 4th, 2025)
Read more: Understanding the Parallel Export Mechanism in MySqlBackup.NET
The parallel processing mode consistently outperforms the single-threaded mode, with time savings becoming more pronounced as database size increases. For instance, with a 2.773 GB database, parallel processing reduced export time by approximately 35~40% compared to the single-threaded approach.
One interesting side observation is that the Samsung Evo 870 SSD demonstrated nearly identical performance to the RAM disk test, which indirectly confirms that this SSD operates with near-RAM efficiency. This suggests either that the SSD achieves DDR3 RAM-level performance, or that the RAM disk implementation cannot deliver 100% of the theoretical RAM speed due to driver limitations. Another theory is that the disk I/O write operations are actually faster than SQL data generation, which means .NET object conversion becomes the bottleneck.
Comparison with Native Tools (mysqldump.exe)
The parallel implementation significantly narrows the performance gap between MySqlBackup.NET and native MySQL tools like mysqldump.exe, while preserving the flexibility and integration advantages of a .NET library. While MySqlBackup.NET’s parallel processing remains slower than mysqldump.exe, this difference is likely attributed to the additional overhead of converting MySQL raw bytes to .NET objects before generating SQL strings.
Future Performance Optimization Potential: A promising avenue for further performance enhancement would involve bypassing the intermediate .NET object conversion stage entirely. By directly referencing MySQL column metadata for data type information, the library could potentially manipulate raw bytes directly into SQL strings, eliminating the costly conversion step. This optimization could significantly reduce CPU cycles and potentially achieve another performance milestone, bringing MySqlBackup.NET’s speed even closer to native MySQL tools while maintaining its .NET ecosystem benefits.
Note: Start from v2.6, MySqlBackup.NET is running in parallel mode by default.
using (var conn = new MySqlConnection(constr))
using (var cmd = conn.CreateCommand())
using (var mb = new MySqlBackup(cmd))
{
conn.Open();
// enabled by default in 2.6, turn off this to run in legacy single thread
mb.ExportInfo.EnableParallelProcessing = true;
mb.ExportToFile(@"C:\backup.sql");
}
Disk I/O Activity Observation
The following test carried out on the following parameters:
Intel Core i7-4770S (3.10GHz) 4 core 8 thread
16GB RAM DDR3 1600 MHz
SSD Samsung 870 Evo 500GB
Windows 10 Pro x64
InnoDB: 3 tables
Database Size: 312 MB
Total Rows: 300000
MySqlDump: 8.0.34 (Export)
MySql: 8.0.34 (Import)
All processes run through Windows IIS ASP.NET WebForms, .NET Framework 4.8, App Built in Release Profile
Disk | Description |
---|---|
![]() |
Backup/Export – MySqlBackup.NET – Single Thread The initial disk I/O activity reaches 100% around 10 seconds at startup and then falls to 15%. This is the slowest method, but surprisingly it shows quite busy disk activity. It’s unclear what intensive disk operations are occurring during this process. |
![]() |
Backup/Export – MySqlBackup.NET – Parallel Processing The initial disk I/O activity reaches 100% around 5 seconds at startup and then falls to 30%. This shows a shorter duration of disk activity spikes compared to single-threaded processing. |
![]() |
Backup/Export – mysqldump.exe mysqldump does not experience an initial spike. It fluctuates between 20% – 40% disk I/O operations throughout the process. This is the fastest method with the lowest resource utilization, which is surprising. |
![]() |
Restore/Import – MySqlBackup.NET Maintains steady progress at 50% disk I/O throughout the entire process. |
![]() |
Restore/Import – mysql.exe Maintains steady progress at 50% disk I/O throughout the entire process. |
Feature image credit: Photo by Pietro Mattia on Unsplash