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

Watchcache exact #126855

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

serathius
Copy link
Contributor

@serathius serathius commented Aug 21, 2024

/kind feature

Benchmark run from #125884. Might be a little stale, but trend should be the same.

goos: linux
goarch: amd64
pkg: k8s.io/apiserver/pkg/storage/cacher
cpu: AMD Ryzen 5 7600X 6-Core Processor
                                                  │  watchcache   │           watchcache-btree            │       watchcache-btree-continue       │   watchcache-btree-continue-exact   │
                                                  │    sec/op     │    sec/op      vs base                │    sec/op      vs base                │   sec/op     vs base                │
StoreListCreate/RV=NotOlderThan-12                    698.8µ ± 4%     227.9µ ± 2%  -67.39% (p=0.000 n=10)     193.7µ ± 2%  -72.27% (p=0.000 n=10)   193.7µ ± 3%  -72.28% (p=0.000 n=10)
StoreListCreate/RV=ExactMatch-12                      356.4µ ± 2%     358.7µ ± 2%        ~ (p=0.631 n=10)     364.7µ ± 1%   +2.31% (p=0.005 n=10)   231.0µ ± 4%  -35.20% (p=0.000 n=10)
StoreList/RV=Empty-12                                 982.5µ ± 6%     722.9µ ± 4%  -26.43% (p=0.000 n=10)     800.7µ ± 1%  -18.51% (p=0.000 n=10)   811.9µ ± 3%  -17.37% (p=0.000 n=10)
StoreList/RV=NotOlderThan-12                          972.3µ ± 2%     700.7µ ± 2%  -27.93% (p=0.000 n=10)     765.1µ ± 3%  -21.31% (p=0.000 n=10)   784.4µ ± 3%  -19.32% (p=0.000 n=10)
StoreList/RV=MatchExact-12                          16552.5µ ± 3%   16377.3µ ± 2%        ~ (p=0.218 n=10)   16931.0µ ± 2%        ~ (p=0.075 n=10)   827.5µ ± 2%  -95.00% (p=0.000 n=10)
StoreList/Paginate/RV=Empty-12                       18.551m ± 1%    18.495m ± 1%        ~ (p=0.353 n=10)     2.389m ± 2%  -87.12% (p=0.000 n=10)   2.398m ± 2%  -87.07% (p=0.000 n=10)
StoreList/Paginate/RV=NotOlderThan-12                18.389m ± 3%    18.451m ± 1%        ~ (p=0.971 n=10)     2.406m ± 2%  -86.91% (p=0.000 n=10)   2.451m ± 3%  -86.67% (p=0.000 n=10)
StoreList/Paginate/RV=MatchExact-12                  18.280m ± 1%    18.468m ± 1%   +1.03% (p=0.003 n=10)    18.907m ± 1%   +3.43% (p=0.000 n=10)   3.218m ± 2%  -82.40% (p=0.000 n=10)
StoreList/NodeIndexed/RV=Empty-12                     1.791m ± 3%     1.796m ± 2%        ~ (p=0.796 n=10)     1.761m ± 3%   -1.67% (p=0.015 n=10)   1.795m ± 3%        ~ (p=0.912 n=10)
StoreList/NodeIndexed/RV=NotOlderThan-12              1.234m ± 4%     1.250m ± 3%        ~ (p=0.796 n=10)     1.260m ± 2%        ~ (p=0.105 n=10)   1.214m ± 3%        ~ (p=0.089 n=10)
StoreList/NodeIndexed/RV=MatchExact-12              7459.99m ± 1%   7455.16m ± 1%        ~ (p=0.796 n=10)   7312.73m ± 1%   -1.97% (p=0.000 n=10)   15.48m ± 1%  -99.79% (p=0.000 n=10)
StoreList/NodeIndexed/Paginate/RV=Empty-12           70.410m ± 1%    64.656m ± 4%   -8.17% (p=0.000 n=10)     3.114m ± 4%  -95.58% (p=0.000 n=10)   2.828m ± 3%  -95.98% (p=0.000 n=10)
StoreList/NodeIndexed/Paginate/RV=NotOlderThan-12    69.420m ± 1%    63.594m ± 1%   -8.39% (p=0.000 n=10)     2.471m ± 4%  -96.44% (p=0.000 n=10)   2.224m ± 4%  -96.80% (p=0.000 n=10)
StoreList/NodeIndexed/Paginate/RV=MatchExact-12     8076.67m ± 1%   8087.91m ± 1%        ~ (p=0.165 n=10)   7686.99m ± 1%   -4.82% (p=0.000 n=10)   15.86m ± 2%  -99.80% (p=0.000 n=10)
StoreList/Namespace/RV=Empty-12                       6.421m ± 1%     1.675m ± 1%  -73.91% (p=0.000 n=10)     1.596m ± 2%  -75.14% (p=0.000 n=10)   1.627m ± 2%  -74.67% (p=0.000 n=10)
StoreList/Namespace/RV=NotOlderThan-12                5.670m ± 2%     1.069m ± 1%  -81.14% (p=0.000 n=10)     1.065m ± 2%  -81.21% (p=0.000 n=10)   1.035m ± 3%  -81.74% (p=0.000 n=10)
StoreList/Namespace/RV=MatchExact-12                 15.845m ± 2%    16.334m ± 3%   +3.09% (p=0.000 n=10)    16.009m ± 2%        ~ (p=0.280 n=10)   1.869m ± 1%  -88.21% (p=0.000 n=10)
geomean                                               13.05m          9.789m       -24.98%                    5.304m       -59.35%                  1.645m       -87.40%

                                                  │   watchcache   │            watchcache-btree            │       watchcache-btree-continue        │   watchcache-btree-continue-exact    │
                                                  │      B/op      │      B/op       vs base                │      B/op       vs base                │     B/op      vs base                │
