Ceph Cache Tier

Source: Internet
Author: User

Cachetier is a ceph server-side caching scheme, simply add a layer of cache layer, the client directly with the cache layer to deal with , improve access speed, the backend has a storage layer, Actually store large amounts of data.

The principle of tiered storage is that the access to the stored data is hot, and the data is not evenly accessed. There is a general rule called the 28 principle, that is, 80% 's application only accesses 20% data, this 20% data becomes the hot data, If you save these hotspot data on SSD disks with high performance, you can increase response time.

high-performance storage, typically bySSDdisk composition, calledCachelayer, Hotlayer,Cache PoolorHot Pool,access to low-performance storage tiers is calledBase PoolorData Pool,Cold Pooland so on.

One,ceph cache mode

1. WriteBack mode:

The client writes to the cache layer ,caches the cache layer, and writes to the back layer in a timely manner , removing the cache layer data. When the client reads, if the cache layer does not exist the data, then migrating data from the back layer, service read requests, has been able to service to the validity period, suitable for a large number of modified data application scenarios (example video editing , online transaction processing class application), Good " hot " data.

2. Read-only mode:

read requests are sent directly toCache Pool, write requests do not go throughCache Pool,instead, it is sent directly toBack_pool.when the client writes data, it writes directly to theBacklayer, when the client reads,CacheLayer fromBacklayer to copy data and service within the validity period, the expired data will be deleted,The advantage of this approach is thatCache Poolset as a single copy on it, even ifCache Poolthe layer fails, and there is no loss of data. This mode is suitable for applications where data is written once and read more than once. examples, video, Audio and more. Suitable for"Cold"data.

3. Read-forward mode:

write the time, and WriteBack mode; When reading, if the object is not present in the cache layer, the read request is forwarded to the back layer.

4. Read-proxy mode:

and the The Read-forward pattern is similar, when reading is not forwarding the client's request, but on behalf of the client to read the back layer of data.

Second, use Cache Tier Steps

1. Creation of 2 pool

Ceph OSD poolcreate cachepool 150ceph OSD poolcreate Backpool 150 150

2. 2 pool connection

Cephosd tier Add Backpool cachepool

3. Setting the cache mode

Ceph OSD Tiercache-mode Cachepool writeback#writeback|forward|readonly|readforward Four modes available on request


4. Set Over-lay

so-called Overlay , that is, all requests sent to the back-end storage tier are forwarded to the Cache layer.

Ceph OSD Tierset-overlay Backpool Cachepool

Third, Configure Cache tier

CEPHOSD Pool Set Foo-hot hit_set_type bloomcephosd Pool set foo-hot hit_set_count 1cephosd Pool Set Foo-hot hit_set_period 3600 # 1 Hourceph OSD Pool Set foo-hot target_max_bytes1000000000000 # 1 tbceph OSD Pool Set foo-hottarget_max_objects 1000000 # 1million Objectsceph OSD Pool set Foo-hotcache_min_flush_age # minutesceph OSD Pool Set FOO-HOTCA Che_min_evict_age 1800 # Minutes

threshold of the Cache layer

Ceph OSD Pool Set cachepooltarget_max_bytes 1099511627776ceph OSD Pool Set cachepooltarget_max_objects 1000000ceph OSD Poo L Set Cachepoolcache_target_dirty_ratio 0.4ceph OSD Pool set Cachepoolcache_target_full_ratio 0.8ceph OSD Pool Set Cachepo OL cache_min_flush_age 600ceph OSD Pool Set Cachepoolcache_min_evict_age 1800

Delete cache tier (read-only)

Ceph OSD Tier Cache-mode Cachepool noneceph osd tier Remove Backpool Cachepool

Delete cache tier (Write-back)

Ceph OSD Tier Cache-mode cachepool forwardrados-p cachepool lsrados-p cachepool cache-flush-evict-allceph OSD Tier Remov E-overlay backpoolceph OSD Tier Remove Backpool Cachepool


This article from "Life is endless, struggle not only!" "Blog, be sure to keep this provenance http://linuxnote.blog.51cto.com/9876511/1791160

Ceph Cache Tier

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.