OneFS中的L3, SSD strategies的概念辨析
PowerScale的操作系统是OneFS,二者是硬件与软件的搭配关系。混合节点(hybrid node)产品,和归档节点(archive node)产品中,是带有一块或两块SSD盘的。本文讨论的就是这一或两块SSD盘的使用的配置,以及这些配置之间的关系。
OneFS的数据分层和管理框架叫做SmartPools,SmartPools提供了五种SSD的使用策略(SSD strategies),用于提升数据(data)或元数据(metadata)的访问速度。
1. Metadata read acceleration—Creates a preferred mirror of file metadata on SSDs and writes the rest of the metadata, plus all the file data, to HDDs.
2. Metadata read/write acceleration—Creates all the mirrors of a file's metadata on SSDs.
3. Avoid SSDs—Never uses SSDs; writes all associated file data and metadata to HDDs only. This strategy is used when insufficient SSD storage capacity exists and you want to prioritize its utilization.
4. Data on SSDs—Use SSD pools for both data and metadata. Note that FEC is always stored on SSD because it must be modified by writes. For mirroring, there is no extra mirror option as with metadata; all mirrors are on SSD. This is because the benefit of a single mirror over FEC-on-SSD is very small.
5. SSDs for L3 cache—A node pool's entire set of SSDs are used for L3, or SmartFlash, read caching.
--摘自《Storage Tiering with Dell PowerScale SmartPools》
大白话来说,就是:
1. Metadata read acceleration:即metadata放一份拷贝在SSD,文件数据放HDD。
2. Metadata read/write acceleration:即metadata的所有拷贝都放在SSD上,当然啦,文件数据还是放在SSD上。
3. Avoid SSDs:就当没有SSD盘,啥都不往上放。(这个选项最豪横,最无脑,选这个不知道是图于啥,也许是有钱任性吧。-_-||)
4. Data on SSDs:所有的metadata都放在SSD上,文件数据中所有的校验码都放在SSD上,这样对写操作非常有利,因为写的时候总是要修改校验码的。(一般这个也不常用,我反正没见过谁这么用的)
5. L3:把SSD当做更多一层的read cache,相当于除了内存之外,又多加了两块SSD作为读缓存,增加缓存命中的概率,减少从HDD盘上读取数据的机会,从而提高读性能。
虽然这五个都跟SSD的使用方式相关,但是修改它们还不在一个地方,命令也不一样,非常容易混淆,搞不清楚它们之间的关系。注意,白皮书上有这么一句关键的话:“Also, L3 cache cannot co-exist with other SSD strategies, except for Global Namespace Acceleration(GNA).”GNA咱们先放一放,只要特别老的cluster才需要开启这个选项。关键是,L3和其他的SSD策略不能共存!
也就是说,只要开了L3,其他的配置不用动,不用改,自动失效。L3关了,再看具体的SSD的使用策略。
经过测试,查看某metadata intensive的workload的性能表现,某HDD集群,采用metadata read/write策略,达到了约20万的ops/sec。而L3的策略,同样的集群,只能达到接近7万的ops/sec。由此推断,开启了L3之后,metadata是不会一直有一份拷贝存放在SSD中的。
那么我们看看,如何打开L3呢?先看看L3有没有打开。
h70001-1# isi storagepool nodepools ls -v | grep "L3" L3 Enabled: No L3 Migration Status: storage
使用下面的命令打开L3:
isi storagepool nodepools modify a300_120tb_6.4tb-ssd_96gb --l3 true -f
关闭也很简单,把上面的true改为false就可以了。注意,关掉L3之后,SSD中的文件数据需要迁移回HDD盘,这个工作是由一个叫做SmartPools的job完成的。做测试的时候,可以手动启动一个这个job,给个High的Policy,让它跑的快一点。
好,我们来看其他的SSD Strategy。查看当前的SSD Strategy的命令如下:
a30001-1# isi filepool default-policy view Set Requested Protection: default Data Access Pattern: concurrency Enable Coalescer: Yes Enable Packing: No Data Storage Target: anywhere Data SSD Strategy: metadata Snapshot Storage Target: anywhere Snapshot SSD Strategy: metadata Cloud Pool: - Cloud Compression Enabled: - Cloud Encryption Enabled: - Cloud Data Retention: - Cloud Incremental Backup Retention: - Cloud Full Backup Retention: - Cloud Accessibility: - Cloud Read Ahead: - Cloud Cache Expiration: - Cloud Writeback Frequency: - Cloud Archive Snapshot Files: - ID: - a30001-1#
Metadata read是默认选项,上面的就是metadata read。而metadata write的修改一般我们做测试的时候,是不会修改file pool policy的,就在某一个感兴趣的目录下,修改那个目录的SSD Strategy就可以了,举例如下:
# 用这个命令来查看这个目录的SSD Strategy是什么 isi get -dD /ifs/data/testdir/ | grep -i "ssd strategy" # 举例如下: h70001-1# isi get -dD /ifs/data/testdir/ | grep metadata-write * SSD Strategy: metadata-write h70001-1# # 使用下面的命令来打开某目录的metadata-write策略 isi set -s metadata-write /ifs/data/testdir isi_sysctl_cluster efs.bam.layout.ssd.sys_btree.mirrors=3 isi_sysctl_cluster efs.bam.layout.ssd.sys_delta.mirrors=3
后续所有这个目录下新生成的文件和目录,都会使用metadata-write的策略。
参考资料
=====================
Migration to L3 cache
OneFS Metadata
https://infohub.delltechnologies.com/en-us/p/onefs-metadata/
OneFS Metadata Overview
http://www.unstructureddatatips.com/onefs-metadata-overview/
Metadata read/write acceleration