Conversation
e28c2c5 to
5a80e52
Compare
5a80e52 to
2b519f2
Compare
| @@ -0,0 +1 @@ | |||
| Cargo.lock No newline at end of file | |||
There was a problem hiding this comment.
this is just some housekeeping I ran into
7c00333 to
cccc3d5
Compare
Merging this PR will improve performance by 34.55%
Performance Changes
Comparing Footnotes
|
215fcde to
ab32105
Compare
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
Benchmarks: TPC-H SF=1 on NVMESummary
Detailed Results Table
|
Benchmarks: FineWeb NVMeSummary
Detailed Results Table
|
Benchmarks: TPC-DS SF=1 on NVMESummary
Detailed Results Table
|
Benchmarks: FineWeb S3Summary
Detailed Results Table
|
Benchmarks: TPC-H SF=10 on NVMESummary
Detailed Results Table
|
Benchmarks: TPC-H SF=10 on S3Summary
Detailed Results Table
|
Benchmarks: TPC-H SF=1 on S3Summary
Detailed Results Table
|
ab32105 to
32d8be0
Compare
Benchmarks: Statistical and Population GeneticsSummary
Detailed Results Table
|
Benchmarks: Clickbench on NVMESummary
Detailed Results Table
|
a56d1ea to
cfff979
Compare
The tests are failing due to a bug in the `url` crate, I had a fix as part of #6187 but it's taking longer than expected to get it in, so figured I'll just take it out. Signed-off-by: Adam Gutglick <adam@spiraldb.com>
| type Item = (MetricId, &'a Metric); | ||
| /// Default metrics registry, stores all state in-memory. | ||
| #[derive(Default, Clone)] | ||
| pub struct DefaultMetricsRegistry { |
There was a problem hiding this comment.
Debating whether we want a RwLock or Mutex here
There was a problem hiding this comment.
I don't think we ever take a read lock here unless its after the scan is finished and there's no contention
robert3005
left a comment
There was a problem hiding this comment.
I made couple small comments. The thing that I am not convinced by is double arcing. But I can see how it ends up being necessary
vortex-metrics/src/timer.rs
Outdated
| #![allow(clippy::expect_used)] | ||
| #![allow(clippy::unwrap_in_result)] |
There was a problem hiding this comment.
moved them to the smallest scope possible
vortex-metrics/src/histogram.rs
Outdated
| #![allow(clippy::expect_used)] | ||
| #![allow(clippy::unwrap_in_result)] |
|
|
||
| /// Sets the gauge to a specific value. | ||
| pub fn set(&self, value: f64) { | ||
| _ = self.0.swap(value.to_bits(), Ordering::AcqRel); |
There was a problem hiding this comment.
my understanding is that using swap here makes the memory ordering such that I can do gauge.get() and then a gague.set(..) and get a consistent ordering.
There was a problem hiding this comment.
Can we leave a comment here? On the surface it makes sense to use store but as you point out swap makes the store wait for a get if there’s one ongoing so you get consistent ordering
ff7bbe3 to
5933bad
Compare
robert3005
left a comment
There was a problem hiding this comment.
Feel free to merge it once you add a comment about swap in gauge
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
051efe9 to
40c54bc
Compare
The tests are failing due to a bug in the `url` crate, I had a fix as part of #6187 but it's taking longer than expected to get it in, so figured I'll just take it out. Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Closes #6078. This PR reworks our metrics crate to simplify it and makes it much harder to make it use unbounded amounts of memory. The implementation is inspired by our current use of `witchcraft-metrics`, the `metrics` crate, DataFusion's metrics and some reading of the OTel spec. It includes several changes: 1. `VortexMetrics` is replaced by the new `MetricsRegistry` trait, which allows user to integrate metrics to whatever metrics backend they have. 1. Removes metrics from the session, making it the responsibility of the user to wire it correctly between various components. 1. No more hierarchical metrics instances, just wire labels if they exist. 1. Removes the `witchcraft-metrics` dependency. It does many things we don't care about or that are opinionated in a way that I don't think is intuitive or useful for most users. It also makes our external API less dependent on other crates we have no control over. 1. Histograms are now f64 and don't use exponential decay, Timers only speak in `Duration`, and counters are u64s. It also introduces a `Gauge` type which I don't think we actually use and I might just delete. I've tested it by running our DF benchmarks with `--show-metrics` and that seems to not change, if anyone else has made use of the metrics, I would love to help test and debug them in another context. --------- Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Closes #6078.
This PR reworks our metrics crate to simplify it and makes it much harder to make it use unbounded amounts of memory. The implementation is inspired by our current use of
witchcraft-metrics, themetricscrate, DataFusion's metrics and some reading of the OTel spec.It includes several changes:
VortexMetricsis replaced by the newMetricsRegistrytrait, which allows user to integrate metrics to whatever metrics backend they have.witchcraft-metricsdependency. It does many things we don't care about or that are opinionated in a way that I don't think is intuitive or useful for most users. It also makes our external API less dependent on other crates we have no control over.Duration, and counters are u64s. It also introduces aGaugetype which I don't think we actually use and I might just delete.I've tested it by running our DF benchmarks with
--show-metricsand that seems to not change, if anyone else has made use of the metrics, I would love to help test and debug them in another context.