惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
B
Blog RSS Feed
L
LangChain Blog
Jina AI
Jina AI
爱范儿
爱范儿
C
Check Point Blog
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
月光博客
月光博客
GbyAI
GbyAI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Stack Overflow Blog
Stack Overflow Blog
V
V2EX
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Microsoft Azure Blog
Microsoft Azure Blog
The GitHub Blog
The GitHub Blog
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题

OneUptime Blog

How to Monitor Azure App Services (PaaS) with OpenTelemetry Grafana Stack vs OneUptime: DIY Observability or Unified Platform? Your AI Workloads Are About to Blow Up Your Observability Bill The Great Observability Consolidation Is Here How to Write Custom Object Classes for Ceph How to Write Custom Ceph Manager Modules How to Write a ceph.conf Configuration File How to Use Rook-Ceph with OpenShift How to Use Rook-Ceph with Longhorn for Comparison How to Configure Volume Snapshot Class for RBD in Rook How to Configure VolumeReplicationClass Scheduling Intervals in Rook How to Set Up Volume Replication with Rook-Ceph How to Create Volume Group Snapshots with Rook CSI How to Visualize Ceph Network Performance in Grafana How to Enable Virtual Host-Style Bucket Access in Rook How to View Runtime Configuration via Admin Socket How to View Quota Settings and Update Stats in Ceph RGW How to View PG Scaling Recommendations with autoscale-status How to View PG Distribution via Admin Socket How to View Performance Metrics in the Ceph Dashboard How to View OSD Performance Counters in Ceph How to View Connection Status via Admin Socket How to View Ceph Cluster Summary Dashboard via CLI How to Version Control Rook-Ceph Configuration How to Version Control Ceph Infrastructure with Terraform How to Verify Kubernetes Node Requirements for Rook-Ceph Deployment How to Verify Health Before and After Rook Upgrades How to Verify Data Integrity with Deep Scrubbing How to Verify Complete Rook-Ceph Cleanup How to Verify Backup Integrity from Ceph Snapshots
How to Configure Usage Log Key Transition in Ceph RGW
Nawaz Dhandala · 2026-03-31 · via OneUptime Blog

Ceph RGW stores usage accounting data in RADOS objects using a specific key format. Over time, the key format may change between releases, and understanding how to manage this transition ensures continuity of billing data.

Understanding Usage Log Keys

Usage logs track per-user bandwidth and request counts. They are stored in the default.rgw.usage pool (or the zone-specific usage pool) under keys based on user and time period. When upgrading Ceph or changing configuration, the key format can shift and old records may not merge correctly with new ones.

Check current usage log configuration:

ceph config get client.rgw rgw_usage_log_tick_interval
ceph config get client.rgw rgw_usage_log_flush_threshold
ceph config get client.rgw rgw_usage_max_shards
ceph config get client.rgw rgw_usage_max_user_shards

Configuring Key Transition Parameters

Set the usage log shard count and flush thresholds via the Ceph config database:

# Set number of shards for usage log storage
ceph config set client.rgw rgw_usage_max_shards 32

# Set per-user shard count
ceph config set client.rgw rgw_usage_max_user_shards 1

# Flush interval in seconds
ceph config set client.rgw rgw_usage_log_tick_interval 30

# Flush when this many records accumulate
ceph config set client.rgw rgw_usage_log_flush_threshold 1024

Verifying the Configuration

After applying, restart RGW pods in a Rook-managed cluster:

kubectl -n rook-ceph rollout restart deployment rook-ceph-rgw-my-store-a

Then verify usage logs are being written:

radosgw-admin usage show --uid=testuser --start-date=2026-01-01 --end-date=2026-03-31

Sample output:

{
    "entries": [...],
    "summary": [
        {
            "user": "testuser",
            "categories": [
                { "category": "get_obj", "bytes_sent": 1048576, "ops": 100 }
            ]
        }
    ]
}

Trimming Old Usage Logs

After a key transition, trim stale usage log data to reclaim space:

# Trim all usage logs older than a date
radosgw-admin usage trim --start-date=2025-01-01 --end-date=2025-12-31

# Trim for a specific user
radosgw-admin usage trim --uid=olduser

Rook CephObjectStore Context

In a Rook-managed cluster, apply configuration changes via the Ceph config override:

apiVersion: ceph.rook.io/v1
kind: CephObjectStore
metadata:
  name: my-store
  namespace: rook-ceph
spec:
  gateway:
    instances: 2
    port: 80

Use CephConfig or config override maps to tune rgw_usage_max_shards without editing the CR directly.

Summary

Ceph RGW usage log key transition involves setting shard counts, flush intervals, and trimming old records after upgrades. Properly configuring rgw_usage_max_shards and rgw_usage_log_flush_threshold ensures accurate billing data collection. Always restart RGW instances after changing these parameters.