dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.26k stars 4.73k forks source link

Performance of EVentSource (WriteEvent) is slow when compared across Amazon Linux distros #107505

Open birojnayak opened 2 months ago

birojnayak commented 2 months ago

Description

While benchmarking few of libraries we realized the method EventSource.WriteEvent perform slow when ran between 2 versions of Amazon Linux. Amazon Linux 2 and Amazon Linux 2023. Source code to test is below.

Configuration

benchmarkSourceCode.zip

Regression?

I don't think this is a regression. This happens under heavy load and multi threaded scenario.

Data

Amazon Linux 2/ 8(vCPU)

dev-dsk-biroj-2b-2ab33525 % dotnet run -c Release
Total time took 00:00:25.7931139

Amazon Linux 2023/ t2.xlarge / 4(vCPU)/16GB RAM

[ec2-user@ip-172-31-27-101 BenchMarkEvent]$ dotnet run -c Release
Total time took 00:00:23.9892903

Analysis

dotnet-policy-service[bot] commented 2 months ago

Tagging subscribers to this area: @dotnet/area-meta See info in area-owners.md if you want to be subscribed.