-
Notifications
You must be signed in to change notification settings - Fork 774
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
[perf] Update Stress Test to avoid false sharing #5985
[perf] Update Stress Test to avoid false sharing #5985
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5985 +/- ##
==========================================
+ Coverage 84.50% 84.56% +0.05%
==========================================
Files 271 271
Lines 12355 12355
==========================================
+ Hits 10441 10448 +7
+ Misses 1914 1907 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
(OTel Rust's stress tests already used padding to achieve this goal, but still it has lower throughput. More work for OTel Rust folks to improve perf🤣 )
I'll run stress tests and share results for main vs this PR, for any easy ref in future!
.NET 8, Windows Main PR |
@cijothomas Could you also mention if the numbers posted for Metrics were for the Counter or Histogram test? By default, the stress test for metrics is run for histogram. |
Histogram. I ran the stress test as default only. |
Motivation for this PR:
long[] statistics
arraystatistics
arrayChanges in the PR:
MeasurementData
to record updates from each worker threadMeasurementData
struct has a size of 128 bytes (16 fields * 8 bytes) which ensures that when we create an array ofMeasurementData
the individual items end up on different cache lines (most systems would have a cache line size <= 128 bytes)Stress Test Results
Machine details:
Windows 11 (10.0.26100.2314) (Hyper-V)
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores
.NET SDK 9.0.100
I ran the stress test for two scenarios to compare the difference.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes