作者:zhangshen 发表于:2014-12-29
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明
(http://blog.csdn.net/mrz001 )
先后在CentOS7+Juno+Ceph(rbd)环境和CentOS6.5+Juno+Ceph (rbd)环境测试过程中都发现使用glance上传镜像特别特别慢的问题,期间分别怀疑过
1、是否是Ceph的配置及优化问题
2、是否是CentOS7与Ceph这些版本的问题
3、手动rbd import非常快,但是glance上传却很慢
最后问题定位在glance问题,开启glance debug 后发现api.log显示
- - -] writing chunkat offset 0 add/usr/lib/python2.6/site-packages/glance_store/_drivers/rbd.py:365
- - -] writing chunkat offset 8208 add/usr/lib/python2.6/site-packages/glance_store/_drivers/rbd.py:365
注意这里的单位是B,因此rbd的块大小仅为8KB
查看vim /etc/glance/glance-api.conf配置 这里明明写着8M
# RADOS images willbe chunked into objects of this size (in megabytes).
# For bestperformance, this should be a power of two
#rbd_store_chunk_size=8
查找buglist后确定是glance_store的bug
https://bugs.launchpad.net/glance/+bug/1390386
注:
>>> 8 *(1024 ^ 2)
8208
>>> 8 *(1024 ** 2)
8388608