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

Disable kine metrics by default #154

Merged
merged 3 commits into from
Aug 8, 2024
Merged

Conversation

louiseschmidtgen
Copy link
Contributor

@louiseschmidtgen louiseschmidtgen commented Aug 7, 2024

Description

Disable kine metrics by default and shutdown the server.

Closes #138 #137

@louiseschmidtgen louiseschmidtgen requested a review from a team as a code owner August 7, 2024 17:04
Copy link

github-actions bot commented Aug 7, 2024

Benchmark Result

goos: linux
goarch: amd64
pkg: github.com/canonical/k8s-dqlite/test
cpu: AMD EPYC 7763 64-Core Processor                
                    │    Before     │                After                 │
                    │    sec/op     │    sec/op      vs base               │
Compaction/sqlite-4    36.65µ ± 11%    41.19µ ± 11%  +12.39% (p=0.038 n=7)
Compaction/dqlite-4    41.02µ ±  2%    41.22µ ±  3%        ~ (p=0.710 n=7)
Create/sqlite-4        1.200m ±  8%    1.276m ±  9%   +6.36% (p=0.038 n=7)
Create/dqlite-4        1.105m ± 12%    1.059m ± 10%        ~ (p=0.128 n=7)
Delete/sqlite-4        1.442m ±  5%    1.436m ± 16%        ~ (p=0.318 n=7)
Delete/dqlite-4        1.383m ± 10%    1.288m ± 10%   -6.88% (p=0.026 n=7)
Get/sqlite-4           262.7µ ±  1%    267.8µ ±  1%   +1.92% (p=0.001 n=7)
Get/dqlite-4           348.4µ ±  1%    352.9µ ±  1%   +1.28% (p=0.001 n=7)
Lease/sqlite-4         97.99µ ±  3%   100.53µ ±  2%   +2.59% (p=0.026 n=7)
Lease/dqlite-4        101.48µ ±  3%    99.05µ ±  1%   -2.39% (p=0.001 n=7)
Update/sqlite-4        1.444m ±  8%    1.449m ±  7%        ~ (p=0.710 n=7)
Update/dqlite-4        1.316m ±  4%    1.453m ±  7%  +10.40% (p=0.001 n=7)
geomean                371.3µ          377.6µ         +1.69%

                    │        Before        │                    After                     │
                    │ page-cache-misses/op │ page-cache-misses/op  vs base                │
Compaction/sqlite-4           0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Compaction/dqlite-4           0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Create/sqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Create/dqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Delete/sqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Delete/dqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Get/sqlite-4                  0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Get/dqlite-4                  0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Lease/sqlite-4                0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Lease/dqlite-4                0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Update/sqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Update/dqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
geomean                                  ²                         +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                    │        Before        │                    After                     │
                    │ page-cache-spills/op │ page-cache-spills/op  vs base                │
Compaction/sqlite-4           0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Compaction/dqlite-4           0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Create/sqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Create/dqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Delete/sqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Delete/dqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Get/sqlite-4                  0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Get/dqlite-4                  0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Lease/sqlite-4                0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Lease/dqlite-4                0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Update/sqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
Update/dqlite-4               0.000 ± 0%               0.000 ± 0%       ~ (p=1.000 n=7) ¹
geomean                                  ²                         +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                    │    Before     │                After                 │
                    │ page-reads/op │ page-reads/op  vs base               │
Compaction/sqlite-4     12.21 ±  1%    12.33 ±   1%        ~ (p=0.216 n=7)
Compaction/dqlite-4     12.18 ±  1%    12.17 ±   1%        ~ (p=0.190 n=7)
Create/sqlite-4         13.91 ± 18%    13.97 ±   2%        ~ (p=0.902 n=7)
Create/dqlite-4         13.85 ±  2%    13.97 ±   1%        ~ (p=0.093 n=7)
Delete/sqlite-4         24.95 ±  1%    24.99 ±   4%        ~ (p=0.737 n=7)
Delete/dqlite-4         24.58 ±  1%    24.61 ±   0%        ~ (p=0.805 n=7)
Get/sqlite-4            14.96 ±  0%    14.96 ±   0%        ~ (p=0.566 n=7)
Get/dqlite-4            11.96 ±  0%    11.95 ±   0%        ~ (p=0.174 n=7)
Lease/sqlite-4         800.0µ ± 80%   600.0µ ± 150%        ~ (p=0.245 n=7)
Lease/dqlite-4         800.0µ ± 50%   664.3µ ±  20%  -16.96% (p=0.004 n=7)
Update/sqlite-4         25.15 ±  2%    25.01 ±   3%        ~ (p=0.209 n=7)
Update/dqlite-4         25.25 ±  2%    24.97 ±   2%        ~ (p=0.436 n=7)
geomean                 3.228          3.104          -3.81%

                    │     Before     │                 After                  │
                    │ page-writes/op │ page-writes/op  vs base                │
Compaction/sqlite-4    208.2m ± 1%        207.8m ± 0%       ~ (p=0.395 n=7)
Compaction/dqlite-4    187.4m ± 0%        187.3m ± 1%       ~ (p=0.876 n=7)
Create/sqlite-4         5.121 ± 1%         5.119 ± 1%       ~ (p=0.646 n=7)
Create/dqlite-4         4.235 ± 2%         4.281 ± 1%  +1.09% (p=0.005 n=7)
Delete/sqlite-4         5.335 ± 1%         5.325 ± 0%       ~ (p=0.338 n=7)
Delete/dqlite-4         4.388 ± 1%         4.398 ± 1%       ~ (p=0.733 n=7)
Get/sqlite-4            0.000 ± 0%         0.000 ± 0%       ~ (p=1.000 n=7) ¹
Get/dqlite-4            0.000 ± 0%         0.000 ± 0%       ~ (p=1.000 n=7) ¹
Lease/sqlite-4          0.000 ± 0%         0.000 ± 0%       ~ (p=1.000 n=7) ¹
Lease/dqlite-4          0.000 ± 0%         0.000 ± 0%       ~ (p=1.000 n=7) ¹
Update/sqlite-4         5.143 ± 0%         5.141 ± 0%       ~ (p=0.729 n=7)
Update/dqlite-4         4.168 ± 0%         4.157 ± 0%  -0.26% (p=0.013 n=7)
geomean                            ²                   +0.04%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                    │      Before      │                  After                  │
                    │  sec-reading/op  │ sec-reading/op  vs base                 │
Compaction/sqlite-4   118.8µ ±    7%      123.6µ ±  14%        ~ (p=0.137 n=7)
Compaction/dqlite-4   32.50µ ±   12%      31.10µ ±  12%        ~ (p=0.209 n=7)
Create/sqlite-4       36.20µ ± 3046%      82.70µ ± 200%        ~ (p=0.383 n=7)
Create/dqlite-4       11.80µ ±   42%      10.00µ ±  68%        ~ (p=0.259 n=7)
Delete/sqlite-4       246.3µ ±  104%      206.4µ ± 224%        ~ (p=0.805 n=7)
Delete/dqlite-4       44.10µ ±   23%      51.60µ ±  17%        ~ (p=0.053 n=7)
Get/sqlite-4          86.20µ ±    4%      86.50µ ±   5%        ~ (p=0.596 n=7)
Get/dqlite-4          33.50µ ±   12%      33.20µ ±  13%        ~ (p=0.300 n=7)
Lease/sqlite-4        100.0n ±     ?      300.0n ±    ?        ~ (p=0.054 n=7)
Lease/dqlite-4         0.000 ±    0%       0.000 ±   0%        ~ (p=1.000 n=7) ¹
Update/sqlite-4       154.6µ ±   21%      179.8µ ±  98%        ~ (p=0.073 n=7)
Update/dqlite-4       97.60µ ±   26%     104.00µ ±  28%        ~ (p=1.000 n=7)
geomean                              ²                   +17.59%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                    │     Before     │                 After                  │
                    │ sec-writing/op │ sec-writing/op  vs base                │
Compaction/sqlite-4   9.800µ ±  9%       9.800µ ± 59%       ~ (p=0.366 n=7)
Compaction/dqlite-4   7.000µ ± 11%       7.100µ ± 11%       ~ (p=0.589 n=7)
Create/sqlite-4       968.0µ ±  8%      1022.0µ ± 14%  +5.58% (p=0.038 n=7)
Create/dqlite-4       28.20µ ± 68%       33.10µ ± 24%       ~ (p=0.383 n=7)
Delete/sqlite-4       1.088m ±  9%       1.070m ± 21%       ~ (p=0.275 n=7)
Delete/dqlite-4       18.90µ ± 33%       20.00µ ± 21%       ~ (p=0.535 n=7)
Get/sqlite-4           0.000 ±  0%        0.000 ±  0%       ~ (p=1.000 n=7) ¹
Get/dqlite-4           0.000 ±  0%        0.000 ±  0%       ~ (p=1.000 n=7) ¹
Lease/sqlite-4         0.000 ±  0%        0.000 ±  0%       ~ (p=1.000 n=7) ¹
Lease/dqlite-4         0.000 ±  0%        0.000 ±  0%       ~ (p=1.000 n=7) ¹
Update/sqlite-4       1.017m ± 12%       1.006m ± 10%       ~ (p=0.710 n=7)
Update/dqlite-4       20.30µ ± 36%       20.60µ ± 46%       ~ (p=0.902 n=7)
geomean                            ²                   +2.30%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                    │    Before     │                After                │
                    │     B/op      │     B/op       vs base              │
