分布式文件系统受传统磁盘文件系统影响,大多使用固定大小的对象或者块来组织和管理文件。定长的分块不适合随机写或插入写,开销大且性能差,但典型的用户约有25%的文件操作是随机写。针对上述现状,提出一种基于内容的可变长文件分块方法,使用拉宾指纹算法对文件进行分块,并根据文件的内容标识文件块。为更准确地指定写类型,提高写性能,给出与POSIX语义兼容的写接口。通过修改Ceph实现一种新的分布式文件系统VarFS,提供文件的可变长分块并支持新的写接口。实验结果表明,由于减少网络数据传输量,VarFS在随机写延迟和带宽消耗量上比Ceph减少了1个~2个数量级。
Inherited from traditional disk file systems,most Distributed File Systems(DFS) organize and manage files based on objects or chunks of fixed sizes, which is expensive and works poorly for random writing or inserting. But approximately 25% of file operations from a typical user are random writing. In order to change this status, this paper puts forward a file blocking method based on variable-sized contents,and it uses Rabin fingerprint algorithm to block the file and identify it according to its contents. A new writing interface which is semantic compatible with POSIX is proposed to accurately specify the writing type and improve writing performance. It presents a novel DFS named VarFS to implement all the design proposed above through modifying the Ceph. Experimental results show that VarFS can reduce the necessary reading and writing back data of update operation, which consequently alleviates amount of data transfer, accordingly it can achieve 1 - 2 orders of magnitude less latency and bandwidth consumption than Ceph on random writing and bandwidth consumption.