Community Edition 4.0.10 as prometheus remote storage, data takes up too much space

version:
Community Edition 4.0.10

configuration:
#docker-compose.yml
version: ‘3.2’

services:
crate:
image: implustechnology/crate-ce:4.0.10
restart: always
hostname: prometheus-db-1
container_name: crate
network_mode: host
volumes:
- “/opt/data/crate:/data”
command:
- crate
- -Ccluster.name=cratecluster
- -Cnode.name=prometheus-db-1
- -Cnode.master=true
- -Cnode.data=true
- -Chttp.port=5201
- -Cpsql.port=5210
- -Ctransport.tcp.port=5202
- -Cnetwork.host=prometheus-db-1
- -Cdiscovery.seed_hosts=prometheus-db-2,prometheus-db-3
- -Ccluster.initial_master_nodes=prometheus-db-1,prometheus-db-2,prometheus-db-3
- -Cgateway.expected_nodes=3
- -Cgateway.recover_after_nodes=2
- -Chttp.cors.enabled=true
- -Chttp.cors.allow-origin="*"
- -Cgateway.recover_after_time=1m
environment:
- CRATE_HEAP_SIZE=2g

data size:
image

how to optimize data size?

1 Like

hi, you can turn off some indexes especially on the labels_hash.
given the query speed benefit you get with cratedb 0.25 kb per record inlcuding all kind of indexing is not too much tbh.
you could also tweek the labels object if you are already aware of them upfront.


https://crate.io/docs/crate/reference/en/latest/general/ddl/fulltext-indices.html#disable-indexing

1 Like

When I disable labels_hash index, I get with cratedb about 0.20 kb per record, but the data size is still big.

Are there any other ways to compress data size?

1 Like