Thứ Bảy, 21 tháng 11, 2015

Openstack, QoS and CEPH RBD

Bài này được làm theo guide sau:
http://www.sebastien-han.fr/blog/2013/12/23/openstack-ceph-rbd-and-qos/

Có mấy thông số có thể áp cho volume:

  • total_bytes_sec: the total allowed bandwidth for the guest per second
  • read_bytes_sec: sequential read limitation (bytes/s)
  • write_bytes_sec: sequential write limitation
  • total_iops_sec: the total allowed IOPS for the guest per second
  • read_iops_sec: random read limitation
  • write_iops_sec: random write limitation

- Chuẩn bị 1 instance, tạo 1 disk default và attach vào instance.

- Tạo partion, tạo filesystem và mount vào sử dụng
- Test:
$ dd if=/dev/zero of=test.img bs=1M count=50 conv=fdatasync
Sử dụng fdatasync() để flush data xuống disk ( thay vì ghi tạm vào memorry buffer )
http://www.informit.com/articles/article.aspx?p=23618&seqNum=5
Kết quả: ~ 20MB/s

- Tạo QoS (limit write với tốc độ ~ 2MB/s)
# cinder qos-create low-write-bytes consumer="front-end" write_bytes_sec=2000000

- Tạo volume type
# cinder type-create low-write-bytes

- Gắn volume-type với qos
# cinder qos-associate <qos_specs> <volume_type_id>

- Tạo volume để test:
# cinder create --display-name vol_limit_speed --volume-type low-write-bytes 1

- Attach volume vào instance



- Test lại và kết quả. ~ 2MB/s


Không có nhận xét nào:

Đăng nhận xét