StoreListCreate/RV=NotOlderThan-12                   293.72Ki ± 4%    233.06Ki ± 4%  -20.65% (p=0.000 n=10)     42.71Ki ± 0%  -85.46% (p=0.000 n=10)   42.77Ki ± 0%  -85.44% (p=0.000 n=10)
StoreListCreate/RV=ExactMatch-12                     115.00Ki ± 0%    114.89Ki ± 0%   -0.09% (p=0.000 n=10)    114.93Ki ± 2%        ~ (p=0.670 n=10)   93.50Ki ± 1%  -18.70% (p=0.000 n=10)
StoreList/RV=Empty-12                                 6.179Mi ± 0%     6.023Mi ± 0%   -2.53% (p=0.000 n=10)     6.023Mi ± 0%   -2.53% (p=0.000 n=10)   6.023Mi ± 0%   -2.53% (p=0.000 n=10)
StoreList/RV=NotOlderThan-12                          6.163Mi ± 0%     6.007Mi ± 0%   -2.53% (p=0.000 n=10)     6.007Mi ± 0%   -2.54% (p=0.000 n=10)   6.007Mi ± 0%   -2.54% (p=0.000 n=10)
StoreList/RV=MatchExact-12                           60.324Mi ± 0%    60.294Mi ± 0%        ~ (p=0.529 n=10)    60.212Mi ± 0%        ~ (p=0.143 n=10)   6.007Mi ± 0%  -90.04% (p=0.000 n=10)
StoreList/Paginate/RV=Empty-12                       64.286Mi ± 0%    64.051Mi ± 0%   -0.37% (p=0.000 n=10)     8.651Mi ± 1%  -86.54% (p=0.000 n=10)   8.652Mi ± 1%  -86.54% (p=0.000 n=10)
StoreList/Paginate/RV=NotOlderThan-12                64.266Mi ± 0%    64.039Mi ± 0%   -0.35% (p=0.000 n=10)     8.636Mi ± 0%  -86.56% (p=0.000 n=10)   8.635Mi ± 0%  -86.56% (p=0.000 n=10)
StoreList/Paginate/RV=MatchExact-12                   63.64Mi ± 0%     63.56Mi ± 0%   -0.12% (p=0.000 n=10)     63.73Mi ± 0%   +0.15% (p=0.000 n=10)   10.98Mi ± 0%  -82.74% (p=0.000 n=10)
StoreList/NodeIndexed/RV=Empty-12                     7.928Mi ± 1%     7.929Mi ± 1%   +0.01% (p=0.035 n=10)     7.928Mi ± 0%        ~ (p=0.971 n=10)   7.902Mi ± 0%   -0.32% (p=0.000 n=10)
StoreList/NodeIndexed/RV=NotOlderThan-12              6.328Mi ± 0%     6.328Mi ± 0%        ~ (p=0.739 n=10)     6.329Mi ± 0%   +0.02% (p=0.035 n=10)   6.302Mi ± 0%   -0.41% (p=0.000 n=10)
StoreList/NodeIndexed/RV=MatchExact-12              5923.83Mi ± 0%   5920.72Mi ± 0%        ~ (p=0.315 n=10)   5924.82Mi ± 0%        ~ (p=0.631 n=10)   71.05Mi ± 0%  -98.80% (p=0.000 n=10)
StoreList/NodeIndexed/Paginate/RV=Empty-12           283.98Mi ± 0%    256.99Mi ± 0%   -9.51% (p=0.000 n=10)     11.90Mi ± 0%  -95.81% (p=0.000 n=10)   11.71Mi ± 0%  -95.88% (p=0.000 n=10)
StoreList/NodeIndexed/Paginate/RV=NotOlderThan-12    282.23Mi ± 0%    255.27Mi ± 0%   -9.55% (p=0.000 n=10)     10.27Mi ± 0%  -96.36% (p=0.000 n=10)   10.10Mi ± 0%  -96.42% (p=0.000 n=10)
StoreList/NodeIndexed/Paginate/RV=MatchExact-12     6218.59Mi ± 0%   6192.72Mi ± 0%   -0.42% (p=0.000 n=10)   6203.27Mi ± 0%   -0.25% (p=0.000 n=10)   67.94Mi ± 0%  -98.91% (p=0.000 n=10)
StoreList/Namespace/RV=Empty-12                      23.745Mi ± 0%     8.123Mi ± 0%  -65.79% (p=0.000 n=10)     8.123Mi ± 0%  -65.79% (p=0.000 n=10)   8.123Mi ± 0%  -65.79% (p=0.000 n=10)
StoreList/Namespace/RV=NotOlderThan-12               22.143Mi ± 0%     6.521Mi ± 0%  -70.55% (p=0.000 n=10)     6.521Mi ± 0%  -70.55% (p=0.000 n=10)   6.523Mi ± 0%  -70.54% (p=0.000 n=10)
StoreList/Namespace/RV=MatchExact-12                 63.389Mi ± 0%    63.318Mi ± 0%   -0.11% (p=0.000 n=10)    63.360Mi ± 0%   -0.05% (p=0.000 n=10)   8.889Mi ± 0%  -85.98% (p=0.000 n=10)
geomean                                               33.76Mi          28.64Mi       -15.15%                    14.15Mi       -58.07%                  5.785Mi       -82.86%

                                                  │   watchcache   │           watchcache-btree            │       watchcache-btree-continue        │   watchcache-btree-continue-exact   │
                                                  │   allocs/op    │   allocs/op     vs base               │   allocs/op     vs base                │  allocs/op   vs base                │
