3月 062018
 

通过命令行创建纠删码规则

  • 首先,需要创建 erasure-code-profile ,当然,也可以使用默认的 erasure-code-profile ,列出现有的 erasure-code-profile :
  • 查看指定erasure-code-profile 的详细内容:
  • 自定义erasure-code-profile , 创建一个只用hdd的 erasure-code-profile:

    可用的选项有:

    • crush-root: the name of the CRUSH node to place data under [default: default].
    • crush-failure-domain(故障域): the CRUSH type to separate erasure-coded shards across [default: host].
    • crush-device-class(设备分类): the device class to place data on [default: none, meaning all devices are used].
    • k and m (and, for the lrc plugin, l): these determine the number of erasure code shards, affecting the resulting CRUSH rule.
  • 根据erasure-code-profile 创建crush rule:
  • 查看crush rule:
  • 创建一个使用纠删码规则的pool

    语法: osd pool create <poolname> <int[0-]> {<int[0-]>} {replicated|erasure} [<erasure_code_profile>] {<rule>} {<int>}
    尽管crush rule 也是根据erasure_code_profile来创建的,但是这里创建纠删码pool的时候,还是需要明确指定erasure_code_profile
    参考: http://docs.ceph.com/docs/master/rados/operations/pools/
  • 调优:

    目前,这个fast_read 之针对纠删码池有效的
  • 如果需要在该pool创建rbd,则需要:
    • 参考: http://docs.ceph.com/docs/master/rados/operations/erasure-code/
    • 创建一个replication pool来做cache tier

      其实,不仅纠删码池可以做cache tier,replication 池子也能做cache tier,因为,我们可能有一批ssd盘,我们就可以在ssd上创建pool来充当sas盘的cache tier以提高性能;结合纠删码、replication、sas、ssd,我们可以做出多种不同性能的存储用以应对不同的场景。
    • 然后 ceph 会提示: 1 cache pools are missing hit_sets  , 还要设置 hit_set_count 和 hit_set_type

通过编辑crushmap来添加规则

参考:

 

实战中的问题:

  1. 12个SAS在 60MB/s 的速度evict的时候,磁盘都很慢了,每个盘达到100左右的tps, 20MB/s左右的读写;比较坑的是,我基本没法控制evict的速度,只好静静地等待evict结束
  2. evict 的同时还在promote, promote的速度倒是可控,但是 osd_tier_promote_max_bytes_sec 默认是5242880 字节(并不算很大); 问题:池子已经没有写入了,为何还在evict和promote?
  3. 修改cache-mode试试: 按说,修改cache-mode为proxy时,就不应该再出现evict和promote了

    果然,修改之后,ceph -s 立刻就看不到evict和promote了 🙂
  4. 查看cache-mode:

 Posted by at 下午 5:01

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据