Compaction/sqlite-4     744.0 ± 50%     739.0 ± 42%       ~ (p=0.620 n=7)
Compaction/dqlite-4   5.644Ki ± 12%   5.586Ki ± 17%       ~ (p=0.383 n=7)
Create/sqlite-4       18.88Ki ± 10%   18.88Ki ±  2%       ~ (p=0.876 n=7)
Create/dqlite-4       17.64Ki ±  0%   17.63Ki ±  0%       ~ (p=0.119 n=7)
Delete/sqlite-4       28.36Ki ±  1%   28.35Ki ±  2%       ~ (p=0.902 n=7)
Delete/dqlite-4       25.26Ki ±  0%   25.26Ki ±  0%       ~ (p=0.596 n=7)
Get/sqlite-4          23.31Ki ±  0%   23.31Ki ±  0%       ~ (p=0.516 n=7)
Get/dqlite-4          21.11Ki ±  0%   21.11Ki ±  0%       ~ (p=1.000 n=7)
Lease/sqlite-4        12.33Ki ±  0%   12.33Ki ±  0%       ~ (p=0.202 n=7)
Lease/dqlite-4        12.33Ki ±  0%   12.33Ki ±  0%  -0.02% (p=0.003 n=7)
Update/sqlite-4       26.13Ki ±  0%   26.10Ki ±  0%       ~ (p=0.128 n=7)
Update/dqlite-4       23.41Ki ±  0%   23.41Ki ±  0%       ~ (p=0.428 n=7)
geomean               13.73Ki         13.71Ki        -0.15%

                    │   Before    │                After                │
                    │  allocs/op  │  allocs/op   vs base                │
Compaction/sqlite-4   29.00 ± 55%   29.00 ± 41%       ~ (p=0.710 n=7)
Compaction/dqlite-4   137.0 ± 12%   136.0 ± 17%       ~ (p=0.474 n=7)
Create/sqlite-4       418.0 ± 19%   417.0 ±  3%       ~ (p=0.941 n=7)
Create/dqlite-4       336.0 ±  0%   336.0 ±  0%       ~ (p=0.462 n=7)
Delete/sqlite-4       659.0 ±  1%   660.0 ±  5%       ~ (p=0.742 n=7)
Delete/dqlite-4       446.0 ±  0%   446.0 ±  0%       ~ (p=0.462 n=7)
Get/sqlite-4          535.0 ±  0%   535.0 ±  0%       ~ (p=1.000 n=7) ¹
Get/dqlite-4          379.0 ±  0%   379.0 ±  0%       ~ (p=1.000 n=7) ¹
Lease/sqlite-4        224.0 ±  0%   224.0 ±  0%       ~ (p=1.000 n=7) ¹
Lease/dqlite-4        224.0 ±  0%   224.0 ±  0%       ~ (p=1.000 n=7) ¹
Update/sqlite-4       607.0 ±  0%   605.0 ±  1%  -0.33% (p=0.010 n=7)
Update/dqlite-4       428.0 ±  0%   428.0 ±  0%       ~ (p=1.000 n=7)
geomean               294.9         294.7        -0.10%
¹ all samples are equal

                    │        Before         │                    After                     │
                    │ network-bytes-read/op │ network-bytes-read/op  vs base               │
Compaction/dqlite-4           2.086Ki ± 12%           2.064Ki ± 17%        ~ (p=0.383 n=7)
Create/dqlite-4                 240.7 ±  0%             241.4 ±  0%   +0.29% (p=0.010 n=7)
Delete/dqlite-4               1.158Ki ±  0%           1.158Ki ±  0%        ~ (p=0.086 n=7)
Get/dqlite-4                  1.134Ki ±  0%           1.134Ki ±  0%        ~ (p=1.000 n=7)
Lease/dqlite-4                0.03280 ± 27%           0.02724 ± 20%  -16.95% (p=0.004 n=7)
Update/dqlite-4                 564.7 ±  0%             564.5 ±  0%        ~ (p=0.191 n=7)
geomean                         153.6                   148.7         -3.17%

                    │          Before          │                     After                      │
                    │ network-bytes-written/op │ network-bytes-written/op  vs base              │
Compaction/dqlite-4               4.614 ±   2%               4.612 ±   3%       ~ (p=0.535 n=7)
Create/dqlite-4                   114.7 ±   2%               116.0 ±   1%  +1.13% (p=0.025 n=7)
Delete/dqlite-4                   423.8 ±   0%               423.9 ±   0%       ~ (p=0.250 n=7)
Get/dqlite-4                      80.55 ±   0%               80.56 ±   0%       ~ (p=0.780 n=7)
Lease/dqlite-4                  0.01360 ± 353%             0.01130 ± 424%       ~ (p=0.407 n=7)
Update/dqlite-4                   263.3 ±   0%               263.4 ±   0%       ~ (p=0.872 n=7)
geomean                           20.04                      19.46         -2.85%
Current status
goos: linux
goarch: amd64
pkg: github.com/canonical/k8s-dqlite/test
cpu: AMD EPYC 7763 64-Core Processor                
                    │    After     │
                    │    sec/op    │
Compaction/sqlite-4   41.19µ ± 11%
Compaction/dqlite-4   41.22µ ±  3%
Create/sqlite-4       1.276m ±  9%
Create/dqlite-4       1.059m ± 10%
Delete/sqlite-4       1.436m ± 16%
Delete/dqlite-4       1.288m ± 10%
Get/sqlite-4          267.8µ ±  1%
Get/dqlite-4          352.9µ ±  1%
Lease/sqlite-4        100.5µ ±  2%
Lease/dqlite-4        99.05µ ±  1%
Update/sqlite-4       1.449m ±  7%
Update/dqlite-4       1.453m ±  7%
geomean               377.6µ

                    │        After         │
                    │ page-cache-misses/op │
Compaction/sqlite-4           0.000 ± 0%
Compaction/dqlite-4           0.000 ± 0%
Create/sqlite-4               0.000 ± 0%
Create/dqlite-4               0.000 ± 0%
Delete/sqlite-4               0.000 ± 0%
Delete/dqlite-4               0.000 ± 0%
Get/sqlite-4                  0.000 ± 0%
Get/dqlite-4                  0.000 ± 0%
Lease/sqlite-4                0.000 ± 0%
Lease/dqlite-4                0.000 ± 0%
Update/sqlite-4               0.000 ± 0%
Update/dqlite-4               0.000 ± 0%
geomean                                  ¹
¹ summaries must be >0 to compute geomean

                    │        After         │
                    │ page-cache-spills/op │
Compaction/sqlite-4           0.000 ± 0%
Compaction/dqlite-4           0.000 ± 0%
Create/sqlite-4               0.000 ± 0%
Create/dqlite-4               0.000 ± 0%
Delete/sqlite-4               0.000 ± 0%
Delete/dqlite-4               0.000 ± 0%
Get/sqlite-4                  0.000 ± 0%
Get/dqlite-4                  0.000 ± 0%
Lease/sqlite-4                0.000 ± 0%
Lease/dqlite-4                0.000 ± 0%
Update/sqlite-4               0.000 ± 0%
Update/dqlite-4               0.000 ± 0%
geomean                                  ¹
¹ summaries must be >0 to compute geomean

                    │     After     │
                    │ page-reads/op │
Compaction/sqlite-4    12.33 ±   1%
Compaction/dqlite-4    12.17 ±   1%
Create/sqlite-4        13.97 ±   2%
Create/dqlite-4        13.97 ±   1%
Delete/sqlite-4        24.99 ±   4%
Delete/dqlite-4        24.61 ±   0%
Get/sqlite-4           14.96 ±   0%
Get/dqlite-4           11.95 ±   0%
Lease/sqlite-4        600.0µ ± 150%
Lease/dqlite-4        664.3µ ±  20%
Update/sqlite-4        25.01 ±   3%
Update/dqlite-4        24.97 ±   2%
geomean                3.104

                    │     After      │
                    │ page-writes/op │
Compaction/sqlite-4    207.8m ± 0%
Compaction/dqlite-4    187.3m ± 1%
Create/sqlite-4         5.119 ± 1%
Create/dqlite-4         4.281 ± 1%
Delete/sqlite-4         5.325 ± 0%
Delete/dqlite-4         4.398 ± 1%
Get/sqlite-4            0.000 ± 0%
Get/dqlite-4            0.000 ± 0%
Lease/sqlite-4          0.000 ± 0%
Lease/dqlite-4          0.000 ± 0%
Update/sqlite-4         5.141 ± 0%
Update/dqlite-4         4.157 ± 0%
geomean                            ¹
¹ summaries must be >0 to compute geomean

                    │      After      │
                    │ sec-reading/op  │
