이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 37. Setting Up Pools


To set up cache tiering, you must have two pools. One will act as the backing storage and the other will act as the cache.

37.1. Setting Up a Backing Storage Pool

Setting up a backing storage pool typically involves one of two scenarios:

  • Standard Storage: In this scenario, the pool stores multiple copies of an object in the Ceph Storage Cluster.
  • Erasure Coding: In this scenario, the pool uses erasure coding to store data much more efficiently with a small performance tradeoff.

In the standard storage scenario, you can setup a CRUSH ruleset to establish the failure domain (e.g., osd, host, chassis, rack, row, etc.). Ceph OSD Daemons perform optimally when all storage drives in the ruleset are of the same size, speed (both RPMs and throughput) and type. See CRUSH Rules for details on creating a ruleset. Once you have created a ruleset, create a backing storage pool.

In the erasure coding scenario, the pool creation arguments will generate the appropriate ruleset automatically. See Create a Pool for details.

In subsequent examples, we will refer to the backing storage pool as cold-storage.

37.2. Setting Up a Cache Pool

Setting up a cache pool follows the same procedure as the standard storage scenario, but with this difference: the drives for the cache tier are typically high performance drives that reside in their own servers and have their own ruleset. When setting up a ruleset, it should take account of the hosts that have the high performance drives while omitting the hosts that don’t. See CRUSH Storage Strategy Examples for details.

In subsequent examples, we will refer to the cache pool as hot-storage and the backing pool as cold-storage.

For cache tier configuration and default values, see Pools - Set Pool Values.

37.3. Creating a Cache Tier

Setting up a cache tier involves associating a backing storage pool with a cache pool:

ceph osd tier add {storagepool} {cachepool}
Copy to Clipboard Toggle word wrap

For example:

ceph osd tier add cold-storage hot-storage
Copy to Clipboard Toggle word wrap

To set the cache mode, execute the following:

ceph osd tier cache-mode {cachepool} {cache-mode}
Copy to Clipboard Toggle word wrap

For example:

ceph osd tier cache-mode hot-storage writeback
Copy to Clipboard Toggle word wrap

Writeback cache tiers overlay the backing storage tier, so they require one additional step: you must direct all client traffic from the storage pool to the cache pool. To direct client traffic directly to the cache pool, execute the following:

ceph osd tier set-overlay {storagepool} {cachepool}
Copy to Clipboard Toggle word wrap

For example:

ceph osd tier set-overlay cold-storage hot-storage
Copy to Clipboard Toggle word wrap

37.4. Configuring a Cache Tier

Cache tiers have several configuration options. You may set cache tier configuration options with the following usage:

ceph osd pool set {cachepool} {key} {value}
Copy to Clipboard Toggle word wrap

See Set Pool Values for details.

37.5. Target Size and Type

Ceph’s production cache tiers use a Bloom Filter for the hit_set_type:

ceph osd pool set {cachepool} hit_set_type bloom
Copy to Clipboard Toggle word wrap

For example:

ceph osd pool set hot-storage hit_set_type bloom
Copy to Clipboard Toggle word wrap

The hit_set_count and hit_set_period define how much time each HitSet should cover, and how many such HitSets to store. Currently there is minimal benefit for hit_set_count > 1 since the agent does not yet act intelligently on that information. :

ceph osd pool set {cachepool} hit_set_count 1
ceph osd pool set {cachepool} hit_set_period 3600
ceph osd pool set {cachepool} target_max_bytes 1000000000000
Copy to Clipboard Toggle word wrap

Binning accesses over time allows Ceph to determine whether a Ceph client accessed an object at least once, or more than once over a time period ("age" vs "temperature").

Note

The longer the period and the higher the count, the more RAM the ceph-osd daemon consumes. In particular, when the agent is active to flush or evict cache objects, all hit_set_count HitSets are loaded into RAM.

37.6. Cache Sizing

The cache tiering agent performs two main functions:

  • Flushing: The agent identifies modified (or dirty) objects and forwards them to the storage pool for long-term storage.
  • Evicting: The agent identifies objects that haven’t been modified (or clean) and evicts the least recently used among them from the cache.

37.6.1. Relative Sizing

The cache tiering agent can flush or evict objects relative to the size of the cache pool. When the cache pool consists of a certain percentage of modified (or dirty) objects, the cache tiering agent will flush them to the storage pool. To set the cache_target_dirty_ratio, execute the following:

ceph osd pool set {cachepool} cache_target_dirty_ratio {0.0..1.0}
Copy to Clipboard Toggle word wrap

For example, setting the value to 0.4 will begin flushing modified (dirty) objects when they reach 40% of the cache pool’s capacity:

ceph osd pool set hot-storage cache_target_dirty_ratio 0.4
Copy to Clipboard Toggle word wrap

When the cache pool reaches a certain percentage of its capacity, the cache tiering agent will evict objects to maintain free capacity. To set the cache_target_full_ratio, execute the following:

ceph osd pool set {cachepool} cache_target_full_ratio {0.0..1.0}
Copy to Clipboard Toggle word wrap

For example, setting the value to 0.8 will begin flushing unmodified (clean) objects when they reach 80% of the cache pool’s capacity:

ceph osd pool set hot-storage cache_target_full_ratio 0.8
Copy to Clipboard Toggle word wrap

37.6.2. Absolute Sizing

The cache tiering agent can flush or evict objects based upon the total number of bytes or the total number of objects. To specify a maximum number of bytes, execute the following:

ceph osd pool set {cachepool} target_max_bytes {#bytes}
Copy to Clipboard Toggle word wrap

For example, to flush or evict at 1 TB, execute the following:

ceph osd pool hot-storage target_max_bytes 1000000000000
Copy to Clipboard Toggle word wrap

To specify the maximum number of objects, execute the following:

ceph osd pool set {cachepool} target_max_objects {#objects}
Copy to Clipboard Toggle word wrap

For example, to flush or evict at 1M objects, execute the following:

ceph osd pool set hot-storage target_max_objects 1000000
Copy to Clipboard Toggle word wrap
Note

If you specify both limits, the cache tiering agent will begin flushing or evicting when either threshold is triggered.

37.7. Cache Age

You can specify the minimum age of an object before the cache tiering agent flushes a recently modified (or dirty) object to the backing storage pool:

ceph osd pool set {cachepool} cache_min_flush_age {#seconds}
Copy to Clipboard Toggle word wrap

For example, to flush modified (or dirty) objects after 10 minutes, execute the following:

ceph osd pool set hot-storage cache_min_flush_age 600
Copy to Clipboard Toggle word wrap

You can specify the minimum age of an object before it will be evicted from the cache tier:

ceph osd pool {cache-tier} cache_min_evict_age {#seconds}
Copy to Clipboard Toggle word wrap

For example, to evict objects after 30 minutes, execute the following:

ceph osd pool set hot-storage cache_min_evict_age 1800
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat