Comments (3)
- Compression can be composed on-top of existing file formats, if random access is not required. With some additional work, it can be implemented even if random access to uncompressed access is needed. (And a bit more work, if
mmap(2)
is needed, thoughmmap
should not be used with golang in the first place due to goroutine stalls.)
Mimir does use random access to objects in the object store. Fortunately we removed most mmap
in store-gateways for reasons you're mentioning. (However TSDB library still uses mmap, so blocks in ingesters do use this)
- As for CPU usage, this one is unlikely to be a bottleneck if proper algorithms and compression levels are chosen. For example, lz4 decompression operates pretty close to
memmove(3)
speeds. Not to mention, that if IO and CPU usage is overlapped then compression may even come for free. And given that compression reduces network, memory, and disk pressure, it may likely reduce end-to-end latencies.Finally, transfer costs (and NVMe/memory on store gateways) are fairly expensive so it may be worth optimizing.
I agree there would be benefits to this. At my previous job I've implemented file-level compression of files on long-term storage with support for random-access, using lz4. It was a fun task, and I'd personally be happy to work on this again :) However it is a non-trivial engineering effort, and it's not addressing our biggest pain points today.
from mimir.
Thank you for your suggestion. We're not going to pursue this anytime soon.
First of all, we use TSDB file format from Prometheus, and we don't plan to change this (if changes are done in Prometheus first, Mimir would adapt to such changes).
Second, Mimir fetches many segments of the index and chunks on demand, and adding additional compression to these files would require lot of changes -- not just a redesign of the format, but changes in the code to adapt to the new format.
Finally, our storage costs are tiny compared to cost of other resources (especially cpu).
For these reasons, implementing this change is a very low priority for us.
from mimir.
I would agree to disagree here, mostly due to:
- Compression can be composed on-top of existing file formats, if random access is not required. With some additional work, it can be implemented even if random access to uncompressed access is needed. (And a bit more work, if
mmap(2)
is needed, thoughmmap
should not be used with golang in the first place due to goroutine stalls.) - As for CPU usage, this one is unlikely to be a bottleneck if proper algorithms and compression levels are chosen. For example, lz4 decompression operates pretty close to
memmove(3)
speeds. Not to mention, that if IO and CPU usage is overlapped then compression may even come for free. And given that compression reduces network, memory, and disk pressure, it may likely reduce end-to-end latencies.
Finally, transfer costs (and NVMe/memory on store gateways) are fairly expensive so it may be worth optimizing.
That said, let me seems like prometheus community was looking into this some time ago, there there is indeed not much traction:
from mimir.
Related Issues (20)
- Alert State History from Mimir
- ingester.max-global-series-per-user: 2000000 is not parsable in ingester values HOT 3
- Unable to deploy helm-chart mimir-distributed with ArgoCD when setting any of `rbac.podSecurityContext` to `null`
- Lots of `"error processing requests from scheduler"` in querier logs HOT 3
- Test flake: TestDistributor/caching_unmarshal_data_disabled/reduce_native_histogram_buckets_via_down_scaling HOT 6
- Prometheus is crashign with Mimir push errors HOT 2
- failed to fetch some blocks | err-mimir-store-consistency-check-failed
- mimir-distributed Chart Env Var Expansion Failure: S3 Access Key and Access Key ID HOT 1
- [ingester] Ingester service state and lifecycler ring state not synchronized HOT 4
- Compactor fails to upload indexes larger than 1G to swift object storage
- Scrape commit failed" err="write to WAL: log samples: write data/wal/XXXXXXXX: no space left on device HOT 1
- Helm: Missing fields in Topology Spread Constraints
- Ruler Pods OOM/spike in memory observed with warning log closing ingester client stream failed
- store-gateway: add timeout to index-header loading
- Mimir returns HTTP status 422 in cases where 5xx makes more sense
- Docs: Update references to mmap in store-gateway architecture
- Query with aggregation return incorrect num of points HOT 1
- [mimir-distributed] Add additionalRuleLabels to PrometheusRule alerts HOT 1
- Request per Second Metric Does Not Sync with Total Request Count in Mimir Visualization
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mimir.