Compaction/sqlite-4   123.6µ ±  14%
Compaction/dqlite-4   31.10µ ±  12%
Create/sqlite-4       82.70µ ± 200%
Create/dqlite-4       10.00µ ±  68%
Delete/sqlite-4       206.4µ ± 224%
Delete/dqlite-4       51.60µ ±  17%
Get/sqlite-4          86.50µ ±   5%
Get/dqlite-4          33.20µ ±  13%
Lease/sqlite-4        300.0n ±    ?
Lease/dqlite-4         0.000 ±   0%
Update/sqlite-4       179.8µ ±  98%
Update/dqlite-4       104.0µ ±  28%
geomean                             ¹
¹ summaries must be >0 to compute geomean

                    │     After      │
                    │ sec-writing/op │
Compaction/sqlite-4   9.800µ ± 59%
Compaction/dqlite-4   7.100µ ± 11%
Create/sqlite-4       1.022m ± 14%
Create/dqlite-4       33.10µ ± 24%
Delete/sqlite-4       1.070m ± 21%
Delete/dqlite-4       20.00µ ± 21%
Get/sqlite-4           0.000 ±  0%
Get/dqlite-4           0.000 ±  0%
Lease/sqlite-4         0.000 ±  0%
Lease/dqlite-4         0.000 ±  0%
Update/sqlite-4       1.006m ± 10%
Update/dqlite-4       20.60µ ± 46%
geomean                            ¹
¹ summaries must be >0 to compute geomean

                    │     After     │
                    │     B/op      │
Compaction/sqlite-4     739.0 ± 42%
Compaction/dqlite-4   5.586Ki ± 17%
Create/sqlite-4       18.88Ki ±  2%
Create/dqlite-4       17.63Ki ±  0%
Delete/sqlite-4       28.35Ki ±  2%
Delete/dqlite-4       25.26Ki ±  0%
Get/sqlite-4          23.31Ki ±  0%
Get/dqlite-4          21.11Ki ±  0%
Lease/sqlite-4        12.33Ki ±  0%
Lease/dqlite-4        12.33Ki ±  0%
Update/sqlite-4       26.10Ki ±  0%
Update/dqlite-4       23.41Ki ±  0%
geomean               13.71Ki

                    │    After    │
                    │  allocs/op  │
Compaction/sqlite-4   29.00 ± 41%
Compaction/dqlite-4   136.0 ± 17%
Create/sqlite-4       417.0 ±  3%
Create/dqlite-4       336.0 ±  0%
Delete/sqlite-4       660.0 ±  5%
Delete/dqlite-4       446.0 ±  0%
Get/sqlite-4          535.0 ±  0%
Get/dqlite-4          379.0 ±  0%
Lease/sqlite-4        224.0 ±  0%
Lease/dqlite-4        224.0 ±  0%
Update/sqlite-4       605.0 ±  1%
Update/dqlite-4       428.0 ±  0%
geomean               294.7

                    │         After         │
                    │ network-bytes-read/op │
Compaction/dqlite-4           2.064Ki ± 17%
Create/dqlite-4                 241.4 ±  0%
Delete/dqlite-4               1.158Ki ±  0%
Get/dqlite-4                  1.134Ki ±  0%
Lease/dqlite-4                0.02724 ± 20%
Update/dqlite-4                 564.5 ±  0%
geomean                         148.7

                    │          After           │
                    │ network-bytes-written/op │
Compaction/dqlite-4               4.612 ±   3%
Create/dqlite-4                   116.0 ±   1%
Delete/dqlite-4                   423.9 ±   0%
Get/dqlite-4                      80.56 ±   0%
Lease/dqlite-4                  0.01130 ± 424%
Update/dqlite-4                   263.4 ±   0%
geomean                           19.46

@louiseschmidtgen louiseschmidtgen changed the title Update kine metrics Disable kine metrics by default Aug 8, 2024
cmd/root.go Outdated Show resolved Hide resolved
cmd/root.go Outdated Show resolved Hide resolved
@louiseschmidtgen louiseschmidtgen merged commit b6d0522 into master Aug 8, 2024
7 checks passed
@louiseschmidtgen louiseschmidtgen deleted the KU-1179/kine-metrics branch August 8, 2024 11:30
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

Successfully merging this pull request may close these issues.

Close metrics connection
2 participants