Skip to content
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

Benchmark to measure ShardingCoordinator.CoordinatorState serialization over DData #7428

Merged

Conversation

Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Dec 20, 2024

Changes

Measuring serialization speed for the DData replicator

Latest dev Benchmarks


BenchmarkDotNet v0.13.12, Pop!_OS 22.04 LTS
13th Gen Intel Core i7-1360P, 1 CPU, 16 logical and 12 physical cores
.NET SDK 9.0.100
  [Host]     : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2


Method ShardCount Mean Error StdDev Gen0 Gen1 Allocated
SerializeCoordinatorState 1 1.690 μs 0.0024 μs 0.0021 μs 0.2651 - 2.45 KB
DeserializeCoordinatorState 1 2.919 μs 0.0093 μs 0.0087 μs 0.3967 - 3.71 KB
SerializeDataEnvelope 1 2.060 μs 0.0038 μs 0.0034 μs 0.3510 - 3.23 KB
DeserializeDataEnvelope 1 4.066 μs 0.0135 μs 0.0113 μs 0.5035 - 4.67 KB
SerializeDataWrite 1 2.212 μs 0.0101 μs 0.0094 μs 0.3662 - 3.39 KB
DeserializeDataWrite 1 4.297 μs 0.0156 μs 0.0139 μs 0.5341 - 5 KB
SerializeCoordinatorState 20 5.911 μs 0.0183 μs 0.0153 μs 1.0376 0.0153 9.58 KB
DeserializeCoordinatorState 20 15.726 μs 0.0164 μs 0.0146 μs 1.9531 0.0610 18.33 KB
SerializeDataEnvelope 20 6.484 μs 0.0450 μs 0.0399 μs 1.4191 0.0305 13.05 KB
DeserializeDataEnvelope 20 16.678 μs 0.0315 μs 0.0279 μs 2.4414 0.0610 22.99 KB
SerializeDataWrite 20 6.683 μs 0.0172 μs 0.0153 μs 1.4343 0.0534 13.21 KB
DeserializeDataWrite 20 12.999 μs 0.0220 μs 0.0184 μs 2.5024 0.0610 23.33 KB
SerializeCoordinatorState 100 21.923 μs 0.0495 μs 0.0438 μs 4.3945 0.2747 40.4 KB
DeserializeCoordinatorState 100 82.973 μs 0.1359 μs 0.1205 μs 11.7188 1.4648 108.68 KB
SerializeDataEnvelope 100 23.528 μs 0.0850 μs 0.0754 μs 6.0730 0.4272 55.85 KB
DeserializeDataEnvelope 100 71.650 μs 0.1363 μs 0.1208 μs 11.2305 1.2207 103.97 KB
SerializeDataWrite 100 23.786 μs 0.0631 μs 0.0559 μs 5.9509 0.7935 54.73 KB
DeserializeDataWrite 100 60.977 μs 0.1250 μs 0.1108 μs 12.6953 1.7090 116.77 KB
SerializeCoordinatorState 1000 216.195 μs 0.8867 μs 0.7860 μs 42.2363 12.4512 390.59 KB
DeserializeCoordinatorState 1000 1,052.957 μs 0.8625 μs 0.7646 μs 152.3438 72.2656 1409.48 KB
SerializeDataEnvelope 1000 222.330 μs 2.0858 μs 1.9510 μs 57.1289 14.1602 526.2 KB
DeserializeDataEnvelope 1000 1,041.750 μs 3.0859 μs 2.7356 μs 166.0156 99.6094 1535.42 KB
SerializeDataWrite 1000 220.144 μs 1.6578 μs 1.4696 μs 57.1289 28.5645 526.37 KB
DeserializeDataWrite 1000 976.237 μs 5.3706 μs 4.7609 μs 167.9688 103.5156 1547.56 KB

@Aaronontheweb Aaronontheweb changed the title [WIP] Benchmark to measure ShardingCoordinator.CoordinatorState serialization over DData Benchmark to measure ShardingCoordinator.CoordinatorState serialization over DData Dec 20, 2024
@Aaronontheweb Aaronontheweb marked this pull request as ready for review December 20, 2024 18:45
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) December 20, 2024 18:45
@Aaronontheweb
Copy link
Member Author

The memory allocations here are going to be larger than the payload size - there's definitely some room for improvement IMHO, but these figures aren't horrible all things considered.

@Aaronontheweb Aaronontheweb merged commit f2ec912 into akkadotnet:dev Dec 20, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant