Skip to content

lusr3/SFCaS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SFCaS(Small File Combine and Search)

本项目实现了基于 FUSE 的用户态文件系统,在合并的大文件中通过文件名查找小文件内容,融合了 sindex 学习索引用于索引查询,并通过 gRPC 实现了简单的分布式应用。

sindex 论文

sindex 项目地址

Prepare

索引文件内容

testDir 目录下的 index 内容
`````````````````````````````````````````
``small file num     (8 bytes)         ``
`````````````````````````````````````````
``needle_size        (4 bytes)         ``
``flags              (1 bytes)         ``      
``offset             (8 bytes)         ``      
``size               (4 bytes)         ``         
``filename           ([1, 255] bytes)  ``           
`````````````````````````````````````````

运行

  1. 编译生成所需二进制文件,创建相关测试目录:

    $ make build
    
  2. 生成示例小文件并合并(以创建 10000 个文件为例):

    $ make create
    $ 10000
    $ make combine
    
  3. 运行主程序,在该工作目录下,将 testDir 映射到 mountDir 上,并将基于 FUSE 实现的文件系统挂载到 mountDir

    $ make run
    
  4. 新开一个终端进行测试(以查询一个文件为例):

    $ make test
    Test for:
    one file(0) | multiple test(1) | time test(2) | all test(3):0
    Look up for file id:0
    size: 13 buf: hello from 0
    
    Cost time: 775us
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published