BlueStore 缓存大小设置#yyds干货盘点#

网友投稿 448 2022-10-08

BlueStore 缓存大小设置#yyds干货盘点#

1、OSD内存

OSD内存主要配置项主要分为两部分

1) OSD内存大小 -- OSD 分配的缓存大小

2) OSD内存使用 -- OSD 使用已分配内存大小的占百分比

2、OSD内存大小

2.1 介绍

The amount of memory consumed by each OSD for BlueStore’s cache is determined by the bluestore_cache_size configuration option. If that config option is not set (i.e., remains at 0), there is a different default value that is used depending on whether an HDD or SSD is used for the primary device (set by the bluestore_cache_size_ssd and bluestore_cache_size_hdd config options).

BlueStore 每个 OSD 消耗的内存 是由配置项 "bluestore_cache_size" 所决定的;如果配置项没有设置(例如,值为 0),会有一个默认值被使用,这个默认值取决于主设备("block"所指向的设备)的性质(HDD 或者 SSD),配置项分别为 "bluestore_cache_size_hdd" 和 "bluestore_cache_size_ssd"

2.2 内存大小配置项

OSD 内存大小主要有 三个 配置项

options

description

bluestore_cache_size

The amount of memory BlueStore will use for its cache. If zero, bluestore_cache_size_hdd or bluestore_cache_size_ssd will be used instead.

bluestore_cache_size_hdd

The default amount of memory BlueStore will use for its cache when backed by an HDD.

bluestore_cache_size_ssd

The default amount of memory BlueStore will use for its cache when backed by an SSD.

2.2.1 bluestore_cache_size

option

type

required

default

bluestore_cache_size

Integer

Yes

0

2.2.2 bluestore_cache_size_hdd

option

type

required

default

bluestore_cache_size_hdd

Integer

Yes

1 * 1024 * 1024 * 1024 (1 GB)

2.2.3 bluestore_cache_size_ssd

option

type

required

default

bluestore_cache_size_ssd

Integer

Yes

3 * 1024 * 1024 * 1024 (3 GB)

3、OSD内存使用配置

3.1 介绍

BlueStore and the rest of the Ceph OSD does the best it can currently to stick to the budgeted memory. Note that on top of the configured cache size, there is also memory consumed by the OSD itself, and generally some overhead due to memory fragmentation and other allocator overhead.

The configured cache memory budget can be used in a few different ways:

Key/Value metadata (i.e., RocksDB’s internal cache)BlueStore metadataBlueStore data (i.e., recently read or written object data)

Cache memory usage is governed by the following options: bluestore_cache_meta_ratio, bluestore_cache_kv_ratio, and bluestore_cache_kv_max. The fraction of the cache devoted to data is 1.0 minus the meta and kv ratios. The memory devoted to kv metadata (the RocksDB cache) is capped by bluestore_cache_kv_max since our testing indicates there are diminishing returns beyond a certain point.

BlueStore OSD 会尽可能的使用已配置的内存空间大小,但不会达到 该缓存空间 配置的最大值,因为 OSD本身也会消耗一些内存,通常还有一些内存碎片 和 分配器 占用部分内存

可以通过不同的方法 配置 可用缓存空间大小,主要有 XX 种方法

Key/Value 元数据信息 (例如,RocksDB 的内部缓存)BlueStore 元数据BlueStore 数据信息(例如,最近读写的 object)

缓冲内存主要被三个配置选项管理控制 : bluestore_cache_meta_ratio、bluestore_cache_kv_ratio 和 bluestore_cache_kv_max;The fraction of the cache devoted to data is 1.0 minus the meta and kv ratios; 测试结果表明,超过一定程度,内存 kv metadate(RocksDB 缓存) 的对应大小会被 "bluestore_cache_kv_max" 所覆盖

3.2 OSD内存使用配置选项

OSD内存使用配置主要包括 三个 配置项

options

description

bluestore_cache_meta_ratio

The ratio of cache devoted to metadata.

bluestore_cache_kv_ratio

The ratio of cache devoted to key/value data (rocksdb).

bluestore_cache_kv_max

The maximum amount of cache devoted to key/value data (rocksdb).

3.2.1 bluestore_cache_meta_ratio

option

type

required

default

bluestore_cache_meta_ratio

Integer

Yes

0.01

3.2.2 bluestore_cache_kv_ratio

option

type

required

default

bluestore_cache_kv_ratio

Integer

Yes

0.99

3.2.3 bluestore_cache_kv_max

option

type

required

default

bluestore_cache_kv_ratio

Floating point

Yes

512 * 1024*1024 (512 MB)

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Java 中很好用的数据结构(你绝对没用过)
下一篇:Azure Virtual Desktop 概述
相关文章

 发表评论

暂时没有评论,来抢沙发吧~