WIP: add metrics to the metadata engine #853

Draft
quentin wants to merge 8 commits from feat-metrics-metadata-engine into main
Owner

To debug #851

To test: in garage.toml, change db_engine to lmdb-with-metrics.


Roadmap:

  • Add counters and histogram gauges on metadata engine ops
  • Do not hardcode Lmdb, instead be generic to be compatible with all metadata engine
  • Maybe add an option to export metrics as JSON (it will make benchmarks results easier to collect)

Example (only counters, after uploading my blog in a bucket on a raw one node cluster):

db_op_counter{cat="control",op="open_tree",tx="no"} 62
db_op_counter{cat="control",op="transaction",tx="yes"} 4337
db_op_counter{cat="data",op="get",tx="no"} 912
db_op_counter{cat="data",op="get",tx="yes"} 6373
db_op_counter{cat="data",op="insert",tx="no"} 234
db_op_counter{cat="data",op="insert",tx="yes"} 6190
db_op_counter{cat="data",op="iter",tx="no"} 3222
db_op_counter{cat="data",op="len",tx="no"} 4139
db_op_counter{cat="data",op="range",tx="no"} 2053
db_op_counter{cat="data",op="remove",tx="yes"} 1501

(The full output including the histograms is attached to this issue)

To debug #851 To test: in `garage.toml`, change `db_engine` to `lmdb-with-metrics`. --- Roadmap: - [X] Add counters and histogram gauges on metadata engine ops - [ ] Do not hardcode Lmdb, instead be generic to be compatible with all metadata engine - [ ] Maybe add an option to export metrics as JSON (it will make benchmarks results easier to collect) --- Example (only counters, after uploading my blog in a bucket on a raw one node cluster): ``` db_op_counter{cat="control",op="open_tree",tx="no"} 62 db_op_counter{cat="control",op="transaction",tx="yes"} 4337 db_op_counter{cat="data",op="get",tx="no"} 912 db_op_counter{cat="data",op="get",tx="yes"} 6373 db_op_counter{cat="data",op="insert",tx="no"} 234 db_op_counter{cat="data",op="insert",tx="yes"} 6190 db_op_counter{cat="data",op="iter",tx="no"} 3222 db_op_counter{cat="data",op="len",tx="no"} 4139 db_op_counter{cat="data",op="range",tx="no"} 2053 db_op_counter{cat="data",op="remove",tx="yes"} 1501 ``` (The full output including the histograms is attached to this issue)
quentin added 1 commit 2024-08-14 20:22:19 +00:00
add proxy to instrument LmdbDB with otel
Some checks failed
ci/woodpecker/push/debug Pipeline failed
ci/woodpecker/pr/debug Pipeline failed
efc87a8b8e
quentin added 1 commit 2024-08-14 21:13:58 +00:00
proxy finalized, use it by setting 'lmdb-with-metrics'
Some checks failed
ci/woodpecker/push/debug Pipeline failed
ci/woodpecker/pr/debug Pipeline failed
56de00945f
quentin added 1 commit 2024-08-15 07:10:52 +00:00
fix cargo.nix
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
9d01a9870c
quentin added 1 commit 2024-08-15 12:32:24 +00:00
switch from sec to us
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
1685d83c04
quentin added 1 commit 2024-08-15 13:31:09 +00:00
switch from micros to millis
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
2d439c388c
quentin added 1 commit 2024-08-15 13:43:34 +00:00
switch to ms, simplify collected metrics
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
14163b5853
quentin added 2 commits 2024-08-17 11:17:31 +00:00
force flag "no read ahead" on LMDB
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
1ebaf7aa17
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
Required
Details
This pull request has changes conflicting with the target branch.
  • Cargo.nix
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat-metrics-metadata-engine:feat-metrics-metadata-engine
git checkout feat-metrics-metadata-engine
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#853
No description provided.