Hi Folks! In this post I will benchmark the Entity Framework Core 7 (Preview) with an application that CRUDs 41 million rows (well again, the deletion process will not be benchmarked, because it's too slow). First, I'd like to say that its performance is worse compared to the same application running EF Core 6 (the info will be present in the charts later in the post). It's worth mentioning that the runtime I ran the application with is the dotnet 6.

If you want know more details about the txt file used to import all the data, please refer to this post.

Clone the git repository here.

Let's talk about the environments (hardware and software) for both of the OSes.

Windows 11 Pro

The PC running the .NET Core 6 application on Windows is an AMD Threadripper 1950X with 32GB of DDR4@3600. The motherboard is an Asrock X399 Taichi and the SSD is an ADATA XPG Pro SX6000, 512GB (reads 2100MB/s, writes 1500MB/s). The OS edition is the Windows 11 Pro, version 21H2. The database server used was the SQL Server 2019 Developer edition.

Fedora 35 Workstation

The PC running the .NET Core 6 application on Fedora is the same: an AMD Threadripper 1950X with 32GB of DDR4@3600. The motherboard is an Asrock X399 Taichi, but the SSD is an ADATA XPG Pro SX8200, 512GB (reads 3500MB/s, writes 2300MB/s). The OS edition is the Fedora 35 Workstation 64 bits, Kernel 5.16. The database server used was the SQL Server 2019 Developer edition.

You might be thinking: this SSD is better than the SX6000, the application running on linux will perform better than the windows one. Yeah, but in reality the benchmark was a lot different. Let's have a look at it!

The Benchmark

As you can see in the charts, Windows took 4.5 hours to insert the 41M rows, while Fedora took 11.81 hours. In the update operation, the difference in performance is even larger: Windows took 6.2 hours to load and update all 41M rows, while Fedora took an astounding 10.91 hours. I'd like to say I am very disappointed with the Linux performance, I thought it would be at least comparable with the windows environment.

Although we are talking about a preview version of the Entity Framework, the version 6 is still better in terms of raw performance.

Conclusion

Well, this one is easy: don't upgrade your EF version just yet.