简体   繁体   English

Ceph 原始存储使用与池存储使用

[英]Ceph raw storage usage versus pool storage usage

I am new user of Ceph.我是 Ceph 的新用户。

My Ceph server is running version 12.2.5.我的 Ceph 服务器运行的是 12.2.5 版。 It has 3 nodes and each node is having 1 OSD with 4TB HDD.它有 3 个节点,每个节点有 1 个 OSD 和 4TB 硬盘。

The ceph.conf ceph.conf

osd pool default size     = 3
osd pool default min size = 2

I have upload 252GB data to Ceph.我已将 252GB 数据上传到 Ceph。

For my understanding, the raw storage usage should be around 3 times because of setting osd pool default size = 3 .根据我的理解,由于设置osd pool default size = 3 ,原始存储使用量应该是 3 倍左右。

But now my global raw storage usage is almost 6 times of my data (1605GB / 252GB = 6.3)但是现在我的全局原始存储使用量几乎是我数据的 6 倍(1605GB / 252GB = 6.3)

GLOBAL:
    SIZE       AVAIL     RAW USED     %RAW USED
    11165G     9560G        1605G         14.38
POOLS:
    NAME                          ID     USED      %USED     MAX AVAIL     OBJECTS
    .rgw.root                     8       1113         0         3000G           4
    default.rgw.control           9          0         0         3000G           8
    default.rgw.meta              10     21502         0         3000G          72
    default.rgw.log               11         0         0         3000G         269
    default.rgw.buckets.index     15         0         0         3000G         427
    default.rgw.buckets.data      16      256G      7.88         3000G     6522963

Is anyone have the same problem on Ceph?有人在 Ceph 上有同样的问题吗?

Update更新

I think I find out the reason.我想我找到了原因。 Most of my file is a small file, but in Ceph version 12.2.5 (bluestore), bluestore have minimum allocate size bluestore_min_alloc_size_hdd = 65536 , therefore if the file is small than 64k, it still use 64k to store it.我的大部分文件都是一个小文件,但是在 Ceph 12.2.5 (bluestore) 版本中,bluestore 有最小分配大小bluestore_min_alloc_size_hdd = 65536 ,因此如果文件小于 64k,它仍然使用 64k 来存储它。

I tested upload 2000 files (each 64k) and 3200 files (each 40k), both total around 128M我测试了上传 2000 个文件(每个 64k)和 3200 个文件(每个 40k),总共大约 128M

The raw usage of 64k file is 410M, close to 384M (2000 * 64k * 3) 64k文件的原始使用量为410M,接近384M(2000 * 64k * 3)

The raw usage of 40k file is 602M, close to 614M (3200 * 64k * 3) 40k文件的原始使用量为602M,接近614M(3200 * 64k * 3)

I am having the same issue.我有相同的问题。 I have only realised this after creating the pool.我是在创建池后才意识到这一点的。 You can change the min_alloc to 4096 but I don't know how that will perform for you.您可以将 min_alloc 更改为 4096,但我不知道这对您有何影响。 I would advise though to go halfway to 32k or 16k but not lower.我建议虽然中途达到 32k 或 16k,但不要降低。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM