Skip to content

Add optional pod quota counter strategy #2231

Description

@bourgeoa

Feature description

Improve pod quota performance with a new strategy using a pod quota counter

  1. use du when available to calculate the pod size
  2. create a pod counter file to be updated at each write this avoid point 1 on each Write
  3. as a security use a maxAge parameter to decide a full recalculation on Write : 24h by default

The actual default pod-quota-file.json is kept
An optional quota/pod-quota-counter.json component is available and can be added

"import": [
      "css:config/storage/backend/pod-quota-file.json",
      "css:config/storage/backend/quota/pod-quota-counter.json",
]

Benchmark with 3000 files

Operation Time
Full pod walk (what default quota does per write) 365 ms
QuotaCounter bootstrap (one-time walk) 388 ms
O(1) counter read (per write check) 0.25 ms
Delta + sidecar persist (per write) 3.8 ms

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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