StoreListCreate/RV=NotOlderThan-12                      561.0 ± 0%       559.0 ± 0%  -0.36% (p=0.000 n=10)       558.0 ± 0%   -0.53% (p=0.000 n=10)    558.0 ± 0%   -0.53% (p=0.000 n=10)
StoreListCreate/RV=ExactMatch-12                        874.5 ± 0%       875.0 ± 0%       ~ (p=0.407 n=10)       875.5 ± 0%        ~ (p=0.196 n=10)    763.5 ± 0%  -12.69% (p=0.000 n=10)
StoreList/RV=Empty-12                                   346.5 ± 1%       345.0 ± 2%       ~ (p=0.236 n=10)       344.5 ± 0%   -0.58% (p=0.001 n=10)    344.0 ± 0%   -0.72% (p=0.000 n=10)
StoreList/RV=NotOlderThan-12                            88.00 ± 1%       87.00 ± 1%  -1.14% (p=0.002 n=10)       87.00 ± 0%   -1.14% (p=0.000 n=10)    87.00 ± 1%   -1.14% (p=0.000 n=10)
StoreList/RV=MatchExact-12                           460591.5 ± 0%    456773.5 ± 0%  -0.83% (p=0.000 n=10)    460860.0 ± 0%   +0.06% (p=0.000 n=10)    256.0 ± 1%  -99.94% (p=0.000 n=10)
StoreList/Paginate/RV=Empty-12                        490.62k ± 0%     486.82k ± 0%  -0.77% (p=0.000 n=10)      34.45k ± 0%  -92.98% (p=0.000 n=10)   34.43k ± 0%  -92.98% (p=0.000 n=10)
StoreList/Paginate/RV=NotOlderThan-12                 490.37k ± 0%     486.56k ± 0%  -0.78% (p=0.000 n=10)      34.21k ± 0%  -93.02% (p=0.000 n=10)   34.18k ± 0%  -93.03% (p=0.000 n=10)
StoreList/Paginate/RV=MatchExact-12                   492.87k ± 0%     489.10k ± 0%  -0.77% (p=0.000 n=10)     493.96k ± 0%   +0.22% (p=0.000 n=10)   50.69k ± 1%  -89.72% (p=0.000 n=10)
StoreList/NodeIndexed/RV=Empty-12                      32.08k ± 0%      32.10k ± 0%       ~ (p=0.061 n=10)      32.09k ± 0%        ~ (p=0.271 n=10)   32.11k ± 0%   +0.11% (p=0.027 n=10)
StoreList/NodeIndexed/RV=NotOlderThan-12               6.614k ± 1%      6.614k ± 1%       ~ (p=0.642 n=10)      6.622k ± 0%   +0.14% (p=0.033 n=10)   6.624k ± 1%   +0.16% (p=0.020 n=10)
StoreList/NodeIndexed/RV=MatchExact-12              46960.49k ± 0%   46580.64k ± 0%  -0.81% (p=0.000 n=10)   46973.40k ± 0%   +0.03% (p=0.000 n=10)   20.11k ± 1%  -99.96% (p=0.000 n=10)
StoreList/NodeIndexed/Paginate/RV=Empty-12           2147.20k ± 0%    1947.92k ± 0%  -9.28% (p=0.000 n=10)      52.92k ± 0%  -97.54% (p=0.000 n=10)   49.36k ± 0%  -97.70% (p=0.000 n=10)
StoreList/NodeIndexed/Paginate/RV=NotOlderThan-12    2118.89k ± 0%    1920.06k ± 0%  -9.38% (p=0.000 n=10)      26.98k ± 0%  -98.73% (p=0.000 n=10)   23.80k ± 0%  -98.88% (p=0.000 n=10)
StoreList/NodeIndexed/Paginate/RV=MatchExact-12     47927.16k ± 0%   47460.51k ± 0%  -0.97% (p=0.000 n=10)   47840.12k ± 0%   -0.18% (p=0.000 n=10)   54.52k ± 2%  -99.89% (p=0.000 n=10)
StoreList/Namespace/RV=Empty-12                        31.84k ± 0%      31.72k ± 0%  -0.39% (p=0.000 n=10)      31.72k ± 0%   -0.38% (p=0.000 n=10)   31.73k ± 0%   -0.36% (p=0.000 n=10)
StoreList/Namespace/RV=NotOlderThan-12                 6.314k ± 0%      6.218k ± 0%  -1.53% (p=0.000 n=10)      6.223k ± 0%   -1.45% (p=0.000 n=10)   6.239k ± 0%   -1.20% (p=0.000 n=10)
StoreList/Namespace/RV=MatchExact-12                  490.13k ± 0%     486.39k ± 0%  -0.76% (p=0.000 n=10)     489.96k ± 0%   -0.04% (p=0.000 n=10)   22.88k ± 1%  -95.33% (p=0.000 n=10)
geomean                                                78.82k           77.48k       -1.69%                     35.79k       -54.60%                  7.016k       -91.10%

