Skip to content

Excessive bucket List operations when actively querying data over long time ranges #5018

@slim-bean

Description

@slim-bean

I've been storing my shell history in Loki for almost a year now, and am discovering some pain points around List operations which are exacerbated by this use case.

Currently the compactor will search through every table in storage to look for work to do, this is a list operation on all the index tables as well as a list operation for each table to see the files in it. So every 10 minutes (default compactor run time) there is a list for as many days of stored data.

Also when you query data boltdb-shipper will download the index and cache it locally for some time, while it's cached every 5 minutes the querier will "sync" this table to make sure no new files were uploaded to the object store. For loki-shell I set the TTL on this cache to > 300 days because I regularly query for long term data. Every 5 minutes, every table in the cache will have a List call made to the object store.

I think a good first step at improving this would be to not compact or 'sync' index tables older than reject_old_samples_max_age

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions