SeaWeedfs学习总结

SeaWeedFS是一种分布式文件系统,它管理数据卷而不是文件块,每个数据卷32GB,可扩展至更大。文件元数据仅16字节,存储在卷服务器上,主控服务器负责统一管理。系统支持高并发读写,利用Append-Only存储提高效率。基本操作包括通过HTTP REST接口进行文件上传、修改、删除和查看。


SeaWeedfs最初是作为一个对象存储来有效地处理小文件的。central master不管理central master中的所有文件元数据,而只管理文件卷,它通过这些volume servers管理文件及其元数据。这减轻了来自central master的并发压力,并将文件元数据分散到卷服务器中,从而允许更快的文件访问(O(1),通常只有一个磁盘读取操作)。每个文件的元数据只有40字节的磁盘存储开销。

1 架构

官网描述:
Usually distributed file systems split each file into chunks, a central master keeps a mapping of filenames, chunk indices to chunk handles, and also which chunks each chunk server has.
The main drawback is that the central master can’t handle many small files efficiently, and since all read requests need to go through the chunk master, so it might not scale well for many concurrent users.
Instead of managing chunks, SeaweedFS manages data volumes in the master server. Each data volume is 32GB in size, and can hold a lot of files. And each storage node can have many data volumes. So the master node only needs to store the metadata about the volumes, which is a fairly small amount of data and is generally stable…

在这里插入图片描述
seaWeedFs的文件存储的基本结构如上,我们从下往上看
数据卷:也就是是类似我们windowspan的D,E盘等物理磁盘,文件保存的物理介质。默认32GB,通过修改代码可以修改为64GB或者128GB,每个文件的最大不超过单个卷的大小。
官网描述:In the current implementation, each volume can hold 32 gibibytes (32GiB or 8x2^32 bytes). This is because we align content to 8 bytes. We can easily increase this to 64GiB, or 128GiB, or more, by changing 2 lines of code, at the cost of some wasted padding space due to alignment.
There can be 4 gibibytes (4GiB or 2^32 bytes) of volumes. So the total system size is 8 x 4GiB x 4GiB which is 128 exbibytes (128EiB or 2^67 bytes).
Each individual file size is limited to the volume size.

数据卷服务器:为了更方便的管理数据卷,通过该服务来对多个数据卷进行管理。其中,数据卷服务器保存了文件元数据,通过访问文件元数据就可以操作数据卷中的文件。从官网中我们了解到文件的元数据只有16字节大小。【文件句柄:表示文件对象的一个便于使用的引用】
官网描述:The actual data is stored in volumes on storage nodes. One volume server can have multiple volumes, and can both support read and write access with basic authentication. 一个卷服务对应多个卷
The actual file metadata is stored in each volume on volume servers. Since each volume server only manages metadata of files on its own disk, with only 16 bytes for each file, all file access can read file metadata just from memory and only needs one disk operation to actually read file data.每个文件的元数据16字节大小,Linu

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值