Use watch cache to serve all types of LIST requests

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 21, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/apiserver area/cloudprovider area/dependency Issues or PRs related to dependency changes area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 21, 2024
@k8s-ci-robot k8s-ci-robot requested review from cheftako, dchen1107 and a team August 21, 2024 17:56
@serathius serathius force-pushed the watchcache-exact branch 2 times, most recently from 2008b43 to 78fd9c2 Compare August 25, 2024 12:16
@wojtek-t wojtek-t self-assigned this Aug 27, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 29, 2024
@dims dims added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 30, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2024
@serathius
Copy link
Contributor Author

/retest

@k8s-ci-robot
Copy link
Contributor

@serathius: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-linter-hints 15b3e1b link false /test pull-kubernetes-linter-hints
pull-kubernetes-verify-lint 15b3e1b link true /test pull-kubernetes-verify-lint
pull-kubernetes-conformance-kind-ga-only-parallel 15b3e1b link true /test pull-kubernetes-conformance-kind-ga-only-parallel
pull-kubernetes-conformance-kind-ipv6-parallel 15b3e1b link false /test pull-kubernetes-conformance-kind-ipv6-parallel
pull-kubernetes-verify 15b3e1b link true /test pull-kubernetes-verify
pull-kubernetes-e2e-gce 15b3e1b link true /test pull-kubernetes-e2e-gce
pull-kubernetes-e2e-gce-cos-alpha-features 15b3e1b link false /test pull-kubernetes-e2e-gce-cos-alpha-features

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 30, 2024
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 24, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: serathius
Once this PR has been reviewed and has the lgtm label, please ask for approval from wojtek-t. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apiserver area/cloudprovider area/dependency Issues or PRs related to dependency changes area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

5 participants