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

Optimise for high load #322

Closed
1 of 2 tasks
haf opened this issue May 8, 2018 · 1 comment
Closed
1 of 2 tasks

Optimise for high load #322

haf opened this issue May 8, 2018 · 1 comment

Comments

@haf
Copy link
Member

haf commented May 8, 2018

Goal: Support shipping 10k messages per second to stackdriver.

Stage 1:

Before

  • Remove closure allocation in logWithTimeout (by synchronising immediately on buffer)
    • Should remove one Alt.choose, one timeout item Alt

After

Stage 2:

@haf
Copy link
Member Author

haf commented May 9, 2018

BenchmarkDotNet=v0.10.14, OS=Windows 10.0.14393.2068 (1607/AnniversaryUpdate/Redstone1)
Intel Core i7-7920HQ CPU 3.10GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores
Frequency=3023437 Hz, Resolution=330.7494 ns, Timer=TSC
.NET Core SDK=2.1.100
  [Host]     : .NET Core 2.0.5 (CoreCLR 4.6.26020.03, CoreFX 4.6.26018.01), 64bit RyuJIT DEBUG
  Job-TVKGOY : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.2563.0
  Job-LLLTYO : .NET Core 2.0.5 (CoreCLR 4.6.26020.03, CoreFX 4.6.26018.01), 64bit RyuJIT

Concurrent=True  Server=True  InvocationCount=128  
LaunchCount=1  WarmupCount=1024  

                Method | Runtime |     Mean |     Error |     StdDev |   Median | Rank |
---------------------- |-------- |---------:|----------:|-----------:|---------:|-----:|
 LogHelloWorld_WithAck |     Clr | 250.6 ns |  5.053 ns |   7.084 ns | 247.7 ns |    2 |
  LogHelloWorld_WithBP |     Clr | 156.1 ns |  3.137 ns |   4.883 ns | 155.8 ns |    1 |
  LogHelloWorld_Simple |     Clr | 293.7 ns |  6.522 ns |  10.715 ns | 289.9 ns |    3 |
 LogHelloWorld_WithAck |    Core | 519.0 ns | 90.334 ns | 266.351 ns | 433.2 ns |    4 |
  LogHelloWorld_WithBP |    Core | 319.0 ns | 46.788 ns | 137.954 ns | 280.9 ns |    3 |
  LogHelloWorld_Simple |    Core | 459.6 ns | 63.946 ns | 173.968 ns | 374.0 ns |    4 |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant