日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

ceph rgw java_ceph rgw multisite基本用法

發布時間:2023/12/1 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ceph rgw java_ceph rgw multisite基本用法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Realm: Zonegroup: 理解為數據中心,由一個或多個Zone組成,每個Realm有且僅有 一個Master Zonegroup,用于處理系統變更,其他的稱為Slave Zonegroup,元數據與Master Zonegroup保持一致;

Zone: Zone是一個邏輯概念,包含一個或者多個RGW實例。每個Zonegroup有且僅有一個Master Zone,用于處理bucket和user等元數據變更。

Period: 保存realm當前的配置信息,使用epoch維護版本信息。

Metadata Sync:Zone是一個邏輯概念,包含一個或者多個RGW實例。每個Zonegroup有且僅有一個Master Zone,用于處理bucket和user等元數據變更。

systemctl restart ceph-radosgw@rgw.hostname

創建realm:

A realm contains the notion of periods. Each period represents the state of the zone group and zone configuration in time.Each time you make a change to a zonegroup or zone, update the period and commit it.

realm里所有的元數據名稱都是全局唯一的,無法創建同名的用戶(uid)和bucket, container;

radosgw-admin realm create --rgw-realm=Giant --default

查看存在的realm:

radosgw-admin realm list

創建Master zonegroup:

刪除 Default ZoneGroup并創建Master ZoneGroup

為了前向兼容,所以會存在默認的zonegroup,需要刪除

radosgw-admin zonegroup delete --rgw-zonegroup=default

radosgw-admin zonegroup create --rgw-zonegroup=beijing --endpoints=beijing.com --master --default

查看zonegroup相關信息:

radosgw-admin zonegroup list

radosgw-amdin zonegroup get {zonegroup name}

創建Master zone:

刪除default Zone 并創建Master Zone

為了前向兼容,所以默認存在zone,需要刪除

radosgw-admin zone delete --rgw-zone=default

#創建Master zone,并指定zonegroup

radosgw-admin zone create --rgw-zonegroup=beijing --rgw-zone=beijing --endpoints=beijing.com --access-key=admin --secret=admin --default --master

Secondary Zones:

You must execute metadata operations, such as user creation, on a host within the master zone. The master zone and the secondary zone can receive bucket operations, but the secondary zone redirects bucket operations to the master zone. If the master zone is down, bucket operations will fail.

Bucket Sharding

主要為了解決.rgw.buckets.index pool的性能問題;該pool下存放了bucket index data;

rgw_override_bucket_index_max_shards

default: 0 #不啟用分片

推薦值: {number of objects expected in a bucket / 100,000}

max value: 7877

The default value for rgw_max_objs_per_shard is 100k objects per shard.

動態修改sharding值: rgw_dynamic_reshading = true

rgw_reshard_num_logs: The number of shards for the resharding log. The default value is 16.

rgw_reshard_bucket_lock_duration: The duration of the lock on a bucket during resharding. The default value is 120 seconds.

rgw_dynamic_resharding: Enables or disables dynamic resharding. The default value is true.

rgw_max_objs_per_shard: The maximum number of objects per shard. The default value is 100000 objects per shard.

rgw_reshard_thread_interval: The maximum time between rounds of reshard thread processing. The default value is 600 seconds.

將bucket加入resharding 隊列:

radosgw-admin bucket reshard add --bucket --num-shards

查看resharding隊列:

radosgw-admin bucket reshard list

手動執行reshard:

radosgw-admin bucket reshard process

取消在bucket resharding期間取消resharding:

radosgw-admin bucket reshard cancel --bucket

壓縮:compression

壓縮插件: zlib: 支持 snappy, zstd: 預覽版

radosgw-admin zone placement modify --rgw-zone=default --placement-id=default-placement --compression=zlib

After enabling or disabling compression, restart the Ceph Object Gateway instance so the change will take effect.

$ radosgw-admin bucket stats --bucket= { ... "usage": { "rgw.main": { "size": 1075028, "size_actual": 1331200, "size_utilized": 592035, "size_kb": 1050, "size_kb_actual": 1300, "size_kb_utilized": 579, "num_objects": 104 } }, ... }

The size_utilized and size_kb_utilized fields represent the total size of compressed data in bytes and kilobytes respectively.

Quota 管理:

Quotas include the maximum number of objects in a bucket and the maximum storage size in megabytes.

IMPORT: Buckets with a large number of objects can cause serious performance issues.

The recommended maximum number of objects in a one bucket is 100,000. To increase this number,

configure bucket index sharding

Set User Quotas:

radosgw-admin quota set --quota-scope=user --uid= [--max-objects=] [--max-size=]

eg:

radosgw-admin quota set --quota-scope=user --uid=johndoe --max-objects=1024 --max-size=1024

A negative value for num objects and / or max size means that the specific quota attribute check is disabled.

Ebable and Disable User Quotas:

#radosgw-admin quota enable --quota-scope=user --uid=

#radosgw-admin quota disable --quota-scope=user --uid=

Set Bucket Quotas:

#radosgw-admin quota set --uid= --quota-scope=bucket [--max-objects=] [--max-size=

Enable and Disable Bucket Quotas

#radosgw-amdin quota enable --quota-scope=bucket --uid=

#radosgw-admin quota-disable --quota-scope=bucket --uid=

Get Quota Settings

#radosgw-admin user info --uid=

Update Quota Stats

#radosgw-admin user stats --uid= --sync-stats

Get User Quota Usage Stats

#radosgw-admin user stats --uid=

Quota Cache:

rgw bucket quota ttl, rgw user quota bucket sync interval, rgw user quota sync interval.

統計用戶

#radosgw-admin usage show --uid=johndeo --start-data=2012-03-01 --end-date=2012-04-01

#radosgw-amdin usage show --show-log-entri

清理孤兒對象:

create a new log pool:

1、rados mkpool .log

2、radosgw-admin orphans find --pool= --job-id= [--num-shards=] [--orphan-stale-secs=]

3、radosgw-admin orphans find --pool=.rgw.buckets --job-id=abc123

4、Clean up the search data:

radosgw-amdin orphans finish --job-id=abc123

Zones:

Ceph Object Gateway supports the notion of zones. A zone defines a logical group consisting of one or more Ceph Object Gateway instances.

總結

以上是生活随笔為你收集整理的ceph rgw java_ceph rgw multisite基本用法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。