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

Performance: Adds headers optimization #1781

Merged
merged 30 commits into from
Aug 26, 2020
Merged

Conversation

j82w
Copy link
Contributor

@j82w j82w commented Aug 14, 2020

Pull Request Template

Description

This changes the headers to base-line to simple implementation. Benchmarks will be added soon. This continues the current PR: #1619.

Blue is the current PR, Orange is master. Roughly 20% improvement in Rps.
HeaderPerfFix

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.17763.1397 (1809/October2018Update/Redstone5)
Intel Xeon Platinum 8272CL CPU 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET Core SDK=3.1.401
[Host] : .NET Core 3.1.7 (CoreCLR 4.700.20.36602, CoreFX 4.700.20.37001), X64 RyuJIT
Job-UEAUJY : .NET Core 3.1.7 (CoreCLR 4.700.20.36602, CoreFX 4.700.20.37001), X64 RyuJIT

Improvements on average:
10KB or 28% drop in allocation
40 us or 10% drop in mean latency

Master branch:

Method Type Mean Error StdDev StdErr Min Q1 Median Q3 Max P80 P85 P90 P95 P100 Op/s Gen 0 Gen 1 Gen 2 Allocated Completed Work Items Lock Contentions
ReadItemExists Stream 481.2 us 8.80 us 13.17 us 2.41 us 458.9 us 470.3 us 480.2 us 490.9 us 508.1 us 494.3 us 495.8 us 501.4 us 502.9 us 508.1 us 2,078.2 2.0033 0.6678 - 39.52 KB 1.0013 0.0013
ReadItemExists OfT 512.6 us 9.09 us 13.60 us 2.48 us 490.2 us 502.3 us 510.5 us 524.5 us 539.7 us 525.3 us 527.9 us 530.6 us 537.7 us 539.7 us 1,950.7 2.3233 0.9957 - 46.68 KB 1.0030 0.0013
ReadItemExists OfTCustom 520.1 us 9.21 us 13.79 us 2.52 us 494.7 us 511.8 us 517.7 us 527.1 us 553.6 us 527.6 us 531.9 us 537.6 us 547.8 us 553.6 us 1,922.9 2.3404 0.6687 - 46.67 KB 1.0027 0.0020

Current PR:

Method Type Mean Error StdDev StdErr Min Q1 Median Q3 Max P80 P85 P90 P95 P100 Op/s Gen 0 Gen 1 Gen 2 Allocated Completed Work Items Lock Contentions
ReadItemExists Stream 437.5 us 6.18 us 9.05 us 1.68 us 422.3 us 430.0 us 437.6 us 444.2 us 457.9 us 444.8 us 445.3 us 448.6 us 452.2 us 457.9 us 2,285.5 1.4265 0.2853 - 29.04 KB 1.0009 0.0023
ReadItemExists OfT 471.3 us 4.80 us 6.89 us 1.30 us 457.3 us 466.1 us 471.0 us 476.8 us 485.3 us 478.4 us 479.1 us 479.9 us 480.1 us 485.3 us 2,121.9 1.8456 0.6152 - 36.2 KB 1.0012 0.0015
ReadItemExists OfTCustom 470.5 us 7.48 us 11.20 us 2.04 us 454.8 us 462.0 us 466.6 us 477.4 us 503.2 us 479.7 us 482.4 us 483.3 us 489.8 us 503.2 us 2,125.5 1.8697 0.6232 - 36.2 KB 1.0047 0.0006

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] This change requires a documentation update

Closing issues

To automatically close an issue: closes #IssueNumber

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors) Description"

Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.

@j82w j82w changed the title Draft - Performance: Headers optimization Draft - Performance: Adds headers optimization Aug 14, 2020
@j82w j82w changed the title Draft - Performance: Adds headers optimization Performance: Adds headers optimization Aug 18, 2020
@j82w j82w self-assigned this Aug 18, 2020
Copy link
Member

@kirankumarkolli kirankumarkolli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for ContenxtLength comment

@kirankumarkolli
Copy link
Member

LockContention highly variable (varies across stream, etc.. it-self), any idea where is it coming from?

Copy link

@YohanSciubukgian YohanSciubukgian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments relative to constants.

@j82w j82w merged commit ce4bf92 into master Aug 26, 2020
@j82w j82w deleted the users/jawilley/perf/headers branch August 26, 2020 23:09
@ghost
Copy link

ghost commented Dec 15, 2021

Closing due to in-activity, pease feel free to re-open.

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.

4 participants